LuceneSailConnection is not threadsafe

The LuceneSail sends the same LuceneIndex to each LuceneSailConnection created from it. Each of the connections are implemented to call LuceneIndex.endReading when they are closed, which fails sporadically with the following (or similar) stacktrace:
Exception in thread "Thread-1" java.lang.AssertionError: org.eclipse.rdf4j.repository.RepositoryException: org.eclipse.rdf4j.sail.SailException: org.apache.lucene.store.AlreadyClosedException: this IndexReader is closed
	at org.eclipse.rdf4j.sail.lucene.AbstractLuceneSailTest$1.run(AbstractLuceneSailTest.java:1069)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.eclipse.rdf4j.repository.RepositoryException: org.eclipse.rdf4j.sail.SailException: org.apache.lucene.store.AlreadyClosedException: this IndexReader is closed
	at org.eclipse.rdf4j.repository.sail.SailRepositoryConnection.commit(SailRepositoryConnection.java:172)
	at org.eclipse.rdf4j.repository.base.AbstractRepositoryConnection.conditionalCommit(AbstractRepositoryConnection.java:366)
	at org.eclipse.rdf4j.repository.base.AbstractRepositoryConnection.add(AbstractRepositoryConnection.java:491)
	at org.eclipse.rdf4j.sail.lucene.AbstractLuceneSailTest$1.run(AbstractLuceneSailTest.java:1063)
	... 1 more
Caused by: org.eclipse.rdf4j.sail.SailException: org.apache.lucene.store.AlreadyClosedException: this IndexReader is closed
	at org.eclipse.rdf4j.sail.lucene.LuceneSailConnection.commit(LuceneSailConnection.java:237)
	at org.eclipse.rdf4j.repository.sail.SailRepositoryConnection.commit(SailRepositoryConnection.java:169)
	... 4 more
Caused by: org.apache.lucene.store.AlreadyClosedException: this IndexReader is closed
	at org.apache.lucene.index.IndexReader.ensureOpen(IndexReader.java:274)
	at org.apache.lucene.index.SegmentReader.getPostingsReader(SegmentReader.java:227)
	at org.apache.lucene.index.CodecReader.fields(CodecReader.java:102)
	at org.apache.lucene.index.LeafReader.terms(LeafReader.java:207)
	at org.apache.lucene.index.LeafReader.termDocsEnum(LeafReader.java:318)
	at org.eclipse.rdf4j.sail.lucene.LuceneIndex.addDocuments(LuceneIndex.java:461)
	at org.eclipse.rdf4j.sail.lucene.LuceneIndex.getDocuments(LuceneIndex.java:452)
	at org.eclipse.rdf4j.sail.lucene.LuceneIndex.getDocuments(LuceneIndex.java:338)
	at org.eclipse.rdf4j.sail.lucene.AbstractSearchIndex.addRemoveStatements(AbstractSearchIndex.java:237)
	at org.eclipse.rdf4j.sail.lucene.LuceneSailConnection.addRemoveStatements(LuceneSailConnection.java:251)
	at org.eclipse.rdf4j.sail.lucene.LuceneSailConnection.commit(LuceneSailConnection.java:217)
	... 5 more
org.eclipse.rdf4j.repository.RepositoryException: org.eclipse.rdf4j.sail.SailException: org.apache.lucene.store.AlreadyClosedException: this IndexReader is closed
	at org.eclipse.rdf4j.repository.sail.SailRepositoryConnection.commit(SailRepositoryConnection.java:172)
	at org.eclipse.rdf4j.repository.base.AbstractRepositoryConnection.conditionalCommit(AbstractRepositoryConnection.java:366)
	at org.eclipse.rdf4j.repository.base.AbstractRepositoryConnection.add(AbstractRepositoryConnection.java:491)
	at org.eclipse.rdf4j.sail.lucene.AbstractLuceneSailTest$1.run(AbstractLuceneSailTest.java:1063)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.eclipse.rdf4j.sail.SailException: org.apache.lucene.store.AlreadyClosedException: this IndexReader is closed
	at org.eclipse.rdf4j.sail.lucene.LuceneSailConnection.commit(LuceneSailConnection.java:237)
	at org.eclipse.rdf4j.repository.sail.SailRepositoryConnection.commit(SailRepositoryConnection.java:169)
	... 4 more
Caused by: org.apache.lucene.store.AlreadyClosedException: this IndexReader is closed
	at org.apache.lucene.index.IndexReader.ensureOpen(IndexReader.java:274)
	at org.apache.lucene.index.SegmentReader.getPostingsReader(SegmentReader.java:227)
	at org.apache.lucene.index.CodecReader.fields(CodecReader.java:102)
	at org.apache.lucene.index.LeafReader.terms(LeafReader.java:207)
	at org.apache.lucene.index.LeafReader.termDocsEnum(LeafReader.java:318)
	at org.eclipse.rdf4j.sail.lucene.LuceneIndex.addDocuments(LuceneIndex.java:461)
	at org.eclipse.rdf4j.sail.lucene.LuceneIndex.getDocuments(LuceneIndex.java:452)
	at org.eclipse.rdf4j.sail.lucene.LuceneIndex.getDocuments(LuceneIndex.java:338)
	at org.eclipse.rdf4j.sail.lucene.AbstractSearchIndex.addRemoveStatements(AbstractSearchIndex.java:237)
	at org.eclipse.rdf4j.sail.lucene.LuceneSailConnection.addRemoveStatements(LuceneSailConnection.java:251)
	at org.eclipse.rdf4j.sail.lucene.LuceneSailConnection.commit(LuceneSailConnection.java:217)
	... 5 more

The failure is not deterministic for whatever reason.
In general RepositoryConnection is not specified to be threadsafe, but closing a repository connection should not affect other connections before the entire Repository/Sail is shutdown. In this test the shutdown should not happen before the test completes. The bug is reproducible fairly consistently for me, happening in at least 1 in 20 builds with a change to randomly vary the number of insertions for each of the threads so they don't all complete at a similar time consistently.

Are you using a build with the changes from #192 ?

@pulquero good catch, he's probably not. This is my mistake: I have neglected to merge the release branch back into master. I'll take care of it ASAP.

Merge done.

I will merge master back into that branch today and see if it is replicable still. If it is still occurring for me (and hudson) it is possible that it is either a bug with my changes, or an existing bug in the lucene/sail code that is being triggered more reliably with my changes that more proactively close iterators which may be releasing resources that were previously being locked up for slightly longer.

After merging master and fixing the trix pom.xml, I am (possibly also as the issue above is intermittent) receiving another error, should I open a separate issue or coopt this issue for it:
[main] INFO org.elasticsearch.node - [Asp] version[1.7.0], pid[5571], build[929b973/2015-07-16T14:31:07Z]
[main] INFO org.elasticsearch.node - [Asp] initializing ...
[main] INFO org.elasticsearch.plugins - [Asp] loaded [], sites []
[main] INFO org.elasticsearch.env - [Asp] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [69.3gb], net total_space [90.4gb], types [ext4]
[main] INFO org.elasticsearch.node - [Asp] initialized
[main] INFO org.elasticsearch.node - [Asp] starting ...
[main] INFO org.elasticsearch.transport - [Asp] bound_address {local[5]}, publish_address {local[5]}
[main] INFO org.elasticsearch.discovery - [Asp] sail_test/YFAyJLDCTkS4ZVgok1p2mA
[elasticsearch[Asp][clusterService#updateTask][T#1]] INFO org.elasticsearch.cluster.service - [Asp] master {new [Asp][YFAyJLDCTkS4ZVgok1p2mA][mint-Shakespeare][local[5]]{local=true}}, removed {[Asp][MC__PpqxQCm9mqm6_z-hwA][mint-Shakespeare][local[5]]{local=true},}, reason: local-disco-initial_connect(master)
[elasticsearch[Asp][clusterService#updateTask][T#1]] INFO org.elasticsearch.gateway - [Asp] recovered [0] indices into cluster_state
[main] INFO org.elasticsearch.http - [Asp] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/<IP_ADDRESS>:9200]}
[main] INFO org.elasticsearch.node - [Asp] started
[elasticsearch[Asp][clusterService#updateTask][T#1]] INFO org.elasticsearch.cluster.metadata - [Asp] [elastic-search-sail] creating index, cause [api], templates [], shards [1]/[0], mappings []
[elasticsearch[Asp][clusterService#updateTask][T#1]] INFO org.elasticsearch.cluster.metadata - [Asp] [elastic-search-sail] create_mapping [resource]
[main] INFO org.eclipse.rdf4j.sail.elasticsearch.ElasticsearchIndex - Field mappings:
{_all={enabled=false}, properties={_geopoint_http://www.opengis.net/ont/geosparql#asWKT={type=geo_point}, context={type=string, index=not_analyzed}, text={type=string}, uri={type=string, index=not_analyzed}}}
[main] INFO org.eclipse.rdf4j.sail.elasticsearch.ElasticsearchIndex - Cluster health: RED
[main] INFO org.eclipse.rdf4j.sail.elasticsearch.ElasticsearchIndex - Cluster nodes: 1 (data 1)
[main] INFO org.eclipse.rdf4j.sail.elasticsearch.ElasticsearchIndex - Index health: RED
[main] INFO org.eclipse.rdf4j.sail.elasticsearch.ElasticsearchIndex - Index shards: 1 (active 0 [primary 0], initializing 1, unassigned 0, relocating 0)
[main] ERROR org.eclipse.rdf4j.sail.lucene.LuceneSailConnection - Committing operations in lucenesail, encountered exception org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query_fetch], all shards failed. Only some operations were stored, 1 operations are discarded. Lucene Index is now corrupt.
org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query_fetch], all shards failed
	at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:237)
	at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$1.onFailure(TransportSearchTypeAction.java:183)
	at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:565)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
[main] INFO org.elasticsearch.node - [Asp] stopping ...
[main] INFO org.elasticsearch.node - [Asp] stopped
[main] INFO org.elasticsearch.node - [Asp] closing ...
[main] INFO org.elasticsearch.node - [Asp] closed
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.852 sec <<< FAILURE! - in org.eclipse.rdf4j.sail.elasticsearch.ElasticsearchSailIndexedPropertiesTest
testRegularQuery(org.eclipse.rdf4j.sail.elasticsearch.ElasticsearchSailIndexedPropertiesTest)  Time elapsed: 0.278 sec  <<< ERROR!
org.eclipse.rdf4j.repository.RepositoryException: org.eclipse.rdf4j.sail.SailException: org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query_fetch], all shards failed
	at org.eclipse.rdf4j.repository.sail.SailRepositoryConnection.commit(SailRepositoryConnection.java:172)
	at org.eclipse.rdf4j.sail.lucene.AbstractLuceneSailIndexedPropertiesTest.setUp(AbstractLuceneSailIndexedPropertiesTest.java:121)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: org.eclipse.rdf4j.sail.SailException: org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query_fetch], all shards failed
	at org.eclipse.rdf4j.sail.lucene.LuceneSailConnection.commit(LuceneSailConnection.java:237)
	at org.eclipse.rdf4j.repository.sail.SailRepositoryConnection.commit(SailRepositoryConnection.java:169)
	at org.eclipse.rdf4j.sail.lucene.AbstractLuceneSailIndexedPropertiesTest.setUp(AbstractLuceneSailIndexedPropertiesTest.java:121)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query_fetch], all shards failed
	at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:237)
	at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$1.onFailure(TransportSearchTypeAction.java:183)
	at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:565)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

The current master (https://github.com/eclipse/rdf4j/commit/5f4d26252ed7488a8a6f2f870920563a4f00f475) still has the reader closed issue on Hudson:
https://hudson.eclipse.org/rdf4j/job/rdf4j-master-verify/52/console
It may also have dead/live-locked ( @jeenbroekstra may need to shut the build off manually). I put in a fix for the testsuite locking up in my unrelated pull request where I was having trouble testing because of it. Feel free to cherry-pick the following commits (sorry I don't have a squashed version available right now) to master/etc. to make sure the testsuite doesn't deadlock in this case:
https://github.com/eclipse/rdf4j/pull/294/commits/214cbff6625d78c7c52334daf5f729541a770d16
https://github.com/eclipse/rdf4j/pull/294/commits/b6bbac1b4d55242fe0174ed73f38c51a98900e12
https://github.com/eclipse/rdf4j/pull/294/commits/62cb90aff2191c292bc173c25648955cd3d9ec77

Thanks Peter, I put up a PR that cherrypicks those fixes for merge into master.

The elasticsearch error is unrelated. red cluster health is usually (in this case) due to not waiting for cluster to fully initialise before issuing a query. Either can see if there is a newer version of ES we can move to which might fix the awaitForClusterHealth() method or insert a manual delay of a second or so in the test.

Merged the concurrency fix. I'm not seeing any further problems, so barring info to the contrary I think we can resolve this issue?

I will run some more builds locally with this patch today to see if it still triggers intermittently for me.

@ansell be aware that this isn't merged to master yet, only the release branch.

Okay, I will run some tests on the release branch for now until it hits master.

Just merged it because why the hell not :)

Testing this on my issue branch (after rebasing and squashing it down to a single commit) showed the error on the first attempt. The commit I tested it on was:
https://github.com/eclipse/rdf4j/pull/294/commits/4e49be2b38072b5de97bece9254245f2b5cc3b6e

I can also intermittently reproduce the bug using the Eclipse JUnit runner, so it isn't related to maven/surefire.

If I understand the problem correctly, the core of the issue is that when a LuceneSailConnection is closed, it calls LuceneIndex.endReading, which in turn (eventually) calls ReaderMonitor.endReading, and this method just calls close() without verifying if other parallel connections are still using that same  index.
Hm, looking at it: wouldn't a simple fix be to change AbstractReaderMonitor line 58 from close() to closeWhenPossible()? I'm not very familiar with this part of the code but it looks as if that method is specifically there to verify shared access.

I think AbstractReaderMonitor has a flaw in the concurrency logic: it uses both an AtomicBoolean and a reference counter, without enforcing synchronizing their reading. E.g. line 55:
	if (readingCount.decrementAndGet() == 0 && doClose.get()) {

It's entirely possible for readingCount to be re-incremented by the time the second part of the && is evaluated.
I'm also slightly confused by the fact that it has two AtomicBooleans, one called doClose and one called closed.

The more I look at it, the stranger I find the construction. LuceneSailConnection calls ReaderMonitor.beginReading, which increases the count - but as far as I can tell it doesn't enforce or check anywhere whether at that point the underlying reader has been closed or not.

The way Lucene internally managed reference counts is also fundamentally broken and a bit scary to look through.
Instead of calling AtomicInteger.incrementAndGet like usual, they use the following obtuse method in IndexReader that is prone to decrements happening concurrently. Seems strange to do it that way if you just have just signalled that you want to add to the reference count, but it is fairly likely to get two threads to not work concurrently if one completes too quickly and decrements the reference count to zero before the second thread is able to start:
  public final boolean tryIncRef() {
    int count;
    while ((count = refCount.get()) > 0) {
      if (refCount.compareAndSet(count, count+1)) {
        return true;
      }
    }
    return false;
  }

Fixes merged into master and the 2.0 release branch. Can we consider this resolved now? The fact that you no longer get the issue in 30+ runs seems pretty solid to me.

Sure, we can reopen or open a follow up if/when it pops up again. To clarify that was 30 runs just of LuceneSailTest, where the issue was occurring, inside of Eclipse JUnit runner. I didn't run the maven build 30 times and it was only on my 2 CPU VirtualBox virtual machine. But it was occurring consistently for me in the 2 CPU virtual machine previously, so in that way it was a valid test host.


Update required node version to 20

CodeQL action have warning

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, github/codeql-action/init@v1, github/codeql-action/autobuild@v1, github/codeql-action/analyze@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

Currently the project uses node version 14. We have to update node to version 20, test all works fine, fix a potential problems and update engines in packages.json. Also, let's mention dev requirements in the docs, we should add info about node version, docker and another tools that are required to make build

Is there a way to benchmark performance currently? It might be interesting to see speed changes after upgrading to node 20.

I think we currently no have benchmarks. We should update node just because 14 version is deprecated and do not supported anymore. I will try to add more unit tests in future, it will be useful additionally for measure performance between node versions too.
Potentially, we may have a problems with build the code with a new node version

How do you test ./Dockerfile and thirdparty/bergamot/Dockerfile?

How do you test ./Dockerfile and thirdparty/bergamot/Dockerfile?

We just run a command make buildAll that build all things. If this command fails, then we have broken code


Map out transaction input and output data structures for CLI

What
We need to map out what information we get about transactions from the new ingestion system. We also need to know what the output to BigQuery should look like. Part of #19.
Why
This issue helps us know what transaction information is easily accessible from the ingestion system and what information may have to be reconstructed or omitted.

In order to get transaction information, we would call getLedger with the sequence number of the desired ledger.
Then ledger.V0.LedgerHeader.TxSet.Tx gives a slice of TransactionEnvelope structs.
For a given envelope e, we can access the signatures by doing e.Signatures, and access the transaction by doing e.Tx. The transaction is defined as
type Transaction struct {
    SourceAccount MuxedAccount
    Fee           Uint32
    SeqNum        SequenceNumber
    TimeBounds    *TimeBounds
    Memo          Memo
    Operations    []Operation `xdrmaxsize:"100"`
    Ext           TransactionExt
}

In order to export the data to BigQuery, we need a struct with the following fields:
transaction_hash: string - get from ledger.V0.TxProcessing[index].Result.TransactionHash
ledger_sequence: integer - get from ledger sequence that was passed in to getLedger
application_order: integer - get from ledger.V0.TxProcessing, which is sorted in apply order
account: string - get from SourceAccount.ToAccountId()
account_sequence: integer - get from SeqNum
max_fee: integer - get from Fee
operation_count: integer - get from len(Operations)
created_at: timestamp - same as the close time of the parent ledger, which is in ledger.V0.LedgerHeader.ScpValue.CloseTime
updated_at: timestamp - Not sure about this one
memo_type: string - get from Memo.Type.String()
memo: string - get from Memo.Text
time_bounds: string - get from TimeBounds; format as "[minTime, maxTime)"
successful: boolean - get from ledger.V0.LedgerHeader.TxProcessing[index].Result.Successful()
fee_charged: integer - get from ledger.V0.LedgerHeader.TxProcessing[index].Result.FeeCharged

In order to connect the transaction result and the transaction itself, use the HashTransaction function from the github.com/stellar/go/network package. The second argument to this hash function is network.PublicNetworkPassphrase, and it returns a hash. Then, search for the hash in the TxProcessing slice.
In order to transform the xdr.Hash into a hex string, convert the Hash to a byte array and use
the EncodeToString function in the encoding/hex package.
Created and updated at times need to be converted to Unix timestamps, right now they are integers.
Use Unix function from time package to get a Time object; format as a UTC time


UX: print human-readable error in case of 404 for specific platform/os

Description

introduce a custom error to handle missing binary (not tool)
print a message with link where the list of available binaries can be checked and invite to contribute if possible
GetToolVersion is public to re-use it

Motivation and Context

[x] I have raised an issue to propose this change, which has been given a label of design/approved by a maintainer (required)

fixes #853
How Has This Been Tested?

./arkade get gh
Downloading: gh
2023/02/18 10:58:37 Looking up version for gh
2023/02/18 10:58:37 Found: v2.23.0
Downloading: https://github.com/cli/cli/releases/download/v2.23.0/gh_2.23.0_macOS_arm64.tar.gz
Look like this tool isn't available for your OS or/and platform. Check out the link to see if the tool you're after is available: https://github.com/cli/cli/releases/tag/v2.23.0.
If it is there, don't hesitate to open an issue and contribute to Arkade!
Error: incorrect status for downloading tool: 404

Are you a GitHub Sponsor yet (Yes/No?)

[ ] Yes
[x] No

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Documentation

[ ] I have updated the list of tools in README.md if (required) with ./arkade get -o markdown
[ ] I have updated the list of apps in README.md if (required) with ./arkade install --help

Checklist:

[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I've read the CONTRIBUTION guide
[x] I have signed-off my commits with git commit -s

[ ] I have tested this on arm, or have added code to prevent deployment

I'm going to iterate on the message a bit. But thanks for sending this.

@Jasstkn unfortunately the link to GitHub will be wrong when the tool isn't available on GitHub i.e. kubectl and other Hashicorp tools.
Thoughts?


How to indent the code outline of the workspace

OS Version: Windows 10 1809
Vscode version:

Current situation：

Expect:

What File Icon Theme are you using?

@gjsjohnmurray
Thx you for replying to my question first.
I used which extension named vscode-icons,  and the theme named VSCode Icons.

Maybe this issue belongs at https://github.com/vscode-icons/vscode-icons

@Rain120 How did you get the 'expected' image?
Did you define any vscode-icon settings, e.g. about folders?

@gjsjohnmurray
Thx for your reply.
Maybe, I will new issue at the vscode-icon repo for help, and I will inform you as soon as possible of the results of the investigation.

@aeschli
Thx for your reply.
I found this extension in the VSCode extension store, the screenshot in its readme.

Hi. vscode-icons maintainer here. There is nothing wrong. The user is asking how to achieve the intended folders visualization we show in the screenshot. What the user missed is that the indented folders are children of the src folder and thus vscode shows them indented to visualize the relationship when the parent folder gets expanded. In the users project the src folder is empty and thus even expanding it doesn't indent the folders beneath it simply because those are at the same level as the src folder.
Mystery solved.

@JimiC
Why are the same projects different in different PC systems, such as windows and Mac?
The Current situation pic is windows

There should be no difference. Can you post new screenies this time from your Windows and MacOS of the same project?

@JimiC
Yes，Here it is.
Mac：
[Mac](https://user-images.githubusercontent.com/20939839/56573639-234a2c80-65f4-11e9-815c-99039602ae0e.png）
Windows:

First, you are showing us different projects.
Second, your src folder in the Windows screenshot is empty. Move any file/folder in it and observe that they are shown indented as you expect.

@JimiC
The first and second is the same project, and the third is another project.
There is the other project in my windows.

OK, I see it now. I suspect that another extension is causing this misalignment. Disable all extensions and then enable them one by one until you find the one that is causing this.

The one that adds that folder icon in the sidebar looks suspicious to me.

First I disable all extensions, and then just enable vscode-icons.

The result is still the same.

What color theme are you using?

The color theme, not the icon theme.

srr, my fault

This is how vscode looks on my Windows with Monokai and vscode-icons.

I don't know why we are different.

@Rain120 When you switch to the built-in `Minimal (Visual Studio Code) theme, do you see the same?

I also found this problem by switching the theme to MiniMal according to your suggestion.
Should I uninstall and reinstall?

Looks like something is strange with positioning in the tree. @joaomoreno @isidorn

@Rain120 Can you take a screenshot of the full VS Code window? I want to see the full status bar as well.

@joaomoreno
Thx for your reply.
Do you want this screenshot?

The workbench.tree.indent setting controls the tree indentation. Did you change that setting?

I should not set the workbench.tree.indent property. I need to go home and check it out. When I get home from work, I will paste my vscode user configuration information screenshot.
I'm not sure if there are plugins that affect the VSCode CSS style, but I tried to close all the plugins and only open vscode-icons, but it doesn't work.

I'm not sure if there are plugins that affect the VSCode CSS style, but I tried to close all the plugins and only open vscode-icons, but it doesn't work.

If a plugin messed around with Code's core CSS, it doesn't matter if you disable it... since they won't revert those changes. You should try a brand new installation, without any plugins.

ok, I will try to uninstall all extensions and reset the user settings in vscode, then install vscode-icon  first, see the effect,  one by one  to find the extensions which affect the VSCode CSS style at last

I just reset my user settings, then uninstalled all the plugins, and then installed one by one, I found that this problem has been solved, thank you so hard to help me solve the problem.


Bj change message

Change :Updated the print message.
Test : Tested locally and all test passing.
Please merge.

This seems to be triggered from a workshop and seems to not address an issue.


DNM: implement various token limits

Description
Note: don't merge this yet - it's currently targeted at the adam/tests branch to show the actual diff, but should be targeted at main once the tests are merged.
closes: #1227

Author Checklist

[ ] included the correct type prefix in the PR title
[ ] added ! to the type prefix if API or client breaking change
[ ] added appropriate labels to the PR
[ ] targeted the correct branch (see PR Targeting)
[ ] provided a link to the relevant issue or specification
[ ] added a changelog entry to CHANGELOG.md
[ ] included comments for documenting Go code
[ ] updated the relevant documentation or specification
[ ] reviewed "Files changed" and left comments if necessary
[ ] confirmed all CI checks have passed

Codecov Report

Merging #1319 (526296d) into adam/tests (b3379b6) will increase coverage by 0.06%.
The diff coverage is 50.00%.

@@              Coverage Diff               @@
##           adam/tests    #1319      +/-   ##
==============================================
+ Coverage       51.67%   51.74%   +0.06%
==============================================
  Files              68       68
  Lines            6697     6712      +15
==============================================
+ Hits             3461     3473      +12
- Misses           2969     2970       +1
- Partials          267      269       +2

Impacted Files
Coverage Δ

x/leverage/keeper/keeper.go
65.46% <50.00%> (-0.79%)
:arrow_down:

x/oracle/types/keys.go
100.00% <0.00%> (ø)

x/oracle/types/msgs.go
93.68% <0.00%> (+3.46%)
:arrow_up:

Note: this will stay draft while we decide if MaxSupply will remain a flat amount, or be changed to a share of USD value.


Fixes to the resend manage link query/page

Now send manage links for parties with dates from 1 week ago until the future

Closes #56

:+1: hope that fixes some support questions. Thanks!


Upgrade reference: restructuring, checklist

This PR updates the Cluster Upgrades with Giant Swarm for the goal to make it more useful and up-to-date for customers.
Changes

Moved all recommendations to the customer into a single checklist
Moved "how to upgrade a cluster" one level up
Removed Warning related to k8s versions before 1.14
Improved meta description

@pipo02mix Can I ask for your help here, please? For

Adding content for the two checklist items you mentioned in https://github.com/giantswarm/giantswarm/issues/13348
Reviewing the rest of the changes

These items will be covered in a follow up PR, as the need a bit more work:

Add checklist item for "the resource rules scope don't contain nodes (it can lead to blocking new nodes to join cluster)"
Add checklist item for "failurePolicy is set to Ignore if the resource rules scope is not well defined"


⚠ GitLab Server has degraded performance

In c08a9cb, GitLab Server (https://gitlab01.its-telekom.eu) experienced degraded performance:

HTTP code: 200
Response time: 6885 ms

Resolved: GitLab Server performance has improved in c020c65.


Share code example read/write  multi slave ?

can someone help me?

Dear all, I am also interested in using two (slave) RS485 sensors with a ESP32. Thanks a lot in advance !

Hi, this is how I do it:
void testRead(uint8_t addr) {   node.setSlaveID(addr);   if (node.readHoldingRegisters(17, 35) == node.ku8MBSuccess)   {     for (uint8_t j = 0; j < 35; j++)     {       data[j] = node.getResponseBuffer(j);       Serial.print(j); Serial.print(": "); Serial.println(data[j]);     }   } }

Hello friend
We have the log for two device inverter is slave and display is master. Have read payload but this Comunication Gtil2 inverter not Hare modbus?
A this link i have shared log
https://github.com/cent0/Extend-wired-system-serial-uart-to-wifi/issues/1


Upgrade all vulnerable dependencies.

Bulk PR to fix several vulnerable deps at once.

Closes #10 #11 #12 #13 #19 #17


Add Replibyte as a database seed option in the Prisma doc

Hi, I am the creator of Replibyte, an open-source tool to seed a development database with a production database while hiding sensitive data.
We have developers using Replibyte to seed their database with Prisma. Is it possible to add a section here to explain how to do it?
Coupling Replibyte to Prisma can help your users to better leverage Prisma.

Hey 👋
Thank you for the suggestion. We don't intend to create more guides on how to seed a database with other tools, such as Replibyte, but we're open to adding a section that mentions and links out to other tools in the docs. I'll take care of  this very soon. 🙂


Don't install nose for production

When a user tries to use the library in production, don't make them install nose as well.
Changed the test scripts to match; Now python setup.py test runs the tests.
Also removed empty file requirements.txt.

:-)


Add unit tests for com.hankcs.hanlp.utility.MathUtilityTest

注意事项

这次修改没有引入第三方类库。
也没有修改JDK版本号
所有文本都是UTF-8编码
代码风格一致
[x] 我在此括号内输入x打钩，代表上述事项确认完毕

Hi,
I've analysed your code base and noticed that com.hankcs.hanlp.utility.MathUtility in the hanlp module is not fully tested.
I've written some tests that cover this class with the help of Diffblue Cover.
Hopefully, these tests should help you detect any regressions caused by future code changes. If you would find it useful to have additional tests written for this repository, I would be more than happy to look at other particular classes that you consider important.

Thanks for your contribution.


update the URLs now the project is transferred to the JHipster org

Hi @jdubois I've got a huge refactoring of the project to a mono repo in my fork.
I suggest we first merge this before doing additional changes as its not going to be easy to merge otherwise.
I am going to create a PR now.

Oops sorry @bd82 !!

I'm currently working on adding the license headers, code of conduct, etc. so I'll stop here -> anyway this will need to be validated by @thorbenvh8 before
I also know @thorbenvh8 wanted to keep the 2 projects, so we should discuss this with him first -> could you send an email to the core dev mailing list explaining your changes, etc?


Attempt at an alternative corepack implementation.

I don't actually know if this will work, but I was trying to make the system itself responsible for maintaining the executable paths so that we didn't need to account for it in our e2e scripts.

Hrm, this would handle CI, but doesn't handle running E2E locally. Then again, our local E2E already doesn't do the right thing so this is maybe "same same"?


Is zed still alive?

Is this editor still being developed? Sounds like a neat idea.

Better asked on newsgroups.


Unreliable ggplot support

The current support for R ggplot visualizations uses tempfile.mktemp(), which is subject to race conditions because it uses a filename rather than a file handle.  Perhaps as a result, the plots currently work fine for a few widget clicks, but then begin to fail.  Maybe the ggplot interface can be changed to write directly to an in-memory object, as in this code?
from rpy2.robjects.packages import importr, data
import rpy2.robjects.lib.ggplot2 as g2
from rpy2.ipython.ggplot import image_png

datasets = importr('datasets')
mtcars = data(datasets).fetch('mtcars')['mtcars']
gp = g2.ggplot(mtcars)
pp = (gp + g2.aes_string(x='wt', y='mpg')
         + g2.geom_point(g2.aes_string(colour='qsec'))
         + g2.scale_colour_gradient(low="yellow", high="red")
         + g2.geom_smooth(method='loess')
         + g2.labs(title="mtcars", x='wt', y='mpg'))

image_png(pp, width=800, height=300)

From what I could see, this version doesn't use a temporary file; see lib/python3.6/site-packages/rpy2/ipython/ggplot.py (seems based on BytesIO).  Can we use this approach instead?

Thanks for finding that, BytesIO is what I tried first but couldn't get it to work. That approach looks much better.

Just tried it, kernel still hangs or restarts 😞

From the console:
Warning: the rpy2 object we are trying to release has no associated capsule.
Fatal Python error: unexpected exception during garbage collection

Thread 0x000070000cd53000 (most recent call first):
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/zmq/utils/garbage.py", line 47 in run
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/threading.py", line 884 in _bootstrap

Thread 0x000070000c438000 (most recent call first):
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/ipykernel/parentpoller.py", line 39 in run
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/threading.py", line 884 in _bootstrap

Thread 0x000070000bf35000 (most recent call first):
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/threading.py", line 295 in wait
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/threading.py", line 551 in wait
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/IPython/core/history.py", line 829 in run
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/IPython/core/history.py", line 58 in needs_sqlite
  File "<decorator-gen-24>", line 2 in run
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/threading.py", line 884 in _bootstrap

Thread 0x000070000b92c000 (most recent call first):
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/ipykernel/heartbeat.py", line 61 in run
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/threading.py", line 884 in _bootstrap

Thread 0x000070000b429000 (most recent call first):
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/tornado/platform/kqueue.py", line 66 in poll
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/tornado/ioloop.py", line 863 in start
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/ipykernel/iostream.py", line 72 in _thread_main
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/threading.py", line 864 in run
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/threading.py", line 884 in _bootstrap

Current thread 0x00007fff91a7a380 (most recent call first):
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/six.py", line 587 in iteritems
  File "/Users/philippjfr/development/bokeh/bokeh/core/properties.py", line 1385 in validate
  File "/Users/philippjfr/development/bokeh/bokeh/core/property/bases.py", line 283 in prepare_value
  File "/Users/philippjfr/development/bokeh/bokeh/core/property/bases.py", line 148 in themed_default
  File "/Users/philippjfr/development/bokeh/bokeh/core/property/descriptors.py", line 545 in instance_default
  File "/Users/philippjfr/development/bokeh/bokeh/core/property/descriptors.py", line 670 in _get_default
  File "/Users/philippjfr/development/bokeh/bokeh/core/property/descriptors.py", line 653 in _get
  File "/Users/philippjfr/development/bokeh/bokeh/core/property/descriptors.py", line 457 in __get__
  File "/Users/philippjfr/development/bokeh/bokeh/model.py", line 676 in _visit_immediate_value_references
  File "/Users/philippjfr/development/bokeh/bokeh/model.py", line 58 in collect_models
  File "/Users/philippjfr/development/bokeh/bokeh/document/events.py", line 237 in generate
  File "/Users/philippjfr/development/bokeh/bokeh/protocol/messages/patch_doc.py", line 91 in process_document_events
  File "/Users/philippjfr/development/bokeh/bokeh/protocol/messages/patch_doc.py", line 55 in create
  File "/Users/philippjfr/development/bokeh/bokeh/protocol/__init__.py", line 46 in create
  File "/Users/philippjfr/development/pyviz_panels/panel/util.py", line 103 in diff
  File "/Users/philippjfr/development/pyviz_panels/panel/util.py", line 112 in push
  File "/Users/philippjfr/development/pyviz_panels/panel/panels.py", line 218 in update_panel
  File "/Users/philippjfr/topographica/external/param/param/parameterized.py", line 584 in __set__
  File "/Users/philippjfr/topographica/external/param/param/__init__.py", line 443 in __set__
  File "/Users/philippjfr/topographica/external/param/param/__init__.py", line 612 in __set__
  File "<ipython-input-3-c433360bdda8>", line 2 in <module>
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2963 in run_code
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2903 in run_ast_nodes
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2785 in _run_cell
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2662 in run_cell
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/ipykernel/zmqshell.py", line 533 in run_cell
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/ipykernel/ipkernel.py", line 196 in do_execute
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 399 in execute_request
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 235 in dispatch_shell
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 283 in dispatcher
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/tornado/stack_context.py", line 277 in null_wrapper
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 432 in _run_callback
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 480 in _handle_recv
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 450 in _handle_events
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/tornado/stack_context.py", line 277 in null_wrapper
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/tornado/ioloop.py", line 888 in start
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 477 in start
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/traitlets/config/application.py", line 658 in launch_instance
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/ipykernel_launcher.py", line 16 in <module>
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/runpy.py", line 85 in _run_code
  File "/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/runpy.py", line 193 in _run_module_as_main

Wonder if it's an error in rpy2's garbage collection, then, not our code.  Hmm. Much easier to fix issues in our own code!
BTW, I thought that bypassing the GGPlotPanel code altogether and returning the result of image_png in the view method in user code would be sufficient for it to work with HTMLPanel, as in the code below (i.e. work as well as the existing example does, anyway).  But I've seen a variety of errors when I try that, for cases that I think should be the same. (Sometimes I get JS errors TypeError: Cannot read property 'comm_manager' of undefined, sometimes HTMLPanel complains it doesn't know what to do with objects of the given type (despite it being something that has a _repr_html_), and sometimes it has no obvious errors but no output displayed.)  I've gotten too confused to capture what's going on here, but thought it might be interesting, as I thought the result from output_png() (an IPython Image) should already be displayable by HTML.
from rpy2.robjects.packages import importr, data
import rpy2.robjects.lib.ggplot2 as g2
from IPython.display import Image
from rpy2.ipython.ggplot import image_png

import param
from panel import Panel, Column
from panel.panels import HTMLPanel

datasets = importr('datasets')
mtcars = data(datasets).fetch('mtcars')['mtcars']

class GGPanel(param.Parameterized):
    point_size = param.Number(default=1, bounds=(1, 10))

    @param.depends('point_size')
    def view(self):
        gp = g2.ggplot(mtcars)
        pp = (gp + g2.aes_string(x='wt', y='mpg')
                 + g2.geom_point(g2.aes_string(colour='qsec'), size=self.point_size)
                 + g2.scale_colour_gradient(low="yellow", high="red")
                 + g2.geom_smooth(method='loess')
                 + g2.labs(title="mtcars", x='wt', y='mpg'))
        return HTMLPanel(image_png(pp))

panel = GGPanel()
Column(panel, panel.view)

Same problem as before, IPython Image._repr_html_ does not return anything.

Turned out to be down to lacking cleanup of param watch callbacks which presumably prevented the R objects from being garbage collected. I've now pushed those changes to master and the ggplot example now works without fail for me.

Great!  Works fine for me now.


[SPARK-47346][PYTHON] Make daemon mode configurable when creating Python planner workers

What changes were proposed in this pull request?

This PR adds an extra config to env.createPythonWorker to make daemon mode configurable to give more flexibility when creating Python planner workers.
Why are the changes needed?

To make python workers more flexible.
Does this PR introduce any user-facing change?

No
How was this patch tested?

Existing tests
Was this patch authored or co-authored using generative AI tooling?

No

cc @ueshin @HyukjinKwon

im fine w/ this change but would defer to @ueshin

@allisonwang-db Seems like the new test is still failing:
[info] - SPARK-47346: cannot create Python worker with different useDaemon flag *** FAILED *** (34 milliseconds)
[info]   org.apache.spark.SparkException: Error from python worker:
[info]   /usr/bin/python3: Error while finding module specification for 'pyspark.daemon' (ModuleNotFoundError: No module named 'pyspark')
[info] PYTHONPATH was:
[info]   /home/runner/work/spark/spark/core/target/scala-2.13/spark-core_2.13-4.0.0-SNAPSHOT.jar
[info] org.apache.spark.SparkException: EOFException occurred while reading the port number from pyspark.daemon's stdout.
[info]   at org.apache.spark.errors.SparkCoreErrors$.eofExceptionWhileReadPortNumberError(SparkCoreErrors.scala:55)
[info]   at org.apache.spark.api.python.PythonWorkerFactory.startDaemon(PythonWorkerFactory.scala:264)
[info]   at org.apache.spark.api.python.PythonWorkerFactory.createThroughDaemon(PythonWorkerFactory.scala:138)
[info]   at org.apache.spark.api.python.PythonWorkerFactory.create(PythonWorkerFactory.scala:104)
[info]   at org.apache.spark.SparkEnv.createPythonWorker(SparkEnv.scala:156)
[info]   at org.apache.spark.SparkEnv.createPythonWorker(SparkEnv.scala:166)
[info]   at org.apache.spark.api.python.PythonWorkerFactorySuite.$anonfun$new$4(PythonWorkerFactorySuite.scala:64)

We may need to set up a working Python env for this test somehow?

The failed test seems not related to this PR.

Thanks! merging to master.


Use array index instead of Buffer.get

Buffer.get was deprecated in 2013 (source) and removed entirely in Node 6 (source).
Due to the removal of Buffer.get this module fails catastrophically in environments running Node 6.  This impacts me because many modules depend on bufferjs (notablynode-slug).

Sorry that I'm a lazy bum (or a busy bee, whichever the case may be). Give me your npm username and I'll give you write access there too.

Hi there AJ,
No worries! I know you're busy (I heard you say so on a JavaScript Air
episode.)
I appreciate you giving me admin access to the repository and my npm username
is alexbooker.
On Jun 1 2016, at 8:35 pm, AJ ONeal<EMAIL_ADDRESS>wrote:

Sorry that I'm a lazy bum (or a busy bee, whichever the case may be). Give
me your npm username and I'll give you write access there too.

—
You are receiving this because you authored the thread.
Reply to this email directly, [view it on GitHub](https://github.com/coolaj86
/node-bufferjs/pull/14#issuecomment-223100755), or [mute the thread](https://g
ithub.com/notifications/unsubscribe/ALYBoF9P65jsthgwilu0mKHHf15N7l1uks5qHd7qga
JpZM4IZLmh).![](https://github.com/notifications/beacon/ALYBoNm7_bFSz_QjI0XcY0
rEmNgSkwO5ks5qHd7qgaJpZM4IZLmh.gif)

Added!

Thanks, @coolaj86. I'll take care of all this tomorrow.


Updating Did I compost to version 1.1.1

Adds new feature to show which patches need compost by @Car-Role

you could load these images once rather than multiple times every frame render: https://github.com/AbusiveTuna/DidICompost/blob/0e5a7f6f43a781969fc67e0f487d70e72e01d1b2/src/main/java/com/compost/PatchOverlay.java#L113-L125
this approach to removing from a list can miss some elements: https://github.com/AbusiveTuna/DidICompost/blob/0e5a7f6f43a781969fc67e0f487d70e72e01d1b2/src/main/java/com/compost/DidICompostPlugin.java#L198-L204 - an easy fix: currentTiles.removeIf(tile -> tile == oldPatch.tile) (or you can iterate in reverse order)
savedPatches is written to, but not actually used to do anything
the setWorldPoints and setNeedsCompostPoints calls don't really do anything (the list reference never changes; did you mean to yield list copies from the getters to avoid ConcurrentModificationException?)
consider clearing your plugin state on shutdown (worldPoints, needsCompostPoints, savedPatches)

you could load these images once rather than multiple times every frame render: https://github.com/AbusiveTuna/DidICompost/blob/0e5a7f6f43a781969fc67e0f487d70e72e01d1b2/src/main/java/com/compost/PatchOverlay.java#L113-L125

this approach to removing from a list can miss some elements: https://github.com/AbusiveTuna/DidICompost/blob/0e5a7f6f43a781969fc67e0f487d70e72e01d1b2/src/main/java/com/compost/DidICompostPlugin.java#L198-L204 - an easy fix: currentTiles.removeIf(tile -> tile == oldPatch.tile) (or you can iterate in reverse order)

savedPatches is written to, but not actually used to do anything

the setWorldPoints and setNeedsCompostPoints calls don't really do anything (the list reference never changes; did you mean to yield list copies from the getters to avoid ConcurrentModificationException?)

consider clearing your plugin state on shutdown (worldPoints, needsCompostPoints, savedPatches)

Updated to latest commit after your pull request, and a quick fix for checking plots


Symfony 2.8 support

Changelog updated, not sure if that's how you wanna have it, so let me know if you require further changes :)

done & dusted :rocket:

Thank you @nocive! I will tag it now!


Fix GroupBy.rank documentation to render properly

Before:

After:

Codecov Report

Merging #1040 into master will decrease coverage by 2.7%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1040      +/-   ##
==========================================
- Coverage   95.12%   92.42%   -2.71%
==========================================
  Files          34       34
  Lines        6768     6768
==========================================
- Hits         6438     6255     -183
- Misses        330      513     +183

Impacted Files
Coverage Δ

databricks/koalas/groupby.py
89.34% <ø> (-2.05%)
:arrow_down:

databricks/koalas/usage_logging/__init__.py
24.54% <0%> (-72.73%)
:arrow_down:

databricks/koalas/usage_logging/usage_logger.py
50% <0%> (-50%)
:arrow_down:

databricks/koalas/__init__.py
78.72% <0%> (-8.52%)
:arrow_down:

databricks/conftest.py
92% <0%> (-6%)
:arrow_down:

databricks/koalas/frame.py
93.17% <0%> (-3.39%)
:arrow_down:

databricks/koalas/utils.py
95.12% <0%> (-3.05%)
:arrow_down:

databricks/koalas/namespace.py
85.8% <0%> (-1.55%)
:arrow_down:

databricks/koalas/plot.py
93.33% <0%> (-0.96%)
:arrow_down:

... and 2 more

Continue to review full report at Codecov.

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

good works :)
(i know what you did, but i think the capture of 'After' in PR description seems exactly same with 'Before'. isn't it ??)

Oops, updated.

Merging this - it's straigtforward.


does hblock check if remote hosts file size has changed since previous update?

does hblock check to see if remote hosts files on remote server have changed before downloading, thus preventing the download of duplicates and speeding up processing? if not, please consider this a feature request.
One must maintain copies of the 1. files or 2. hashes on the system and compare the hash or whatever, diversion.ch does this effectively.

Although I appreciate the benefit of this feature I think it is outside the scope of the project, as I want to keep this script as simple as possible.


Literate_pr2 stack- Required.

Hi,
We are working with PR2. would like to get literate_pr2 stack so that we can make PR2 read text using kinect. Unable to get the code from  "https://mediabox.grasp.upenn.edu/svn/penn-ros-pkgs/literate_pr2/trunk". Can you please provide us with the code. Thanks a lot. Awaiting your earliest response.
Thanks and Regards,
PR2 Team

The doc entry of literate_pr2 is from ROS Electric which is a long time ago (https://github.com/ros/rosdistro/blob/da50ae4bf7f80cd11d8512cad3d094d828b00d07/doc/electric/penn-ros-pkg.rosinstall#L6). The owner and maintainers of that code are not related to this repository at all and we don't have any knowledge about this server.
You might want to search for the creators of that software and try to contact them directly. One starting point might be their video which contains names: http://wiki.ros.org/literate_pr2


Fails when Range starts at top of the HTML body

Fails when range.commonAncestorContainer == range.startContainer in index.ts. startFound is always False.
An example of when this happens is selecting the range at the top of this page to the end.

      <meta content="text/html; charset=UTF-8" http-equiv="content-type">

      start
      end

Naive fix: (not sure if there are side effects, still testing)
Change:
let node: Node | null;
while (node = treeWalker.nextNode()) {
...
}

To:
let node = treeWalker.root;
do {
...
} while (node = treeWalker.nextNode());

Fixed.
Unit test with the provided HTML here: https://github.com/LukasRada/rangee/blob/master/tests/Rangee.test.ts#L88
(By the way I am refactoring the whole solution, I got 100% unit test coverage but will add also e2e test)


Astronomical Triggers Need Backup Time

Is your feature request related to a problem? Please describe.
When an astronomical scheduled trigger is started and configured to use an astronomical type that is not supported at the moment (for example lunar rise when today is a new moon), will fail to start.
Describe the solution you'd like
Instead of failing to start, the trigger should use a "backup" time and just use that to get going.
Describe alternatives you've considered
Fail to start (current behavior). Defer re-start by specified time.

Merged


Suggestions function to REPL

Add a new Suggestions (or any better name) pseudo function to display engine suggestions, making use of the cursor pointer (|).
Examples can be found here:
https://github.com/microsoft/Power-Fx/blob/ed83c6709c8e633a999ac0b186951d2162be7e6e/src/tests/Microsoft.PowerFx.Core.Tests/IntellisenseTests/SuggestTest.cs#L193

https://github.com/microsoft/Power-Fx/pull/2023


Make deployable

@chriddyp In order to make this deployable we were missing:

A config file
A worker for celery beat in the Procfile
and gunicorn pip package in the requirements file

I also made a v0.0.1 of a deployment helper, it's usable, but for from being complete, I made it on the go to help me deploy more often, faster... so please have a look at it, and feel free to suggest any improvements.
cc @cldougl

lgtm 💃


Fix(cli): ctrl+c not killing running server on Windows

Please provide enough information so that others can review your pull request:
I create this PR to fix :

dev server keeps running after exiting on Windows
Terminal output log has no color

Test plan (required)
I've patched refine-cli to test this change and it works well
Closing issues

#3175

Self Check before Merge
Please check all items below before review.

[ ] Corresponding issues are created/updated or not needed
[ ] Docs are updated/provided or not needed
[ ] Examples are updated/provided or not needed
[ ] TypeScript definitions are updated/provided or not needed
[ ] Tests are updated/provided or not needed
[ ] Changesets are provided or not needed

Hey @yasnbouz ,
Thank you! ⚡


Operate under Inference Mode as well as No Grad

Originally commented by @ElliottKasoar as part of #103

InferenceMode
No changes are currently included, but it would be good to support InferenceMode too eventually, as it should provide further performance benefits over NoGradMode.
However, it has stricter requirements, and the mode was only added (as a beta) in PyTorch 1.9, so we would need to be careful if we want to support older versions.

"Looking at the docs we'd maybe want to create an optional argument bool :: inference mode and if set to true enable c10::InferenceMode for the function as a block.

Copying @ElliottKasoar's comment from #81

InferenceMode

See: inference mode, autograd mechanics and the dev podcast
From our benchmarking (see FTorch with InferenceMode and NoGradMode sections), benefits were less clear, but in general it is expected to be at least as fast

Tests were carried out by replacing torch::AutoGradMode enable_grad(requires_grad); with c10::InferenceMode guard(requires_grad); in all ctorch.cpp functions, but ideally both options would be presented to users

This mode was only added (as a beta) in PyTorch 1.9, so we would need to consider support for older versions
The mode is also much stricter than NoGradMode, so cannot be used in all cases


Allow setting callable for popen behaviour

Sometimes I need to test calling a command which will have different output each time, typically polling the status of some external system.  Currently this isn't possible.
By allowing setting a callable to be called when the command is actually run, it's possible to achieve this.
One potential concern here are the errors if the specified callable has the wrong signature or returns the wrong number of parameters to be unpacked.  I think the default errors are clear enough here.
Happy to extend tests and doc if needed.

Coverage decreased (-1.5%) to 98.484% when pulling 9315cd0291a51c92bd45313069380203ebfe1ccd on nebulans:popen-callable-behaviour into 172993cd945ffe76db2ce38472ecf65752ffa406 on Simplistix:master.

Coverage decreased (-1.5%) to 98.484% when pulling 9315cd0291a51c92bd45313069380203ebfe1ccd on nebulans:popen-callable-behaviour into 172993cd945ffe76db2ce38472ecf65752ffa406 on Simplistix:master.

Coverage decreased (-1.5%) to 98.484% when pulling 9315cd0291a51c92bd45313069380203ebfe1ccd on nebulans:popen-callable-behaviour into 172993cd945ffe76db2ce38472ecf65752ffa406 on Simplistix:master.

Not sure if this is your preferred way to py2/3 compatibility.

I suppose the natural alternative to having the callable return a tuple of the right shape would be to present a public PopenBehaviour class which the callable should return an instance of.  It would need to have an __init__ method with the same signature as MockPopen.set_default, with presumably the same defaults.
It's certainly not clear how this would impact set_command and set_default, but I'll have a go at implementing if it sounds better to you.
The callable taking stdin is there as it's possible that the supplied callable would change its behaviour (either in terms of what it returns or its side effects) based on the value supplied to stdin (this is coming from the same set of requirements as #73).  A contrived example might be mocking calls to scp or curl and creating some mock content in the specified output location, except that location is in stdin not the command itself.
I can accept having setting a callable override any behaviour configured by set_command, certainly makes the API simpler!

What I'd be tempted to suggest here (and have done myself in similar circumstances) is to use have a shim python file (you can use a TempDirectory with a bit of a dance to make sure you're using the correct interpreter if your environment is sensitive to that sort of thing) that behaves exactly as you require and then not use a mock for Popen at all. Not mocking is always the best option ;-)
Could that work here? If not a PopenBehaviour sounds like a nice idea and can replace the internal tuple data structure completely, with the class instances being used internally and set_command and set_defaultinstantiating from their arguments...

I can't get the link to PopenBehaviour in the doc to work - any ideas?

Okay, I collapsed the set_callable method down into a parameter of set_default, which feels a bit simpler to me, and sorted out the docs: PopenBehaviour wasn't included in api.txt and it didn't have a docstring so would have been skipped by Sphinx had it been included.

Hopefully the merge is okay? Any problems, please shout as I'm aiming for a 6.0.0 release within a day or two...

Looks fine, thanks


Using existing Vue components

I've read https://axellience.github.io/vue-gwt/advanced/integrating-with-js-components.html#using-js-components-in-java
But still cannot figure it out how to use existing Vue components from vue-gwt :-(
I'm trying to use https://bootstrap-vue.js.org/
In my index.html I've loaded vue and bootstrap-vue like: https://bootstrap-vue.js.org/docs#browser
Then in Java code I'm using VueGWT.initWithoutVueLib();
And trying to use some components in my components' templates, like:
<b-button :variant="warning"></b-button>

Obviously I have to use JsComponent annotation to make it working, but I cannot figure it out, tried something like:
@JsComponent("bButton") // tried: Vue.bButton, b-button, Vue.b-button
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class BButton extends VueComponent {
}

Perhaps namespace or name in JsType should be something different, but I'm lost.

Hi!
I've just checked, and for this library you don't even need the @JsComponent annotation. This annotation is useful if you need to extend or access the instance of the JsComponent (which is not the case with Bootstrap).
So all you need to do is include Bootstrap like you did:
    <!-- Add this to <head> -->
    <link type="text/css" rel="stylesheet"<EMAIL_ADDRESS>    <link type="text/css" rel="stylesheet"<EMAIL_ADDRESS>
    <!-- Vue JS Framework -->
    <script<EMAIL_ADDRESS>
    <!-- Add this after vue.js -->
    <script<EMAIL_ADDRESS>    <script<EMAIL_ADDRESS>
Then in you components you should be able to use bootstrap components directly:
<div v-if="visible">
	The property "visible" is set to true! Hello
    <b-progress :value="(int) 12" :max="(int) 100" show-progress animated></b-progress>
</div>

In this case we cast the value to int, otherwise it gets casted to Integer.
For your case, it might not work because you are binding variant to "warning", it should probably be:
<b-button variant="warning"></b-button>

@adrienbaron Thank you! It was just silly mistake with binding :-( Unfortunately error message was absolutely not helpful, so I've started to dig in a wrong direction.

@adrienbaron But anyway, question is kind of remains. How to use JsComponent annotation in such case, for example I want to extend b-button somehow.

Unfortunately error message was absolutely not helpful, so I've started to dig in a wrong direction.

What was the error message? Maybe we can improve it if it's on Vue GWT side.

How to use JsComponent annotation in such case, for example I want to extend b-button somehow

Usually, you should pass the pass to your Component constructor or options object to @JsComponent.
In the case of Vue Bootstrap this is a little tricky to do. They don't expose the Components on an object on Window for you.
However, it's still doable, if you expose them manually. In your index.html, after bootstrap inclusion add for example:
<script>
window.BootstrapVue = {
    bButton: Vue.component("bButton") // Returns a Component Constructor function
}
</script>

Then with this should work just fine:
@JsComponent("BootstrapVue.bButton")
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Function")
public class BButton extends VueComponent {
}

@Component(hasTemplate = false)
public class MyButton extends BButton {
    // here comes extended functionality
}

@adrienbaron Actually, if I don't have invalid BButton class at all, then error message is perfectly fine:
Couldn't find variable/method "secondary" in the Component.
Make sure you didn't forget the @JsProperty/@JsMethod annotation or try rerunning your Annotation processor.

In expression: secondary

While processing Node: <b-button :variant="secondary">
  Test
</b-button>

But in case I have invalid BButton class and mentioned it in Component components:
@Component(components = { BButton.class })
public class TestComponent extends VueComponent { }

then error:
Breaking on exception: Error: java.lang.RuntimeException: Couldn't find VueFactory for Component: com.axellience.vuegwtdemo.client.components.vx.TestComponent. Make sure that annotation are being processed, and that you added the -generateJsInteropExports flag to GWT. You can also try a "mvn clean" on your maven project.

which gives me nothing useful.
Thank you for advice window.BootstrapVue =
works perfectly fine for me.

@adrienbaron I'm sorry for being troublesome, but one more related question. According to docs "Functional Components" are not yet supported, but in this particular case I want to add additional properties to MyButton and adjust render() function, i.e. I want to execute my render code plus call predecessor's render() with probably adjusted properties (for example MyButton has new "important" property, which means size="lg" and variant="warning" for predecessor). I cannot find any meaningful example how to solve such case even on "pure" Vue.

But in case I have invalid BButton class and mentioned it in Component components, then error

Yes, this is kind of a "generic" error in case it can't find the generated component class at Runtime. It can have a lot of causes, from Annotation Processor not running, to missing the JsInterop flag. It can also come from classes that threw error(s) at instantiation and didn't register themselves (which is probably the case here). I'll check exactly what's happening in that case see if I can figure out a better error message.

but in this particular case I want to add additional properties to MyButton and adjust render() function, i.e. I want to execute my render code plus call predecessor's render() with probably adjusted properties (for example MyButton has new "important" property, which means size="lg" and variant="warning" for predecessor).

In that case you wouldn't extend the Component, you would do something like:
@Component
public class MyButton {
    @Prop
    @JsProperty
    boolean important;

   @Computed
   public String getVariant() {
      return important ? "warning" : "info";
   }

   @Computed
   public String getSize() {
      return important ? "lg" : "sm";
   }
}

With the following template:
<b-button :size="size" :variant="variant"></b-button>

@adrienbaron Yes, composition is possible solution, BUT:

MyButton won't be "functional component" anymore, i.e. it will be "heavier".
Imagine that b-button has 20 properties, and most of them are needed for MyButton as well, so I have to redeclare all of them, that's really bad.

@slavap

If we add support for functional components, you'll be able to declare a render function for your functional component that returns a vNode of your bButton. It will still be a little heavier than the bButton alone (would render 2 functional components instead of 1), but would be better.
Yes it's sadly the case. On the other end it's bad practice to have too much properties on a Component.

@adrienbaron

By the way, not sure if it's a good idea, but perhaps then I can modify/adjust bButton.vNode in my MyButton render function?
Looks like inheritance is the second class functionality in Vue, first class is composition, that's sad.

@slavap

I don't think Vue.js allows overriding a render function. When you extend, if you have a render function, it overrides the original one from what I know.
Yes, let's not start a debate on inheritance VS composition ;), but I think its more adapted in the case of Components.

@adrienbaron
By the way, I don't understand @Prop generation for boolean.
@Prop @JsProperty boolean important; // generates: options.addJavaProp("important", false, null);

Why jsTypeName is null?
Why in VueComponentOptions.addJavaProp() processing for jsTypeName param is commented out?
IMO it's more natural to write:
<my-button important="true"></my-button>
<!-- instead of: -->
<my-button :important="(boolean) true"></my-button>

@slavap
jsType is not null if you pass checkType=true to @Prop.
But indeed the part in addJavaProp should not be commented out. From what I see on GitHub history, it's a bug left from the latest beta when we migrated to Elemental. We will fix this for the next beta.
Sadly, even if we pass the type of the prop to Vue, it won't parse it automatically from what I understand:
vuejs/vue#2168
So the binding is mandatory. I was thinking for "simple" value to detect the type (like integer, true/false), to remove the need for casting as it would work in most case. The problem is that for more complex expression (method calls etc...), we won't be able to detect the type and casting would be necessary. Seems "odd" to need casting sometimes and sometimes not.

@adrienbaron Actually it could be possible to add heuristic converter under the hood, and process obvious cases only, like true/false, 123, 456.07 If case is not obvious then casting is mandatory and heuristic is automatically doing nothing.

@slavap
Yes that's a little what I had in mind, but I actually thought of something better (in my opinion).
If we forbid to used wrapped primitive as props, then we can always just pass the value along as a non wrapped primitive type (think I have a solution for that), and it would just work.
So to sum up you could do:
@JsProperty @Prop boolean important;

<my-button :important="true"></my-button>
<my-button :important="bob > 10"></my-button>
<my-button :important="methodReturningNonWrappedBoolean()"></my-button>
<my-button :important="(boolean) methodReturningWrappedBoolean()"></my-button>

But this would throw an annotation processing error with an explicit message saying Wrapped primitive are not supported as @Prop:
@JsProperty @Prop Boolean important;

What do you think?

@adrienbaron I don’t see much benefits in boxed types, so your proposal is absolutely good to me. The only concern is what value I’ll get in case of  :important=“” ? And in case it’s not defined at all ?

@slavap
I think that will just through a compilation error, the expression in "" must be always be a valid Java expression.

@adrienbaron Good. Also in case of numerical types it could be kind of important to distinguish between not defined, i.e. null in case of boxed types, but for primitive types it will be 0 (though js hasProperty may help in such cases)

@slavap Arh yes, that's true didn't think about null. hasProperty sadly wouldn't work as Vue define the Props on the object even if they don't have value (if i'm not mistaken).
We could also allow wrapped primitive and force casting in those case:
@JsProperty @Prop Integer counter;

<my-button :counter="(Integer) 10"></my-button>
<my-button :counter="(Integer) 10 + 25"></my-button>
<my-button :counter="(Integer) methodReturningNonWrappedInteger()"></my-button>
<my-button :counter="methodReturningWrappedInteger()"></my-button>
<my-button :counter="null"></my-button>

Might make more sense this way for primitives.

@adrienbaron yes, I like it that way!

The only thing is wrapped primitives will make your components non compatible with JS apps, but maybe we can find a way around that in some other release 😉. Thank you for the help!

@adrienbaron Thank you for vue-gwt and quick responses!

@adrienbaron  It works. The only minor problem is:
:important="" gives uninformative error "SyntaxError: Unexpected token ,"
Uncaught SyntaxError: Unexpected token ,
    at new Function (<anonymous>)
    at $initRenderFunctions_0_g$ (VueComponentOptions.java:109)
    at $setComponentTemplate_0_g$ (VueComponentOptions.java:75)
    at getOptions_5_g$ (MyButtonJsType.java:30)
    at MyButtonFactory_1_g$.init_15_g$ [as init_12_g$] (MyButtonFactory.java:27)
    at get_83_g$ (MyButtonFactory.java:37)
    at lambda$1_33_g$ (MyButtonJsType.java:15)
    at MyButtonJsType$lambda$1$Type_1_g$.get_85_g$ [as get_72_g$] (MyButtonJsType.java:15)
    at getFactory_1_g$ (VueGWT.java:112)
    at getFactory_0_g$ (VueGWT.java:100)
    at new VueGwtWidget_3_g$ (VueGwtWidget.java:35)

@slavap The part between quotes must be a java expression, so if you type :important="" it's like you are typing:
this.important = ;

Which is not valid java. You can either not bind: important="", which would just pass an empty string, or bind the empty string value: :important='""'

@adrienbaron I was just experimenting with intentionally wrong template. It’s quite easy to miss value between quotes.

@slavap Ah sorry, I read to fast. Yes I should cast this exception and add a more informative message with the attribute and node responsible for the error. Can you open a new issue for this?

@adrienbaron Sure, will open in the morning, it’s deep night in my town.


String Test outside String1 = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Test.unity
StringTest
OutsideString1 = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I am sorry this is right

mine too, what's that

i am sorry too


Fix proximity meter issue

Jira issue:
https://glia.atlassian.net/browse/MOB-2771
What was solved?
Proximity sensor stays on after the call is finished.
Release notes:

[ ] Feature
[x] Ignore
[ ] Release notes (Is it clear from the description here?)
[ ] Migration guide (If changes are needed for integrator already using the SDK - what needs to be communicated? Add underneath please)

Additional info:

[x] Tests fixed, added? Unit, acceptance, snapshots?
[ ] Logging necessary for future troubleshooting of customer issues added?

Screenshots:

!squash

!squash


Error on running dump-pkts.lua example

I am facing an error when I try to run the dump-pkts.lua example using the command:
sudo ./build/libmoon examples/dump-pkts.lua 0
where 0 is the device id. I do get the following log when running the example before it terminates with error:
[INFO]  Found 1 usable devices: Device 0: 00:25:90:69:CA:C8 (Intel Corporation 82574L Gigabit Network Connection)
The error is:
/home/tina/libmoon/lua/device.lua:196: Could not configure device 0: error Invalid argument
Are there any other arguments that need to be passed to run the example? Or does the error have anything to do with the device?

82574L is not a great NIC, it probably doesn‘t support one of our default parameters. It‘s > 10 years old.
I recommend getting a better NIC, i.e. a i350 or better.

Am 14.02.2019 um 21:10 schrieb Tina Johnson<EMAIL_ADDRESS>I am facing an error when I try to run the dump-pkts.lua example using the command: sudo ./build/libmoon examples/dump-pkts.lua 0 where 0 is the device id. I do get the following log when running the example before it terminates with error:
[INFO] Found 1 usable devices: Device 0: 00:25:90:69:CA:C8 (Intel Corporation 82574L Gigabit Network Connection)
The error is:
/home/tina/libmoon/lua/device.lua:196: Could not configure device 0: error Invalid argument
Are there any other arguments that need to be passed to run the example? Or does the error have anything to do with the device?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

There's really only one option on which this NIC is likely failing: dropEnable which we set to true by default.
Try adding dropEnable = false to the device.config, that should fix it.
But you really should get a different NIC, you'll also run into other problems with the 82574L

Hi,
We tried disabling dropEnable (and also, did the unbind and bind again) but it still says the device is down. So, we have ordered another NIC. While we wait, is there any other small tweaks or tricks we could try?
Thank you for your prompt replies!

Then it's probably related to queue size or maybe rss (even if set to just 1, it probably tries to enable it?)? Anyways, there isn't really a point in using any DPDK application with that NIC.

We have installed a brand new NIC on our machine (Intel(R) Ethernet Converged Network Adapter XXV710-DA2 (2x25G)). Even now while we try to run the same error shows up:
`pulkit@ixmon:~/FlowScope$ sudo ./libmoon/build/libmoon lua/flowscope.lua examples/liveStatistician.lua 0
[INFO]  Initializing DPDK. This will take a few seconds...
EAL: Detected 24 lcore(s)
EAL: No free hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:04:00.0 on NUMA socket 0
EAL:   probe driver: 8086:158b net_i40e
EAL: PCI device 0000:04:00.1 on NUMA socket 0
EAL:   probe driver: 8086:158b net_i40e
[INFO]  Found 1 usable devices:
Device 0: 3C:FD:FE:CC:97:B4 (unknown NIC (PCI ID 8086:158b))
[INFO]  checkExpiry: function: 0x40528dd0
[INFO]  checkInitializer: function: 0x40528d90
[INFO]  extractFlowKey: function: 0x40526e88
[INFO]  stateType: struct live_flow_state
[INFO]  logLevel: WARN
[INFO]  defaultState: table: 0x40526f60
[INFO]  checkFinalizer: function: 0x40528be8
[INFO]  flowKeys: table: 0x40529078
[INFO]  checkInterval: 5
[INFO]  handlePacket: function: 0x40528c88
[INFO]  {struct ipv4_5tuple -> struct live_flow_state}: cdata<struct hmapk16v64 *>: 0x012f7730
[INFO]  {struct ipv6_5tuple -> struct live_flow_state}: cdata<struct hmapk64v64 *>: 0x012f7980
[INFO]  direct mode
[INFO]  Waiting for devices to come up...
[INFO]  Key buffer size: 64
[Analyzer] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[Analyzer] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[Analyzer] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[Analyzer] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[INFO]  [Checker]: Started
Top flows over sliding 5s window:
bps    pps    Flow
Active flows 0, cumulative packets 0 [0.00/s], cumulative bytes 0 [0.00/s], took 0.00s
[INFO]  [Checker]: Done, took 0.000122s, flows 0/0/0 [purged/kept/total]
[Analyzer] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[Analyzer] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[Analyzer] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[Analyzer] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[ERROR] Device 0 (3C:FD:FE:CC:97:B4) is DOWN: 0 MBit/s
[INFO]  0 devices are up.
[Analyzer] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[INFO]  [Checker]: Started
Top flows over sliding 5s window:
bps    pps    Flow
Active flows 0, cumulative packets 0 [0.00/s], cumulative bytes 0 [0.00/s], took 0.00s
[INFO]  [Checker]: Done, took 0.000053s, flows 0/0/0 [purged/kept/total]
[Analyzer] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[Analyzer] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[Analyzer] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[Analyzer] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[Analyzer] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)`
We were trying the livestatician.lua from Flowscope examples but we are running into the same dpdk errors. Do you have any pointers for us? Appreciate your help, Thanks!


put a config setting into cli config for the base href for the deployment server

Bug Report or Feature Request (mark with an x)
- [ ] bug report -> please search issues before submitting
- [ x] feature request

Versions.

Repro steps.

The log given by the failure.

Desired functionality.

The cli offers an option to add the basehref during the build ng build --base-href /folder-name/ --prod
This sounds like an excellent cli config setting, cause you do not want to do this every single time.
https://stackoverflow.com/questions/46568731/configuring-the-index-html-basehref-at-ng-build-time
Mention any other details that might be useful.

Hi @halukkaramete,
It is already. See<EMAIL_ADDRESS>


How to save a "prequantized_flow" safetensor?

Hello,
The documentation mentions that the --prequantized-flow option can be used to load a prequantized model, which reduces the checkpoint size by about 50% and shortens the startup time (default: False).
However, I couldn’t find any interface in the repository to enable this functionality.
Could you please provide guidance on how to store and load a prequantized model to save resources and initialization time?
Looking forward to your response, thank you!

Ah! Essentially it's just the checkpoint which gets created after loading the model and doing at least 12 steps of inference. You could do something like this in the root of the repo-
from flux_pipeline import FluxPipeline, ModelVersion
from safetensors.torch import save_file
prompt = "some prompt"
pipe = FluxPipeline.load_pipeline_from_config_path("./configs/your-config.json")
if pipe.config.version == ModelVersion.flux_schnell:
    for x in range(3):
        pipe.generate(prompt=prompt, num_steps=4)
else:
    pipe.generate(prompt=prompt, num_steps=12)

quantized_state_dict = pipe.model.state_dict()

save_file(quantized_state_dict, "some-model-prequantized.safetensors")

Thank you for your helpful response. The solution works well for loading pre-quantized SFTs.
However, do you have any suggestions for saving and loading a Torch-compiled Flux model? Currently, the initialization time for compiling the Flux model is quite cumbersome, and I’m looking for ways to streamline this process.

Ah- You can speed that up by using nightly torch- for me compilation only takes a few (maybe 3-4) seconds at most.

I appreciate your amazing work!
for me torch-nightly takes 9-18 sec per inference on first 3 warm-up inferences
and torch takes 1-1.5 minites per inference on first 3 inferences
am i missing something?

That seems correct, it's possible that it's just related to the cpu- I have a 7950x so everything runs very fast.


[ADV-LOG] Engine Thread not closing on program execution

The thread is forever open so even when the program finishes execution and at the end you write
Logger.Instance.Stop() the thread is still open so the program will not stop.

Option tested on devenv.
Move thread as a private Field.
Add IDisposable as an interface of Logger Engine
And create the Dispose Method that will be called before stopping the logger.
Some Code Snippets from my devenv:
//logger.cs

		/// <summary>
		/// Writes buffer (if enabled) and closes the program
		/// </summary>
		public void Stop()
		{
			if (Config.SaveLogToFile)
			{
				Engine.WriteAll();
				Engine.Dispose();
			}

			running = false;
			Engine = null;
			Config = null;
		}

//LogEngine.cs
        public virtual void Dispose()
        {
            EngineTh.Abort();
            GC.SuppressFinalize(this);
        }


Release 0.7.2

Prep release 0.7.2

I really hate not being able to change the branch post-mortem...

Coverage remained the same at 95.16% when pulling 13e12ed6d611b52a5bd4e86ac75ab58a801adcc2 on esc:release-0.7.2 into e41587ccc199cef8dbfb48808503f8b55eea063a on Blosc:master.

Coverage remained the same at 95.16% when pulling 13e12ed6d611b52a5bd4e86ac75ab58a801adcc2 on esc:release-0.7.2 into e41587ccc199cef8dbfb48808503f8b55eea063a on Blosc:master.


Avoid dev container push for merge request on GitLab

    - if [[ "$CI_PIPELINE_SOURCE" != "merge_request_event" ]]; then
        docker buildx build . \
          --build-arg PYTHON_VERSION=${PYTHON_VERSION} \
          --cache-to type=registry,ref=${CI_REGISTRY_IMAGE}/dev-cache:py${PYTHON_VERSION},mode=max \
          --file .devcontainer/Dockerfile \
          --push \
          --tag ${CI_REGISTRY_IMAGE}/dev:py${PYTHON_VERSION} \
          --target dev;
      fi

Another minor warning
#4 WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 9)
#4 WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 70)
#4 WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 84)

devcontainer workflow is mostly for building and testing the new dev containers. Since the ci workflow is supposed to have the same environment as dev containers. Though this is true only for GitLab but not for GitHub currently, but that is a different story. In this way, we do not need to build a same dev container and test it again.


feat: now can use dynamic select on logs

:tada: This PR is included in version 2.2.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Python script to get glTF mesh index and primitive index of an object inside Blender

Hey everyone, I'm trying to write an addon to set dynamic and static hotspots for google model viewer directly in blender. Most of it works already, but for dynamic hotspots I need the glTF Mesh Index and Primitive Index of the object, the hotspot should be located on.
Is there a way to output the glTF mesh and primitive index of an object through python inside blender?

Hello,
Not sure there is a way to be sure at 100% of the index of object & primitive.
Could you use the name of object.
For primitive, meshes are split by material, so you can use the material name to get the right primitive?

Wow, thanks a million that actually helped a lot. I have never understood how the primitives are created. I reverse engineered the glTF importer/exporter to some extent to figure this out and always ended up with something to do with material indexing. I always thought I had made a mistake, but never got the idea that this is where the primitives come from.
I have now landed on a new problem. I hope it's okay to continue using this post.
Let's say I export a Suzanne mesh from Blender which is half covered with one material and half covered with another material (Red and Blue in this example). Now if I place two hotspots in the Google Model Viewer Editor, one on the red half and one on the blue, I get different indexes for the face the hotspot is placed on than I do in Blender.
Can you explain to me how this occurs?
Are mesh primitives treated as independent meshes with their own way of counting indexes?


Add support for custom column widths to table columns

Table columns support the same custom widths as text inputs

You can use the width override classes to set the width of table columns.

The form builder has a method like this to assign the right value:
  def width_classes
    return if @width.blank?

    case @width

      # fixed (character) widths
    when 20 then %(#{brand}-input--width-20)
    when 10 then %(#{brand}-input--width-10)
    when 5  then %(#{brand}-input--width-5)
    when 4  then %(#{brand}-input--width-4)
    when 3  then %(#{brand}-input--width-3)
    when 2  then %(#{brand}-input--width-2)

      # fluid widths
    when 'full'           then %(#{brand}-!-width-full)
    when 'three-quarters' then %(#{brand}-!-width-three-quarters)
    when 'two-thirds'     then %(#{brand}-!-width-two-thirds)
    when 'one-half'       then %(#{brand}-!-width-one-half)
    when 'one-third'      then %(#{brand}-!-width-one-third)
    when 'one-quarter'    then %(#{brand}-!-width-one-quarter)

    else fail(ArgumentError, "invalid width '#{@width}'")
    end
  end

The components library should do the same, so the call would look like:
<%= row.cell(width: 'three-quarters') { object.my_fancy_value } %>

This was implemented right at the beginning too. I find it unintuitive that it's set in the cell so missed it, but that's how HTML works!


Sudbury multi-family misclassified

https://www.rutlandrpc.org/wp-content/uploads/2023/07/Sudbury_UDO_adopted_1-10-22.docx
Multifamily require public hearing before the zoning board. Fields 3FDP & 4FDP should be changed from Allowed/Conditional to Public Hearing.

Hello, everyone!
I just wanted to check on these revision requests that John has been sending. Is anyone working to make these changes in the existing feature layer? If not, should I be doing that?
Thanks,
Yoshi
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: John E. Adams (VCGI) @.>
Sent: Thursday, September 19, 2024 12:26:02 PM
To: VERSO-UVM/VT_Zoning_Atlas @.>
Cc: Subscribed @.***>
Subject: [VERSO-UVM/VT_Zoning_Atlas] Sudbury multi-family misclassified (Issue #212)
https://www.rutlandrpc.org/wp-content/uploads/2023/07/Sudbury_UDO_adopted_1-10-22.docx
Multifamily require public hearing before the zoning board. Fields 3FDP & 4FDP should be changed from Allowed/Conditional to Public Hearing.
—
Reply to this email directly, view it on GitHubhttps://github.com/VERSO-UVM/VT_Zoning_Atlas/issues/212, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWBR5PWGRWLOTFX7UGUTAJTZXL3JVAVCNFSM6AAAAABOQJM4AOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZTMOBSGQYTIMY.
You are receiving this because you are subscribed to this thread.Message ID: @.***>


If you push to a branch in a pull request, it will be "fork deleted".

Gitea version (or commit ref):gitea-1.11.4-linux-amd64
Git version:2.24.0
Operating system:CentOS Linux release 7.6.1810 (Core)
Database (use [x]):

[x] PostgreSQL
[ ] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[ ] No
[x] Not relevant

Log gist:

Description
I used gitea-1.9.2 to begin with. There was no problem at the time.
We then moved to gitea-1.10.1,1.10.2. It was working too.
However, after moving to gitea-1.11.1, an additional push to a branch in a pull request resulted in fork deleted and the pull request could no longer be merged.
The next time I reverted to gitea-1.10.4 and gitea-1.10.6, it worked.
But the next time I select gitea-1.11.4, it's the same error.
How can I get rid of this error?

Is it possible that you ran gitea with different file names or different file paths (you shouldn't)? (e.g. gitea-1.11 instead of gitea, or /bin/gitea1.11/gitea vs. /bin/gitea1.10/gitea). If that's the case, make sure to run the "rebuild git hooks" procedure from the site admin menu, but try to avoid renaming the executable. Also, make sure you never access the gitea repositories directly: only through gitea (or your local copies, of course).
By the way, it's not advisable to go back and forth with the versions, because the database suffers changes on each migration that may not be backwards compatible.

I have an issue that looks the same, even though I have this error in a different way.
Here is what I do:

I create a branch, push to it.
I do a pull request
I push new things into the same branch

When I do that, I get this message in my Pull request: This pull request is broken due to missing fork information.
And  meaz wants to merge 1 commits from mybranch into master  becomes meaz wants to merge 1 commits from deleted into master

@meaz I can't reproduce on master.
What version are you reporting this on?

I also can't reproduce on release/v1.11 or 1.11.4..

It is version 1.11.4.

Ok I tried to reproduce on 1.11.4 but couldn't. Can you reproduce on try?
Can you give me an exact script to reproduce on 1.11.4 - (I tried to follow your comments above but was unable to reproduce with those - but I missed your info about fork because you didn't mention fork in your steps to reproduce.)
Is the problem unpredictable - in that it only occurs infrequently?
Does it rely on load? What OS are you running on? What DB?
Ah looking again I see that you report fork broken - Are you pushing to branch on a fork which has an open pr to its base repo?
I will try testing that.

Hi,
indeed, there is no issue won try...
As for the steps:

I clone the project
I create a branch, push to it.
I do a pull request
I push new things into the same branch
The error appears.

Is the problem unpredictable - in that it only occurs infrequently?

No, it happens each time I do the same steps, and for different repos.

Does it rely on load? What OS are you running on? What DB?

I don't know, I'll ask the admin. OS I'm pretty sure it is Debian Stretch. DB is postgresql.

Are you pushing to branch on a fork which has an open pr to its base repo?

I'm not pushing to a fork. Directly to a branch on the main repo.

Are you pushing over ssh or https?
If you're pushing over ssh what happens if you do a simple ssh to git@server - you should not get a prompt - if you do you are not logging into gitea with a key managed by gitea and therefore all bets are off and you are in an unsupported situation.

I'm pushing using Atom, so I guess it is https ?
I'll try to spot the issue more precisely with the admin. Any idea where we should start searching?

I'm pushing using Atom, so I guess it is https ?
Atom probably uses a plugin to push?! Any plugin that does git stuff probably uses git scm in the background, which supports ssh. The way it handles the remote url happens automatically. For example you won't see any different behavior between git clone https://<url>/<owner>/<repo>.git and git@<url>:<owner>/<repo>.git. So it could be using both you should see the remote url if it has http/https or something like user@something, it should be viewable through Atom.

I'll try to spot the issue more precisely with the admin. Any idea where we should start searching?

I clone the project
I create a branch, push to it.
I do a pull request
I push new things into the same branch
The error appears.

I tried the above using a raspberry pi 3 b+, with the most recent updates and postgresql and I could not replicate the issue.

The admin updated his instance, it works now.


How to change wr's notion of the "current" exercise?

Hi, thanks for the free workshops!
I am working through 100-exercises-to-learn-rust and I keep finding myself wanting to reverse wr's "position" in the workshop, most often this is in order to rerun an exercise that I completed successfully but then thought of a nicer way to solve it.
It would be nice to have a flag to either change the position or to test a specific solution
Thanks
N.B. I know that I can edit progress.db manually, I just think it would be nice to have a command line flag

You can now use wr check from inside an exercise to verify that specific exercise, regardless of where you are in the workshop!