Some fine tuning of paren spacing

for parens that don't line-break, turn the added spaces into separate atoms. In future, they will be added conditionally when an option is enabled -- this change makes it easier.
for parens that can line-break, play with softline/line instead of adding spaces -- that leads to more reliable formatting without bugs
fine-tune the unary expression spacing to make it conform better to how space-unary-ops is configured in eslint-config-wpcalypso

@samouri Would you mind trying out this branch and checking if the results are better? I'm only aware about one bug:
map( a =>
  a(),
 ); // extra space

This case is quite tough, I hope to solve it in the next day or two.
My dream here is to introduce a calypsoSpacing option for prettier, and make the fork support both the enabled and disabled state -- with the enabled state being the hardcoded default for us.
That would make a merge into the official version at least theoretically possible.
To test, check that the following rules as defined in eslint-config-wpcalypso are always happy:

computed-property-spacing
space-in-parens
space-unary-ops
jsx-curly-spacing
template-curly-spacing
object-curly-spacing

Thanks for working on this @jsnajdr.
Initial thoughts:

is there any benefit of using line instead of " " + softline?  While line makes more sense for the original prettier project, I don't love the idea of having two different way for adding in extra calypso spacing.
I think it would be a really good idea to add in the variable calypsoSpace now.  If the flag is true, make it " ", else empty string "".  That way it will be blatantly obvious on inspection if it were added for calypso or in the original prettier.
We'll soon need to start being careful about how often we make changes calypso-prettier. It would be frustrating for any teams using this if they were hit by whitespace changes regularly.

is there any benefit of using line instead of " " + softline? While line makes more sense for the original prettier project, I don't love the idea of having two different way for adding in extra calypso spacing.

line is exactly the same thing as " " + softline, so there is no difference in behavior -- line is just a very useful shortcut. I think it's a good idea to keep the same conventions as the rest of the prettier codebase.
There are indeed two ways how to add the Calypso space -- one adds a potential line break, the other add just an unbreakable whitespace. And it's intentional -- it's a way to express that we want the outer () to 'hug' the inner {} or []. For example, there's no break between the nested brackets here:
fun( {
  param1,
  param2
} );

I think it would be a really good idea to add in the variable calypsoSpace now. If the flag is true, make it " ", else empty string "". That way it will be blatantly obvious on inspection if it were added for calypso or in the original prettier.

I pushed a commit that adds a calypso-spacing option that does exactly this. Our prettier fork has all options hardcoded and ignores all options passed from outside, but if we ever want to honor the options, everything is ready.

We'll soon need to start being careful about how often we make changes calypso-prettier. It would be frustrating for any teams using this if they were hit by whitespace changes regularly.

Fortunately, the prettier maintainers feel the same way. This is what @vjeux told me on a Gitter chat the other day:

by the way, now that we reach 1.0, I'm very sensitive around formatting changes and upgrade velocity, so they should start changing less and less things and the releases be more spaced apart.

By the way, what do you think about upgrading our fork to the latest 1.4.x release? When I find a bug or a potential improvement in the 1.1 version that we use, it's almost always fixed in the upstream version.

By the way, what do you think about upgrading our fork to the latest 1.4.x release? When I find a bug or a potential improvement in the 1.1 version that we use, it's almost always fixed in the upstream version.

Upgrades are welcome :). I'm personally a bit checked out of this project because it already solves main gripe pretty well (manual formatting), but I'm happy to review any work you do to make it better.
If you want to update to 1.4 you should make a new branch in this repo called "calypso-1.4"


Choose users you want to be your friends

Rather than displaying a choice of every other user on the system, the player wants to only track and / or play against their friends.  User should be able to add a friend based on information known to them (name, email address, etc.), and they should also be able to block users if they don't want to be tracked, messaged, or play with them.

This is done and deployed.  It still needs an enhancement to search for partial names of your friends so it doesn't try to download all users when choosing friends. I will add that as a separate issue and close this one.


In V2 the BLE "Generic Access" "Device Name" is only BBC micro:bit

Should it be BBC micro:bit V2?
Basically, in this snippet inside MicroBitBLEManager::init(), the enableBonding variable is an init() parameter only set to true when in pairing mode:
https://github.com/lancaster-university/codal-microbit-v2/blob/446765ed7553b0f0d647ba6c9ad61e3b797e1693/source/bluetooth/MicroBitBLEManager.cpp#L265-L272
So basically what we get is

Generic Access->Device Name
Device Information->Model Number String

Pairing mode
BBC micro:bit [abcde]
BBC micro:bit V2

Not pairing mode
BBC micro:bit
BBC micro:bit V2

This might be correct, but just wanted to double check.

This should be fine.


Npmjs inside react-scripts 0.95 webpack is 1.x????Why not 2.0?

{
"name": "react-scripts",
"version": "0.9.5",
"description": "Configuration and scripts for Create React App.",
"repository": "facebookincubator/create-react-app",
"license": "BSD-3-Clause",
"engines": {
"node": ">=4"
},
"bugs": {
"url": "https://github.com/facebookincubator/create-react-app/issues"
},
"files": [
"babelrc",
"eslintrc",
"bin",
"config",
"scripts",
"template",
"utils"
],
"bin": {
"react-scripts": "./bin/react-scripts.js"
},
"dependencies": {
"autoprefixer": "6.7.2",
"babel-core": "6.22.1",
"babel-eslint": "7.1.1",
"babel-jest": "18.0.0",
"babel-loader": "6.2.10",
"babel-preset-react-app": "^2.2.0",
"babel-runtime": "^6.20.0",
"case-sensitive-paths-webpack-plugin": "1.1.4",
"chalk": "1.1.3",
"connect-history-api-fallback": "1.3.0",
"cross-spawn": "4.0.2",
"css-loader": "0.26.1",
"detect-port": "1.1.0",
"dotenv": "2.0.0",
"eslint": "3.16.1",
"eslint-config-react-app": "^0.6.2",
"eslint-loader": "1.6.0",
"eslint-plugin-flowtype": "2.21.0",
"eslint-plugin-import": "2.0.1",
"eslint-plugin-jsx-a11y": "4.0.0",
"eslint-plugin-react": "6.4.1",
"extract-text-webpack-plugin": "1.0.1",
"file-loader": "0.10.0",
"fs-extra": "0.30.0",
"html-webpack-plugin": "2.24.0",
"http-proxy-middleware": "0.17.3",
"jest": "18.1.0",
"json-loader": "0.5.4",
"object-assign": "4.1.1",
"postcss-loader": "1.2.2",
"promise": "7.1.1",
"react-dev-utils": "^0.5.2",
"style-loader": "0.13.1",
"url-loader": "0.5.7",
"webpack": "1.14.0",
"webpack-dev-server": "1.16.2",
"webpack-manifest-plugin": "1.1.0",
"whatwg-fetch": "2.0.2"
},
"devDependencies": {
"react": "^15.3.0",
"react-dom": "^15.3.0"
},
"optionalDependencies": {
"fsevents": "1.0.17"
}
}

Why do you expect it to be 2? We'll release the version that uses 2 when it's fully ready.


Refactor: Improve Folder Structure, Code Optimization, and Wire Up ZIP Endpoint

Description
This pull request encompasses the following enhancements:

Folder Structure Refactoring:

Reorganized the project folder hierarchy for improved organization and clarity.
Moved files and directories to more appropriate locations.

Code Optimization:

Conducted code optimizations to enhance performance and maintainability.
Applied best practices to improve code readability and efficiency.

Endpoint Implementation:

Wired up the endpoint to serve the actual ZIP file, completing the previously pending task.

These changes aim to create a more maintainable and efficient codebase. Please review and provide feedback.

Thank you so much for the contribution, @abdlhay! 🎁 Really appreciate it! We'll make a few minor changes live on stream, but this is good to merge. What a wonderful holiday gift! 🤗


[FLINK-15571][connector] Redis Stream connector for Flink

What is the purpose of the change
Introduce a new Flink connector with Redis Stream data structure.
Brief change log

Implement a new Flink connector with Redis Stream.

Verifying this change
This change added tests and can be verified as follows:

Added basic tests

Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): yes
The public API, i.e., is any changed class annotated with @Public(Evolving): no
The serializers: don't know
The runtime per-record code paths (performance sensitive): no
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no
The S3 file system connector: no

Documentation

Does this pull request introduce a new feature? yes
If yes, how is the feature documented? not documented

@rmetzger How to improve from review=[description]? Is there anything I can do from my side?
PS: I plan to add documentation after the implementation is finalized.
Thank you.

Hi, @sazzad16 . Thanks for open the PR. However, as the Automated Checks describe, we should first reach a consensus in JIRA ticket and then push the PR. I think you can:

Open a discussion thread in user/dev ML on whether we need this connector.
Attach a design doc of this connector to the ticket.

@KarmaGYZ Briefly speaking, this is a simple idea. i) Save data into Redis. ii) Get data from Redis. So I'm not sure about what to do here.
Could you please refer to an example (design doc)? Thanks.

@KarmaGYZ Thank you for your response.
Briefly speaking, this is a simple idea. i) Save data into Redis. ii) Get data from Redis. So I'm not sure about what to do here.
Could you please refer to an example (design doc)? Thanks again!

@sazzad16 Maybe you can refer to this FLIP. All in all, I think we should reach a consensus on whether we need this connector first. Just like Yun Tang's comment on FLINK-15571.

@KarmaGYZ It'll be helpful. Thank you.

@KarmaGYZ how one can add a new FLIP?

@sazzad16 @gkorland Hi! Sorry for the late reply. Are you still interested in contributing/maintaining a Redis connector for Flink?

@MartijnVisser We'd love to. Let us know how to proceed.

@sazzad16 We're currently in the process of externalizing connectors from Flink's main repository to their own individual repositories. For example, the Elasticsearch connector is being moved from this repo to https://github.com/apache/flink-connector-elasticsearch. While working on moving out Elasticsearch, we're also creating some templates/examples/archetype for all other connectors.
The idea would be that we create a new repo for Redis, flink-connector-redis. You could open up PRs against that repo. A Source should be build via the Source API (see FLIP-27 https://cwiki.apache.org/confluence/display/FLINK/FLIP-27%3A+Refactor+Source+Interface) and Sinks using the Unified Sink API / ASync API (see FLIP-143 https://cwiki.apache.org/confluence/display/FLINK/FLIP-143%3A+Unified+Sink+API and FLIP-171 https://cwiki.apache.org/confluence/display/FLINK/FLIP-171%3A+Async+Sink). This also depends on the level of guarantees (at least once, at most once, exactly once etc) you want to guarantee. There are maintainers in the Flink community who can help with reviews for these type of implementations.

@MartijnVisser that sounds like a great plan, when do you plan to open the new repo?

@gkorland I'll open an announce thread on the Dev mailing list today and I'll find a PMC who can create a repo. Would take a couple of days at most

@gkorland @chayim Apologies for the slight delay, but the repo is there. You can find it at https://github.com/apache/flink-connector-redis
The current best implementation can be found at https://github.com/apache/flink-connector-elasticsearch
Please ping me in case you have any questions or remarks

Thanks @MartijnVisser. Appreciate it!

@MartijnVisser Just submitted the PR https://github.com/apache/flink-connector-redis/pull/2 in the new repo. Please consider that as work in progress and it would be great to get some initial reviews.


FST#Compiler allocates too much memory

Description
https://blunders.io/jfr-demo/indexing-4kb-2<IP_ADDRESS>.03.36/allocations-drill-down
The allocation profile for nightly indexing benchmark shows that FST#ByteStore occupies a rather high ratio because we always construct a FST#Compiler each time calling Lucene90BlockTreeTermsWriter$TermsWriter#writeBlocks, which will allocate a new 32KB byte[] .
As the profile shows, most of memory was allocated from FST#init, which means BytesStore rarely needs another page to store bytes. So I suspect we are using a too large page here. Maybe we should decrease the page size to 8k or even smaller ?

I did an experiment: Index random BytesRefs and count the byte usage when BytesStore#finish called. The following are the statistical results:
total sample: 23130

avg: 78.12
min: 7
mid: 36
pct75: 40
pct90: 40
pct99: 44
max: 10790

While the bytesrefs are random, it may share little prefix and suffix, I tried to mock some common prefix/suffix for them like:
if (R.nextBoolean()) {
  int prefixLen = R.nextInt(b.length / 2);
  System.arraycopy(commonPrefix, 0, b, 0, prefixLen);
}

if (R.nextBoolean()) {
  int suffixLen = R.nextInt(b.length / 2);
  System.arraycopy(commonSuffix, commonSuffix.length - suffixLen, b, b.length - suffixLen, suffixLen);
}

And here is the result:
total sample: 27235

avg:<PHONE_NUMBER>20929
min: 8
mid: 24
pct75: 629
pct90: 3347
pct99: 5374
max: 29049

We will allocate a 32kb while 99% cases only need 5kb. These results somewhat matches the allocation profile that we rarely need a second block in BytesStore.

I get similar statistics for wikimediumall and here are the results when BytesStore#finish called 1,000,000 times.
BytesStore#finish called: 1000000 times

min: 1
mid: 16
avg: 64.555987
pct75: 28
pct90: 57
pct99: 525
pct999: 4957
pct9999: 29124
max: 631700

It seems 1k bytes per block is enough here. 99% cases can be covered by single block and we at most need 600+ blocks for single FST.

Thanks @gf2121 -- this is a great discovery (and thank you https://blunders.io for the awesome integrated profiling in Lucene's nightly benchmarks!).

While the bytesrefs are random, it may share little prefix and suffix, I tried to mock some common prefix/suffix for them like

It's always dangerous to test on random data (even random data that attempts to simulate realistic patterns): you'll draw random conclusions yet act on them as if they were trustworthy!  Better to test by indexing true terms that show up in a real-world corpus.
Still, I think this issue is indeed compelling -- most FSTs in practice are likely smaller than 32 KB.  But one issue to be aware of is shrinking the block size will worsen this issue, where performance of building & immediately using (in HEAP, not via save/load) an FST has poor performance when the FST needs more than one block.
Really we need to get away from FST attempting to re-implement an in-memory filesystem, badly!  We've seen many problems from this over the years... like poor performance reading bytes in reverse, this issue (over-allocating blocks), the above linked issue (poor performance using a just-built FST).  The FST compiler really ought to stream its bytes directly to DataOutput (inspired by Tantivy's awesome FST implementation) which will in general be backed by a "true" filesystem since FST compilation is fundamentally append-only writes.
But until we fix this "correctly" (stop trying to be a ramfs, badly), I agree we should tweak the block size for terms dict FST writing.

FWIW I was looking into this a bit when I saw this issue come in. Specifically on Solr 8.11, but as far as I can tell the changes in #12604 apply to 8.x as well.
In a 30s async profiler memory allocation profile, can see that ~4% of total is this same FST byte array.

I put up a backport PR for lucene-solr branch_8_11 - https://github.com/apache/lucene-solr/pull/2677


[Agent] Improve edits by adding back edit_file_by_line

What is the problem that this fixes or functionality that this introduces? Does it fix any open issues?
This is a follow-up of https://github.com/OpenDevin/OpenDevin/pull/2685.
Give a brief summary of what the PR does, explaining any non-trivial design decisions
Per discussion with @tobitege in https://github.com/OpenDevin/OpenDevin/pull/2685, this PR:

add back edit_file_by_line and make it co-exists with edit_file_by_replace
add back append_file so that agent can easily append content to the end due to concern mentioned here.
fix the extra newline produced by insert_content_at_line introduced in https://github.com/OpenDevin/OpenDevin/pull/2685

TODO:

[x] This requires https://github.com/OpenDevin/OpenDevin/pull/2685 to be merged first
[ ] Run SWE-Bench Lite to validate performance.

Other references

@xingyaoww when you're ready to run an eval on this I can do so.

@neubig I'm running one gpt-4o eval on the latest commit of this PR to see if it degrades/improves perf - will share updates soon!

@neubig
Before the Merge branch 'main' into xw/further-improve-edit commit, this PR scores 64 out of 300 (21.3%) on SWE-Bench Lite, comparable to https://github.com/OpenDevin/OpenDevin/pull/2685, which scores (63/300 - it go down from 64 to 63 after fix the empty patch issue of evaluation in https://github.com/OpenDevin/OpenDevin/pull/2776).

If you can evaluate the performance of this PR using Claude-3.5-sonnet, we can probably start reviewing and discussing if we want to merge this one.
I added the edit_by_line function back, fixed the space issue introduced in the previous PR, and added more unit tests to make the editing potentially more robust. So even if it does not improve score, there might still some value to merge this.

I think the avenue of improvement could come down to:

reduce the number of instances that produce empty patches
reduce the number of instances that stopped due to turn limit (e.g., sometimes the agent tries to debug the code by running commands, which sometime contribute to this turn limit - we could try to ask the agent to stop once the files are edited)
increase the max turn limits since we already cap each instance at 4 USD, so there's no need for a turn limit

Starting with this one, I will work on this on subsequent PR to test these

The prompts need to be changed to reflect the change of functionality and new edit_file_by_line specifically in codeact_swe, but possibly elsewhere.

The prompts also need a hint for the LLM (here: especially Sonnet) to not use any placeholders when writing files, that does cause quite some problems when that happens.
Idk how different LLM's specifically work in that regard, if they calculate how many tokens they can actually cover for their setup and thus MUST truncate content occasionally.
Another hint could be to split up larger chunks of code up into multiple writes (i.e. responses), wdyt?

The prompts also need a hint for the LLM (here: especially Sonnet) to not use any placeholders when writing files, that does cause quite some problems when that happens.
Idk how different LLM's specifically work in that regard, if they calculate how many tokens they can actually cover for their setup and thus MUST truncate content occasionally.
Another hint could be to split up larger chunks of code up into multiple writes (i.e. responses), wdyt?

@tobitege good point! But since eval have been run for this - we can probably defer these prompt changes to the next PR, so we can focus on analyzing the effect of "edit tools" in this PR?

The prompts also need a hint for the LLM (here: especially Sonnet) to not use any placeholders when writing files, that does cause quite some problems when that happens.
Idk how different LLM's specifically work in that regard, if they calculate how many tokens they can actually cover for their setup and thus MUST truncate content occasionally.
Another hint could be to split up larger chunks of code up into multiple writes (i.e. responses), wdyt?

@tobitege good point! But since eval have been run for this - we can probably defer these prompt changes to the next PR, so we can focus on analyzing the effect of "edit tools" in this PR?

Of course, just wanted to check with you on your thoughts about it in general. 👍

@neubig Got the claude-3.5 results out.. There's slight degradation on claude-3.5 results (69/300=23%) compared to 1.7 (73/300=24.3%). I suspect it might be caused by the addition of edit by line number in addition to edit by replace. Do you think we should remove the edit by line and run eval again, or we can just merge as is, and then try to remove it further?

I agree that if accuracy has gone down we should probably re-try the eval.

Improved results on this PR - after merging https://github.com/OpenDevin/OpenDevin/pull/2846 that removes edit_file_by_line (this does hurt!).
74 resolved out of 300-27=273 inference instances (~27% solve rate).
Those 27 instances are unable to run on claude-3.5-sonnet due to the following error:
litellm.BadRequestError: litellm.ContentPolicyViolationError: VertexAIException ContentPolicyViolationError -
{"type":"error","error":{"type":"invalid_request_error","message":"Output blocked by content filtering policy"}}

Anthropic updated their article last week (https://support.anthropic.com/en/articles/9205721-why-am-i-receiving-an-output-blocked-by-content-filtering-policy-error), suggesting that '.... they generally arise from Anthropic’s efforts to prevent Claude from being used to replicate or regurgitate pre-existing materials...'
Maybe claude is trained on some repository in the SWE-Bench test set, and managed to reproduce them exactly during inference, which is blocked by anthropic's latest update feature?
Nevertheless, 74 resolved, compared to the previous run, 73 resolved, which is still a minor improvement, which I think worth merge this in.

Let me know if people have more concerns here (cc @tobitege) -- if not, i plan to merge this sometime tomorrow (in the next 12-18 hours) so we can go ahead test https://github.com/OpenDevin/OpenDevin/pull/2489 with the updated "edit" function.

Let me know if people have more concerns here (cc @tobitege) -- if not, i plan to merge this sometime tomorrow (in the next 12-18 hours) so we can go ahead test #2489 with the updated "edit" function.

Of course, go ahead. 😃


Pass -fstack-check to gcc and clang. This protects against aliasing o…

…f stack and heap. Implements issue #45

Thanks! This looks good.


difficulties to login on ldaps

hi,
i got the errors :
Exception while invoking method 'login' TypeError: Cannot read property 'on' of undefined
at setupSocket (/home/meteoruser/.meteor/packages/typ_ldapjs/.<IP_ADDRESS>brxoay.lw2j++os+web.browser+web.cordova/npm/node_modules/ldapjs/lib/client/client.js:111:15)
events.js:183
throw er; // Unhandled 'error' event
Error: self signed certificate in certificate chain
at TLSSocket. (_tls_wrap.js:1105:38)
my certificate is valid, if i set LDAP_DEFAULTS.ldapsCertificate to false, or if i set environment variable NODE_TLS_REJECT_UNAUTHORIZED to 0,
then there is no "self signed certificate" error,
but the "Cannot read property 'on' of undefined" error still remain.

here the solution i found :

add env var NODE_TLS_REJECT_UNAUTHORIZED=0

modify .meteor/packages/typ_ldapjs/.<IP_ADDRESS>brxoay.lw2j++os+web.browser+web.cordova/npm/node_modules/ldapjs/lib/client/client.js

// var closeSocket = (opts.secure ? socket.socket : socket);
if (socket.socket === undefined) { closeSocket = socket; }else{ closeSocket = socket.socket; }
any advice ?


Bugfix for https://github.com/chef-cookbooks/push-jobs/issues/61

Fix for issue #61 and #57

Thank you for for the PR; it looks like PR #63 also fixes this; so closing this one.


Support of a different Credential Stores

Hi!
Today plug_auth only supports an private agent to Store credentials. For me, the best scenario is when basic auth is checked with my configured db... there are plans to allow me to Specify an GenServer that gives database access to my credentials?
There is another easier way to achieve this?
Thanks

Hi. This is a good idea, PR would be welcome.

I merged the PR and released the new version. I made some refactoring, please check it and see if it works fine for you (it should). I also removed the extra tests because they were basically redundant, they were only checking that the store is correctly read from the map, but this is pretty much trivial.


Use transformers-compat

@peti points out that depending on transformers >= 0.4 is no good for GHC 7.8.4 users. This change lowers that to >= 0.2 and brings in transformers-compat for the ExceptT transformer.

This patch won't do the trick, I'm afraid, because there's still the dependency on mtl == 2.2.*, and that version of mtl depends on transformers == 0.4.*. So we're back right where we started.

This patch won't do the trick, I'm afraid, because there's still the dependency on mtl == 2.2., and that version of mtl depends on transformers == 0.4.. So we're back right where we started.

Interesting. I was able to build this package with GHC 7.8.4. Cabal info says that transformers <IP_ADDRESS> and <IP_ADDRESS> are installed, along with transformers-compat <IP_ADDRESS>.

What does cabal configure -v say when you configure your build? Is there no warning about conflicting package versions?

Here's a snippet of cabal configure -v:
Resolving dependencies...
Configuring smtp-mail-ng-<IP_ADDRESS>...
Dependency attoparsec ==<IP_ADDRESS>: using attoparsec-<IP_ADDRESS>
Dependency base ==<IP_ADDRESS>: using base-<IP_ADDRESS>
Dependency base16-bytestring ==<IP_ADDRESS>: using base16-bytestring-<IP_ADDRESS>
Dependency base64-bytestring ==<IP_ADDRESS>: using base64-bytestring-<IP_ADDRESS>
Dependency bytestring ==<IP_ADDRESS>: using bytestring-<IP_ADDRESS>
Dependency crypto-random ==0.0.8: using crypto-random-0.0.8
Dependency cryptohash ==0.11.6: using cryptohash-0.11.6
Dependency filepath ==<IP_ADDRESS>: using filepath-<IP_ADDRESS>
Dependency haskeline ==<IP_ADDRESS>: using haskeline-<IP_ADDRESS>
Dependency mime-mail ==<IP_ADDRESS>: using mime-mail-<IP_ADDRESS>
Dependency mtl ==2.2.1: using mtl-2.2.1
Dependency network ==<IP_ADDRESS>: using network-<IP_ADDRESS>
Dependency stringsearch ==<IP_ADDRESS>: using stringsearch-<IP_ADDRESS>
Dependency text ==<IP_ADDRESS>: using text-<IP_ADDRESS>
Dependency tls ==1.2.16: using tls-1.2.16
Dependency transformers ==<IP_ADDRESS>: using transformers-<IP_ADDRESS>
Dependency transformers-compat ==<IP_ADDRESS>: using transformers-compat-<IP_ADDRESS>
Dependency x509-store ==1.5.0: using x509-store-1.5.0
Dependency x509-system ==1.5.0: using x509-system-1.5.0
Using Cabal-<IP_ADDRESS> compiled by ghc-7.8
Using compiler: ghc-7.8.4

There you go:

Dependency transformers ==<IP_ADDRESS>: using transformers-<IP_ADDRESS>

You are building with version 0.4.x. This is going to work fine as long as your package doesn't link anything that refers to the core version of transformers, but once you do, you'll get a big fat warning from Cabal about potentially broken binaries. IMHO, just adding doctest into the build-depends stanza should do the trick.

I see. Ok, relaxing mtl to >= 2.0 seems to clear it up.

Works like a charm:
Configuring smtp-mail-ng-<IP_ADDRESS>...
Dependency attoparsec ==<IP_ADDRESS>: using attoparsec-<IP_ADDRESS>
Dependency base ==<IP_ADDRESS>: using base-<IP_ADDRESS>
Dependency base16-bytestring ==<IP_ADDRESS>: using base16-bytestring-<IP_ADDRESS>
Dependency base64-bytestring ==<IP_ADDRESS>: using base64-bytestring-<IP_ADDRESS>
Dependency bytestring ==<IP_ADDRESS>: using bytestring-<IP_ADDRESS>
Dependency crypto-random ==0.0.8: using crypto-random-0.0.8
Dependency cryptohash ==0.11.6: using cryptohash-0.11.6
Dependency filepath ==<IP_ADDRESS>: using filepath-<IP_ADDRESS>
Dependency haskeline ==<IP_ADDRESS>: using haskeline-<IP_ADDRESS>
Dependency mime-mail ==<IP_ADDRESS>: using mime-mail-<IP_ADDRESS>
Dependency mtl ==<IP_ADDRESS>: using mtl-<IP_ADDRESS>
Dependency network ==<IP_ADDRESS>: using network-<IP_ADDRESS>
Dependency stringsearch ==<IP_ADDRESS>: using stringsearch-<IP_ADDRESS>
Dependency text ==<IP_ADDRESS>: using text-<IP_ADDRESS>
Dependency tls ==1.2.16: using tls-1.2.16
Dependency transformers ==<IP_ADDRESS>: using transformers-<IP_ADDRESS>
Dependency transformers-compat ==<IP_ADDRESS>: using transformers-compat-<IP_ADDRESS>
Dependency x509-store ==1.5.0: using x509-store-1.5.0
Dependency x509-system ==1.5.0: using x509-system-1.5.0
Using Cabal-<IP_ADDRESS> compiled by ghc-7.8

Thank you very much!

Thank you very much!

No problem! <IP_ADDRESS> is up on hackage


"401 error: The access token expired" when using SpotifyClientCredentials

I am creating my Spotipy object like this, after reading this code snippet:
scc = SpotifyClientCredentials(client_id = SPOTIPY_CLIENT_ID,
                                   client_secret = SPOTIPY_CLIENT_SECRET)
sp = spotipy.Spotify(client_credentials_manager = scc)

However, after a number of queries, I obtain the following error:
http status:401
Traceback (most recent call last):
  File "retriever2.py", line 114, in <module>
    store_songs(terms, dbfile, total_number)
  File "retriever2.py", line 97, in store_songs
    songs = get_songs(sp, playlist)
  File "retriever2.py", line 36, in get_songs
    track_results = sp.next(track_results)
  File "/home/chema/.local/lib/python2.7/site-packages/spotipy/client.py", line 172, in next
    return self._get(result['next'])
  File "/home/chema/.local/lib/python2.7/site-packages/spotipy/client.py", line 123, in _get
    return self._internal_call('GET', url, payload, kwargs)
  File "/home/chema/.local/lib/python2.7/site-packages/spotipy/client.py", line 104, in _internal_call
    -1, '%s:\n %s' % (r.url, r.json()['error']['message']))
spotipy.client.SpotifyException: http status: 401, code:-1 - https://api.spotify.com/v1/users/1248788010/playlists/4wEVX1M28mBIpiHttM6PrP/tracks?offset=100&limit=100:
 The access token expired

I was under the impression that SpotifyClientCredentials was used to update the access token accordingly. Right now, I have my queries inside a try - except block and I refresh it manually (I basically recreate the sp object every time I get an exception). Am I using this correctly or is there any other way?

Hi, I am having the same problem as you and I was wondering how you got the try - except to work? Right now it just seems to not catch the error for me.

@Biggerandreas You can use something like this to catch exception raised when the token expires:
try:
    do_something()
except spotipy.client.SpotifyException:
    # re-authenticate when token expires
    token = ...
    sp = spotipy.Spotify(auth=token)
    do_something()

@ritiek I have already tried that but it still gives me this error:

Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/spotipy-2.4.4-py3.5.egg/spotipy/client.py", line 121, in _internal_call
File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 935, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.spotify.com/v1/me/player/currently-playing
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/python/musicplayer3.py", line 101, in
run_loop()
File "/home/pi/python/musicplayer3.py", line 87, in run_loop
new_track = main.get_song()
File "/home/pi/python/musicplayer3.py", line 41, in get_song
info = self.sp.currently_playing()
File "/usr/local/lib/python3.5/dist-packages/spotipy-2.4.4-py3.5.egg/spotipy/client.py", line 899, in currently_playing
File "/usr/local/lib/python3.5/dist-packages/spotipy-2.4.4-py3.5.egg/spotipy/client.py", line 148, in _get
File "/usr/local/lib/python3.5/dist-packages/spotipy-2.4.4-py3.5.egg/spotipy/client.py", line 126, in _internal_call
spotipy.client.SpotifyException: http status: 401, code:-1 - https://api.spotify.com/v1/me/player/currently-playing:
The access token expired

Thanks in advance.

@Biggerandreas That should not be happening, I've been using something similar without problems. Do you mind sharing relevant code from your script here? (removing any credentials of course)

@ritiek Sorry for the mess of a code but here it is:
import spotipy
import spotipy.oauth2 as oauth
import re
import time
from RPLCD.i2c import CharLCD
from requests import exceptions

# songs['item']['artists'][0]['name']

lcd = CharLCD(
	i2c_expander='PCF8574', address=0x27, port=1,
	cols=20, rows=4, dotsize=8,
	charmap='A02',
	auto_linebreaks=True,
	backlight_enabled=True)

lcd.clear()

username = ''
scope = 'playlist-read-private,' \
		' playlist-read-collaborative,' \
		' user-read-playback-state,' \
		' user-modify-playback-state,' \
		' user-read-currently-playing'
redirect_uri = 'http://localhost/'
client_id = ''
client_secret = ''

_re_compiled = re.compile("'name':\s'(.*?)'|'name':\s\"(.*?)\"")
_auth_finder = re.compile("code=(.*?)$", re.MULTILINE)

class Main:
	def __init__(self):
		self.spo = oauth.SpotifyOAuth(
			client_id=client_id,
			client_secret=client_secret,
			redirect_uri=redirect_uri,
			scope=scope,
			cache_path=".cache-{}".format(username))

		self.sp = spotipy.Spotify(auth=self.get_token())
		self.get_song()

	def spot(self, token):
		self.token = token
		self.sp = spotipy.Spotify(auth=token)
		return self.sp

	def refresh_token(self):
		cached_token = self.spo.get_cached_token()
		is_it_expired = self.spo.is_token_expired(cached_token)
		if is_it_expired is True:
			refreshed_token = cached_token['refresh_token']
			new_token = self.spo.refresh_access_token(refreshed_token)
			self.sp = spotipy.Spotify(auth=new_token)
			return new_token

	def get_token(self):
		token_info = self.spo.get_cached_token()
		if token_info:
			access_token = token_info['access_token']
			return access_token
		else:
			auth = self.spo.get_authorize_url()
			print(auth)
			auth_url = input('Click the link above and copy and paste the url here: ')
			_re_auth = re.findall(_auth_finder, auth_url)
			access_token = self.spo.get_access_token(_re_auth[0])
			return access_token

	def get_song(self):
		info = self.sp.currently_playing()
		self.finder = re.findall(_re_compiled, str(info))
		self.song = info['item']['name']
		_re_artist = re.findall(_re_compiled, str(info['item']['artists']))

		if not _re_artist[0][0]:
			self.artist = _re_artist[0][1]
		else:
			self.artist = _re_artist[0][0]

		return "Song: {} Artist: {}".format(self.song, self.artist)

time_started = time.strftime("%Y-%m-%d %H:%M:%S")
main = Main()
main.refresh_token()

def run_loop():
	lcd.clear()
	lcd.cursor_pos = (0, 0)
	lcd.write_string(main.song)
	lcd.cursor_pos = (3, 0)
	lcd.write_string(main.artist)
	track_count = 0
	old_track = main.get_song()
	while True:
		new_track = main.get_song()
		time.sleep(0.1)
		if new_track != old_track:
			print(main.finder)
			track_count += 1
			print(track_count)
			lcd.clear()
			lcd.cursor_pos = (0, 0)
			lcd.write_string(main.song)
			lcd.cursor_pos = (3, 0)
			lcd.write_string(main.artist)
			old_track = new_track

lcd.clear()
lcd.cursor_pos = (0, 0)
lcd.write_string(main.song)
lcd.cursor_pos = (3, 0)
lcd.write_string(main.artist)
track_count = 0
old_track = main.get_song()
while True:
	new_track = main.get_song()
	time.sleep(0.1)
	try:
		if new_track != old_track:
			print(main.finder)
			track_count += 1
			print(track_count)
			lcd.clear()
			lcd.cursor_pos = (0, 0)
			lcd.write_string(main.song)
			lcd.cursor_pos = (3, 0)
			lcd.write_string(main.artist)
			old_track = new_track
			main.refresh_token()

	except spotipy.client.SpotifyException:
		#main = Main
		token = main.refresh_token()
		main.spot(token)

		current_time = time.strftime("%Y-%m-%d %H:%M:%S")
		print(time_started - current_time)
		print(current_time)
		print(time_started)
		print("Got an exception ")
		with open('logs.txt', 'a') as the_file:
			the_file.write(current_time)

@Biggerandreas Actually, there are couple of things you need to fix with your code. I'll try to explain my best.  We only need to call it when a spotipy.client.SpotifyException is raised. You should remove calling it from any other place.
As spotipy.client.SpotifyException is raised when the token expires, we don't need to check it again in Main.refresh_token(). So, we can reduce Main.refresh_token() to something below:

    def refresh_token(self):
        cached_token = self.spo.get_cached_token()
        refreshed_token = cached_token['refresh_token']
        new_token = self.spo.refresh_access_token(refreshed_token)
        print(new_token)
        # also we need to specifically pass `auth=new_token['access_token']`
        self.sp = spotipy.Spotify(auth=new_token['access_token'])
        return new_token

In your main loop, you should place main.get_song() under try block otherwise we cannot catch any exception it raises (in our case, we want to catch spotipy.client.SpotifyException).
You are also trying to subtract 2 different times in str which is not possible. Consider:

import time
time_started = time.strftime("%Y-%m-%d %H:%M:%S")
current_time = time.strftime("%Y-%m-%d %H:%M:%S")
print(time_started - current_time)

Traceback (most recent call last):
  File "timi.py", line 4, in <module>
    print(time_started - current_time)
TypeError: unsupported operand type(s) for -: 'str' and 'str'

As a workaround, we can convert them to datetime.datetime objects and then subtract them:
from datetime import datetime
import time
fmt = "%Y-%m-d %H:%M:%S"
time_started = time.strftime(fmt)
current_time = time.strftime(fmt)
# also i think you meant `current_time - time_started` and not other way round
print(datetime.strptime(current_time, fmt) - datetime.strptime(time_started, fmt))

That should clear most stuff. Let me know if anything is still not right. :)

Thanks for the help, will try to see if it works!

@ritiek Sadly it did not work, maybe I am just doing it wrong.
You said I should put main.get_song() in my main loop with a try block, but how would I do that?
Is there a way to shorten the timeout? So I don't have to wait an hour for the error?
Thanks in advance.

My bad, that wasn't clear enough. You have this code:
while True:
	new_track = main.get_song()
	time.sleep(0.1)
	try:
		if new_track != old_track:
			print(main.finder)
			...

You should put Main.get_song() under try block like this so we could catch exceptions:
while True:
	time.sleep(0.1)
	try:
		new_track = main.get_song()
		if new_track != old_track:
			print(main.finder)
			...

Is there a way to shorten the timeout?

Yep, kind of. For testing purposes, you could add raise spotipy.client.SpotifyError(401, 401, 'ouch!') under try block as well:
while True:
	time.sleep(0.1)
	try:
		raise spotipy.client.SpotifyError(401, 401, 'ouch!')
		new_track = main.get_song()
		if new_track != old_track:
			print(main.finder)

Of course, this won't let rest of the code in try block (after raise ...) run, you could just check out if it is generating a new token correctly or not by adding a simple print in Main.refresh_token():
    def refresh_token(self):
        cached_token = self.spo.get_cached_token()
        refreshed_token = cached_token['refresh_token']
        new_token = self.spo.refresh_access_token(refreshed_token)
        print(new_token['access_token'])  # <--
        # also we need to specifically pass `auth=new_token['access_token']`
        self.sp = spotipy.Spotify(auth=new_token['access_token'])
        return new_token

If it gives you a new token every time then you're probably good to go.
I can't actually test your complete code as I don't have any LCD display for my Pi.

@ritiek Thanks! Now it catches it.

@ritiek Now it catches the error but It does not seem to refresh the token because it just keeps printing, should I do something else in the try block?
while True:
	time.sleep(0.1)
	try:
		new_track = main.get_song()
		if new_track != old_track:
			print(main.finder)
			track_count += 1
			print(track_count)
			lcd.clear()
			lcd.cursor_pos = (0, 0)
			lcd.write_string(main.song)
			lcd.cursor_pos = (3, 0)
			lcd.write_string(main.artist)
			old_track = new_track

	except spotipy.client.SpotifyException:
		token = main.refresh_token()
		main.spot(token)
		print("Got an exception ")

@Biggerandreas I went back to the code I was writing when I reported this issue. In the end it seems that what I did was simply to authenticate at the beginning of each loop I was doing (which retrieved some songs, but not so many that the auth would expire). This: https://github.com/rinze/spotify-moods/blob/847cfcbcf1b463e50705b772821bf48acbb309fd/retriever.py#L78
while n_playlists < total_playlists:
    sp = spotipy.Spotify(client_credentials_manager = scc)
    [...]

In any case, shouldn't spotipy handle this internally?

@Biggerandreas You don't need to feed your refreshed token to Main.spot(). Main.refresh_token() automatically take cares of that with self.sp = spotipy.Spotify(auth=new_token['access_token']).
You could just reduce your except block to:
except spotipy.client.SpotifyException:
	main.refresh_token()
	print("Got an exception ")

When your token expires (after 1 hour), your code will raise an exception spotipy.client.SpotifyException which will cause Main.refresh_token() to execute which should refresh your instance of spotipy.Spotify() with your newly refreshed token, so the script should keep working fine.

In any case, shouldn't spotipy handle this internally?

@rinze Yep, it would nice to have an optional argument to spotipy.Spotify(auto_refresh=True) which would automatically refresh token once it expires. I don't see any active development on spotipy, so can't say how long before anything like this happens.

@ritiek Now it works, thanks for the help.

Thanks @ritiek. You've been very helpful and active on this repo over the years. I'm currently the only maintainers on the repo, would you be interested to join me? If yes I will tweet your name to @plamere and see if he's ok. I see no reason why not, because Paul initially invited 2 more people but they aren't as available as expected.

Sure, thanks! That would be very nice.

Great, thank you! You should have received the invite from @plamere :
The goal is to automate RTD + PyPi deployments from a single account, but if needed we can still request it later


Allow pixel snap for rotated objects (issue 14496)

Fixes #14496
@groud The change here is to check for rotation == 0 only during forced snapping and allow it always if it's explicitly set

old condition: ("snap pixel is set" OR "force snap pixel") AND rotation == 0
new condition: "snap pixel is set" OR (force snap pixel AND rotation == 0)

For the record, in Godot 2.1 this code is:
Vector2 CanvasItemEditor::snap_point(Vector2 p_target, Vector2 p_start) const {
	if (snap_grid) {
		p_target.x = _snap_scalar(snap_offset.x, snap_step.x, snap_relative, p_target.x, p_start.x);
		p_target.y = _snap_scalar(snap_offset.y, snap_step.y, snap_relative, p_target.y, p_start.y);
	}
	if (snap_pixel)
		p_target = p_target.snapped(Size2(1, 1));

	return p_target;
}

What's the status of this?

I think the issue this PR was trying to solve is now solvd thanks to the editor rework. Simple Node2D (without a rect) can ben snapped even if rotated.
So I guess the PR can be closed.


Insert a todo into the database example throws an error. Suggested fix.

Bug report
Describe the bug
The code for adding a Todo throws several errors.
There appears to be an error in the JSON serialization and the client database insertion says "from" when the method should be "form. Changing that part works. But I'm unsure if the data is being properly serialized.
 do {
        let jsonData: Data = try JSONEncoder().encode(todo)
        let jsonDict  = try JSONSerialization.jsonObject(with: jsonData, options: .allowFragments)
        try client.database.form("todos")
            .insert(values: jsonDict as! [String : Any])
                           .execute { results in

                            print(results)
            // Handle response
        }
    } catch {
       print("Error inserting the todo: \(error)")
    }

To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:

Add the example for adding a Todo.

The following error messages appear:

Cannot convert value of type 'Any' to specified type '[String : Any]'
Closure expression is unused
Unable to infer type of a closure parameter 'results' in the current context

Expected behavior
Ideally the code wouldn't throw any error messages.
System information

Xcode 12.5.1

@AndrewMayneProjects fixed misspelled from and also fixed the serialisation issue. here is the example:
struct Todo: Codable {
    var `id`: Int?
    var task: String?
    var completed: Bool?
}

database.from("todo").select().execute { (result) in
    switch result {
    case .success(let response):
        guard let data = response.body as? Data else {
            return
        }
        do {
            let todos = try JSONDecoder().decode([Todo].self, from: data)
            print(todos)
        } catch {
            print(error.localizedDescription)
        }
    case .failure(let error):
        print(error.localizedDescription)
    }
}

do {
    let todo = Todo(task: "fix some issues in postgrest-swift", completed: true)
    let jsonData: Data = try JSONEncoder().encode(todo)

    database.from("todo").insert(values: jsonData).execute { (result) in
        switch result {
        case .success(let response):
            guard let data = response.body as? Data else {
                return
            }
            do {
                let todos = try JSONDecoder().decode([Todo].self, from: data)
                print(todos)
            } catch {
                print(error.localizedDescription)
            }
        case .failure(let error):
            print(error.localizedDescription)
        }
    }

}catch {
    print(error.localizedDescription)
}

ref: https://github.com/supabase/postgrest-swift/blob/master/Sources/example/main.swift

This works great! Thank you!


Downloading Momi seperately?

Hello, I need some help figuring out how to download the Momi mod separate from everything else. It seems every time I download the files, it treats it like I want to download all of the files included, and once it shut down my computer from the sheer amount of code.

what you should do is
get winrar
download the source code
in the zip, click on the momi stuff
extract
done


How to use s2-geometry-swift?

Is there any example code or tutorial on how to use this library? I couldn't find any good resources...
I would like to make a simple app where you can load locations from a server based on s2 geometries.

Hi @NickAtGit ,
http://s2geometry.io/ would be the closest thing to official documentation, there are a few articles around, but the best way would be to play around with the library for a bit. I think the S2Cell, S2CellID S2RegionCoverer and S2Rect will cover your use cases.
Try hashing your locations into Level 30 CellIDs(smallest cells) for storage, and for querying use RegionCoverer to create your query CellIDs. At its heart, S2Cells are based off quad-tree with each cell having its own unique id (each level of quad requiring 4 bits, smaller cells using more bits etc.), so you can query any sized cells for your locations by setting and unsetting your children bits.
Hope that helps you.


Demo is not working

Summary:
Demo is not working
Steps to reproduce:
1.https://reactcommunity.org/react-modal/
Expected behavior:
See a real basic example of react-modal
Additional notes:

@carloshpds Thanks for the issue.  I think I've fixed it but with some caching going on, it might not work until the cache is refreshed.

Okay I confirmed that it's working now.  This was closed by 8895edfbbc2a3a0442e45946b934505a1f013ee8 plus a few more parent commits.


1.9.6-1.19.4-fabric is not compatible with MC 1.19.4

Despite being labelled as a version for 1.19.4, the version of mcpitanlib 1.9.6-1.19.4 gives the error "Some of your mods are not compatible with each other." and has possible remedies: downgrade to any version after 1.3.6, or switching to a version of MC after 1.19.4.
Image:

The same applies with versions 1.9.4 and 1.9.5 as well


The mod is crashing the game

When I try to load the game with this mod, it is crashing the game. When I disable the mod it works just fine. I tried everything: to find incompatible modes, to change the java version, everything doesn't want to work.
Crash Report: https://mclo.gs/L2AQonb

MTR4 is NOT supported. Use MTR 3.2.2 if you want to use NTE.


fix taskrun failing with duplicate unique image found

Changes
fix issue-6257
ignore unknown OS/architecture image entrypoint, because runtime.GOOS and runtime.GOARCH will not be unkonwn. all possible GOOS values are defined in src/go/build/syslist.go
Signed-off-by: chengjoey<EMAIL_ADDRESS>Submitter Checklist
As the author of this PR, please check off the items in this checklist:

[ ] Has Docs included if any changes are user facing
[ ] Has Tests included if any functionality added or changed
[x] Follows the commit message standard
[x] Meets the Tekton contributor standards (including
functionality, content, code)
[x] Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
[ ] Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
[ ] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes
NONE

/kind bug

@chengjoey we may want some unit tests to exercise that 👼🏼 cc @afrittoli @imjasonh

thanks @vdemeester , i added unknown platform test case for buildCommandMap

/assign

/assign

/assign

@EmmaMunley Can we please get this merged? I believe only the lgtm label is required to make it mergeable. We currently have to build custom images without provenance to handle multi-arch container images. Would really appreciate if this can get into the next release

@EmmaMunley Can we please get this merged? I believe only the lgtm label is required to make it mergeable. We currently have to build custom images without provenance to handle multi-arch container images. Would really appreciate if this can get into the next release

@lbernick @jerop is it possible to add the lgtm to this pr


Fix: hide conversion rate text

resolve #123

This change is

Builds ready [e2c2cf5]builds: chrome, firefox, opera
bundle viz: background, ui, inpage, contentscript, ui-libs, bg-libs, phishing-detect
dep viz: background
all artifacts

Builds ready [4a4341c]builds: chrome, firefox, opera
bundle viz: background, ui, inpage, contentscript, ui-libs, bg-libs, phishing-detect
dep viz: background
all artifacts

Builds ready [9dfc257]builds: chrome, firefox, opera
bundle viz: background, ui, inpage, contentscript, ui-libs, bg-libs, phishing-detect
dep viz: background
all artifacts


Add RxJs version to website for clarity:  http://reactivex.io/rxjs/

Many thanks for the great work with Rxjs6. When I do a Google search on Rxjs6 I still find links to version 4 and 5.  On the RxJS website I do not see any reference to the version and it would be great if the website could either post it on the toolbar header , home or an about page.
It would be great if you could follow what Angular.io is doing with current and past versions which helps to eliminate confusion on syntax. Thanks in advance.

dupe of https://github.com/ReactiveX/rxjs/issues/2258, and tracking in https://github.com/ReactiveX/rxjs-docs also.


feat(nginx): ensure dns resolver respects a ttl

when services behind the nginx proxy roll or scale up, nginx does not pick
up the new ips as it never rechecks DNS until it is restarted. this can
be mitigated by setting a ttl with the valid parameter on the DNS
resolver AND by ensuring the domain lookups are made through a variable.
see: https://serverfault.com/questions/240476/how-to-force-nginx-to-resolve-dns-of-a-dynamic-hostname-everytime-when-doing-p/593003#593003

What this PR does:
ensure the resolver has a suitable validity period and move domains
behind an nginx variable, forcing nginx to recheck DNS when proxying
requests.
Which issue(s) this PR fixes:
Fixes #
Checklist

[x] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@kd7lxl issue is, if the upstream block is merged, we have no way to force nginx to re-resolve DNS. as outlined in the stack overflow thread I linked (https://serverfault.com/questions/240476/how-to-force-nginx-to-resolve-dns-of-a-dynamic-hostname-everytime-when-doing-p/593003#593003), nginx will not respect the resolver ttl. the only way to make nginx not attempt to send traffic to pods that don't exist or to send traffic to new pods it's not aware of is to restart/reload it. this makes autoscaling cortex distributors impossible without an additional controller to acknowledge the change to the running distributors and restart the nginx pods.
for a time, we also tried bypassing nginx entirely and pointing prometheus directly at the distributors, but this fails because each prometheus process establishes a connection to a single distributor and forwards all samples to that single distributor.
I'm not sure how anyone is able to make this work at scale without either patching this chart or simply disabling autoscaling on cortex distributors.

Closed in favor of #366 . Thank you so much for contribution!


STORAGE_ACCESSKEYID and STORAGE_SECRETACCESSKEY from Secret

Describe the enhancement you'd like to see
Currently, there is no way to provide the storage access-key-id and secret-access-key from the secret kind. Having these values not come from a secret introduces a security challenge in my workflow. I use Flux Helm Release to manage Testkube installation and store the manifest in a Git repo. Anyone having access to the repo will be able to see the values.
It'd be great if the helm chart loads the values from a secret if provided.
I can take a stab and submit a pull request.
https://github.com/kubeshop/helm-charts/blob/935a2934f35c573d146bae1278e972d112b3d8e0/charts/testkube-api/templates/deployment.yaml#L120-L121
https://github.com/kubeshop/helm-charts/blob/935a2934f35c573d146bae1278e972d112b3d8e0/charts/testkube-api/templates/deployment.yaml#L122-L123

Thank you @michaelsatish Good suggestion

PR was merged https://github.com/kubeshop/helm-charts/pull/557 and will be released by the of the week.

Unfortunately this fix just broke support for this: https://github.com/kubeshop/testkube/issues/3965
I think you should have instead inverted your logic, so apply the secretRef if the property has a value, otherwise just pass the old value across.

thank you @jrlost we will ask @ypoplavs to check

Hello @jrlost!
Thank you for bringing it to our attention. We have inverted the logic for the secrets in Minio and now the feature with AWS S3 storage should be working. Please upgrade to v1.13.4 of the helm charts and let us know about the results.

@ypoplavs it impacts https://github.com/kubeshop/helm-charts/blob/develop/charts/testkube-api/templates/deployment.yaml#L152 as well

@ypoplavs confirmed working, thank you


COCO dataset

Thanks for your great work! I have a difficulty to understand why and how to use COCO dataset to train the SiamMask?
Thanks

hi,I want to train my own voc or coco dataset.Have you succeeded?could you give me some advice!


Unwrapping the command runner from deploy

Small regression with the deploy command. Since it acts as an entry point, the command runner isn't necessary.
Also, for fun, added the verbose command to the eb deploy options to stream events from the eb cli.

Thanks for digging into this! I had a feeling that big refactor was going to break something 😝


fix: add new keyword to overriden method

Description
Remove warning by adding new

:tada: This PR is included in version 1.2.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


poly2tri-c: move away from untrusted repo to one that is owned by its Nixpkgs maintainer

Motivation for this change
poly2tri-c hasn't been under development for a long time. Using unrelated Google code exports on Github is suboptimal but not easy to avoid. But as @jtojnar, the maintainer of the package also owns a fork on gitlab.gnome.org, I'd vouch to use this as source.
See also:
https://gitlab.gnome.org/GNOME/gegl/-/issues/214#note_1002908
https://github.com/NixOS/nixpkgs/pull/109812
Things done
I tested that the src hash still matches and doesn't need to be altered.

[X] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[X] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

Thanks.

Thanks.

Backport in 91ec5829df97d956c633b9af864642a069e1d771.

Backport in 91ec5829df97d956c633b9af864642a069e1d771.


Talk thumbnails on landing page are cut off

Compare the thumbnails on the talks page vs. the landing page. On the landing page, the thumbnails are cut off on edges. This problem does not exist on talks page. (Note, however, that I much prefer the layout and rendering of the talks on the landing page. So, when we eventually create a Django snippet for this, it should be based on the landing page version).
Talks page:

Landing page:

unfortunately, that's the only way I could come up with to keep the scaling working. The alternative is that the talks change height when they exceed the cropping box, but this makes things look worse.
We're in a bit of a tight spot since using the talks page layout makes our content misaligned with "see all" because of margins, but using my current landing page layout necessitates cropping so that we can scale and keep aspect ratio without increasing beyond the maximum 180px height for each item.
Any ideas?

OK, given your explanation, I think it's fine. Closing issue.


(Feat): Add parse_meta_from_tarball and BundleMeta bindings for JS

Adds wasm bindings for the BundleMeta struct and its children. Also adds a parse_meta_from_tarball that async streams the bundle and just decompresses the meta.json out of it. Additional comments provided inline for reviewer(s)

Dear reviewers @dfrankland @max-trunk
I made some pretty significant changes to the internal API for this, namely using tsify in place of wasm_bindgen everywhere except the context package. We have a lot of custom logic there that didn't easily convert.
Please re-review the follow-up changes


Chrome Samples

I Downloaded The Code Provided Here In Github Regarding Chrome Samples.and ran the same in chrome browser on my computer.
but no sample is working.
Do i need to install any extra plugin? or do i need any modifications in the JSON file.
I tried all of the samples . none of them were working.
i need to run chrome desktop capture first as i am making a project on this
when i click enable capture nothing happens.

What is your platform?
How do you launch a chrome app?


Fix the send_frame bound

The additional Pixel bound is spurious and wrong.

Coverage remained the same at 82.616% when pulling 246d5c443b89ad8f15e4cdac227da70eb0a528dd on rust-av:misc-fixes into e6cc192382854b94b785aa32e890dadba597289e on xiph:master.


Add note for mz:is_current

Something like:

Defaults to -1 when status is not known, set to 1 when we know a place is active, and 0 if it's closed.

Added the note:

Verified.


[Bug]: Error uploading ipa file:   [Application Loader Error Output]: ERROR: [ContentDelivery.Uploader] Asset validation failed (90057) The bundle 'Payload/xxx.app/Frameworks/MapboxMaps.framework' is missing plist key.

Mapbox Implementation
Mapbox
Mapbox Version
10.16.3
Platform
iOS
@rnmapbox/maps version
10.0.0-beta.11
Standalone component to reproduce
import React from 'react';
import {
  MapView,
  ShapeSource,
  LineLayer,
  Camera,
} from '@rnmapbox/maps';

const aLine = {
  type: 'LineString',
  coordinates: [
    [-74.00597, 40.71427],
    [-74.00697, 40.71527],
  ],
};

class BugReportExample extends React.Component {
  render() {
    return (
      <MapView style={{flex: 1}}>
        <Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
        <ShapeSource id="idStreetLayer" shape={aLine}>
          <LineLayer id="idStreetLayer" />
        </ShapeSource>
      </MapView>
    );
  }
}

Observed behavior and steps to reproduce
Xcode : 15.1
Error returned when archive file uploading via Fastlane method upload_to_testflight
Error uploading ipa file:
[Application Loader Error Output]: ERROR: [ContentDelivery.Uploader] Asset validation failed (90057) The bundle 'Payload/xxx.app/Frameworks/MapboxMaps.framework' is missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring
[Application Loader Error Output]: ERROR: [ContentDelivery.Uploader] Asset validation failed (90057) The bundle 'Payload/xxx.app/Frameworks/Turf.framework' is missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring
Expected behavior
App should upload via testflight method
Notes / preliminary analysis
No response
Additional links and references
No response

Facing same issue with xcode 15.3

Any update for this issue?

See https://github.com/mapbox/mapbox-gl-native-ios/issues/555

See mapbox/mapbox-gl-native-ios#555

Thanks, @mfazekas
But this didn't work for me. Do you have any other recommendations? I have resolved all issues to run the app on the simulator & device. But whenever I upload the app to the Testflight, it rejects the app with the CFBundleExecutable key or Invalid Bundle Structure issue.


Arbitrum Mainnet Data Streams

Closed in favor of https://github.com/smartcontractkit/documentation/pull/1710/files


Improve how ConnectionAcquisitionTimeout is checked

I think I've addressed the synchronization issue you've pointed out.


Decimal.Parse() incongruency with native .NET

The regexp in System.Decimal() constructor has a typo where a dot character is not escaped, acting as a any-character match symbol.
Strings like these are accepted, albeit they shouldn't: "2ee+1", "2+e+1", "-2+", "+2-"
According to MS Documentation on Decimals, no plus or minus signs (+/-) should be accepted in the end of the string. Yet, in practice, .NET accepts it.
These strings should be parseable: ".2+", ".2-", "1.2-"
Yet, if the sign is provided in prefix form, then they shouldn't -- i.e. sign should be in either side or none, never both. Examples: "+.2+", "-.2-", "+1.2-"
This issue was spotted while reviewing issue #3979.
Steps To Reproduce
https://deck.net/f0b3465473d20c5df95fad74e172ec45
        decimal tmpm;

		var invalid_samples = new string[]
        {
            "2ee+1",
            "2+e+1",
            "-2+",
            "+2-"
        };

        var valid_samples = new string[]
        {
            ".2+",
            ".2-",
            "1.2-"
        };

        foreach (var sample in invalid_samples)
        {
            Assert.Throws<FormatException>(() => decimal.Parse(sample), "decimal.Parse(\"" + sample + "\") throws FormatException");
        }

        foreach (var sample in valid_samples)
        {
            Assert.True(decimal.TryParse(sample, out tmpm), "decimal.TryParse(\"" + sample + "\") succeeds.");
        }

Expected Result
According to this repl.it:
Success: decimal.Parse("2ee+1") throws FormatException
Success: decimal.Parse("2+e+1") throws FormatException
Success: decimal.Parse("-2+") throws FormatException
Success: decimal.Parse("+2-") throws FormatException
Success: decimal.TryParse(".2+") succeeds.
Success: decimal.TryParse(".2-") succeeds.
Success: decimal.TryParse("1.2-") succeeds.

Actual Result
Failure: decimal.Parse("2ee+1") throws FormatException
Failure: decimal.Parse("2+e+1") throws FormatException
Failure: decimal.Parse("-2+") throws FormatException
Failure: decimal.Parse("+2-") throws FormatException
Failure: decimal.TryParse(".2+") succeeds.
Failure: decimal.TryParse(".2-") succeeds.
Failure: decimal.TryParse("1.2-") succeeds.

Tests were expanded to even further scenarios while making the fix:

Deck: https://deck.net/7e5ce873425a2bba75f2096accee2797
Native: https://repl.it/@FabricioMurta/7e5ce873425a2bba75f2096accee2797

And this reflects the added unit tests, exactly.

The fix will make it to the next Bridghe release.


fix: go module version now supports v4

Description
Caused by https://github.com/asyncapi/spec-json-schemas/issues/376
Go package module name was never updated, and it should be done every time a major version is released.
It is not ideal, but at this time there is no other choice. We will investigate further in https://github.com/asyncapi/spec-json-schemas/issues/376.
Related issue(s)
https://github.com/asyncapi/spec-json-schemas/issues/376

/rtm


AST: Refactor SelfReferenceKind in preparation for #33767

This will enable us to allow members containing references to Self or associated types
only in covariant position to be used on an existential.

@swift-ci please smoke test

@swift-ci please smoke test

@swift-ci please test source compatibility release

@swift-ci please smoke test

@swift-ci please test source compatibility release

@swift-ci please test source compatibility release

@swift-ci please test source compatibility

The few source compat FAILs are clone failures that can be observed in some neighbouring builds too, so I think the patch will are alright.

@slavapestov Thank you for looking through this in such short terms.


No Terms of Use when using Shibboleth

When using Shibboleth as authentication service new users don't see the Terms of Use. In local.py ACCOUNT_TERMS_OF_USE is set to True. Is this the intended behaviour or am I missing something?

Hi, right now ACCOUNT_TERMS_OF_USE is not supported for Shibboleth (or LDAP), since no new personal data is entered by the user. The main motivation for the terms of use feature was the GDPR-mania last year. We might change that in the future, but it is not straight forward because of the libraries we use for Shibboleth.

Hi, we do also need to use terms of use in combination with LDAP. As far as I have seen, these are still implemented for the sign-up process only. From an interface perspective, we would like to require users to accept the terms of use at their first login. If, however, they do not accept, no account will be created and they can not use the tool. At least for the LDAP authentication, we can help implementing this feature.

Hi, same requirement here for LDAP. Is there any community work in progress we could contribute to?

Hi @johlton, we did not yet worked on this issue.

In the meeting on 2023-02-23, we discussed that the best way to deal with this is probably a new custom middleware, which checks for the user if the consent flag is set, and if not, to redirect to a page where it can be set.

This needs to be postponed again.


Issue with k8s.io/zh/docs/home/

This is a...

[ ] Feature Request
[ ] Bug Report

Problem:
Proposed Solution:
Page to Update:
https://kubernetes.io/...

努力成为一个伟大的架构师


fixing issue #681

Description of your changes

This pr fixes #681 as following:

Track the created cluster's version in its State, to use for retrieving the corresponding AMI
Use ec2 client's DescribeImages method (available in aws sdk 1.16) to retrieve AMIs that are specific for created cluster's region and version
Remove the hardcoded AMIs
Add 80+% test coverage for the new code
Make the existing unittests work

Checklist

I have:

[x] Run make reviewable to ensure this PR is ready for review.
[x] Ensured this PR contains a neat, self documenting set of commits.
[x] Updated any relevant documentation, examples, or release notes.
[ ] Updated the RBAC permissions in clusterrole.yaml to include any new types.

I have no idea why it says I closed it when i just submitted the comment now, sorry about that!!

@jbw976 I switched back using aws-go-sdk-v2. I kept the older commit for future comparison purposes in the future, if we decided to migrate.


"Milcov" is listed in the drop-down menu

Description:
When user writes "Milcov" the location appears in the drop-down menu next to the comune and the county witch is a part according to the law
Precondition:
The website is up an running.

Step 1
Write in the search bar "Milcov"
Expected results
The location appears in the drop-down menu as "Comuna Milcov, OLT"


Adding new device hangs

Keybase GUI Version: 1.0.47-20180403160041+242bcf96eb
On new Ubuntu 18.04 beta 2 machine, install Keybase, run_keybase, enter username, select an existing working mobile device. Enter new device name. See QR code. On mobile device, scan QR code. Code seems to be read correctly. At this point both devices are doing nothing. The mobile device says to continue setup on the desktop, but the desktop is just waiting for the QR code to be scanned.
Tried about 10 different times, including entering the text instead of scanning the QR code.

I didn't see the device appear anywhere, including the Device tab on the website, until I entered a paper key on the new machine. That worked.
I just sent the keybase log and referenced this issue.

Can you also send a log from the phone you were scanning a QR code with?

same here

@lucaszanella  need way more info if I'm going to look into it. What's most helpful is a log sent from both devices.

Just sent the phone logs. Sorry, would have sent sooner but it took me a while to find the feature in the app (feedback).

Thanks @sowbug. I'm seeing tons of network errors on your phone, was your network up at the time?

I was at home on my usually rock-solid WiFi network, and I don't recall
anything being off. I had also tried several times on a Pixel C tablet and
saw the same thing -- just sent that log as well.
If both are complaining about network errors, then maybe something indeed
was squirrelly on my side.
On Sun, Apr 8, 2018, 7:37 PM Maxwell Krohn<EMAIL_ADDRESS>wrote:

Thanks @sowbug https://github.com/sowbug. I'm seeing tons of network
errors on your phone, was your network up at the time?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/keybase/client/issues/11305#issuecomment-379611505,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAB2VLTE3rb46Jpn20lyi4Anp7I2Db0nks5tmsl6gaJpZM4TLwLf
.

Thanks @sowbug. Puzzling
@lucaszanella I just saw your log from the phone. Also Android, also showing network errors when posting provisioning info.

I was having the exact same problem.  Trying to add keybase on a Windows 7 machine. Tried connecting it through my android phone, and another machine running Arch Linux.  I get the exact same results that sowbug described.  Then I tried the process again, but removed the space that I had for the name of the new device and everything worked.

I almost lost all my work (actually I have backups but not in git form), because whenever I tried to press 'backup paper key' it didn't work, both on phone and computer, and I suddenly lost my keybase on both computers, only this single phone was left. I was trying to do login in other ways now and discovered that I can add create a paper key and log into it. Now I backed this key and there's no risks anymore :)

@wundrellama my device name had no spaces

Sorry all. It was a server outage. Should be fixed now.  Thanks for reporting and sorry for a bad experience here.

I'm seeing this currently, and it worked fine an hour ago.  I can't add an ubuntu device from a mac device.  if server outages cause it, I'd like to suggest that the device being added confirm the verification key was succesfully sent to the server (or failing if it wasn't).


Information Extraction - Assertion and Evidence

[ ] Ask for all the assertions from a paper: Assertions are strings and we want to perform NER for the string. The output of NER will then be used as triples in the KG.

ex) Given a sentence extracted from publication: "A mammalian brain has millions to billions of cells."

Perform NER: a mammalian brain has million to billions of cells
Triples: [mammalian brain] --has--> [millions to billions of cells] --appears_in--> [publication xyz]


TensorFlow killed when making data augmentations

The number of performing cutout augmentation is about 25,000 and it's suddenly killed. I have tried for several times. I guess memory overflow? But I failed to solve it.

It's likely an memory overflow, you could get around it by separating your images into multiple tfrecords, running the augmentation script on each one, and then recombining it all. I don't currently have a script for that, but it should be fairly easily to write.


configure mypy outside of pre-commit environment

[x] matching configuration in mypy.ini
[ ] add types to pipenv dev dependencies (e.g. types-PyYAML, types-pycurl...)

Why add the dependencies to the Pipfile? It's not great to have them defined in two places.

If you configure mypy linting inside an editor it doesn't have the dependencies

Then let's figure out how to define them once and use in both places.


Add tech talk texts

Just started reviewing :) :octocat: Sent from GH.

Merged and made it live :octocat: Sent from GH.


Issue/more init

Pull Request
Description
One more init
How Has This Been Tested?
Ci tests

[ ] Yes

Checklist:

[ ] My code follows OCF's coding style guidelines
[ ] I have performed a self-review of my own code
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have checked my code and corrected any misspellings

Looks like you've used ..py rather than .py.
Separate note, and I could be wrong, but I thought __init__.py files weren't necessary after a certain version of python?

thanks, good spot.
yea they done seem to be needed when install it with pip install -e ., but when deploying and isntall from pypi they do seemed to be needed. Let me see if i can check why


SharePoint Online use Prime API restore OneNote file failed

Hi Team,
We use SharePoint Online Prime API to restore OneNote files failed.
The Queue Message like:
Message:Error=Value=OneNoteUpgradeNotSupported, Tag=0x0121d3da, Message=Upgrade blocked: OneNote file is not located within a Notebook folder. The file will not be upgraded. CallStack --    at Cobalt.RequestBatch.ThrowIfAnyError()
at Cobalt.PackagingUtils.PutStream(ByteData data, CobaltEndpoint endpoint)
at Microsoft.SharePoint.Utilities.SPBITSSession.<>c__DisplayClass1d.b__17()
at Cobalt.ExceptionRetry.RetryTransientExceptions(Action action, Boolean allowRetry, Action actionBeforeRetry)
at Microsoft.SharePoint.Utilities.SPBITSSession.SetStream(SPFile file, Nullable`1 levelOverride, StreamPath streamPath, Stream content, SPFileSaveBinaryParameters saveBinaryParams, Boolean retryTransientFailures, Boolean isDiffGram, StreamAccessHints streamAccessHints, Byte[] finalDataHash)
at Microsoft.SharePoint.Deployment.FileSerializer.CreateOrUpdateFileWithGuid(Stream spstm, SPLoggerObject loggerObject, SPWeb web, Guid fileId, SPResourcePath filePath, Int32 authorId, String authorLoginName, Int32 editorId, String editorLoginName, String checkinComment, DateTime timeCreated, DateTime timeLastModified, MetaInfoHandler metaInfo, Int32 length, Int32 iVersion, Boolean isFirstVersion, SPImportSettings settings, Int32 listItemId, String listInternalName, Boolean hasNoExecuteFlag, ImportObjectManager objectManager)
CorrelationId:eb04219f-f0d8-a000-66e5-2283b8500e16

@LeoJiang1988 thank you for submitting feedback.
I think the best way forward is if you open a service ticket in your tenant so this can get resolved ASAP. Based on the outcome let me know if it is something that can be called out in the docs.
Please follow this link to contact support for business products:https://docs.microsoft.com/office365/admin/contact-support-for-business-products
Please keep us posted here on the resolution so we can feed whatever information you discover into the content.


Drag and drop column positioning

Now that there's column persistence thanks to #304, users should be able to change the positioning order of columns, and have them save/load on shutdown/startup.

Fixed in #324.


Add build version number to package cache zip names

This makes it easier to distinguish between the package caches from different builds.


Exception occurs when using System.Text.Json deserializer to deserialize enum.

The existing runtime-csharp unit-tests do not currently test deserialization. When adding such a test, a bug is exposed.
Steps to reproduce
Add the following unit-test in the runtime-csharp test solution under \test\models\json_serializer.
    [Test]
    public void TestRoundTrip()
    {
        const string expectedJsonString = "{\"house_number\":1,\"marriage\":true,\"members\":2,\"array_type\":[1,\"test\"],\"nestedObject\":{\"test\":\"test\"},\"enumTest\":\"test\",\"houseType\":\"flat\",\"roofType\":\"straw\",\"test_not_used\":2}";
        Address address = JsonSerializer.Deserialize<Address>(expectedJsonString) ?? throw new Exception("Failed to deserialize address.");
        string actualJsonString = JsonSerializer.Serialize(address);
        Assert.That(actualJsonString, Is.EqualTo(expectedJsonString));
    }

Run the test.
Expected outcome
The JSON is correctly deserialized to the relevant model and the test passes.
Actual outcome
An exception occurs:
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException : The best overloaded method match for 'com.mycompany.app.json_serializer.EnumTestExtensions.ToEnumTest(string)' has some invalid arguments

Technical detail
This is caused by the following generated code in the generated JsonConverter<T>:
if (propertyName == "houseType")
{
    var value = HousingTypeExtensions.ToHousingType(JsonSerializer.Deserialize<dynamic>(ref reader, options));
    instance.HouseType = value;
    continue;
}

Note the call to Deserialize<dynamic> - this should be Deserialize<string>.

I've fixed the enum bug, but the unit-test has identified a second bug. The generator generates the following code:
if (instance.AdditionalProperties == null)
{
    instance.AdditionalProperties = new Dictionary<string, dynamic>();
}

var deserializedValue = JsonSerializer.Deserialize<Dictionary<string, dynamic>?>(ref reader, options);
instance.AdditionalProperties.Add(propertyName, deserializedValue);
continue;

Which fails on the call to Deserialize with the exception:
System.Text.Json.JsonException : The JSON value could not be converted to System.Collections.Generic.Dictionary`2[System.String,System.Object]. Path: $ | LineNumber: 0 | BytePositionInLine: 1.

However, the generated code looks very wrong - I don't think it should be deserializing to a dictionary, but to a simple dynamic value that gets added to the AdditionalProperties dictionary.

A third bug is that oneOf types are deserialized to a JsonElement, not to the actual type when being deserialized.
Therefore, when attempting to serialize a deserialized model, one gets the following error:
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException : Operator '!=' cannot be applied to operands of type 'System.Text.Json.JsonElement' and '<null>'

For example,
"members": {
  "oneOf": [
    {
      "type": "string"
    },
    {
      "type": "number"
    },
    {
      "type": "boolean"
    }
  ]
},

will cause the error on this serailization code:
if (value.Members != null)
{
    // write property name and let the serializer serialize the value itself
    writer.WritePropertyName("members");
    JsonSerializer.Serialize(writer, value.Members, options);
}

I've fixed the bugs I've mentioned above, but I have a concern that deserializing to JsonElement will be confusing for consumers.
Perhaps this can be looked into in a future issue? However, without adding type-annotations to the output JSON, it's likely that there is no sensible way around this, so 🤷 .


fix(npm): Releasing newly compiled npm lib

:tada: This PR is included in version 1.5.3 :tada:
The release is available on npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:


adding Lakmalis changes

This pull request don't have any changes in any files.

This is an old pull request which is not valid now. closed it!


Highlighting in IDE is not updated on edit

Environment

Operating System (e.g. Ubuntu 16.04 x64): Windows 10 Version 1909
IDE Version (e.g. CLion 2016.3.2): CLion 2020.1
Cppcheck executable version (cppcheck --version): 1.90
Cppcheck plugin version: 1.4.2

Expected behaviour
When editing the code the Cppcheck highlighting should update accordingly.
Actual behaviour
The highlight is not correct until the file has been closed and opened again.
Steps to reproduce the behaviour
#include <string>

template<typename T>
void f(T t) {
	(void)t;
}

class A
{
private:
	std::string s_{"str"};
};

static void f2(A a)
{
	(void)a;
}

int main()
{
	A a;
	//f<const A>(a); // un-comment for warning template function f()
	f2(a);

    return 0;
}

If you un-comment that line it should show a warning in the template function, but no error is shown. If you close the file and open it again the warning will be shown. Same when you comment it the warning doesn't go away.

What Cppcheck options are you using?

In general, when I test uncommenting code, annotations seem to update correctly.

This appears to be an issue in CLion. The shown problems never change from the initial state when the file was opened. I filed a ticket with CLion - see https://youtrack.jetbrains.com/issue/CPP-22882

Apparently not an upstream issue but a implementation one related to #65.


[ci] Use mold or lld when available

mold and lld can be a much faster alternative to ld from gcc. We should modify our CMakeLists.txt to detect and use these when possible. cc @yelite @driazati
cc @driazati

wow yeah, thought about it some days ago, about using mold. That would great to experiment mold on TVM!

@areusch @driazati This issue is closed automatically upon merge of #10683


Uncaught TypeError: Cannot read property 'getTitle' of null

[Enter steps to reproduce below:]

...
...

Atom Version: 1.0.11
System: Mac OS X 10.10.5
Thrown From: atom-pair package, v2.0.10
Stack Trace
Uncaught TypeError: Cannot read property 'getTitle' of null
At /Users/reflector/.atom/packages/atom-pair/lib/modules/session.coffee:151

TypeError: Cannot read property 'getTitle' of null
  at /Users/reflector/.atom/packages/atom-pair/lib/modules/session.coffee:151:34
  at Function._.each._.forEach (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jasmine-tagged/node_modules/jasmine-focused/node_modules/jasmine-node/node_modules/underscore/underscore.js:153:9)
  at Function.module.exports.SharePane.each (/Users/reflector/.atom/packages/atom-pair/lib/modules/share_pane.coffee:16:20)
  at /Users/reflector/.atom/packages/atom-pair/lib/modules/session.coffee:146:17
  at PresenceChannel.prototype.emit (/Users/reflector/.atom/packages/atom-pair/lib/pusher/pusher.js:855:17)
  at PresenceChannel.prototype.handleEvent (/Users/reflector/.atom/packages/atom-pair/lib/pusher/pusher.js:3822:8)
  at /Users/reflector/.atom/packages/atom-pair/lib/pusher/pusher.js:74:9
  at ConnectionManager.prototype.emit (/Users/reflector/.atom/packages/atom-pair/lib/pusher/pusher.js:855:17)
  at message (/Users/reflector/.atom/packages/atom-pair/lib/pusher/pusher.js:3420:6)
  at Connection.prototype.emit (/Users/reflector/.atom/packages/atom-pair/lib/pusher/pusher.js:855:17)
  at listeners.message (/Users/reflector/.atom/packages/atom-pair/lib/pusher/pusher.js:3048:8)
  at TransportConnection.prototype.emit (/Users/reflector/.atom/packages/atom-pair/lib/pusher/pusher.js:855:17)
  at TransportConnection.prototype.onMessage (/Users/reflector/.atom/packages/atom-pair/lib/pusher/pusher.js:2210:6)
  at WebSocket.self.socket.onmessage (/Users/reflector/.atom/packages/atom-pair/lib/pusher/pusher.js:2232:6)

Commands
     -1:17.9.0 emmet:insert-formatted-line-break-only (atom-text-editor#AtomPair.editor.is-focused)
     -1:17.9.0 editor:newline (atom-text-editor#AtomPair.editor.is-focused)
     -1:17.7.0 emmet:insert-formatted-line-break-only (atom-text-editor#AtomPair.editor.is-focused)
     -1:17.7.0 editor:newline (atom-text-editor#AtomPair.editor.is-focused)
     -1:17.5.0 emmet:insert-formatted-line-break-only (atom-text-editor#AtomPair.editor.is-focused)
     -1:17.5.0 editor:newline (atom-text-editor#AtomPair.editor.is-focused)
     -1:17.4.0 emmet:insert-formatted-line-break-only (atom-text-editor#AtomPair.editor.is-focused)
     -1:17.3.0 editor:newline (atom-text-editor#AtomPair.editor.is-focused)
     -1:17.2.0 emmet:insert-formatted-line-break-only (atom-text-editor#AtomPair.editor.is-focused)
     -1:17.2.0 editor:newline (atom-text-editor#AtomPair.editor.is-focused)
     -1:17 emmet:insert-formatted-line-break-only (atom-text-editor#AtomPair.editor.is-focused)
     -1:17 editor:newline (atom-text-editor#AtomPair.editor.is-focused)
     -1:16.8.0 emmet:insert-formatted-line-break-only (atom-text-editor#AtomPair.editor.is-focused)
     -1:16.8.0 editor:newline (atom-text-editor#AtomPair.editor.is-focused)
     -1:16.6.0 emmet:insert-formatted-line-break-only (atom-text-editor#AtomPair.editor.is-focused)
     -1:16.6.0 editor:newline (atom-text-editor#AtomPair.editor.is-focused)

Config
{
  "core": {
    "themes": [
      "atom-material-ui",
      "one-dark-syntax"
    ],
    "disabledPackages": [
      "language-c",
      "language-clojure",
      "language-csharp",
      "language-go",
      "language-java",
      "language-objective-c",
      "language-perl",
      "language-php",
      "language-python",
      "language-ruby",
      "language-ruby-on-rails",
      "language-sql",
      "language-toml",
      "language-yaml"
    ]
  }
}

Installed Packages
# User
atom-material-ui, v0.6.0
atom-pair, v2.0.10
emmet, v2.3.12
file-icons, v1.6.9
linter, v1.5.0
pigments, v0.13.2

# Dev
No dev packages

I just got this error when I tried to join my atom-pair instance from a Mac to Windows. The error showed up on the host (Windows) machine, and nothing happened on the Mac.

encountered with Linux to Windows pair session. Errors popped up on session host (Linux) and tab titles were blank on windows side.

Same issue here, on Mac to Windows (host). Mac side popped successful connection. The session started successfully despite the errors from the Windows side.
[host] Windows 7; Atom v1.9.9; Atom-pair v2.0.10
[client] Mac OS X 10.9.5; Atom v1.9.9; Atom-pair v2.0.10

Same error encountered just now.
[host] Linux Ubuntu 16.04; Atom v1.12.7; Atom-pair v2.0.10
[client] Linux Ubuntu 16.04; Atom v1.12.7; Atom-pair v2.0.10

Doesn't work when host with:
[host] macOS 10.12.2; Atom v1.13.1; Atom-pair v2.0.10

I just connected two of my Windows 10 together with Doesn't work when host with Atom v1.13.1; Atom-pair v2.0.10. I also received this error. Has anyone seen any more issues than just the errors popping up? Is there any functionality issues?

Why is it closed? Still an issue for me...

Hi,
I closed it as I recently look over maintenance of this plugin and believed it had since been resolved. Could you tell me a little about your setup?

+1; just ran into this today as well, Windows -> Mac.

Please tell me about your setup. What version of Atom? Are you attempting to use your own Pusher details? What other plugins do you have installed?

@kn100 I was using atom 1.2.2 on Ubuntu and trying to connect with a friend using atom on Windows 10. Both of us installed atom then just for using atom pair, and it was the only extension we installed outside the default extensions which come with the installation. I was trying to use my own credentials for pusher but we tried without it as well.


google bans my IP address after some minutes of internet noise

This project is awesome, thanks for it.
After some minutes of internet noise, Google has banned my IP address.
What about using duckduckgo instead?

pr #25 adds an optional flag to use duckduckgo instead of google.


Jenkins Job for Testing Against Newest Downstream Libraries

Description
From some comments @bgoodri made on Discourse, it could be nice for us and downstream maintainers if we ran a jenkins job on dev->master that used the newest versions of Eigen, Boost, etc. These would be set to warnings and not actual errors. Once we figure out if it's us or them that's goofing up we can report to maintainers as appropriate.
This could pull either their dev or most recent release.
I'm pretty sure we also lag behind the latest version for most things, so we can set these tests to run when the current release version is greater than the one we use. Then we can use these tests to also know if it's fine to update the dependencies.
Layout
For the Jenkins job

Download newest versions of Eigen, boost etc. to libraries folder
Connect those properly to libraries file
Run tests (all or some or ???)
Have a report (or something legible) generated in the output

Dunno if we should test each individually or all at once or whatever.
Expected Output
We could be very fancy and have Jenkins post an issue or something, but a simple alt is just to have the test failures available via the Jenkins console.
If people think this is useful and good I can probably spend a bit of time working on it.

Thanks---that sounds like a good idea.  We'll likely run into parse errors.  Testing individually will be most informative, but it may be too high a burden.

Is this issue still relevant with the build with parameters thing we have now?

Which thing is that?

Ah I misunderstood this issue. I thought this was an issue on how to test cmdstan with specific branches on Math with newer libraries, nevermind. This one is trying to actually automatically use the newest library. sorry.


Can't Compile the latest PySCF(pyscf-1.7.5)

Dear developers of PySCF,
When i compile latest pyscf-1.7.5, i can't compile libxcfun, because libxcfun need higher cmake(3.14), however the cmkae version is 3.5.1 in our cluster, i responsed the issue with our administrator who reject my requirement. So, developers of pyscf can give a solution way? thanks all.

xcfun is not mandatory. you can try  cmake -DBUILD_XCFUN=OFF

you mean that delete BUILD_XCFUN:BOOL=ON in CMakeCache.txt ?

xcfun is not mandatory. you can try  cmake -DBUILD_XCFUN=OFF

you mean that delete BUILD_XCFUN:BOOL=ON in CMakeCache.txt ?

No, just
 cd pyscf/lib
 mkdir build; cd build
 cmake -DBUILD_XCFUN=OFF ..
 make

No, just
 cd pyscf/lib
 mkdir build; cd build
 cmake -DBUILD_XCFUN=OFF ..
 make

i try your method, but a new issue ocur : fatal error: XCFun/xcfun.h: No such file or directory

No, just
 cd pyscf/lib
 mkdir build; cd build
 cmake -DBUILD_XCFUN=OFF ..
 make

i tried it according to your method, but a new issue occurs : fatal error: XCFun/xcfun.h: No such file or directory

I see. You can use pre-compiled libraries.
In the lib directory, run
curl http://www.sunqm.net/pyscf/files/bin/pyscf-1.7.5-deps.tar.gz | tar xzf -

I see. You can use pre-compiled libraries.
In the lib directory, run
curl http://www.sunqm.net/pyscf/files/bin/pyscf-1.7.5-deps.tar.gz | tar xzf -
Then do the cmake and make as above.

Latest PySCF has been successfully installed, thank you again!

I see. You can use pre-compiled libraries.
In the lib directory, run
curl http://www.sunqm.net/pyscf/files/bin/pyscf-1.7.5-deps.tar.gz | tar xzf -
Then do the cmake and make as above.

when i compile to use cmake -DBLA_VENDOR=Intel10_64lp_seq  -DBUILD_XCFUN=OFF .. , and then testing, occurs a error : Intel MKL FATAL ERROR: Cannot load libmkl_avx2.so or libmkl_def.so. . , but installation manual note that useing  cmake -DBLA_VENDOR=Intel10_64lp_seq can improve 10x sppeedup, so how solve this issue ?

Try doing this before you run a calculation

export LD_PRELOAD=$MKLROOT/lib/intel64/libmkl_avx.so:$MKLROOT/lib/intel64/libmkl_core.so

more on this is here
Regards
Vamshi

export LD_PRELOAD=$MKLROOT/lib/intel64/libmkl_avx.so:$MKLROOT/lib/intel64/libmkl_core.so

well, it's ok. thank you again

xcfun can be switched off by
cmake -DENABLE_XCFUN=OFF ..

On Wed, Oct 14, 2020 at 11:58:43PM -0700, leebo-2020 wrote:

No, just
 cd pyscf/lib
 mkdir build; cd build
 cmake -DBUILD_XCFUN=OFF ..
 make

i tried it according to your method, but a new issue occurs : fatal error: XCFun/xcfun.h: No such file or directory
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/pyscf/pyscf/issues/738#issuecomment-708943508

--


How to test annotations that have "/" in its path?

Hi Folks,
I'm trying to evaluate the following tests:
      - equal:
          path: metadata.annotations.kubernetes.io/ingress.class
          value: merged
      - equal:
          path: metadata.annotations.merged.ingress.kubernetes.io/config
          value: merged-ingress

But I'm receiving the following errors:

How can I run these tests?
Thanks in advance.

The problem is the dots in the annotation key, not the slash. "kubernetes.io/ingress.class" is the name of the annotation, but unittest is breaking it up as a map called kubernetes that contains a map called io/ingress that contains a key called class.
I'm having the same problem with a Kubernetes label that contains a dot. I haven't found a solution yet, but if I do I'll post here.

The below function is responsible for traversing the data based on the path: value. It's a simple state machine, and it doesn't support treating . differently in different contexts. If we added support for this, what would the syntax look like?

Put the value in quotes, e.g. metadata.annotations."kubernetes.io/ingress.class"
jq uses a syntax where you can specify fields of an object with a Javascript-like syntax of a.["b"]. In jq, a.b is just a shorthand for a.["b], which means you could specify our annotation with metadata.annotations.["kubernetes.io/ingress.class"].

https://github.com/lrills/helm-unittest/blob/436447d3bcc47be1ed51d66bc7a21dec7d97262e/unittest/valueutils/valueutils.go#L120-L191

Oh! We already support a syntax similar to jq, I just missed it when reading the code. You can do
metadata.annotations.[kubernetes.io/ingress.class]

As far as I can tell this is not documented. I'll submit a PR to add documentation on specifying paths, including this .[] syntax.

Sorry, I was right the first time. If you specify a key with [], unittest expects a number index, not a string key. We could add support for the jq syntax though.

@gcavalcante8808 , @xordspar0, i have added the jq syntax for escaping the dots.
Since it's not merged into this repo, you can download a version from my forked repo: https://github.com/quintush/helm-unittest/releases

Thanks, nice work. I hope it gets merged into upstream, but if not I'll take a look at your fork.

Thank you, awesome work!

Close due to archiving repository.
Sorry for not presenting so long. I've been working on another project and don't have time to for helm-unittest.
Please consider other working forks like quintush/helm-unittest.


samples: subsys: logging: logger: Fix performance showcase

Sample tries to estimate maximum number of messages that can be
logged. It was using two system cycles and counting number of
messages logged in that window. It did not take into account the
fact that clock frequency may vary and logging speed also varies
(especially if LOG_IMMEDIATE is enabled). Presented results may
be faulty and misleading.
Fix is attempting to adjust window size to increase precision of
the measurement.
Fixes #21801 .
Signed-off-by: Krzysztof Chruscinski<EMAIL_ADDRESS>

@nordic-krch you have "Fixes #21644" in the description, but #21644 is is a PR and not an issue. Is it intentional or the reference is wrong?

Is it intentional or the reference is wrong?

@jhedberg fixed.

@jakub-uC @nashif  any chance to take a look at that?