text:
Update lxml to 3.6.0 and added dependencies

Hi, I noticed that my previously PR didn't include dependencies as I didn't make static build.
I use VS2015 and for static build I'll need VS2010, and I'm not willing to install it just to make such build.
So this PR updates to latest lxml for win32 with Python 3.3, and includes dependencies.
Cheers

updated wrong folder, huh

source: gharchive/pull-request

repo: eerohele/sublime-lxml

license: mit

license_type: permissive

license_source: bigquery


text:
Where to go for questions?

I know issues isn't really the right place for this but I am trying to fins some answer to questions about this project. Could we open up the discussions GH feature? Or maybe a discord or something like that?

Hi!
There's a Zulip chat: https://derw.zulipchat.com/join/4bfr6yyf7ow75eya4hmztx6g/
That's the place to go right now, or Twitter.

twitter would not allow me to DM you. My account may have been blacklisted for inactivity?

Discussions is enabled now for anyone looking for a forum to discuss in: https://github.com/eeue56/derw/discussions

source: gharchive/issue

license_source: github-api


text:
Switch to ember browserify

Move from broccoli-browserify to ember-browserify
Add in a blueprint that adds ember-browserify to project
Fixes #17

Moving to ember-browserify is good.
Is there a reason we can't just make is a dependency instead of using a blueprint?  Alternatively, if it really needs to be added to the containing application instead of nested, it should probably be listed as a peerDependency.

@ef4 I went ahead and moved that stuff out of the blueprint and just added as dependency.

This would be awesome! I'd love to use ember-code-snippet for our docs :)

👍

@ef4 would you be able to publish a new release with this in it?

I published 1.7.0 with this, and then realized it breaks apps that don't already have browserify as a top-level dependency. Reverted and published 1.8.0 to go back until this can be fixed.

@ef4 I was running through ember-browserify docs a bit. It seems like this is a known issue.
Should I go ahead and move the addition of the addon back into the blueprint? I'm not sure how we would be able to guarantee that they run the blueprint gen again though.
Open to recommendations.

What about an update to the readme? Requiring browersify installa and a major version bump?

Yes, that sounds about right.

major version bump
list ember-browserify in peerDependencies in package.json
if ember-browserify is not correctly installed, fail with a friendly message and instructions how to fix


text:
Read-only trackedParam

A read-only version of trackedParam decorator would be great. I understand that having more than one active component (or controller, route, service, ...) managing the same query parameter could be a footgun. Preventing it by API design is a good decision in my opinion. But more than one component (or controller, route, service, ...) should be able to read the current value to prevent property drilling or services only needed to passthrough query parameter read access.

The reason trackedParam is a property decorator is that the property is the true owner of the state. Since that would not be true for this read-only one, I think it would be better if it was something like a resource.
But also, I'm not convinced it's a good idea. The way I'm thinking about trackedParam, it doesn't change the data flow within the application. It works like normal tracked, and can even be normal tracked in environments without global routing.
If you want to share a tracked value across disparate parts of an application, you can use @tracked on a service. The same is necessarily true of @trackedParam. I think that would be better than offering a special-purpose read-only API.

The reason trackedParam is a property decorator is that the property is the true owner of the state.

Shouldn't the URL be the true owner of the state and trackedParam only be a tracked proxy of the value in the URL? Or is there a limitation of the browser's APIs preventing us from reliable detect all changes to the URL?

license: MIT


text:
support for sphinx

author of sphinx here. would love to have sphinx covered by your tool: https://github.com/stef/pwdsphinx/ - and the addons https://github.com/stef/websphinx-firefox and https://github.com/stef/websphinx-chrom

Hello, I will take a look and if the manager store credentials in plaintext format and there is a way of extracting the data, I will include it to the tool.
Thank you for the suggestion.

there is no plaintext credentials. it computes an OPRF(k,masterpassword) = output_password. and the oprf is basically hash(masterpassword || hash(masterpassword)*k) - where * is a scalar multiplication on the curve 25519, k is in a remote compartment - a server on the internet, or a dedicate hw device.

If the credentials are encrypted at all times, there is no way to dump them. So, this password manager cannot be included in the tool.

authors: efchatz stef

repo: efchatz/pandora


text:
[Request] implement ISJSON check

EntityFramework Core 7 (released Nov 2022) implements the support to JSON data soring/querying via Linq.
https://devblogs.microsoft.com/dotnet/announcing-ef7-release-candidate-2/
Microsoft suggests the use of the ISJSON CHECK to improve performance:
https://learn.microsoft.com/en-us/sql/relational-databases/json/optimize-json-processing-with-in-memory-oltp
EF does not seem to provide an option to enable the ISJSON check. Any plan to provide it in this extension?

@pietrodicaprio I don't think adding an ISJSON check constraint would improve performance - it would only make sure that only JSON data is ever present in the column (and in fact would hurt performance by doing so). Can you point to where you saw that?
In any case, this plugin is just a shortcut for some common constraints - you can always define your own check constraints yourself.

SQL Server: ISJSON
SQLite: json_valid
MySQL: JSON_VALID
PostgreSQL: not needed, since the column type (jsonb) already enforces JSON

SQL Server: ISJSON SQLite: json_valid MySQL: JSON_VALID PostgreSQL: not needed, since the column type (jsonb) already enforces JSON

Oracle: IS JSON

@roji I think what might be even more useful is to be able to use JSON data as any other data.
For example, you can have a PrimitiveCollection which gets serialized as a JSON array, but unfortunately you won't receive checked constraints for items in the array.
Example: you have an array of genders ["male", "female", "other"]. Right now you cannot prevent having "dog" within it.

@molinch this issue currently on tracks that a column contains valid JSON, not that the values inside a collection are in a specific valid list. How do you propoes we implement your proposal?

So if you have a PrimitiveCollection then the checked constraint could be as ISJSON(json_col, ARRAY) (see: https://learn.microsoft.com/en-us/sql/t-sql/functions/isjson-transact-sql?view=sql-server-ver16)
However that would still not validate the content of the array. It would just ensure we do have a JSON array.
In order to go that far I don't see any good solution except writing a user defined function ... That seems way beyond what this library should do.

@molinch yeah, I'm definitely aware of ISJSON - see the above comparison.

authors: Xor-el molinch pietrodicaprio roji


text:
🛑 UTT Nodo Morón is down

In cdf8cc7, UTT Nodo Morón (https://www.uttnodomoron.com.ar) was down:

HTTP code: 0
Response time: 0 ms

Resolved: UTT Nodo Morón is back up in 78caac6 after 5 minutes.

repo: efecear/upptime


text:
🛑 Almacén BioPandora is down

In 0e73954, Almacén BioPandora (https://www.biopandora.com.ar) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Almacén BioPandora is back up in 94c7eae.


text:
🛑 Almacén BioPandora is down

In f4e3503, Almacén BioPandora (https://www.biopandora.com.ar) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Almacén BioPandora is back up in a69179c.


text:
Elasticsearch: continurous indexing blog articles

On application bootstrap phase, bulk inserts is acceptable. So I'll prepare some articles for demonstration.
Related #1, new article should be indexed. Insert into Elasticsearch when article posted. (from webapp to Elasticsearch insert API).
Also, index template for blog article is required.

fixes on #6

repo: efkbook/blog-sample


text:
🛑 CDN-Mikrotik-2 is down

In e8d280d, CDN-Mikrotik-2 (http://118.179.50.70) was down:

HTTP code: 0
Response time: 0 ms

Resolved: CDN-Mikrotik-2 is back up in 08d9f6a after 25 minutes.


text:
Create $__plugins_mermaid-tw5_code-block-snippet.tid

fixes #6

Added pull request. Thanks.

Sorry, but I insist that you should merge this PR, instead of only write it in readme.
Because tiddler with tags: $:/tags/TextEditor/Snippet can be quick add by snippet tools, so user don't need to copy&paste from readme.

@efurlanm Hi, you should merge PR, instead of close it!

authors: efurlanm linonetwo


text:
NoSuchMethod exception on plugin startup

May be related to #17.
The exact error as logged in the console is:
java.lang.reflect.InvocationTargetException: null
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_212]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212]
	at me.egg82.antivpn.BungeeBootstrap.onEnable(BungeeBootstrap.java:84) ~[?:?]
	at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:283) ~[BungeeCord.jar:git:Waterfall-Bootstrap:1.14-SNAPSHOT:57a7f98:284]
	at net.md_5.bungee.BungeeCord.start(BungeeCord.java:281) ~[BungeeCord.jar:git:Waterfall-Bootstrap:1.14-SNAPSHOT:57a7f98:284]
	at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:62) ~[BungeeCord.jar:git:Waterfall-Bootstrap:1.14-SNAPSHOT:57a7f98:284]
	at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15) ~[BungeeCord.jar:git:Waterfall-Bootstrap:1.14-SNAPSHOT:57a7f98:284]
Caused by: java.lang.NoSuchMethodError: com.google.common.collect.Platform.newHashMapWithExpectedSize(I)Ljava/util/Map;
	at com.google.common.collect.HashMultimap.<init>(HashMultimap.java:97) ~[BungeeCord.jar:git:Waterfall-Bootstrap:1.14-SNAPSHOT:57a7f98:284]
	at com.google.common.collect.HashMultimap.<init>(HashMultimap.java:93) ~[BungeeCord.jar:git:Waterfall-Bootstrap:1.14-SNAPSHOT:57a7f98:284]
	at com.google.common.collect.HashMultimap.create(HashMultimap.java:59) ~[BungeeCord.jar:git:Waterfall-Bootstrap:1.14-SNAPSHOT:57a7f98:284]
	at co.aikar.commands.Locales.addMessageBundle(Locales.java:141) ~[?:?]
	at co.aikar.commands.Locales.addMessageBundle(Locales.java:132) ~[?:?]
	at co.aikar.commands.Locales.addMessageBundles(Locales.java:124) ~[?:?]
	at co.aikar.commands.Locales.loadLanguages(Locales.java:92) ~[?:?]
	at co.aikar.commands.BungeeLocales.loadLanguages(BungeeLocales.java:15) ~[?:?]
	at co.aikar.commands.BungeeCommandManager.getLocales(BungeeCommandManager.java:104) ~[?:?]
	at co.aikar.commands.BungeeCommandManager.<init>(BungeeCommandManager.java:66) ~[?:?]
	at me.egg82.antivpn.AntiVPN.onEnable(AntiVPN.java:69) ~[?:?]
	... 9 more
[09:33:12] [main/WARN]: Exception encountered when loading plugin: AntiVPN
java.lang.RuntimeException: Could not invoke onEnable.
	at me.egg82.antivpn.BungeeBootstrap.onEnable(BungeeBootstrap.java:87) ~[?:?]
	at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:283) ~[BungeeCord.jar:git:Waterfall-Bootstrap:1.14-SNAPSHOT:57a7f98:284]
	at net.md_5.bungee.BungeeCord.start(BungeeCord.java:281) ~[BungeeCord.jar:git:Waterfall-Bootstrap:1.14-SNAPSHOT:57a7f98:284]
	at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:62) ~[BungeeCord.jar:git:Waterfall-Bootstrap:1.14-SNAPSHOT:57a7f98:284]
	at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15) ~[BungeeCord.jar:git:Waterfall-Bootstrap:1.14-SNAPSHOT:57a7f98:284]

The plugin is installed on the proxy server and I use MariaDB as a database (without Redis for now).

That seems to happen on the odd occasion. Try downloading https://search.maven.org/remotecontent?filepath=com/google/guava/guava/27.1-jre/guava-27.1-jre.jar and replacing the com.google.guava-guava-27.1-jre.jar in the external directory. If that works, let me know so I can see if I can fix it in a more automatic manner on the plugin's end.

I believe I've finally fixed this issue by loading Guava sync, first- before anything else.


text:
load overflow scroll issue

I have a problem with infinite-scroll in "overflow:scroll" section, when i scroll this section to end, just loading will appear but doesn't handle method until page(browser) scrolled.

Hi, I've added a new prop for this, check out https://github.com/egoist/vue-mugen-scroll#scrollconatiner
Let me know if there's any issues.

thanks
in SSR(server-side rendering) i give that error:
Uncaught TypeError: Cannot read property 'addEventListener' of undefined
i think in server context, "window" is undefined. should first check if in browser context.

eh, I'm not sure if mounted() will be called in SSR, and windows is only used in that method

thank you so much it works very well @egoist
sorry I made a mistake, i forgot add ref to my container. I thought class name is for reference, I didn't saw ref attribute in example.

Glad to hear that 🍻

authors: RezaHaidari egoist

repo: egoist/vue-mugen-scroll


text:
Test for simple types first

When building the logstash JSON document, the _get_record_fields tests for various types to provide a sane default configuration to convert values into JSON-serializable values.
We noticed that the _get_record_fields spend a lot of time in isinstance checks, which hurts performance as it has to check every entry in the class hierarchy. Before, _get_record_fields would do 4 extra isinstance tests before deciding that the value can be passed along without modification. Since most log kwargs are probably simple types, reorder the tests so that simple types are tested first.
Additionally, move the inner value_repr into the class to allow subclasses to override the implementation without having to reimplement _get_record_fields.

Looks good to me, thanks!
One minor remark: would you mind changing value_repr to _value_repr to mark it as private? Even on subclassing, this should not cause any issues.
I'm going to test the changes a bit and then probably merge it

Sure. I've updated the PR.

Thank you for merging.
Any ETA on a release which includes this commit? :innocent:

I hope on the upcoming weekend :).

Done.


text:
Sass: Look at reinstating utility functions

The feedback has been mixed on whether we should reintroduce the suite of theme.json Sass functions (color, spacing etc). Adding an issue so its not forgotten about and can be discussed further.

The majority voted to use the generated css variables, so instead we should look at creating a VS Code plugin to help.


text:
test

comment

1

2

repo: eijio/test


text:
Add an alternative return type when expanding tensor expressions.

This PR adds a new function for expanding tensor expressions and returning the result as another tensor rather than as an array.

Hello @cjayross! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file src/riccipy/metric.py:

Line 7:81: E501 line too long (85 > 80 characters)

repo: einsteinpy/riccipy


text:
Fog not working after build

The fog only works when running in the editor, leading to some visual glitches when running the game from the executeable

Fixed in c84da5d.

authors: haavardsjef hermannm


text:
Negatively scaled blocks are moved when using makeunique

Grab a block. Scale it -1 on the x axis and use MakeUnique. Then the block jumps vertically.

False alarm. Someone who used version 1.1 and thought he used 1.2.

repo: ejnaren/rhinotools


text:
update gulp-mocha 3.0.1->4.0.1; yeoman-assert 2.2.2->3.0.0

Update dev dependencies to latest versions:

gulp-mocha 3.0.1->4.0.1
yeoman-assert 2.2.2->3.0.0

Coverage decreased (-100.0%) to 0.0% when pulling 60d51823769baba997f027044461a6e10b883e07 on update-dev-dependencies into 4373d45ef57768816139dfa5254173c8828a6e8d on master.

Coverage decreased (-100.0%) to 0.0% when pulling 1c45f43c675499b6c5950bde4680c1dfa64b7936 on update-dev-dependencies into 4373d45ef57768816139dfa5254173c8828a6e8d on master.

Coverage decreased (-100.0%) to 0.0% when pulling 1c45f43c675499b6c5950bde4680c1dfa64b7936 on update-dev-dependencies into 4373d45ef57768816139dfa5254173c8828a6e8d on master.

Coverage decreased (-100.0%) to 0.0% when pulling 1c45f43c675499b6c5950bde4680c1dfa64b7936 on update-dev-dependencies into 4373d45ef57768816139dfa5254173c8828a6e8d on master.


text:
Add Dijkstra Algorithm

Add the C++ version of Dijkstra Algorithm.
The code should be in /Graph Theory/Dijkstra Algorithm
For further reference: Brilliant

Hey, @ekdnam I would like to work on it.

I would like to contribute to this issue in c++ language

I would like to contribute. Provide me the chance

hey @ekdnam i would like to work on this

Dijkstra C++ has been added. Closing this issue now

repo: ekdnam/Algorithms


text:
[docs typo] easy done -> easily done

Just a silly typo fix.

Ping. This looks good to merge.

authors: ocharles relrod

repo: ekmett/mtl


text:
Code_39 Barcode scan miss last character

Hi
I'm not sure if we missed something but:
If we scan a CODE_128 barcode it works fine and returns all the digits as expected
However a CODE_39 barcode invariably misses the last digit of the code
We've tried different lengths of barcodes, the maximum being 17 characters, but the issue occurs with all the Code_39 we have scanned.
Has anyone faced this issue at all? Is there a setting to set?
Thanks
Vincent

here's an example of a barcode that will be scanned but the last digit missing.
https://www.barcodesinc.com/generator/image.php?code=SJNTAAE12U1006970&style=197&type=C128B&width=271&height=50&xres=1&font=3

@Louies89 Thanks but now another error occurs in the view (Using React Native 0.55.4):

Error: Attempted to RESUME barcode scanner before scanner view was instantiated.
at createErrorFromErrorData (blob:http://localhos…2-2a7db7dd8efb:2041)
at blob:http://localhos…2-2a7db7dd8efb:1993
at MessageQueue.__invokeCallback (blob:http://localhos…2-2a7db7dd8efb:2435)
at blob:http://localhos…2-2a7db7dd8efb:2180
at MessageQueue.__guardSafe (blob:http://localhos…2-2a7db7dd8efb:2348)
at MessageQueue.invokeCallbackAndReturnFlushedQueue (blob:http://localhos…2-2a7db7dd8efb:2179)
at debuggerWorker.js:70

We had the issue above before and that's why we used the
'com.google.android.gms:play-services-vision:15.0.2'
as suggested in #29
I tried with the latest version (16.2.0) but CODE_39 is still decoded incorrectly.

Post your code here, Can take a look into it...


text:
Map server - Read from real map

#64 adds a basic implementation for a map server.
This should eventually be replaced with a module that reads an actual image with metadata.
For a first version, reading an image from app resources would do.

Duplicate of #121

repo: ekumenlabs/tangobot


text:
Minecraftpros discord gone - magic plugin discord?

I was wondering given that minecraftpros (which had a magic plugin support section) if you guys would be interested in making a magic plugin discord for help, sharing spells, general chat etc.

The one on minecraftpros is basically the official one. I don't think we need a separate discord, especially considering I've not personally been on discord in a while. There are lots of good people there who can help already, don't think we should start from scratch.

Oh.. wait.. I missed the title. That discord is gone.. ??

Yes minecraftpros has been deleted.

Well that sucks. Yeah I think we could start a new server ...

Ah nice one. It probably would be small but if you put the link up on the spigot page when you make it, i'm sure it could grab a fair few people.

Allrighty- pretty bare bones for now: https://discord.gg/6TYYth

repo: elBukkit/MagicPlugin


text:
Experiment: earch field on the right

This PR is currently just here to let people try it out. The implementation is likely not the best, and this is certainly not ready to merge.
Please do not discuss this change here, but in this issue)!

Issue was closed, we decided not to change this

repo: elan-ev/tobira


text:
When using weblux, different requests get the same traceid

apm-agent version：1.25.0
VM options：-javaagent:elastic-apm-agent-1.25.0.jar -Delastic.apm.enable_experimental_instrumentations=true -Delastic.apm.use_path_as_transaction_name=true
i use apm-agent-api in spring gateway，i want to get the traceid and transmit it to downstream applications，i use WebFilter ：
`public class MyWebFilter implements WebFilter, Ordered {
public Mono<Void> filter(ServerWebExchange ctx, WebFilterChain chain) {
	String traceId = null;
	Transaction transaction = ElasticApm.currentTransaction();
	if (!StringUtils.isBlank(transaction.getTraceId())) {
		traceId = transaction.getTraceId();
	} else {
		transaction = ElasticApm.startTransaction();
		try (final Scope ignored = transaction.activate()) {
			transaction.setName(CLASS_NAME + "#" + "filter");
			transaction.setType(Transaction.TYPE_REQUEST);
			traceId = transaction.getTraceId();
		} catch (Exception e) {
			transaction.captureException(e);
			throw e;
		} finally {
			transaction.end();
		}
	}
	//set traceId in httpHeader......
}

}`
when i sent some request, i found the same traceid：

Hi @LeePui ,
We don´t  have automatic instrumentation available for Spring Gateway, thus I assume that you are trying to work-around that limitation by propagating the headers yourself to the Webflux client, is that right ?
First, we currently have a PR (#1948) that changes a bit Webflux instrumentation that is about to be merged, would you mind testing with this snapshot to be sure that the observed behavior is still present ?
From what I understand, the Spring Gateway provides Webflux server endpoints and delegates execution to Webflux client.
Because we don't have automatic instrumentation of Webflux client (#1932), that means in your case:

you should always have a transaction active in the filter (if not, then it means we should fix that first)
you will have to propagate the active transaction to the client part, using either Reactor context or Webflux ServerExchange attributes are good options.
you will have to write an interceptor on the client to retrieve the transaction and create a client span that wraps the HTTP request execution (I'm not yet familiar with the client, thus I don't know exactly how that would work).
you will have to write the client span ID into HTTP headers for context propagation, there should be a single span per downstream HTTP request.

All the points 2 to 4 should be handled by the automatic instrumentation of Webflux client.
What likely happens in your case is that you have a single transaction that does multiple downstream HTTP requests, which explains why you see many times the same transaction ID.

Hi @LeePui ,
We don´t have automatic instrumentation available for Spring Gateway, thus I assume that you are trying to work-around that limitation by propagating the headers yourself to the Webflux client, is that right ?
First, we currently have a PR (#1948) that changes a bit Webflux instrumentation that is about to be merged, would you mind testing with this snapshot to be sure that the observed behavior is still present ?
From what I understand, the Spring Gateway provides Webflux server endpoints and delegates execution to Webflux client.
Because we don't have automatic instrumentation of Webflux client (#1306), that means in your case:

you should always have a transaction active in the filter (if not, then it means we should fix that first)
you will have to propagate the active transaction to the client part, using either Reactor context or Webflux ServerExchange attributes are good options.
you will have to write an interceptor on the client to retrieve the transaction and create a client span that wraps the HTTP request execution (I'm not yet familiar with the client, thus I don't know exactly how that would work).
you will have to write the client span ID into HTTP headers for context propagation, there should be a single span per downstream HTTP request.

All the points 2 to 4 should be handled by the automatic instrumentation of Webflux client.
What likely happens in your case is that you have a single transaction that does multiple downstream HTTP requests, which explains why you see many times the same transaction ID.

Hi @SylvainJuge ,
In fact, i'm trying to get traceId by apm-agent-api in spring gateway, i want to combining application log and apm tracing by traceId.
So i use the code above to get traceId and set it in httpHeader. I will get the traceid from the request header and put it into the log in downstream applications.

So, if I understand correctly here, the end-to-end request workflow is the following:

an HTTP client makes a request to the Spring-Gateway service
this gateway is instrumented with APM agent and you retrieve a transaction ID using the API
your code manually injects this transaction ID into downstream HTTP requests using a custom header
the gateway delegates request processing to downstream services with the extra HTTP header
the downstream service re-injects the ID provided through headers into logs, probably through manual calls to the MDC.
you should (in theory) be able to correlate the initial HTTP call on the gateway and the logs on the downstream service(s).

Can you confirm that properly describes your case here ?
What is not really clear to me are the following points:

does your gateway perform multiple downstream HTTP calls ?
which custom header do you use in the Webflux HTTP client ?
is the downstream service also instrumented with APM agent ?

So, if I understand correctly here, the end-to-end request workflow is the following:

an HTTP client makes a request to the Spring-Gateway service
this gateway is instrumented with APM agent and you retrieve a transaction ID using the API
your code manually injects this transaction ID into downstream HTTP requests using a custom header
the gateway delegates request processing to downstream services with the extra HTTP header
the downstream service re-injects the ID provided through headers into logs, probably through manual calls to the MDC.
you should (in theory) be able to correlate the initial HTTP call on the gateway and the logs on the downstream service(s).

Can you confirm that properly describes your case here ?
What is not really clear to me are the following points:

does your gateway perform multiple downstream HTTP calls ?
which custom header do you use in the Webflux HTTP client ?
is the downstream service also instrumented with APM agent ?

yes, the request workflow is right.

does your gateway perform multiple downstream HTTP calls ?
just one downstream.

which custom header do you use in the Webflux HTTP client ?
i use elastic-apm-traceparent

is the downstream service also instrumented with APM agent ?
yes

and i use API in gateway like this:
public class MyWebFilter implements WebFilter, Ordered {

public Mono<Void> filter(ServerWebExchange ctx, WebFilterChain chain) {
	String traceId = null;
	Transaction transaction = ElasticApm.startTransaction();
        try (final Scope ignored = transaction.activate()) {
	        transaction.setName(CLASS_NAME + "#" + "filter");
	        transaction.setType(Transaction.TYPE_REQUEST);
	        traceId = ElasticApm.currentTransaction().getTraceId();
                System.out.println(Thread.currentThread().getName() + "__" + traceId);
        } catch (Exception e) {
	        transaction.captureException(e);
	        throw e;
        } finally {
	        transaction.end();
        }
	//set traceId in httpHeader......
}
}

i do stress tests in 1.24.0 and  1.25.1-SNAPSHOT.jar, use 20 thread, each thread loop 10 times。
i found 1.24.0 will get the same traceId in the same thread, it look like this:

reactor-http-nio-1__9ffe164b152f884ef070a30a10b0d5fe
reactor-http-nio-2__47767cb81dfdc7c037086f2f49a157e1
reactor-http-nio-3__9a3bfbe74ead54a222bbcaba8381d6e3
reactor-http-nio-4__0f0d8346645cf853ab1d5c610f72d570
reactor-http-nio-1__9ffe164b152f884ef070a30a10b0d5fe
reactor-http-nio-2__47767cb81dfdc7c037086f2f49a157e1
.....

and 1.25.1-SNAPSHOT.jar will get a empty traceId.
if i replace traceId = ElasticApm.currentTransaction().getTraceId(); with traceId = transaction.getTraceId(); , it will get different traceid.

There are multiple issues here, thus we will proceed step by step to make that more clear, starting from the upstream gateway then going to the downstream service.

On the gateway, we should have a transaction created for every request, thus ElasticApm.currentTransaction().getTraceId() should not be empty 100% of the time.

Still on the gateway, we should manually create a span for every downstream HTTP request because we don´t  provide automatic webflux client instrumentation, pseudo-code:

// should start the span when the HTTP request is started
Span span = ElasticApm.currentTransaction().startSpan();

// manually propagate the context header (don't try to do this yourself)
span.injectTraceHeaders(...); // see method javadoc for an example here

// ... execute the HTTP request

// ending the span when the HTTP request ends, as it may not be in the same method or even thread
// storing span reference within reactor context could be required as most processing is asynchronous
// unlike with blocking HTTP clients

span.end();

On the downstream service, the HTTP context propagation header should be visible, and there should be an active transaction. This transaction should have its parent context ID that refers to the HTTP client span.

There are multiple issues here, thus we will proceed step by step to make that more clear, starting from the upstream gateway then going to the downstream service.

On the gateway, we should have a transaction created for every request, thus ElasticApm.currentTransaction().getTraceId() should not be empty 100% of the time.
Still on the gateway, we should manually create a span for every downstream HTTP request because we don´t  provide automatic webflux client instrumentation, pseudo-code:

// should start the span when the HTTP request is started
Span span = ElasticApm.currentTransaction().startSpan();

// manually propagate the context header (don't try to do this yourself)
span.injectTraceHeaders(...); // see method javadoc for an example here

// ... execute the HTTP request

// ending the span when the HTTP request ends, as it may not be in the same method or even thread
// storing span reference within reactor context could be required as most processing is asynchronous
// unlike with blocking HTTP clients

span.end();

On the downstream service, the HTTP context propagation header should be visible, and there should be an active transaction. This transaction should have its parent context ID that refers to the HTTP client span.

ok,thank you

Hi @LeePui, this issue hadn't had any update in while, thus I suggest that we revisit it once we have implemented Webflux Client support (https://github.com/elastic/apm-agent-java/issues/1306). In the mean time I will close this and we can re-open later if required.

authors: LeePui SylvainJuge

repo: elastic/apm-agent-java


text:
[automation] Update go release version 1.18.8

What
Bump go release version with the latest release.
Further details
See changelog for 1.18.8
Automatically generated from https://apm-ci.elastic.co/job/apm-shared/job/bump-go-release-version-pipeline/

:green_heart: Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS

Expand to view the summary

Build stats

Start Time: 2022-11-07T04:05:15.700+0000

Duration: 10 min 55 sec

Test stats :test_tube:

Test
Results

Failed
0

Passed
176

Skipped
3

Total
179

:robot: GitHub comments
Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

/test : Re-trigger the build.

authors: apmmachine elasticmachine

repo: elastic/elastic-agent-system-metrics


text:
Behavior of elasticsearch-hadoop/spark when es nodes are restarted

Is there a recommended protocol for restarting elasticsearch machines when data is being streamed in live from Spark into Elasticsearch? How does elasticsearch-hadoop/spark deal with node failure?
Thanks in advance.

No sure what you mean by protocol - if you need to restart the nodes then any data that is being streamed to the cluster will fall back to any available nodes.  Restarting nodes means the cluster state needs to be shuffled around so do expect performance to slow down.
I'm not sure why you would want to restart the nodes however in cases like this having some type of buffer or queue in front tends to provide the 'space' needed to for differences in system lifecycle.
Last but not least, for questions please use the forums - an issue tracker is not the appropriate place for asking questions.
Thank,

Sorry about that @costin. thanks for the quick reply! will use forums next time.

authors: costin hsunami

repo: elastic/elasticsearch-hadoop


text:
Bulk data failure

NEST/Elasticsearch.Net version 6.5.1:
Elasticsearch version 6.5.4
Description of the problem including expected versus actual behavior:
I used client.Bulk() method to save data to ES, responsed success, except _id had value,other fields had empty value, and no exception for me, any mistake with me?
Steps to reproduce:
my  demo code
private void Test(){
         var index = "test";
         var key = "Gid";
        var bulkJobjectList2 = new List<JObject>() {
                            new JObject() {
                                    { "Gid","1" },
                                    { "Title","test index bulk many 1 width JObject" }
                                },
                            new JObject() {
                                  { "Gid","2" },
                                  { "Title","test index bulk many 2 width JObject" }
                                }
                        };
          EsHelper.ClientSet.IndexMany(index, key, bulkJobjectList2);
    }

EsHelper  class IndexMany method :

public static IBulkResponse IndexMany(this IElasticClient client, string index, string keyField, IEnumerable<JObject> res) {
            var response = client.Bulk(b =>
                                        b.Index(index)
                                        .Type(index)
                                        .IndexMany(res, (f, o) =>
                                            f.Document(o)
                                            .Id(o[keyField].Value<string>())
                                            )
                                       );
            return response;
        }

Expected behavior
data save success,but only _id had vlaue,others were empty.
Provide ConnectionSettings (if relevant):
Provide DebugInformation (if relevant):
`
Valid NEST response built from a successful low level call on POST: /test/test/_bulk?pretty=true&error_trace=true
Audit trail of this API call:

[1] HealthyResponse: Node: http://192.168.0.1:9200/ Took: 00:00:00.2489880

Request:
{"index":{"_id":"1"}}
{"Gid":[],"Title":[]}
{"index":{"_id":"2"}}
{"Gid":[],"Title":[]}
Response:
{
"took" : 6,
"errors" : false,
"items" : [
{
"index" : {
"_index" : "test",
"_type" : "test",
"_id" : "1",
"_version" : 3,
"result" : "updated",
"_shards" : {
"total" : 2,
"successful" : 1,
"failed" : 0
},
"_seq_no" : 7,
"_primary_term" : 1,
"status" : 200
}
},
{
"index" : {
"_index" : "test",
"_type" : "test",
"_id" : "2",
"_version" : 3,
"result" : "updated",
"_shards" : {
"total" : 2,
"successful" : 1,
"failed" : 0
},
"_seq_no" : 19,
"_primary_term" : 1,
"status" : 200
}
}
]
}
`
### Tasks

Hi!
NEST 6.5.1 is a very old version and out of support..
How did you confirm your data was not written correctly? The bulk response does not return the full documents which means it's totally expected to only see _id and a few other meta fields.
The request looks good, so I assume your data is correctly written. You should try to request it in a second operation or manually check it in Kibana.

Thank your reply,I known where was my wrong,Nest 6+ changed Json Serializer，stackoverflow had question,https://stackoverflow.com/questions/50107494/how-do-i-serialize-properties-of-type-jtoken-or-jobject-in-elasticsearch-nest

repo: elastic/elasticsearch-net


text:
Listing Watches

There is no option to list watches as can be seen in the link below:
https://www.elastic.co/guide/en/watcher/current/listing-watches.html
 GET .watches/_search
{
        "fields" : [],
        "query" : {"match_all" : { } }
}

Thanks.

You should be able to just issue a search against the .watches index...
            var result = Client.Search<Watch>(x => x
                .Index(".watches")
                .AllTypes()

authors: DvirL aochsner

repo: elastic/elasticsearch-watcher-net


text:
[meta] add helm 3.6.0 support

This commit bump the Helm version used in helm-charts tests to 3.6.0.
https://github.com/helm/helm/releases/tag/v3.6.0

jenkins test this please

repo: elastic/helm-charts


text:
Support datastreams in Rally

Propose the following features be core operations in Rally due to the applicability to common workloads:

[x] Create a datastream - https://www.elastic.co/guide/en/elasticsearch/reference/master/set-up-a-data-stream.html#manually-create-a-data-stream
[x] Delete a datastream - https://www.elastic.co/guide/en/elasticsearch/reference/master/set-up-a-data-stream.html#delete-a-data-stream
[x] Bulk indexing - https://www.elastic.co/guide/en/elasticsearch/reference/master/use-a-data-stream.html#data-streams-bulk-indexing-requests I'm not sure we need changes here as the structure is the same as a bulk request @dliappis but we might want to limit to create actions only.
[ ] Stats API support - https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-stats-api.html
[x] ~Ability to rollover a datastream - https://www.elastic.co/guide/en/elasticsearch/reference/master/use-a-data-stream.html#manually-roll-over-a-data-stream We can potentially support this through a new runner. Note the event data supports this via this runner. We want this rollover to occur during indexing, however - so we may want to incorporate it into the bulk action itself. To discuss with @dliappis. This is low priority and likely to be used infrequently if we recommend using ILM for rollover.~ Dropped in support of ILM. https://github.com/elastic/rally/issues/1087

Datastreams support a number of other operations e.g. Updating documents by query. I don't believe these will be used regularly in workloads however and can be implemented as custom runners if needed.

I have hit an issue on the prometheus track PR that also needs create-datastream, and would love to see this done as a good first step. Lets chat tomorrow @gingerwizard about timing of this first step.

Code merged. Pending IT and docs.

@danielmitterdorfer we will need data streams stats. My initial instinct is to add as a runner like https://esrally.readthedocs.io/en/stable/track.html?highlight=index stats#index-stats? Any other approaches you'd like to consider?

If we want custom metrics I suggest we implement a so-called telemetry device similar to: https://github.com/elastic/rally/blob/4d4f8633a91c34b5fe9a58734a2ffc30c815569b/esrally/telemetry.py#L1243.

👍  appreciate the guidance.

authors: danielmitterdorfer gingerwizard hub-cap

repo: elastic/rally


text:
fix: Refresh action title on update

Summary
Resolves #234.
When running a test, the title shown is not reflective of the other data associated with the action if the user has updated it.
Before

After

Implementation details
I have modified the update logic to call the same actionTitle() function that we call when we initially create the action, so the same logic should apply to created and edited actions now.
How to validate this change

Record a journey
Modify an action's data so as to update the title (e.g. create a new URL for a navigate action
Run the journey
In the test result flyout, observe that the title of your action reflects the updated value

:green_heart: Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS

Expand to view the summary

Build stats

Start Time: 2022-04-29T20:05:45.959+0000

Duration: 9 min 9 sec

Test stats :test_tube:

Test
Results

Failed
0

Passed
73

Skipped
0

Total
73

:robot: GitHub comments
To re-run your PR in the CI, just comment with:

/test : Re-trigger the build.

authors: apmmachine justinkambic

repo: elastic/synthetics-recorder


text:
docker容器部署es-job注册中心等状态化据是存放在哪里？

Please answer these questions before submitting your issue. Thanks!
开源不易，我们希望将精力放在完成新功能和解决有价值的问题上，为了让大家的配合更具有效率，请填写以下列出的全部问题
Which version of Elastic-Job do you using?（您使用的Elastic-Job版本为？）
Expected behavior （您预期的结果是）
Actual behavior （实际运行的结果是）
docker容器部署es-job每次启动后页面数据均为空，登记注册中心这些状态化数据是存放在哪里？
Steps to reproduce the behavior （可重现问题的操作步骤）
Please provide the reproduce example codes (such as github link)，otherwise we will label the issue as Invalid and close it.（为了节省复现问题的时间，请务必提供可重现的代码，否则我们会将issue直接标记为invalid并关闭）
Code should based on https://github.com/elasticjob/elastic-job-example
（代码请基于 https://github.com/elasticjob/elastic-job-example）

on zookeeper

authors: lklkxcxc terrymanu

repo: elasticjob/elastic-job-lite


text:
[Epic] Q2-Analyzed/Upgrade upstream apps to new versions

Q2-Charts to be upgraded

[ ] upstream / fluentd #1222
[ ] upstream / fluentd-elasticsearch #1223
[ ] upstream / metrics-server #1487
[ ] upstream / prometheus-elasticsearch-exporter #1229
[ ] upstream / dex #1406
[ ] upstream / harbor #1404
[ ] upstream / node-local-dns  #1408
[ ] upstream / velero #1480
[ ] upstream / opensearch #1362

Q2-Charts Analyzed - To be upgraded in Q3

[x] upstream / gatekeeper #1224
[ ] upstream / ingress-nginx #1225
[ ] upstream / kured #1489
[x] upstream / starbord-operator #1228
[ ] upstream / prometheus-blackbox-exporter #1230
[ ] upstream / thanos #1023
[ ] upstream / kube-prometheus-stack #1486
[ ] upstream / grafana #1407
[x] upstream / certmanager #1221
[ ] upstream / falco #1405
[ ] upstream / falco-exporter #1488

@crssnd closed ? Still many charts to be upgraded in Q2 as mentioned above.

yes, we already have the epics for the Q upgrades, so this was closed as it is a duplicate

yes, we already have the epics for the Q upgrades, so this was closed as it is a duplicate

But we closed the older one as in favor of making it seperate -  https://github.com/elastisys/compliantkubernetes-apps/issues/1024

authors: crssnd raviranjanelastisys

repo: elastisys/compliantkubernetes-apps


text:
_InactiveRpcError 문의

안녕하세요?
koapy 가 아래와 같은 에러로 자주 멈춥니다.
---------------------------------------------------------------------------
_InactiveRpcError                         Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_16832/2625759874.py in <module>
      4 from koapy.backend.kiwoom_open_api_plus.grpc.KiwoomOpenApiPlusServiceClient import KiwoomOpenApiPlusServiceClient
      5 kiwoom = KiwoomOpenApiPlusServiceClient()
----> 6 kiwoom.EnsureConnected()

~\.conda\envs\danta\lib\site-packages\koapy\backend\kiwoom_open_api_plus\core\KiwoomOpenApiPlusQAxWidgetMixin.py in EnsureConnected(self, credentials)
    794         로그인이 되어있지 않다면 로그인을 수행합니다.
    795         """
--> 796         is_connected = self.IsConnected()
    797         if not is_connected:
    798             self.Connect(credentials)

~\.conda\envs\danta\lib\site-packages\koapy\backend\kiwoom_open_api_plus\core\KiwoomOpenApiPlusQAxWidgetMixin.py in IsConnected(self)
     41         키움증권 서버에 접속되었는지 여부를 반환합니다.
     42         """
---> 43         return self.GetConnectState() == 1
     44
     45     def ShowAccountWindow(self):

~\.conda\envs\danta\lib\site-packages\koapy\backend\kiwoom_open_api_plus\grpc\KiwoomOpenApiPlusServiceClientSideDynamicCallable.py in __call__(self, *args)
     32     def __call__(self, *args):
     33         request = self._create_call_request(self._name, args)
---> 34         response = self._stub.Call(request)
     35         result = self._unpack_response(response)
     36         return result

~\AppData\Roaming\Python\Python39\site-packages\grpc\_channel.py in __call__(self, request, timeout, metadata, credentials, wait_for_ready, compression)
    944         state, call, = self._blocking(request, timeout, metadata, credentials,
    945                                       wait_for_ready, compression)
--> 946         return _end_unary_response_blocking(state, call, False, None)
    947
    948     def with_call(self,

~\AppData\Roaming\Python\Python39\site-packages\grpc\_channel.py in _end_unary_response_blocking(state, call, with_call, deadline)
    847             return state.response
    848     else:
--> 849         raise _InactiveRpcError(state)
    850
    851

_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.UNAVAILABLE
	details = "failed to connect to all addresses"
	debug_error_string = "{"created":"@1648791831.720000000","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":3129,"referenced_errors":[{"created":"@1648791831.720000000","description":"failed to connect to all addresses","file":"src/core/lib/transport/error_utils.cc","file_line":163,"grpc_status":14}]}"

재현시나리오를 특정하지는 못했으나, 계좌조회, 조건검색, 주식매매 등 여러 동작들이 반복되던 중에
꼭 한번씩은 발생되는 것 같습니다. 어떻게 디버깅해보면 좋을지 조언 부탁드립니다.

특정한 프로세스로 버그 재현이 안 된다면, 단순히 gRPC Server-Client 통신이 안 좋은것인지도 모릅니다. 서버를 Remotely 운영하십니까?

서버는 remote 로 운영하지않고 local로만 운영합니다.
일단.. gRPC 응답없을때는 koapy를 다시 띄우는 것으로 우회해서 사용하려고 합니다.

비슷한 문제를 겪었습니다. Windows 10에서 python을 바로 호출하면 "Command Prompt" 쉘에서 프로그램이 동작하는데, 이때, 내부 문자열 인코딩이 '949 (EUC-KR)'로 처리되다가 오류가 발생하는 것으로 예상됩니다. "PowerShell 7 Core"를 따로 설치하여, 여기서 python을 호출하여 프로그램을 실행할 때는 문제가 발생하지 않았습니다.

이 문제는 단순히 문자열 디코딩 문제가 아니라, gRPC 서버가 클라이언트에 전송하는 과정에서 시스템 불안정이 디코딩 할 수 없는 문자열(노이즈)을 생성합니다. 즉, 시스템 안정성과도 연관이 있는 문제로 보입니다. 시스템 냉각이 잘 안 되는 시스템에서 간헐적으로 가비지 문자열이 gRPC 스트림에 들어오는데, 그게 스트림을 멈추게하는 원인이 되었습니다.

비슷한 문제를 겪었습니다. Windows 10에서 python을 바로 호출하면 "Command Prompt" 쉘에서 프로그램이 동작하는데, 이때, 내부 문자열 인코딩이 '949 (EUC-KR)'로 처리되다가 오류가 발생하는 것으로 예상됩니다. "PowerShell 7 Core"를 따로 설치하여, 여기서 python을 호출하여 프로그램을 실행할 때는 문제가 발생하지 않았습니다.

repo: elbakramer/koapy


text:
🛑 Rentas municipal is down

In ff86943, Rentas municipal (https://rentas.catamarcaciudad.gob.ar/ui/index.php) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Rentas municipal is back up in 2ecf5fc.


text:
Add an AWS EKS example

Add a simple AWS EKS example and optionally, provide an example of how to install Artifactory on it once ready

Resolved by https://github.com/eldada/terraform-playground/commit/df423926f14cb167f8f7884d26bc0440414f9b32

repo: eldada/terraform-playground


text:
🛑 BIP is down

In 6a77262, BIP (https://www.bancoprovincia.bancainternet.com.ar/eBanking/login/inicio.htm) was down:

HTTP code: 0
Response time: 0 ms

Resolved: BIP is back up in 698d01e.

repo: eldikra/monitoreo


text:
watch articles

Is it or will it be possible to watch articles (add them to personal watchlist) ?

I don't know where it is necessary to use multiple keys in mediawikis api so I decided to disable this feature. I'm not sure but I'm thinking php uses only "key=value2" so why should we send "key=value1"?
I prefer guava because it has some useful classes like the immutable ones. For more infos about immutability see javapractices or Effective Java .
And because of my preference of immutability I would create an new instance of the builder and don't allow mutation after creation (because it hard to test all permuations). :wink:
Other libs are used because I is easier for me to reuse existing utilities instead of recreating them

org.jdom:jdom2:jar:2.0.5
xml parsing (legacy library, should be removed in future)
com.fasterxml.jackson.core:jackson...
json parsing
org.apache.httpcomponents:httpclient:jar:4.3.4
http client (easier to configure - compared to HttpURLConnection)
org.apache.commons:commons-lang3:jar:3.3.2
used as helper for xml parsing (could be removed in future)
org.slf4j:slf4j-api:jar:1.7.9
allows custom logger configuration
javax.inject:javax.inject:jar:1
only annotations for IoC frameworks

If you see a possibility to reduce this dependencies I'm interested in.

I don't know where it is necessary to use multiple keys in mediawikis api so I decided to disable this feature. I'm not sure but I'm thinking php uses only "key=value2" so why should we send "key=value1"?
I prefer guava because it has some useful classes like the immutable ones. For more infos about immutability see javapractices or Effective Java .
And because of my preference of immutability I would create an new instance of the builder and don't allow mutation after creation (because it hard to test all permuations). :wink:
Other libs are used because I is easier for me to reuse existing utilities instead of recreating them

org.jdom:jdom2:jar:2.0.5
xml parsing (legacy library, should be removed in future)
com.fasterxml.jackson.core:jackson...
json parsing
org.apache.httpcomponents:httpclient:jar:4.3.4
http client (easier to configure - compared to HttpURLConnection)
org.apache.commons:commons-lang3:jar:3.3.2
used as helper for xml parsing (could be removed in future)
org.slf4j:slf4j-api:jar:1.7.9
allows custom logger configuration
javax.inject:javax.inject:jar:1
only annotations for IoC frameworks

If you see a possibility to reduce this dependencies I'm interested in.

I'm willing to help, I just want to be sure about what we will do. Here's how I see how to program queries:
1- Each query class will have a constructor like this:
 public Query(MediaWiki bot, int limit, QueryParameter params, int... namespaces)

limit and namespaces are the only thing that all queries share so I added to the constructor. The user have a way to parameter his query so I added a class QueryParameter in which he can parameter it.
I have programmed WatchList query with this logic (you see it in my fork, I will update it with comments). If will be ok on something I will help to redo all the queries and remove all the xml methods.

I'm checking out your fork now -- btw: it's easier to comment pull requests :wink: and it's no problem to add further commits to a pull request and/or squash/fixup commits later.

Ok I will do it this evening, normally I will have time.

A few comments:

Why has the WatchResponse setters? It is a common use case to receive watchlist entries and change the contents later? (some getters are never called and Date was returned directly -> better use the copy constructor)
In case of QueryParameter:
I don't understand how to use the filter function  boolean check(String key, String[] values)?
How does QueryParameter check or better help me with typesafe arguments what params can be used with WatchList? What do you think about a typesafe configuration builder like following, so you don't have to check the online docs what params are allowed for a particular version of mediawiki and we avoid typo problems in param arguments?

    testee = WatchList.of(bot); // default watchlist
    testee = WatchList.from(bot)
      .withProperties("user", "timestamp", "comment", "title") //
      .withProperties(USER, TIMESTAMP) // or typesafer with enum values
      .onlyMinorChanges() //
      .noBotChanges() //
      .noAnonymousChanges() //
      .withLimit(1000000) //
      .build();

I would prefer to move WatchListResults and WatchResponse to query package.
I tried to run WatchListTest with my user on www.mediawiki.org but it returns an empty iterator.
The commit "Using Map instead of Multimap" looks good (I would cherrypick it if this okay for you)
(sometimes there are some System.out... calls, that should be removed ... try to use log.debug(..) or some e.printStackTrace instead of throw new IllegaleState..  -- I assume it's a WIP state)
(if possible try to use "2 space indentation and not reformat the sources :wink: -- else it's no problem I'll have to fix this this later)

What error did you find in the pom.xml? I've seen you disabled some, in my opinion, useful plugins like
buildnumbering
code coverage
checkstyle rules
integrations tests (causes compiler errors)
...

Your idea is better with enum for typesafe arguments.
I used setter to be able to parse the json response (if I remember well this is how Jackson library works)
I have got the following error in the pom.xml:
How to solve “Plugin execution not covered by lifecycle configuration” for Spring Data Maven Builds

So I added the pluginManagement tag like explained here http://stackoverflow.com/questions/6352208/how-to-solve-plugin-execution-not-covered-by-lifecycle-configuration-for-sprin

I used setter to be able to parse the json response (if I remember well this is how Jackson library works)

You can also use constructor arguments or static factory methods

I have got the following error in the pom.xml: How to solve “Plugin execution not covered by lifecycle configuration” for Spring Data Maven Builds

Sounds like the eclipse pom warning, if no eclipse connector is present. In the days where I'm working with eclipse, I clicked on the error message in the pom editor and selected the option "Mark goal run as ignored in Eclipse build in Eclipse preferences"

it is okay if I cherry-pick your change "Using Map instead of Multimap"?

Yes of course!

It's a pity, the change will cause 14 failing tests, so I have to wait

if this commit compiles and my few tweaks and TODOs are okay for you I'll merge it to master (Multimap to Map is the next change on my list) ... If it is merged, can you help with the open TODOs? (I'll recommend a hard reset)

about the topic login in a test:
There is a abstract AbstractIntegTest class, check its implementaions (*IntegTest) for more details about testing mocked responses.
e.g. RecentchangeTitlesIntegTest
we need a response for a valid login and responses for watchlist queries

I'm going to push 7d2b4e9 to master this later afternoon, hope it's okay?

Please look at my recent commit. I don't see how to a test for WatchList. Do you have a formatter that respect your checkstyle?

I tried to add your changes to my tracking branch
I can export my formatter settings for intellij, but I'm not sure if this is useful for you. What do you think about to disable eclipses autoformatting? Or try to apply the simple rules (indent with 2 spaces, line length 100)
about testing: I try to add an example in a further commit
Please reset your branch hard to my tracking branch before you add further commits (else it becomes very difficult to resolve the conflicts) -- read the docs about git reset --hard before :wink:
btw: I've figured out how Date is mapped to String

Ok, just I made an error in the code. Must replace this:
if (dir != null)
requestBuilder.param("wldir", dir.name());
by
if (dir != null)
requestBuilder.param("wldir", dir.toString());

For me it's fine to merge with master and do the next steps. Do you agree?

Why you want to do the date formatting in WatchList class? Why not create param method that accept Date object? These method will be used in the other queries. I suggest also to add a param method that accept long type.

Yes you can merge.
BTW, I'm currently adapting the other queries to new format, do you have any comments?

Thanks
About testing: I'm working on an test example for this.
About the other queries, please reset your working branch and try to change your auto formatter :wink:
(if possible try to write tests first -- I know this could be challenging -- with the current patchset we are going to loose about 6% coverage -- goodbye green coverage badge :wink: )

I've added an test draft for Watchlist, can you help to complete it? ef7f3fd

Done! Can you look to the copy method and tell me how we should do to pass limit and namespaces?
I created a new branch replace xml by json. Tell me if it's ok what I did for login function or do you have a better idea.
After that I will change all the queries to the format (builder + json). I think that every query must provide a limit of the results that will return;
example:
Query query = createNewQuery();
query.setLimit(500);
// the query will return 500 results or less and then will stop
while(query.hasNext())
    doSomething(query.next());

I suggest to do that because now limit doesn't have any sense. Why the user want to change the limit?

I'm going to check your change ... thanks for your work, but give me a few minutes to restore the format (so it is easier for me to see the real change and the travis run ends with success :wink: )
btw: Have you tried to run mvn clean test locally? Do you think it is helpful if I add a contributor section to README.md with details about source code format - eg. with the title "How to configure your IDE for contributions?"

Hmm can you help me please? It feels very time consuming to check this again: Your pull request contains changes to the following files:
 src/main/assembly/src-with-dependencies.xml
 src/main/java/net/sourceforge/jwbf/core/actions/HttpActionClient.java
 src/main/java/net/sourceforge/jwbf/core/actions/ParamJoiner.java
 src/main/java/net/sourceforge/jwbf/core/actions/Post.java
 src/main/java/net/sourceforge/jwbf/core/actions/RequestBuilder.java
 src/main/java/net/sourceforge/jwbf/core/internal/Checked.java
 src/main/assembly/src-with-dependencies.xml
 src/main/java/net/sourceforge/jwbf/core/actions/HttpActionClient.java
 src/main/java/net/sourceforge/jwbf/core/actions/ParamJoiner.java
 src/main/java/net/sourceforge/jwbf/core/actions/Post.java
 src/main/java/net/sourceforge/jwbf/core/actions/RequestBuilder.java
 src/main/java/net/sourceforge/jwbf/core/internal/Checked.java
 src/main/assembly/src-with-dependencies.xml
 src/main/java/net/sourceforge/jwbf/core/actions/HttpActionClient.java
 src/main/java/net/sourceforge/jwbf/core/actions/ParamJoiner.java
 src/main/java/net/sourceforge/jwbf/core/actions/Post.java
 src/main/java/net/sourceforge/jwbf/core/actions/RequestBuilder.java
 src/main/java/net/sourceforge/jwbf/core/internal/Checked.java
 src/main/java/net/sourceforge/jwbf/mapper/JsonMapper.java
 src/main/java/net/sourceforge/jwbf/mediawiki/MediaWiki.java
 src/main/java/net/sourceforge/jwbf/mediawiki/actions/login/PostLogin.java
 src/main/java/net/sourceforge/jwbf/mediawiki/actions/queries/QueryError.java
 src/main/java/net/sourceforge/jwbf/mediawiki/actions/queries/Response.java
 src/main/java/net/sourceforge/jwbf/mediawiki/actions/queries/WatchList.java
 src/main/java/net/sourceforge/jwbf/mediawiki/actions/queries/WatchListResults.java
 src/main/java/net/sourceforge/jwbf/mediawiki/actions/util/AllPagesEnums.java
 src/main/java/net/sourceforge/jwbf/mediawiki/actions/util/LangLinksFilter.java
 src/test/java/net/sourceforge/jwbf/core/actions/HttpActionClientTest.java
 src/test/java/net/sourceforge/jwbf/core/actions/PostTest.java
 src/test/java/net/sourceforge/jwbf/core/actions/RequestBuilderTest.java
 src/test/java/net/sourceforge/jwbf/mapper/JsonMapperTest.java
 src/test/java/net/sourceforge/jwbf/mediawiki/actions/editing/PostModifyContentTest.java
 src/test/java/net/sourceforge/jwbf/mediawiki/actions/queries/SearchIntegTest.java
 src/test/java/net/sourceforge/jwbf/mediawiki/actions/queries/WatchListIntegTest.java
 src/test/java/net/sourceforge/jwbf/mediawiki/actions/queries/WatchListTest.java
 src/test/resources/mediawiki/any/embeddedin_3.xml
 src/test/resources/mediawiki/v1-15/allPageTitles0.xml
 src/test/resources/mediawiki/v1-15/allPageTitles1.xml
 src/test/resources/mediawiki/v1-15/allPageTitles2.xml
 src/test/resources/mediawiki/v1-15/siteinfo_fail.xml
 src/test/resources/mediawiki/v1-16/allPageTitles0.xml
 src/test/resources/mediawiki/v1-16/allPageTitles1.xml
 src/test/resources/mediawiki/v1-16/allPageTitles2.xml
 src/test/resources/mediawiki/v1-16/siteinfo_fail.xml
 src/test/resources/mediawiki/v1-17/allPageTitles0.xml
 src/test/resources/mediawiki/v1-17/allPageTitles1.xml
 src/test/resources/mediawiki/v1-17/allPageTitles2.xml
 src/test/resources/mediawiki/v1-17/siteinfo_fail.xml
 src/test/resources/mediawiki/v1-18/allPageTitles0.xml
 src/test/resources/mediawiki/v1-18/allPageTitles1.xml
 src/test/resources/mediawiki/v1-18/allPageTitles2.xml
 src/test/resources/mediawiki/v1-18/siteinfo_fail.xml
 src/test/resources/mediawiki/v1-19/allPageTitles0.xml
 src/test/resources/mediawiki/v1-19/allPageTitles1.xml
 src/test/resources/mediawiki/v1-19/allPageTitles2.xml
 src/test/resources/mediawiki/v1-19/siteinfo_fail.xml
 src/test/resources/mediawiki/v1-20/allPageTitles0.xml

But I assume the effective change was made in the following files - can you confirm this? If not, remove  or add entries from the following list, and I'll reset the rest to master.
src/main/java/net/sourceforge/jwbf/mediawiki/actions/queries/QueryError.java
src/main/java/net/sourceforge/jwbf/mediawiki/actions/queries/Response.java
src/main/java/net/sourceforge/jwbf/mediawiki/actions/queries/WatchList.java
src/main/java/net/sourceforge/jwbf/mediawiki/actions/queries/WatchListResults.java
src/main/java/net/sourceforge/jwbf/mediawiki/actions/util/AllPagesEnums.java
src/main/java/net/sourceforge/jwbf/mediawiki/actions/util/LangLinksFilter.java
src/test/java/net/sourceforge/jwbf/mapper/JsonMapperTest.java
src/test/java/net/sourceforge/jwbf/mediawiki/actions/queries/WatchListIntegTest.java
src/test/java/net/sourceforge/jwbf/mediawiki/actions/queries/WatchListTest.java

ups sorry I compared the wrong branches (the post above is the diff between jwbf/master and hunsu/ChangetoJson) ... but I also interested in the effective change :wink:

btw: Have you tried to run mvn clean test locally?
No, I will do it next time.
Do you think it is helpful if I add a contributor section to README.md with details about source code format - eg. with the title "How to configure your IDE for contributions?"
This is a good idea. Me I don't know for example how to activate loggin.

see branch https://github.com/eldur/jwbf/tree/hunsu-master

I'm still waiting your comments about what I did? Its strange that I haven't received a mail about response.

sorry it is very time consuming to review your patches. It changes about ~7000 lines. (And jwbf is a free time project -- and currently my free time is very rare)
$ git diff --stat origin/master | tail -n1
 72 files changed, 3776 insertions(+), 3009 deletions(-)

If you want to help me, and speed-up the review try to reduce the diff.

I wish I have read this http://blog.jooq.org/2015/03/16/the-10-things-everyone-does-wrong-when-committing-pull-requests/ article before I have done the pull request. I know it hard for you to review it. The pull request is to replace xml by json. To help you review my changes you will first look at the methods I added in JsonMapper class, theses methods I use them to parse json response. If it's ok, now you will at each queries I have changed and review it. Please tell what have you have reviewed until now and make comments about I have done so I can make to something to help you review my patches.
Normally the queries are ok as the tests pass, I have just replaced the xml responses by json reponsees.
I haven't changed 7000 lines of code, There's also the resources files I have added to do the tests.
Do you any update about the "How to contribute"?

Sorry for the delay my real live job is very stressful in the last months.
To the topic of this issue: I tried to removed the format changes and squashed and reformated your change a little. See branch hunsu-master next steps will follow in this branch

If I add comments to this squashed changes, it is possible that you work with this state instead of merging back this changes?

Yes I can.

Hi Hunsu, the stressful days are gone and I spend some time to your patches.Your changes looks good, I've added a few comments the branch.
What do you think to rebase your changes to 3 and give them the titles ( so it's easier for me to write releasenotes later)

Removed request paramater array like [a=b, a=c]
Replaced XML support with JSON
Added new watchlist support

the stressful days are gone and I spend some time to your patches.

Glade to hear that, I have even started my own library.

What do you think to rebase your changes to 3 and give them the titles ( so it's easier for me to write releasenotes later)

Done. Please verify what I have done (test branch) as I'm not very familiar with git rebase. Perhaps you will have to fix check style and format the code.

authors: Hunsu eldur jotpe

repo: eldur/jwbf


text:
在electron-vue-vite 中如何使用代理来请求后端数据接口？？

在electron-vue-vite 中如何使用代理来请求后端数据接口？？

直接用住主进程请求不就行了？

@caoxiemeihao 那怎么吧请求返回的数据传递到页面上呢？

vite.config.js 里面 配置下代理就行了
server: {
host: pkg.debug.env.VITE_DEV_SERVER_HOSTNAME,
port: pkg.debug.env.VITE_DEV_SERVER_PORT,
proxy: {
"^/api": {
target: xxx,
rewrite: (path) => path.replace(/^/api/, ""),
changeOrigin: true,
},
},
},

不太行啊
---- 回复的原邮件 ----
| 发件人 | @.> |
| 日期 | 2023年03月08日 16:07 |
| 收件人 | @.> |
| 抄送至 | @.>@.> |
| 主题 | Re: [electron-vite/electron-vite-vue] 在electron-vue-vite 中如何使用代理来请求后端数据接口？？ (Issue #349) |
vite.config.js 里面 配置下代理就行了
server: {
host: pkg.debug.env.VITE_DEV_SERVER_HOSTNAME,
port: pkg.debug.env.VITE_DEV_SERVER_PORT,
proxy: {
"^/api": {
target: xxx,
rewrite: (path) => path.replace(/^/api/, ""),
changeOrigin: true,
},
},
},
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

authors: caoxiemeihao daizhiyu yoke0104x

repo: electron-vite/electron-vite-vue


text:
fix: run node-gyp rebuild correctly

It should have iterated through all of the node-gyp commands since node-gyp rebuild pushes clean, configure, and build commands to the todo list. Also:

ensures that the module path is the current working directory when it's running
adds a regression test

Fixes #404

A further complication: node-gyp likes to set the MSVS version (and corresponding environment variable) to 2015, which is very problematic on the CIrcleCI Windows machines. Had to cache the original value when instantiating the Rebuilder class and also restore the environment variable after each call to rebuild() in tests.

@electron/wg-ecosystem this is ready for review. Sorry for the commit noise earlier, I had to figure out the Windows situation.
One person reports that this PR is working for them: https://github.com/electron/electron-rebuild/issues/404#issuecomment-689863252

repo: electron/electron-rebuild


text:
Code tags' content is shifted to the left

These styles seem to be the culprit:

:clap:


text:
Uses builder default style for custom field input demo instead of custom style

Fixes elegantthemes/Divi#20530
Based on the feedback, we need to use default builder field style instead of the custom style. It's better for the customer for the experience to be cohesive.
This PR also fix the warning about unused construct method on input component and class property warning on Hello World module component.

@lots0logs I just added a fix for class property warning here https://github.com/elegantthemes/create-divi-extension/pull/376/commits/cdbd061342689888f88a94af9f49f587bc7491a8.

@lots0logs I just reverted custom field definition on Hello World module because it contradicts with the existing tutorial and may confuse 3rd party devs who want to learn custom module development for the first time.

@lots0logs Yeah.. it's intentional. We keep it as custom field example. However, we don't connect it to Hello World module. So, we can use and connect it later with Simple Header module on our tutorial.
I mean, once new 3rd party devs learn about Creating Custom Module, they can continue to learn Creating Custom Field and connect it to Simple Header module from the previous tutorial.

repo: elegantthemes/create-divi-extension


text:
Document Glib.Notification [$50]

Should add docs about how to use notifications with Glib.Notification.
https://www.bountysource.com/issues/28858552-document-glib-notification

I want to tackle on this, but it's more than what the title may suggest: In order to get GLib.Notifications to show up properly, you need an GLib.Application subclass, a .desktop file, and if you want to offer buttons, GLib Actions and D-BUS activation. I think that's a load of prerequisites that the guide would only touch lightly (but you'll need to understand), so maybe change the description, or create separate bugs for them.

Hey @desiderantes, You're right, it would cover creating a GLib.Application subclass. Our guide already covers creating a .desktop file so you would only need to mention amending it. As of this moment, buttons aren't supported by Gala's notification server, so it wouldn't need to cover explicit buttons.

I think @Philip-Scott may have already started working on this. Pinged him this morning to make sure he assigns himself if he is

Ok, i'll drop what i currently have
El sáb., dic. 5, PM a 12:55 PM, Daniel Forénotifications@github.com escribió:
I think @Philip-Scott may have already started working on this. Pinged him this morning to make sure he assigns himself if he is
—
Reply to this email directly or view it on GitHub.

authors: danrabbit desiderantes

repo: elementary/mvp


text:
Add encoding utf-8 from the form

Add encoding utf-8 from the form.

instead

#new = request.POST.get('task', '').strip()
add
new = request.POST.getunicode('task', '')


text:
Season Packs

Burst doesn’t find any season packs if i go with strm file for an episode. It just finds episode torrents. Isn’t it possible to find season packages with more seeders?
If i manually search name of series s01 I can find but the thing is no season pack result if i do click a specific episode from my library.
thanks.

Some trackers has episode torrents, some have mostly season packs.
Each tracker has own settings what to search when you need episode/movie.
You can look at providers.json file or override any settings.

so what should i do? when I click from library for example:
name s01 e02
strm file
I guess it searches:
name s01 e2
but it should also search:
name s01
and should bring me the both results.
because I know that there is a season pack on the same tracker and it has way more seeders than lonely episode torrent.

so what should i do?

Use trackers that have season queries for episode searches.
Change queries for trackers that you like.

for example:
    "season_extra": "",
    "season_extra2": "",
    "season_keywords": "{title} s{season:2}",
    "season_keywords2": "",
    "season_query": "",

It seems season_query is empty for this instance then change to what?

@kavuraki season... are queries, used to search seasons. You need tv_..., they are used for episode searches.

"tv_keywords": "{title} s{season:2}e{episode:2}",
"tv_keywords2": "{title} {season:2}x01|S{season:2}",
"tv_keywords_fallback": "{title} s{season}"
I understand that from these keywords when I click a library integrated elementum strm file then 3 queries are occured:
first query with "{title} s{season:2}e{episode:2}",
second query with "{title} {season:2}x01|S{season:2}",
third query with "{title} s{season}"
for each providers I had enabled.
Then It gathers all results and shows me.
In this respect, my problem is lack of "tv_keywords_fallback" (third query) results because I am sure that there exist season packs with plenty seeders. I want to play the episode from that pack not from lonely episode torrent.
Sorry that I may be insistent and boring...

@kavuraki tv_keywords and tv_keywords2 are queried always, does not matter if first one has any results or not. tv_keywords_fallback is run only when usual queries get no results.

I edited providers.json
this:
"tv_keywords": "{title} s{season:2}e{episode:2}",
"tv_keywords2": "{title} {season:2}x01|S{season:2}",
"tv_keywords_fallback": "{title} s{season}"
to:
"tv_keywords": "{title} s{season:2}e{episode:2}",
"tv_keywords_fallback": "{title} s{season}",
"tv_keywords2": "{title} {season:2}x01|S{season:2}"
on the sites that I enabled.
Still no season packs are found from the trackers that I know the pack exists %100
just finds the torrents related to that episode which have less sources than packs.
What would be the reason behind this?

Log file can show what is searched and what query is used for search.
Changing in providers.json is a bad practice, this file will be overwritten by plugin update. You should use overrides.json for it.

resolved with changing
"tv_keywords2": "{title} s{season}"
to
"tv_keywords2": "{title} s{season:2}"
where should I put the overrides.json exactly?

http://elementum.surge.sh/burst/override/

authors: elgatito kavuraki


text:
MSID: 93887 Version: 2 DOI: 10.31234/osf.io/wymuc

MSID: 93887
Version: 2
Preprint DOI: https://doi.org/10.31234/osf.io/wymuc
Step 1. Awaiting reviews
Editorial to post reviews via hypothesis
Useful links:

DocMap: https://data-hub-api.elifesciences.org/enhanced-preprints/docmaps/v2/by-publisher/elife/get-by-manuscript-id?manuscript_id=93887
New model tracking: https://docs.google.com/spreadsheets/d/1_fHaoOy7hjyocptKtVJRijeNpUY4hBS7Ck_aVmx6ZJk/
Reviews on sciety: https://sciety.org/articles/activity/10.31234/osf.io/wymuc

For trouble shooting (e.g. no Docmaps available):

DocMap issue addressing: https://miro.com/app/board/uXjVNCwK6EI=/
Explore DataHub DocMaps API: https://lookerstudio.google.com/reporting/4c2f0368-babb-4beb-b5b3-497e7e7b0f08/page/ejphD
Unmatched submissions and preprints: https://lookerstudio.google.com/u/0/reporting/9f86204f-3bf7-477c-9b18-5c5ef141bf69/page/p_gxi57ha93c
Unmatched manuscripts spreadsheet: https://docs.google.com/spreadsheets/d/15QcK8w-ssB7109RQEDtFpJPZ0J5HTGxoHa_2TtpMBbg/edit#gid=1336081641

Step 2. Preview reviewed preprint
Production QC content ahead of publication
Instructions:

QC preview: https://prod--epp.elifesciences.org/previews/93887v2
Update ticket with any problems (add blocked label)
When QC OK, add QC OK label to ticket and add publication date and time to https://docs.google.com/spreadsheets/d/1amAlKvdLcaDp5W8Z8g77NmkwbMF5n_u89ArSqPMO8jg
Move card to next column
(At end of the day post link in #enhanced-preprint and ask for PDF to be generated)

Useful links:

Preprint DOI :  https://doi.org/10.31234/osf.io/wymuc
Confirm reviews returned by EPP: https://prod--epp.elifesciences.org/api/reviewed-preprints/93887/v2/reviews
To update the MECA path in the docmap: https://docs.google.com/spreadsheets/d/1mctCQuNFBjSn97Lihy7_vBO6z7-N-oqyLv4clyi6zHg

Step 3: Awaiting search reindex
This step adds the reviewed preprint to the homepage: https://elifesciences.org
The search reindex is triggered once an hour. We need the reviewed preprint to be indexed as the search application serves the journal homepage.
Useful links:

Jenkins pipeline to reindex search can be triggered sooner or monitored here: https://alfred.elifesciences.org/job/process/job/process-reindex-reviewed-preprints/

Step 4: Published! PDF requested
Waiting for PDF to be generated
Useful links:

PDF tracking: https://docs.google.com/spreadsheets/d/106_XeDjmuBae7gexOTNzg60lapeqjl2aRn9DzupGyS8/

Step 5: Introduce PDF to data folder and git repo
Upload PDF to relevent folder in git repo https://github.com/elifesciences/enhanced-preprints-data/
Step 6: Done!

[ ] Kettle is on!

v7 of preprint

@acollings The peer review section has duplicated each reviewer's comments, can this be fixed?

Thanks Naushin. I'm going to ask @fred-atherden to take a look as it's more complicated than usual (OSF). Not sure if we've messed up the posting (Sue's away). I'm not exactly sure what I should do to fix this. I'm happy to help but I'm hoping Fred can point me in the right direction...

Yeah I'm really confused by what's going on. The new hypothesis comments haven't been pulled into the DocMap at all, and instead the old ones have just been duplicated in the version 1. Even more confusing is why these appear in the peer review tab for the v2 preview on EPP (instead of there just being some kind of broken page).
In any case, searching here suggests DataHub has found the right hypothesis comments:

I see there's no representation of the revised submission in the DocMap. In order to rectify that we need to add the details to the unmatched manuscripts spreadsheet.
I've just done so. We should check what this/the DocMap looks like when DataHub has pulled that information in.

Great thanks, looks good now!

authors: acollings fred-atherden naushinthomson


text:
🛑 Jellyfin is down

In 8196af3, Jellyfin (https://jellyfin.elightcap.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Jellyfin is back up in 4c41e26 after 10 minutes.

repo: elightcap/statuspage


text:
Improve support for soft deletes

Elixir version
All
Database and Version
PostgreSQL 14+
Ecto Versions
All
Database Adapter and Versions (postgrex, myxql, etc)
Postgrex
Current behavior
I am trying to enable soft-delete behaviour in an application, following the rules in this article: https://evilmartians.com/chronicles/soft-deletion-with-postgresql-but-with-logic-on-the-database
Assuming a "item" table with the following field:
  add :_deleted_at, :utc_datetime

I can trivially add soft deletes like this:
    execute """
            CREATE OR REPLACE RULE "phx_sync_soft_deletion" AS ON DELETE TO "items"
            DO INSTEAD UPDATE items SET _deleted_at = NOW() WHERE id = OLD.id RETURNING OLD.*;
            """,
            """
            DROP RULE IF EXISTS phx_sync_soft_deletion ON items;
            """

As well as a view that hides all deleted rows:
    execute "CREATE OR REPLACE VIEW visible_items AS SELECT * FROM items WHERE _deleted_at IS NULL",
            "DROP VIEW IF EXISTS visible_items"

And then I change my Ecto schema to the following:
  schema "visible_items" do

This means I only see the non soft-deleted rows. But if I want to see them all, I can do Repo.all({"items", Item}).
However, this has one issue: because the delete never happen, the underlying Repo.delete(item) operation returns zero rows. Ecto then assumes this is happening because the record does not exist, and return an Ecto.StaleEntryError. We can workaround this by calling {:error, _changeset} = Repo.delete(item, stale_error_field: :id) but it still returns an error tuple.
Expected behavior
Perhaps we should allow a allow_stale: true option? Or allow_no_return: true?
I thought about enabling this by default, because a delete should be idempotent, but perhaps that's not the best idea. Some applications may want to detect when two deletes race each other?

:allow_stale seems better to me because the count of 0 is still technically a return value. and also you can still use returning.
i thought maybe postgres has a way to send the number of affected rows if a rule is changing the delete. but i haven't been able to find anything to do that

Enabling by default might be confusing. Assuming we will still return {:ok, struct}.
My reason for thinking this is because I see the same kind of confusion when insert/update are used without returning. It is relatively common for new people to be confused why the returned struct is not what they expect to be in the database. So this is kind of like another way to be confused.

Since zero rows are returned, returning has no effect, unfortunately.

Implementation is trivial. I'm against it being default because:

It's a breaking change
It can be a foot-gun / confusion point. Being opt-in is more straightforward IMO

Oh if both the rule and the delete operation specify returning I think you can still get data. At least it worked when I tested on my psql

Oh if both the rule and the delete operation specify returning I think you can still get data. At least it worked when I tested on my psql

So psql is doing something special. If I do this on the sample app I have:
Sync.Repo.query!("DELETE FROM items WHERE id = $1 RETURNING id", [Ecto.UUID.dump!(id)])
|> IO.inspect()

It returns this:
%Postgrex.Result{
  command: :delete,
  columns: nil,
  rows: nil,
  num_rows: 0,
  connection_id: 1286,
  messages: []
}

I would love if it worked :(

Yeah it seems it works with simple queries but not the binary protocol. I tried testing in Ecto as well and when it didn't work I tried in Postgrex directly to see what was going on. And I could get it to work on a simple connection but not a "normal" postgrex connection.
I'm curious what's going on so I'll probably still keep looking into it. But don't know if I'll find anything useful so probably shouldn't hold up this issue.

Beside the obvious benefits that comes with creating rules in the the database, then Ecto already points in the directions of implementation in the application layer:  https://hexdocs.pm/ecto/Ecto.Repo.html#c:prepare_query/3 and to me, this is where Ecto/Elixir application becomes powerful.
So maybe we should be able to modify a repos insert/delete/update even more.

We can close this, no?

I reopened because while the suggestion was implemented, there could be further discussion. But yeah, I think it can be closed :)

authors: Schultzer greg-rychlewski josevalim v0idpwn

repo: elixir-ecto/ecto


text:
allow arbitrary parentheses in wheres

hello! :wave:
I noticed when building a dynamic/2 that where clauses don't seem to like arbitrary parentheses surrounding expressions like not is_nil(..).
Most minimally with a dynamic/2 (although the same happens in where/3 and from/2):
iex> dynamic([f], (not is_nil(f.foo)))
** (Ecto.Query.CompileError) `not(is_nil(f.foo))` is not a valid query expression.
# ..

You can work around this particular case a number of ways:

drop those extra parentheses, they aren't necessary: dynamic([f], not is_nil(f.foo))
use the parentheses as shown in the error message: dynamic([f], not(is_nil(f.foo)))
replace not with == false: dynamic([f], (is_nil(f.foo) == false))

So ultimately this PR is probably not necessary, but I like having the option to have those extra parentheses. I found this behavior when writing out a dynamic/2 with a few expressions pieced together with and/2s and or/2s, and I like to add some extra parentheses to be explicit and let the formatter clean up for me.
What do you think?

Beautiful test, beautiful fix. Thank you.

:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart:

Today, I caught the same bug in pagination
@the-mikedavis thank you for the fix

authors: fuelen josevalim the-mikedavis


text:
@spec Auto Suggestion Broken since somewhen around 0.6.2?

Environment

Elixir & Erlang versions (elixir --version): Erlang/OTP 23 [erts-11.2] [source] [64-bit] Elixir 1.11.4 (compiled with Erlang/OTP 21)
Operating system: Windows 10 /WSL Arch
Editor or IDE name (e.g. Emacs/VSCode): VSCode
Editor Plugin/LSP Client name: ElixirLS

Troubleshooting

[X] Restart your editor (which will restart ElixirLS) sometimes fixes issues
[X] Stop your editor, remove the entire .elixir_ls directory, then restart your editor

NOTE: This will cause you to have to re-run the dialyzer build for your project

If you're experiencing high CPU usage, it is most likely Dialyzer building the PLTs; after it's done the CPU usage should go back to normal. You could also disable Dialyzer in the settings.
Logs

Check the output log by opening View > Output and selecting "ElixirLS" in the dropdown. Please include any output that looks relevant. (If ElixirLS isn't in the dropdown, the server failed to launch.)
No Errors

Check the developer console by opening Help > Toggle Developer Tools and include any errors that look relevant.
No Errors

Installing 0.7.0 then repeatedly deleting .elixir_ls does not help
installing 0.6.2 then repeatedly deleting .elixir-ls does help
with 0.6.2 i get suggestions for the @spec , with 0.7.0 i dont
0.6.2: https://cdn.discordapp.com/attachments/269508806759809042/829735077779996712/unknown.png
0.7.0: https://media.discordapp.net/attachments/646832679999897610/829994787565731911/unknown.png

@gallexme What do you mean by "@spec Auto Suggestion"? Do you mean Code Lens suggesting type specs for functions/macros (which I verified is working) or @spec attribute code completion (which is also working) or code completions inside typespecs (which is also working)? We need more info and a project that reproduces this issue.

0.6.2 Pic shows the suggestion I'm talking about, a gray @spec recommendation which u can click and automatically gets inserted into the code, I'm not the only one with the issue, it happens with any project
I'm using Windowsz, but same issue with arch Linux on wsl2
For one guy it worked by repeatedly installing 0.7, but for me only after installing a 0.6 version
@axelson
Meant
"Hmm, that's likely a bug introduced since we generalized that portion of the code. Please file a bug report thumbsup"
Other user having same issue:

Im using Using otp 23 and elixir 1.11
Same issue happens with otp24 rc2 and elixir 1.11 on arch Linux
How can I provide u more Infos?
https://gitlab.com/zen_core/zen_core
Is one project where that issue happens
But I also see it happening on empty elixir applications

@gallexme you didn't post any pic.

a gray @SPEC recommendation which u can click and automatically gets inserted into the code

It's called Code Lens and the problem is on Windows only. On macOS it works fine.

did post those 2 pics in the issue
but its okay :)
0.6.2: https://cdn.discordapp.com/attachments/269508806759809042/829735077779996712/unknown.png
0.7.0: https://media.discordapp.net/attachments/646832679999897610/829994787565731911/unknown.png

authors: gallexme lukaszsamson

repo: elixir-lsp/elixir-ls


text:
Bump versions of "cache" action and rust at CI files

This makes the nightly version used in our CI equal to the used in
polars.

I'm doing a little experiment trying to improve cache usage. But it shouldn't change much.

repo: elixir-nx/explorer


text:
Using placeholders results in (Exqlite.Error) expected 6 arguments, got 5

Using ecto's placeholder feature results in an unexpected error:
placeholders = %{timestamp: ~N[2024-10-26 16:40:06]}

attrs = [
  %{
    id: 12911,
    json: %{a: 42},
    author_login: "jason",
    committed_date: ~N[2024-10-25 17:57:25],

    # Inserting with placeholders results in `(Exqlite.Error) expected 6 arguments, got 5`
    inserted_at: {:placeholder, :timestamp},
    updated_at: {:placeholder, :timestamp},

    # Inserting directly successfully inserts the row
    # inserted_at: placeholders.timestamp,
    # updated_at: placeholders.timestamp,
  }
]

Sqlite3Repro.Repo.insert_all(
  Sqlite3Repro.MergedPullRequest,
  attrs,
  placeholders: placeholders
)

Results in:

iex(1)> Sqlite3Repro.run_and_save_merged_prs_query
** (Exqlite.Error) expected 6 arguments, got 5
INSERT INTO "merged_pull_requests" ("id","json","author_login","committed_date","inserted_at","updated_at") VALUES (?,?,?,?,?,?)
(ecto_sql 3.12.1) lib/ecto/adapters/sql.ex:1096: Ecto.Adapters.SQL.raise_sql_call_error/1
(ecto_sql 3.12.1) lib/ecto/adapters/sql.ex:967: Ecto.Adapters.SQL.insert_all/9
(ecto 3.12.4) lib/ecto/repo/schema.ex:59: Ecto.Repo.Schema.do_insert_all/7
(sqlite3_repro 0.1.0) lib/sqlite3_repro.ex:60: Sqlite3Repro.run_and_save_merged_prs_query/0
iex:1: (file)

Full repro is at https://github.com/axelson/sqlite3_repro

I don't think I implemented placeholders 😞

@axelson published under v0.17.3

@warmwaffles wow, that was fast! Thank you so much! I just tested it in my full app and it's now working! 🎉

No problem. I was meaning to implement cell wise placeholders. This is just the excuse I needed.

authors: axelson warmwaffles


text:
Fresh Install errors when trying to clone elixir-lsp/elixir-ls

With a fresh installation of Erlang OTP 25 and Elixir 1.17, When I open an .ex file I'm prompted to install elixir_ls (as expected).
It fails immediately with
{"init terminating in do_boot",{undef,[{elixir,start_cli,[],[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({undef,[{elixir,start_cli,[],[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...done

The command output is:
[elixir-tools] Cloning ref tags/v0.22.0 from repo elixir-lsp/elixir-ls
Error executing vim.schedule lua callback: .../lazy/elixir-tools.nvim/lua/elixir/elixirls/download.lua:27: Failed to clone elixir-lsp/elixir-ls
stack traceback:
        [C]: in function 'assert'
        .../lazy/elixir-tools.nvim/lua/elixir/elixirls/download.lua:27: in function 'clone'
        ...nvim/lazy/elixir-tools.nvim/lua/elixir/elixirls/init.lua:217: in function 'install_elixir_ls'
        ...nvim/lazy/elixir-tools.nvim/lua/elixir/elixirls/init.lua:309: in function 'cb'
        ...ocal/share/nvim/lazy/dressing.nvim/lua/dressing/util.lua:206: in function <...ocal/share/nvim/lazy/dressing.nvim/lua/dressing/util.lua:202>

The only thing I wonder is if this is somehow related to Apple Silicon. But I have no idea since it's failing so early in the process.

I have the same problem with my AMD chip, clone instantly fails.

what happens when you try to clone the repo from the cli?

can you delete the "elixir-tools.nvim" folder that is inside of the .elixir_ls folder in your project and see if it works then, something may have gotten goofed with where it attempts to clone the repo into

Interesting yeah that looks like it's worked. I did that several times over the weekend (deleted the folder) only to have it choke at the same place. It looks like both Next_LS and Elixir_ls are now attached to the buffer. Thank you!

authors: Robert4S mhanberg nobleach


text:
[BUG] arraylength(EWW_CPU.cores) seems broken on one of my machines, but not the other

Checklist before submitting an issue

[X] I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
[X] I have specifically verified that this bug is not a common user error
[X] I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)

Description of the bug
I have defined a widget to show me the number of CPU cores, using this expression: arraylength(EWW_CPU.cores)
On one system, this works perfectly and displays a number
On my other system, this displays an empty widget, not even a zero
There's nothing in eww logs output or the output from eww reload that is related to this (same output with and without this widget)
Note that EWW_CPU.cores and EWW_CPU.cores[0] and EWW_CPU.cores[15] and EWW_CPU.avg all work as expected, there's just something weird happening when I try to use arraylength(EWW_CPU.cores), and only on the one system
Reproducing the issue
The full widget is here:
(defwidget cpus []
  (box :class "cpus" :orientation "h" :space-evenly false
    "🐂 ${arraylength(EWW_CPU.cores)}"))

Expected behaviour
This is working as expected on my Intel-based laptop, showing "🐂 12"
However, on my AMD-based system, I get an empty widget, it still takes up the space that an empty widget would (based on the padding in my stylesheet), but it is almost as though it is displaying an empty string, there is not even the "🐂" at the beginning
Additional context
This is the last entry from cat /proc/cpuinfo there (system that works):
processor       : 11
vendor_id       : GenuineIntel
cpu family      : 6
model           : 165
model name      : Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
stepping        : 2
microcode       : 0xf0
cpu MHz         : 803.265
cache size      : 12288 KB
physical id     : 0
siblings        : 12
core id         : 5
cpu cores       : 6
apicid          : 11
initial apicid  : 11
fpu             : yes
fpu_exception   : yes
cpuid level     : 22
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp pku ospke md_clear flush_l1d arch_capabilities
vmx flags       : vnmi preemption_timer posted_intr invvpid ept_x_only ept_ad ept_1gb flexpriority apicv tsc_offset vtpr mtf vapic ept vpid unrestricted_guest vapic_reg vid ple pml ept_mode_based_exec
bugs            : spectre_v1 spectre_v2 spec_store_bypass swapgs itlb_multihit srbds mmio_stale_data
bogomips        : 5202.65
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

And this is the output from eww state | grep EWW_CPU (system that works):
EWW_CPU: { "cores": [{"core": "cpu0", "freq": 810, "usage": 4},{"core": "cpu1", "freq": 806, "usage": 4},{"core": "cpu2", "freq": 811, "usage": 1},{"core": "cpu3", "freq": 814, "usage": 0},{"core": "cpu4", "freq": 810, "usage": 3},{"core": "cpu5", "freq": 810, "usage": 2},{"core": "cpu6", "freq": 813, "usage": 2},{"core": "cpu7", "freq": 805, "usage": 4},{"core": "cpu8", "freq": 812, "usage": 1},{"core": "cpu9", "freq": 813, "usage": 1},{"core": "cpu10", "freq": 811, "usage": 1},{"core": "cpu11", "freq": 812, "usage": 1}], "avg": 1.8321309 }

This is the last entry from cat /proc/cpuinfo there (system that does not work):
processor       : 15
vendor_id       : AuthenticAMD
cpu family      : 23
stepping        : 2
microcode       : 0x800820d
cpu MHz         : 1518.701
cache size      : 512 KB
physical id     : 0
siblings        : 16
core id         : 7
cpu cores       : 8
apicid          : 15
initial apicid  : 15
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate ssbd ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca sev sev_es
bugs            : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
bogomips        : 6402.36
TLB size        : 2560 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 43 bits physical, 48 bits virtual
power management: ts ttp tm hwpstate cpb eff_freq_ro [13] [14]

And this is the output from eww state | grep EWW_CPU (system that does not work):
EWW_CPU: { "cores": [{"core": "cpu0", "freq": 3289, "usage": 1},{"core": "cpu1", "freq": 1599, "usage": 1},{"core": "cpu2", "freq": 1360, "usage": 1},{"core": "cpu3", "freq": 1338, "usage": 1},{"core": "cpu4", "freq": 1375, "usage": 1},{"core": "cpu5", "freq": 1377, "usage": 0},{"core": "cpu6", "freq": 1373, "usage": 0},{"core": "cpu7", "freq": 1376, "usage": 0},{"core": "cpu8", "freq": 2549, "usage": 1},{"core": "cpu9", "freq": 1332, "usage": 1},{"core": "cpu10", "freq": 1503, "usage": 0},{"core": "cpu11", "freq": 1513, "usage": 1},{"core": "cpu12", "freq": 1466, "usage": 5},{"core": "cpu13", "freq": 3345, "usage": 1},{"core": "cpu14", "freq": 1447, "usage": 2},{"core": "cpu15", "freq": 1334, "usage": 1}], "avg": 1.18747 }

❯ eww --version
eww 0.2.0

❯ paru -Qi eww
Name            : eww-wayland-git
Version         : 0.2.0.r33.g106106a-1

Wasn't arraylength only added in 0.3.0 ? If it's that there should have been a warning about unknown function tho.

OMG
I can't believe it was this simple, doh!
Works with -git package for commit https://github.com/elkowar/eww/commit/4ffb7d48414ecba9936be1a2dfffce4130dcbdaa
Doesn't work for commit https://github.com/elkowar/eww/commit/106106ade31e7cc669f2ae53f24191cd0a683c39
Thanks @viandoxdev !!!

authors: jokeyrhyme viandoxdev

repo: elkowar/eww


text:
update mongodb to 2.x and mongoose to 4.x

tests are still passing

Thank you for the PR, @thomaspeklak!  I erred on the side of maintaining backwards compatibility with older libs (>= rather than ~), just in case there are still people using them.  Fixed as of d0112d8362f29cc9008e34283edf13c18b7880fb and published as v1.1.0

authors: elliotf thomaspeklak

repo: elliotf/mocha-mongoose


text:
Fix Mouse.isDown behavior for non-fullscreen components

The signal Mouse.isDown doesn't work as explained in the documentation:

True when any mouse button is down, and false otherwise.

For embedded components pressing or releasing a mouse button outside the component doesn't change the value of the signal Mouse.isDown, even if the mouse is moved back into the component afterwards.
Here is an example (save it as Main.elm and compile elm-make Main.elm --output=elm.js):
module Main (main) where

import Graphics.Element exposing (show)
import Mouse

main = Signal.map show Mouse.isDown

Now embed it in an HTML document:

Mouse no longer lives in core. Not sure if it is still an issue in elm-lang/mouse.

repo: elm-lang/core