Calling os.exit() from within a test is not protected

To reproduce:
describe("tests", function()
	it("will exit early", function()
		os.exit(42)
	end)

	it("will never be run", function()
		print("here be dragons")
	end)
end)

I was blindsided by this while integration testing a CLI program, because busted never got to offer feedback on why my program had stopped prematurely.
It seems most useful for busted to consider a test that calls os.exit() with a non-zero exit code to have triggered an error, but the question on what to do about an exit code of zero is a little thorny. example:
local function application_code() os.exit(0) end
it("should this succeed or fail?", function()
    assert.equal(true, true)
    application_code()
    assert.equal(true, false)
end)

If os.exit(0) just causes a test to complete early, then a test writer who doesn't know that the os.exit() call exists might expect this test to fail when it doesn't.
If os.exit() causes an error no matter what, then a user that is expecting code to fall-through using os.exit() can guard for it, and the user that doesn't expect it can be informed in a safe way.

os.exit is not the only thing that might do this (e.g. C libraries, segfaults, etc).
The proper solution would be to run tests in a subprocess.
However that is a lot of complexity.
I advise closing this as WONTFIX.


[WIP] remove hostPID

ECOPROJECT-1120 : removing hostPID which is part of the PodSecurityPolicy.
PodSecurityPolicy was deprecated at 1.25 k8s (replaced by PSA)

/retest

/retest

/test ci/prow/4.13-openshift-e2e

/test 4.13-openshift-e2e

/retest

/lgtm

/test 4.12-openshift-e2e

/retest


Change config format to scope configs by type

Closes: #3636
Description
This turns out to be a very good place to start to discover requirements for Hermes to operate in a more multi-chain way, since it allows discovering which parts of the code access Cosmos-specific data to do Cosmos-specific logic, and which parts are required for general relaying.
The only change to the existing config format so far is the change in semantics of the type field, which now must be CosmosSdk. I did not preserve the existing logic and tests that parsing different variations of casing and dashes are supported, because I don't think this is particularly valuable to support.
So far, only the core ibc-relayer crate is updated; the cli is not, because it's not necessarily clear how the cli should change to accomodate non-SDK chains.

PR author checklist:

[ ] Added changelog entry, using unclog.
[ ] Added tests: integration (for Hermes) or unit/mock tests (for modules).
[x] Linked to GitHub issue.
[ ] Updated code comments and documentation (e.g., docs/).
[ ] Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

[ ] Reviewed Files changed in the GitHub PR explorer.
[ ] Manually tested (in case integration/unit/mock tests are absent).

I was planning to leave self-review comments on the build failures that reveal issues with the CLI interface, but that will need to wait for the CI to run.

I thought it'd be possible to add comments to check failures, but this doesn't seem to be the case. Instead I put them inline.

Now we need to figure out a good story for backend-specific commands, eg. keys, as you've pointed out here and in #3641.

Maybe for now we can restrict these commands to CosmosSdk chains, by throwing a runtime error if used against another type of chain?

I have done some work propagating the configuration changes, but I'm leaving some of the refactor items as a last step (as previously agreed above).
I would like to pause and see if CI passes, tie up loose ends, before pushing on the specific TODOs (e.g. extracting the tendermint config) and doing another pass.

This took longer than anticipated, but the branch is finally passing all integration tests. Now, we should be able to move quickly on getting the remaining items done and ready for review by tomorrow:

[x] small review issues

[x] remove dead code
[x] move list_keys to be a method on ChainConfig
[x] move config validation out of relayer-cli

when this is done:

[ ] extract the tendermint fields into a struct and make the chain config embed it

and finally:

[ ] move CosmosSdkConfig into the cosmos/ backend
[ ] move the cosmos specific config validation routines into the sdk backend
[ ] move detect_compatibility_mode into the cosmos sdk impl

@romac I think this is ready for review! We can split out the tendermint config in future work since it has a small surface area, ditto for the websocket methods, for now we can just error if they are not supported.

@hdevalence Before I can merge this, can you please enable edits from maintainers on this PR?

Hmm, the Github docs only talk about personal-owned forks, I'm not sure if it's possible because we made it from an org fork. But I can certainly add you to our org fork ? https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork#

@romac I can't see that button, maybe it's only visible to the PR creator, but I added you as a collaborator to the forked repository: invitations

Perfect, thank you both! 🙏

Will these config changes require updates to the Hermes guide?

I thought they were all taken care of, but actually found three templates that we missed: https://github.com/informalsystems/hermes/pull/3679


Tutorial: can not find main

When setting up the Hello World tutorial, in step 1 sbt complains:
> run
[warn] No main class detected
[info] Fast optimizing /Users/donnut/dev/scala/scalajs/target/scala-2.11/scala-js-tutorial-fastopt.js
[trace] Stack trace suppressed: run last compile:scalaJSLauncher for the full output.
[error] (compile:scalaJSLauncher) No main class detected.
[error] Total time: 2 s, completed Mar 28, 2015 2:15:03 PM

I'm using scala 2.11.6, sbt 0.13.7.
Any thought on what can go wrong here?
Thanks

Welcome to Scala.js. This is not the right place to ask questions like this. Please use SO or the mailing list.
Have you defined the main class TutorialApp? sbt cannot find it.

If you need further assistance on this, please create an SO post or ask on the mailing list or gitter and cross reference here.


Lack of assist support when using session properties with SqlAlchemy

Problem
Following on from #1048 we are now prompted for a username and password which are used to complete a parameterised URL. However, we are still lacking assist support since session data is obtained via the notebook object passed into execute which is not present during calls to autocomplete.
We've worked around this issue by implementing the same approach as the JDBC connector (Code Here):

Add a global in-memory API_CACHE
Implement the create_session method which creates and stores an engine object in the cache
Retrieve the engine in calls to autocomplete

This has some shortcomings such as:

The cache size is unbounded
Users may need to enter their credentials multiple times
Doesn't allow different cache strategies or stores

Proposed Solution
Abstract the idea of a SessionStore which can easily be extended with multiple backend to give admins control over session handling. Example Implementations:

In-Memory Cache (What the JDBC already does)
DynamoDB Store where admins would have control over the TTL and encryption
create_session and close_session methods can simply refer to this store

Nice description. I see two main things. Persistence of:

credentials optionally typed by the end user (mainly about this issue)
sqlalchemy session objects (could be split in another issue)

Generally we should remove this global cache variable. A bit similar to #1020. Django also has a pluggable cache system that can TTL keys: https://github.com/cloudera/hue/blob/master/desktop/libs/libsentry/src/libsentry/privilege_checker.py#L23
About 1., another possibility would be to persist it in the browser (that was the original idea), so that there is no need to deal with the tricky security of handling end user credentials in the backend. This would also scale elegantly. Those credentials would automatically picked-up by create_session (https://github.com/cloudera/hue/blob/master/desktop/core/src/desktop/js/apps/notebook/notebook.js#L368) and added to the request data if they are there so that the backend API create_session get them and persist them in Django' cache system with a TTL.
e.g. Frontend with totalStorage() and 'showAuthModal' https://github.com/cloudera/hue/blob/master/desktop/core/src/desktop/js/ko/components/ko.sessionAuthModal.js
@JohanAhlen
About 2.,
For actual connections/SqlAlchemy session object, building a pool of them similarly to the Thrift for the HiveServer interface (https://github.com/cloudera/hue/blob/master/desktop/core/src/desktop/lib/thrift_util.py and https://github.com/cloudera/hue/tree/master/apps/beeswax/src/beeswax/server). Note that SqlAlchemy pools are url based so it would be one pool per user it seems: https://docs.sqlalchemy.org/en/13/core/pooling.html
IIRC correctly, one issue with non in API server memory was that the Python objects could not be pickled and stored there (or need to investigate something like Dill https://github.com/uqfoundation/dill).
Long term is to move to the Celery Task Server which also needs a store like Redis.

Task Server workers http://issues.cloudera.org/browse/HUE-8738
Result caching and storage http://issues.cloudera.org/browse/HUE-8787

Let's split 2 out into another issue since it's more of an optimisation for the SQLAlchemy connector.
Storing the credentials in the browser would work but we run Hue in a remote environment where users connect to and when finished their session is destroyed. So the user would have to enter their credentials each time. We would also have to encrypt the data before storing it to prevent those credentials being discovered if the device is compromised.
Using a server-side store such as Dynamo would be convenient for this but I realise this is probably an edge-case. I don't think Hue would need to be responsible for handling the credentials securely if the operators ensure proper encryption-in-transit and encryption-at-rest.
I wonder if there's room for both cases:

Look for credentials passed from the client-side
Otherwise fallback to a configured session store

For the credentials, Local Storage and IndexedDB are not considered safe, we'd indeed need to encrypt ourselves which seems messy.
A better option could be the Credential Management API, https://w3c.github.io/webappsec-credential-management/ I'll take a spin at it and see if I can come up with something in ko.sessionAuthModal.

Both could live, but for sure management password is often the last thing the service should do :)
Curious if we could leverage the Chrome password manager on the frontend too? (similar to traditional website logins). That might be even simpler and secure.

Yes, both options have pros and cons.

Alternatively, we could modify the API so that session properties are sent with each request. The properties could be kept in-memory on the client-side, this would fix the issue but not provide any convenience for the user and would be a large change.

Yes, that's how it was designed 4 years ago. It is not much change as only for the create_session call but there is no persistence.
Feel free to have a stab at the backend one. Especially as there will be a redis soon it might be convenient. Django Cache probably supports DynamoDB has backend too.
We will probably iterate on the client side only solution too.


[feature request] Support for setting log level using environment variable

RealSense ID SDK uses spdlog to output logs.
Currently, all levels of logs are output to console. It's annoying at times.
Please provide a way for user to dynamically control level of log output using environment variables or other way.
spdlog provides such a feature. It is just adding spdlog::cfg::load_env_levels().
https://github.com/gabime/spdlog/tree/v1.8.2#load-log-levels-from-env-variable-or-from-argv
What do you think? Thanks,

Related https://github.com/IntelRealSense/RealSenseID/issues/18

To control log level, the SetLogCallback() can be used (include "RealSenseID/Logging.h").
The following example displays only logs with level Info or higher:
#include "RealSenseID/Logging.h"
void my_log_clbk(RealSenseID::LogLevel level, const char* msg)
{
    std::cout << msg << std::endl;
}
// subscribe to log events with level Info or higher.
RealSenseID::SetLogCallback(LogLevel::Info, true, my_log_clbk);

In addition, the following convenience CMake options can be used turn on/off debug to screen or to file:

cmake -DRSID_DEBUG_CONSOLE=ON/OFF: Debug all to screen.
cmake -DRSID_DEBUG_FILE=ON/OFF: Debug all to to "rsid_debug.log" file.

@gabime "log" that I pointed to here refers to the latter.
RealSense ID SDK that installed from installer will allways display debugging information on console, because it is compile with RSID_DEBUG_CONSOLE=ON. It can only be specified at compile time of SDK. It's not friendry for user.
My suggestion is to add spdlog::cfg::load_env_levels(). It will allow users to change their behavior at runtime without re-compile SDK by loading settings from environment variables.

If specify RealSenseID::LogLevel::Off to RealSenseID::SetLogCallback, but SDK will always display all log to console. Is it bug?

No, this is because the RSID_DEBUG_CONSOLE=ON

My suggestion is to add spdlog::cfg::load_env_levels(). It will allow users to change their behavior at runtime without re-compile SDK by loading settings from environment variables.

Good idea, will add it to our workplan.

@gabime Thank you for discussion with me! 👍

User code can implement any log filtering needed using the rsid logging API.


Structure templates in yml files and allow multiple files

First the current template.py is really a data structure, rather than Python code. It should be in json or even better YAML. Next it should be possible to add separate templates, depending on the current project.

Yes, sure.
But, for particular invoices, a single regexp is not enough to extract the needed information. For example, for the invoices BinaryLife Inc. (www.browserstack.com), I have the following text for the date:
Dated:                 14t h Dec, 2015

If I extract "14t h Dec, 2015", then invoice2data cannot parse the date, and I don't want to patch date parsing to support "14t h" (with a space between t and h !). I cannot use a regexp to extract the string '14 Dec, 2015' (which would work) ; AFAIK, it is not possible to extract '14 Dec, 2015' with a single regexp. So, for this particular invoice, I would like to execute a few lines of Python code to get the date of the invoice.
So, for me, the evolution is towards a structure in which, for each field, we can have either a regexp OR a few lines of code (which could include one or several regexp). YAML could certainly do the job, because we can have both a structure and include some lines of code (at least it's what we do in Odoo with the YAML tests).

There are a few more things to take into consideration:

having a single keyword is sometimes not enough to match the right template. For example, for a large telecom Operator such as Orange, they have a lot of different invoice layout for the different business units of the company, and all these business units have the same VAT number because it is the same company. So I can't only use the VAT number to identify the template ; I would like to use both the VAT number (because it is very accurate) and also one or more strings.

multi-language invoices: for example, if I am a French DropBox customer, I will receive an invoice in French with VAT number "IE 9852817J". But, if I am an English DropBox customer, I will receive an invoices in English with the same VAT number. So, if I use the VAT number as keyword, it's a problem because we cannot handle French and English invoices of Dropbox with the same template. Again, I think the good solution is to use several keywords to match the good template for dropbox : the first keyword would be the VAT number (to be sure that we are dealing with a dropbox invoices) and the second keyword would be a string in the language of the invoice, so as "Facture" for the Dropbox French template  and "Invoice" for the Dropbox English template".

I think the system with "several keywords" can be implemented very shortly ; we just have to convert keyword from a string to a list of strings.

OK, I added support for multi-keywords, which solves the problem of multi-language I think and also the problem of large suppliers that have many different invoice templates.
@manuelRiel By the way, could you update the template of Amazon and add a keyword that is specific to the German version of the invoice, so that I can add a template of Amazon France.
Now that we have multi-keyword, we can continue the discussion on a possible new format and the issue of the few invoices in which a single regexp is not enough and we require real code.

Implemented a new template system based on Yaml-files. By default it will use our existing templates, but you can also point it to an external folder. Like
python3 -m invoice2data.main --debug --template-folder invoice2data/templates invoice2data/test/pdfs/*
Other changes:

switched to external dateparser which should be more reliable
Input files are no longer read in Python, but in the shell with wildcards. E. g. invoice2data/test/pdfs/*. Better separation. @alexis-via

Commit: 86785c9

And:

python3 support

Up next:

add circleci tests
add options in yml to solve the problems you mentioned. (E.g. remove all whitespace to get better matching)

Thanks for all these new features ! It seems really great, in particular the new options, the new yaml files with one file per supplier/template, the ability to define a date format and to define several regexp (I need to test that !)
I am not an expert of the python 2 vs python 3 stuff, but I guess that your move to Python 3 will oblige me to maintain a branch for python2 in order to continue to use invoice2data with Odoo (Odoo uses python 2.7)... unless if there is a way to use a python3 lib from a python2 program without too many headaches (but I don't think so). In this case, we need to:

dedicate a branch for the python2 version
find the best way to maintain the 2 versions without too much overhead work

I am running tests for several py2 and py3 versions. The same code is compatible with  2 and 3. So no need for an extra version.
If you run into errors in py2, just open an issue.

OK, I didn't know it was possible to use the same lib for python 2 and python 3 !
I didn't achieve to use the new version for the moment. First, extrac_data has 1 more argument (not mentionned in README) ; I think it should be an optional argument (if this second arg is not set, it defaults to using all templates). Then, I have a crash:
>>> extract_data('/home/alexis/myinvoice.pdf', '/home/alexis/new_boite/dev/invoice2data/invoice2data/templates/fr')
DEBUG:invoice2data.main:number of char in pdf2text extract: 2826
DEBUG:invoice2data.main:Testing 83 template files
'/'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/invoice2data-0.2.0-py2.7.egg/invoice2data/main.py", line 59, in extract_data
    logger.debug("keywords=%s", t['keywords'])
TypeError: string indices must be integers, not str

But I need more time to investigate it ; I'll have a look this week.

I had a look at the dateparser lib ; it seems good, but it's not magic either. For example, see my comment in https://github.com/scrapinghub/dateparser/issues/52
Another example, with the latest version of dateparser:
>>> dateparser.parse(u'14th Dec, 2015', languages=['en'])
datetime.datetime(2015, 12, 14, 0, 0)
>>> dateparser.parse(u'14thDec,2015', languages=['en'])
>>> dateparser.parse(u'14t h Dec, 2015', languages=['en'])
datetime.datetime(2015, 12, 27, 14, 0)

So for my example of the invoices of BinaryLife Inc. (www.browserstack.com), I still need to execute some python code, or at least do a replace before sending the date to parsing.
I have a similar problem with the invoices of Free Mobile: they use a special char for "é" in Décembre (December in French) : they use "é", so it doesn't work with dateparser. I implemented an option remove_accents (via unidecode) so that it becomes "Decembre", but it doesn't work with dateparser either... it needs Décembre with the accent to work ! Again, a replace would be enough.

Another big pb that I just discovered: it seems dateparser 0.3.2 released a few days ago is broken:
1:11 alexis@silence ~ % python
Python 2.7.10 (default, Oct 14 2015, 16:09:02)
[GCC 5.2.1 20151010] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from invoice2data import extract_data
ou
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/invoice2data-0.2.0-py2.7.egg/invoice2data/__init__.py", line 1, in <module>
    from .main import extract_data
  File "/usr/local/lib/python2.7/dist-packages/invoice2data-0.2.0-py2.7.egg/invoice2data/main.py", line 10, in <module>
    import dateparser
  File "/usr/local/lib/python2.7/dist-packages/dateparser-0.3.2-py2.7.egg/dateparser/__init__.py", line 4, in <module>
    from .date import DateDataParser
  File "/usr/local/lib/python2.7/dist-packages/dateparser-0.3.2-py2.7.egg/dateparser/date.py", line 11, in <module>
    from dateparser.date_parser import date_parser
  File "/usr/local/lib/python2.7/dist-packages/dateparser-0.3.2-py2.7.egg/dateparser/date_parser.py", line 16, in <module>
    from .conf import apply_settings
  File "/usr/local/lib/python2.7/dist-packages/dateparser-0.3.2-py2.7.egg/dateparser/conf.py", line 62, in <module>
    settings = Settings()
  File "/usr/local/lib/python2.7/dist-packages/dateparser-0.3.2-py2.7.egg/dateparser/conf.py", line 31, in __init__
    self._updateall(self._get_settings_from_yaml().items())
AttributeError: 'NoneType' object has no attribute 'items'

Just don't remove the whitespace if date parsing doesn't work without it.

@m3nu If I remove the whitespace, dateparser returns a wrong result:
dateparser.parse(u'14t h Dec, 2015', languages=['en'])
datetime.datetime(2015, 12, 27, 14, 0)

Then you can use the yml-template option to give the date format. That will work for sure.
We can add another option to set the language if that improves it or auto-detect the invoice language.

FYI, I spent more time investigating tonight and I confirm that Odoo is currently incompatible with dateparser (and it has nothing to do with invoice2data). So I opened a full bug report on odoo https://github.com/odoo/odoo/issues/10670 and I also opened a bug report at dateparser https://github.com/scrapinghub/dateparser/issues/141 This bug is not easy and I am not able to fix it by myself for the moment.
I'll wait a few days to see if someone comes up with a solution to this incompatibility. If not, I'm afraid I'll have to develop a branch of invoice2data that doesn't use dateparser... but I hope it won't happen because it would split our efforts in two separate branches (as I would only be motivated to develop in the branch that work with odoo).

The bug has been fixed in Odoo and the patch is already in Odoo v8 (incredible !!!).
Unfortunately, we are not finished with the issues with the recent changes... because I still have a crash when trying to install the odoo module account_invoice_import. Here is the cause of this "next" issue (I hope it is the last one !) : when I install invoice2data with the command "sudo python ./setup.py install", it reads requirements.txt that lists pdfminer3k (for python3), so it installs pdfminer3k. But, after that, if I import "from pdfminer.pdfparser import PDFParser" (the odoo module account_invoice_import needs that), I have a crash:
% python
Python 2.7.10 (default, Oct 14 2015, 16:09:02)
[GCC 5.2.1 20151010] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pdfminer.pdfparser import PDFParser
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/pdfminer3k-1.3.0-py2.7.egg/pdfminer/pdfparser.py", line 7, in <module>
    from .psparser import PSStackParser, PSSyntaxError, PSEOF, literal_name, LIT, KWD, handle_error
  File "/usr/local/lib/python2.7/dist-packages/pdfminer3k-1.3.0-py2.7.egg/pdfminer/psparser.py", line 4, in <module>
    from .utils import choplist
  File "/usr/local/lib/python2.7/dist-packages/pdfminer3k-1.3.0-py2.7.egg/pdfminer/utils.py", line 212, in <module>
    0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff,
  File "/usr/local/lib/python2.7/dist-packages/pdfminer3k-1.3.0-py2.7.egg/pdfminer/utils.py", line 180, in <genexpr>
    PDFDocEncoding = ''.join( chr(x) for x in (
ValueError: chr() arg not in range(256)

The details of what is installed:
% pip freeze|grep pdfm
pdfminer==20140328
pdfminer3k==1.3.0

The only solution I found so far is to manually uninstall pdfminer3k.
@sebastienbeau Do you have a recommendation about how to handle this ?

It seems the solution is there:
http://stackoverflow.com/questions/19672980/can-you-set-conditional-dependencies-for-python-2-and-3-in-setuptools

I made a PR for that here https://github.com/m3nu/invoice2data/pull/14

Thanks@bguillot. So this is working for everyone now?

@m3nu at least it is working fine on python2 with Odoo without hack. I already updated the installation procedure of the Odoo module that use invoice2data... it's now much simpler to install !

Hello guys instead of using yaml files as templates format can't we use json format files. I have a project and i want the templates to be json format how can i do it ?
Thanks


interlock: advise host mode on ip hashing

Noticed references to client IP address in ip hashing docs, which called to mind https://github.com/moby/moby/issues/25526. Verified nginx docs agree with respect to hashing based on client ip.  Host mode networking (already documented) addresses the concern.

Deploy preview for docsdocker ready!
Built with commit f71903d80694a50f0552c61a8c1e95b5a1fd4b9e
https://deploy-preview-8155--docsdocker.netlify.com

thank you!


Implement Activation Block Data for Ethereum Hardforks

Describe the feature
Create a function in the Hardfork enum to return activation block numbers for Ethereum hardforks,
pub fn activation_block(&self) -> Option<u64> {}

Documentation about block number activation : https://ethereum.github.io/execution-specs/autoapi/index.html
Part code : https://github.com/paradigmxyz/reth/blob/main/crates/ethereum-forks/src/hardfork.rs
Additional context
No response

Hey it's possible to add Good First Issue for this one ? :)

related:
https://github.com/foundry-rs/foundry/issues/6440
this function should take Chain as an argument and return the known activation block

related:
foundry-rs/foundry#6440
this function should take Chain as an argument and return the known activation block

i would like to give this for another person if you are okay :)

I can take this

I can take this

Hey @mattsse you can assign me this, ig #5723 aimed to solve this but was unable due to circular dependencies which can be tackled if we switched to alloy-chains instead reth-primitive implementation, I am currently working on #5429, hence will see this issue as well simultaneously.


Update bike.json

routing tends to put out much more pleasant routes when it prioritizes cycle paths over calm roads
this is a super minor change but something that's annoyed me for a while, so here's my solution

The upcoming 8.0 release includes a lot of improvements to bike routing:

https://github.com/graphhopper/graphhopper/pull/2774
https://github.com/graphhopper/graphhopper/issues/2777
https://github.com/graphhopper/graphhopper/pull/2785
https://github.com/graphhopper/graphhopper/pull/2786
https://github.com/graphhopper/graphhopper/pull/2790
https://github.com/graphhopper/graphhopper/pull/2796
https://github.com/graphhopper/graphhopper/pull/2802
https://github.com/graphhopper/graphhopper/pull/2804

looking at #2790 that does exactly what i was looking for lol, my bad
thanks for mentioning that


tests: regenerate test snapshots and remove obsolete snapshots (WIP)

This PR regenerates all tests snapshots. It also removes all snapshots that are currently produced by any tests. I have not investigate whether this is because the tests have been renamed/removed or whether the tests that are supposed to generate these snapshots fail before the get there.

This isn't currently ready to be merge: I regenerated the snapshots with wrong versions of some of the dependencies and need to regenerate them. That turns out to have its own problems, so I'll need a bit to get this PR ready...

@EpsilonPrime: We can delay deciding what are the correct results and probably should go through all results again at some point to decide whether they are actually correct but if we can avoid submitting wrong results, I think that'd be good. I thus went again through the diff of the snapshots. I think you covered the most suspicious changes. Here's one more though:
--- a/substrait_consumer/tests/functional/extension_functions/arithmetic_snapshots/function_test_results/median_result.txt
+++ b/substrait_consumer/tests/functional/extension_functions/arithmetic_snapshots/function_test_results/median_result.txt
@@ -1,2 +1,2 @@
-498.72
+498.73

All the remainders seem to be due to (1) the Substrait plan version produced by Isthmus and (2) Isthmus changing the order of project and filter in the plans it generates.


Enable std.json.parseJSON to parse nan/inf.

JSONValue.toString outputs 'nan', 'inf', or '-inf', when it has type
JSON_TYPE.FLOAT and value double.nan/double.infinity/-double.infinity.
However, parseJSON would fail on encountering these values in a string.
This patch enables parseJSON to read special float values.
I submitted this as issue #14399 a bit ago and then decided to take a shot at fixing it.
To be clear: this does not change the output of std.json.toString, which was already outputting special values for nan/inf. It simply allows std.json to read the special values that it outputs.

nan and inf don't seem to be valid JSON values. I think we shouldn't make our own JSON dialect by accepting them. Instead, I'd suggest to refuse the special values when constructing a JSONValue.

Fair enough, they aren't part of the official standard. However, I could at least see a use case for serializing inf, if not nan. Would it be more acceptable to serialize into the strings "nan", "inf", and "-inf"?

Would it be more acceptable to serialize into the strings "nan", "inf", and "-inf"?

I think JSONValue should be kept in sync with its JSON output. That is, let's not have JSON_TYPE.FLOAT values that serialize to strings.
We could let JSONValue(float.nan) etc construct string values. I.e. let them be the same as JSONValue("nan") etc.
I'd lean towards letting them throw, though. I think it's less surprising than getting strings back.

Someone on the bugzilla issue linked this go discussion that mentions a part of the json spec where it specifies that NaN and Inf should be represented as null, but the link to the spec they quote is dead.
Plus using null would lose information about whether it is NaN, Inf, or -Inf.

If we decide to throw, I have implemented that at (see https://github.com/rcorre/phobos/commit/d2c1665b38b4ceafd3e56e8daa9e79aaf2f77cc2).
However, I am in favor of finding some way to encode NaN/Inf even if it is not strictly 'standard'.

Someone on the bugzilla issue linked this go discussion that mentions a part of the json spec where it specifies that NaN and Inf should be represented as null, but the link to the spec they quote is dead.

Here's the (dead-)linked specification: http://www.ecma-international.org/ecma-262/5.1/
The quotes are from section 15.12.3 which describes a stringify function which returns a JSON fragment. So this is not about how JSON is defined, but about what JSON is produced by ECMAScript.
So we'd be in the good company of ECMAScript itself if we'd map nan and inf to null.

However, I am in favor of finding some way to encode NaN/Inf even if it is not strictly 'standard'.

I'm against adding new keywords to the JSON output (like foo: nan), because it wouldn't be proper JSON anymore.
Generating JSON strings (like foo: "nan") seems ok-ish to me. This would mean that a processor has to be aware of the convention and handle the cases accordingly. We can't let std.json map "nan" to double.nan, because the value may be meant to be the string "nan".
I'd still prefer to reject the special values, though. When I have to be aware of nan -> "nan" on the processing end, then the convenience on the generating end isn't worth much to me. Better to fail early, in my opinion.

I'd still prefer to reject the special values, though. When I have to be aware of nan -> "nan" on the processing end, then the convenience on the generating end isn't worth much to me.

Yeah, I agree here.
I'm not sure I'd like to encode as null either, as that loses the information of whether it was NaN or Inf.
I'll put in a PR for making them throw.

It's a separate option to enable this for the std.data.json proposal.
http://s-ludwig.github.io/std_data_json/stdx/data/json/lexer/lex_options.special_float_literals.html

Ruby × (has allow_nan option)
Python ✓
JS ✓

It think the best option here would be to make it configurable.

I've updated the PR with optional encoding/decoding of special float values (defaults to 'no').
However, if std.data.json is planned to replace std.json soon, there may not be much point to this.

However, if std.data.json is planned to replace std.json soon, there may not be much point to this.

We hardly found a review manager yet. Better to fix things now than prolonging it in favor of something else to come.

Looking good, thanks.

Updated docs and replaced Flag with a flagset enum JsonOptions.

Auto-merge toggled on

Thx


data: ADITYADAS1999

Check List (Check all the applicable boxes)

[✅] My code follows the code style of this project.
[✅] My change requires changes to the documentation.
[✅] I have updated the documentation accordingly.
[✅] All new and existing tests passed.
[✅] This PR does not contain plagiarized content.
[✅] The title of my pull request is a short description of the requested changes.

Hey,
It looks like you have mistakenly put the portfolio link instead of GitHub link

ohh no, I will change this👀


Documentation: add examples

the examples folder should contain examples for each resource and data source.
Following the documentation here we should create examples accordingly.

this was resolved and is now part of the v1.1.0


trigger_files removes labels added by user as part of PR creation

I added some labels as part of the PR creation flow, but rustbot removed them when it added T-rustdoc: https://github.com/rust-lang/rust/pull/91876#event-5760005621

Distributed systems problem, I suppose. The github side event log shows:
fd73ee70-5c5d-11ec-914a-1521518a34ea: 16:45:30 - camelid, labeled = +C-cleanup, I-compiletime, I-compilemem
fd7e9cd0-5c5d-11ec-8087-4a7cb5275989: 16:45:30 - camelid, labeled = C-cleanup, I-compiletime, +I-compilemem
fd8812b0-5c5d-11ec-9b60-669487d92dd5: 16:45:30 - camelid, labeled = C-cleanup, +I-compiletime, I-compilemem
fe2208c0-5c5d-11ec-859c-7d384597c723: 16:45:31 - rustbot, unlabeled, remove: C-cleanup, left: T-rustdoc
fe2208c0-5c5d-11ec-859c-7d384597c723: 16:45:31 - rustbot, unlabeled, remove: I-compiletime, left: T-rustdoc
fe2b7ea0-5c5d-11ec-9d4a-c8dfb48b4f18: 16:45:31 - rustbot, unlabeled, remove: I-compilemem, left: T-rustdoc
fe3c6e90-5c5d-11ec-8d28-edd2327c1b85: 16:45:31 - rustbot, labeled = T-rustdoc
fd1a0ea0-5c5d-11ec-8965-864abb4f8d0b: 16:45:32 - camelid, opened, labels = []

Triagebot logs (edited to strip details) show (note, UUIDs here are triagebot, not expected to match those generated by GitHub).
23d83c5e-42b2-4073-bef6-a8945105213f: Opened, labels: []
23d83c5e-42b2-4073-bef6-a8945105213f: set_labels rust-lang/rust#91876 to [T-rustdoc]
5f13fdab-1c90-4e77-a2e9-5c697bc040a6: Labeled, +C-cleanup, labels: [C-cleanup, I-compiletime, I-compilemem]
955c9052-63ea-41b1-b988-ebcc8b58b191: Labeled, +I-compilemem, labels: [C-cleanup, I-compiletime, I-compilemem]
df1cb36a-5984-494e-967d-b8333beb1304: Labeled, +I-compiletime, labels: [C-cleanup, I-compiletime, I-compilemem]
a70da24b-df42-4884-94bc-30b16e87f91c: Unlabeled, -C-cleanup, labels: [T-rustdoc]
4dc2f136-5c14-44b2-baef-4245a6cacfca: Unlabeled, -I-compiletime, labels: [T-rustdoc]
ae0627e2-ca61-416a-91c0-f7b4291a2fed: Unlabeled, -I-compilemem, labels: [T-rustdoc]
8f010590-1d05-4634-a111-3b62f88ce127: Labeled, +T-rustdoc, labels: [T-rustdoc]

Both logs are ordered "oldest" to "newest", i.e., last event is latest event.
I think the likely fix here is to migrate to the new(?) API GitHub offers for adding labels, rather than setting them. It seems like we can do so by just changing the put to a post. We'll want to update the code that calls in to delete and add labels to use the "add" and "delete" APIs as well, so that we're not clobbering unrelated state.
Should be a fairly straightforward change.

OK, filed #1540 which should close this issue. Really a nice cleanup regardless.


Strange behavior when pattern matching

When matching on a discriminated union I need to match all values individually even when all I want to match the tuple.  I am new to F# so this could very well be the correct semantics but in Standard ML (and I believe OCaml) this would just work -- it feels like a bug.
Repro steps
Consider this type:
type 'a Digit =
| D1 of 'a
| D2 of 'a * 'a
| D3 of 'a * 'a * 'a
| D4 of 'a * 'a * 'a * 'a
Of the following 3 functions f1, f2 compile fine, but f3 fails to compile.  I want to use the tuple on the right hand side of -> (and not have to rebuild it) but I simply can't.
let f1 d =
    match d with
    | D1 x0 -> 1
    | D2 (x0, x1) -> 2
    | D3 (x0, x1, x2) -> 3
    | D4 (x0, x1, x2, x3) -> 4

let f2 d =
    match d with
    | D1 _ -> 1
    | D2 _ -> 2
    | D3 _ -> 3
    | D4 _ -> 4

let f3 d =
    match d with
    | D1 x -> 1
    | D2 x -> 2
    | D3 x -> 3
    | D4 x -> 4

Expected behavior
All 3 should compile.
Actual behavior
Only f1 and f2 compile.
Known workarounds
Use version f1
Related information
Microsoft Visual Studio Community 2015
Version 14.0.25424.00 Update 3
Microsoft .NET Framework
Version 4.7.02556
Installed Version: Community
Visual F# 2015   00322-20000-00000-AA209
Microsoft Visual F# 2015
Visual F# Power Tools   2.5.6
A collection of additional commands for F# in Visual Studio

Thanks for writing the issue, I came across the exact same thing a little while back too! It might (guessing here) have to do with how DUs store these tupled args (possibly not as a tuple) and that F# doesn't want to synthesize one on match but it's not pretty.

I can definitely see how this can be confusing. Perhaps a better error message that describes why you can't do this would be better.

If you change the type definition slightly, even f3 works:
type 'a Digit =
| D1 of ('a)
| D2 of ('a * 'a)
| D3 of ('a * 'a * 'a)
| D4 of ('a * 'a * 'a * 'a)


Custom Grids?

Just a general question here - if I want to download a custom grid from the Zurb site, how would you recommend incorporating that with FoundationPress?? Don't if it would complicated or would just be a replacement of the core foundation files. Would love to be able to add my own custom grid.
http://foundation.zurb.com/develop/download.html

You should take a look at the assets -> scss -> config -> _settings.scss file. In there are setting for the grid starting on line 76. You can copy and past those grid variables into the _custom-setting.scss file and change the values for your custom grid.

If you change the grid to a custom one you also have to change the templates where the grid is used, since they are built for the default 12 column grid. Lines like:
<div class="small-12 large-8 columns" role="main">

Good point. I've started using the grid mixins to start making my code more semantic, so that may be worth checking out as well.


[Improve][AWS] update the bundle aws sdk version to 1.11.1034

Purpose of this pull request
The new AWS JAVA SDK version support more hadoop-aws auth method like EC2 profile IMDSv2 and WebIdentityTokenCredentialsProvider. which will ensure AWS S3 access in EC2 IMDSv2 only and EKS IRSA.
Check list

[x] Code changed are covered with tests, or it does not need tests for reason:
[x] If any new Jar binary package adding in your PR, please add License Notice according
New License Guide
[x] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
[x] If you are contributing the connector code, please check that the following files are updated:

Update change log that in connector document. For more details you can refer to connector-v2
Update plugin-mapping.properties and add new connector information in it
Update the pom file of seatunnel-dist

[x] Update the release-note.

Yes, I think 1.11.1034 is good. Please add e2e for this pr.
You can add an e2e test case and run it in your local env. And then put the picture of the result here. Before you push the e2e code, you need add @Disable annotation for it.

Sorry I am not very familiar this project code base, how to write e2e testing code? I find several folders in seatunnel-e2e which should I create the testing code class? Or should I pick up a Connector such as S3File to write the testing code?


add audio cue for task end and terminal bell

fix #141506
fix https://github.com/microsoft/vscode/issues/47711

not sure what's happening w the test failure - it passes locally


My Arm's Big Adventure does not list Hardy Gout Tubers or Spade in the final step.

For the items to bring in the final step, those two items just aren't listed despite being ESSENTIAL to completing.

Fixed, thanks.


Create pre-compile / chain extension to interact on Ethereum event

Description
We need to implement chain extension or precompile to interact with events from Ethereum Light client
Suggested solution
As initial implementation, the chain extension should expose verified receipts from the on-chain eth light client.
Once event is submitted the user should be able to interact with a contract that will verify event submission and do some actions depends on logs.

Proposed EVM precompile interface:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface EthReceiptProvider {
    function logs_for_receipt(
        uint256 chain_id,
        uint256 block_number,
        bytes32 receipt_hash,
        address contract_addr
    )
        external
        returns (
            bytes32 [][] calldata,
            uint[][] calldata
        );
}

// Ethereum contract
contract Dog {
    event Bark(string message);
    event TailWag(string message);

    function bark() public {
        emit Bark("Woof! Woof!");
    }

    function wagTail() public {
        emit TailWag("The dog is happy and wagging its tail!");
    }
}

// GGXChain EVM contract that reacts on Dog contract
contract DogOwner {
    EthReceiptProvider public ethReceiptProvider;
    address public dogContractAddress;
    event Response(string message);

    constructor() {
        dogContractAddress = 0x3B123F7Dd131e724a2dC59c83d26640B77412D0d;
        ethReceiptProvider = EthReceiptProvider(0x0000000000000000000000000000000000009999);
    }

    function respondToDogActions(
        uint256 chain_id,
        uint256 block_number,
        bytes32 receipt_hash
    )
        public
    {
        (bytes32[][] memory topics, uint[][] memory _data) = ethReceiptProvider.logs_for_receipt(
            chain_id,
            block_number,
            receipt_hash,
            dogContractAddress
        );

        for (uint i = 0; i < topics.length; i++) {
            for (uint j = 0; j < topics[i].length; j++) {
                if (topics[i][j] == keccak256("Bark(string)")) {
                    emit Response("Bad boy");
                } else if (topics[i][j] == keccak256("TailWag(string)")) {
                    emit Response("Good boy");
                }
            }
        }
    }
}

The WASM version of the dog_owner conract that utilizes chain extension:
#![cfg_attr(not(feature = "std"), no_std, no_main)]

use ink::env::{chain_extension::FromStatusCode, DefaultEnvironment, Environment};
use ink::prelude::vec::Vec;

#[ink::contract(env = crate::ReceiptRegistryDefaultEnvironment)]
mod dog_owner {
    use ink::prelude::string::String;

    #[ink(storage)]
    pub struct Dog {
        contract: [u8; 20],
    }

    #[ink(event)]
    pub struct Response {
        response: String,
    }

    impl Dog {
        /// Constructor that initializes the `bool` value to the given `init_value`.
        #[ink(constructor)]
        pub fn new(contract: [u8; 20]) -> Self {
            Self { contract }
        }

        #[ink(message)]
        pub fn process(&mut self, chain_id: u32, block_number: u64, receipt_hash: types::H256) {
            let logs = self
                .env()
                .extension()
                .logs_for_receipt(chain_id, block_number, receipt_hash.0, self.contract)
                .expect("failed to retrieve logs");

            for (topics, _) in logs {
                for topic in topics {
                    if topic.0 == keccak_hash::keccak("Bark(string)").0 {
                        self.env().emit_event(Response {
                            response: String::from("Bad boy"),
                        });
                    } else if topic.0 == keccak_hash::keccak("TailWag(string)").0 {
                        self.env().emit_event(Response {
                            response: String::from("Good boy"),
                        });
                    }
                }
            }
        }
    }
}

pub type Log = (Vec<types::H256>, Vec<u8>);

#[ink::chain_extension]
pub trait ReceiptRegistryExtension {
    type ErrorCode = Error;

    #[ink(extension = 0x00040001)]
    #[ink(handle_status = false)]
    fn logs_for_receipt(
        chain_id: u32,
        block_number: u64,
        receipt_hash: [u8; 32],
        contract_address: [u8; 20],
    ) -> Result<Vec<Log>, Error>;
}

/// chain extension errors.
#[derive(scale::Encode, scale::Decode, Debug)]
#[cfg_attr(feature = "std", derive(scale_info::TypeInfo))]
pub enum Error {
    FailRetrievalOfLogs,
}

impl FromStatusCode for Error {
    fn from_status_code(status_code: u32) -> core::result::Result<(), Self> {
        match status_code {
            0 => Err(Self::FailRetrievalOfLogs),
            1 => Ok(()),
            _ => panic!("encountered unknown status code"),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "std", derive(scale_info::TypeInfo))]
pub enum ReceiptRegistryDefaultEnvironment {}

impl Environment for ReceiptRegistryDefaultEnvironment {
    const MAX_EVENT_TOPICS: usize = <DefaultEnvironment as Environment>::MAX_EVENT_TOPICS;

    type AccountId = <DefaultEnvironment as Environment>::AccountId;
    type Balance = <DefaultEnvironment as Environment>::Balance;
    type Hash = <DefaultEnvironment as Environment>::Hash;
    type BlockNumber = <DefaultEnvironment as Environment>::BlockNumber;
    type Timestamp = <DefaultEnvironment as Environment>::Timestamp;

    type ChainExtension = ReceiptRegistryExtension;
}

impl From<scale::Error> for Error {
    fn from(_: scale::Error) -> Self {
        panic!("encountered unexpected invalid SCALE encoding")
    }
}


--disable-agent flag poblem

Hi,
Some time ago I installed version 0.8.0 and with the single installation command without other flags in the same host, both the master node and an agent node were executed and if the agent was not wanted in the same host I had used the appropriate flag --disable-agent.
Installing k3s (v0.9.1) again without flag only the master appears and if I use the flag to disable the agent (which does not start) the master node is not visible, as if it did not exist but k3s is correctly running..
I tried to install earlier versions too, thinking that maybe it was a version problem but nothing even for example with version 0.8.0 I get the same result.

@Salvocll This is expected behavior when --disable-agent flag is passed. Its documented in this issue. https://github.com/rancher/k3s/issues/891

Let us know if there are any other questions/concerns. --disable-agent is no longer advertised in the cli and docs and we do not recommend it as the kubelet won't be running and thus the node won't be listed via kubectl, etc.
You can run k3s without --disable-agent and if you don't want anything to schedule on the master nodes you can taint them with something like this: --node-taint key=value:NoExecute


Snapshots are being written differently in OSX and Unix

What version of React-Table are you using?
6.8.6
What bug are you experiencing, or what feature are you proposing?
I have a private repo that I'm maintaining that uses react-table.
I am also using jest as my snapshot testing tool.
a few weeks ago, I started getting some failures about an invalid snapshot:
Received value does not match stored snapshot "CustomTable renders without crash 1".
15:55:58
15:55:58     - Snapshot
15:55:58     + Received
15:55:58
15:55:58     @@ -15,11 +15,11 @@
15:55:58           >
15:55:58             <div
15:55:58               className="rt-tr"
15:55:58             >
15:55:58               <div
15:55:58     -           className=" -cursor-pointer rt-th"
15:55:58     +           className="-cursor-pointer rt-th"
15:55:58                 onClick={[Function]}
15:55:58                 style={
15:55:58                   Object {
15:55:58                     "flex": "100 0 auto",
15:55:58                     "maxWidth": null,
15:55:58     @@ -32,11 +32,11 @@
15:55:58                 >
15:55:58                   Type
15:55:58                 </div>
15:55:58               </div>
15:55:58               <div
15:55:58     -           className=" -cursor-pointer rt-th"
15:55:58     +           className="-cursor-pointer rt-th"
15:55:58                 onClick={[Function]}
15:55:58                 style={
15:55:58                   Object {
15:55:58                     "flex": "100 0 auto",
15:55:58                     "maxWidth": null,
15:55:58
15:55:58       50 |         );
15:55:58       51 |         let tree = component.toJSON();
15:55:58     > 52 |         expect(tree).toMatchSnapshot();
15:55:58          |                      ^
15:55:58       53 |     });
15:55:58       54 |

this snapshot is invalid due to a tiny whitespace that is added while rendering react table.
apparently, it renders differently on local and CI machines (jenkins on linux servers to be precise).
I have found a similar issue on jest's repository (https://github.com/facebook/jest/issues/6450) but it seems like it is not truly the solution and that something should be done on your end as well.

This feature/issue has been tagged as one that will likely be fixed or improved in the next major release of React-Table. This release is expected to be completed in the next 6 - 8 months. Please see #1143 for more detail. If you believe this feature can be easily fixed, we invite you to fork the project, attempt the fix, and use it until the latest version is available. If the fix is simple enough, we will also consider it as a PR to the current version.


fix: update sync_headers_in_reverse logic to match lotus

Summary of changes

Changes introduced in this pull request:

Update  sync_headers_in_reverse logic to match lotus
Avoid re-validating the current head when the local chain is not a fork
Avoid some unnecessary clones

Log(importing a snapshot whose head is not a fork, it no longer re-validates the head):
2024-05-07T12:55:50.070707Z  INFO forest_filecoin::chain_sync::chain_muxer: Local node is behind the network, starting BOOTSTRAP from LOCAL_HEAD = 1591906 -> NETWORK_HEAD = 1592005
2024-05-07T12:55:52.146710Z  INFO forest_filecoin::chain_sync::tipset_syncer: Validating tipset: EPOCH = 1591907, N blocks = 2

lotus code(func (syncer *Syncer) collectHeaders): https://github.com/filecoin-project/lotus/blob/master/chain/sync.go#L684
Some highlights:
...
// we want to sync all the blocks until the height above our
// best tipset so far
untilHeight := known.Height() + 1
...
loop:
	for blockSet[len(blockSet)-1].Height() > untilHeight {
             ...
        }
...
if base.IsChildOf(knownParent) {
		// common case: receiving a block that's potentially part of the same tipset as our best block
		return blockSet, nil
	}

	// We have now ascertained that this is *not* a 'fast forward'
	log.Warnf("(fork detected) synced header chain (%s - %d) does not link to our best block (%s - %d)", incoming.Cids(), incoming.Height(), known.Cids(), known.Height())
	fork, err := syncer.syncFork(ctx, base, known, ignoreCheckpoint)

Reference issue to close (if applicable)

Closes https://github.com/ChainSafe/forest/issues/4113
Other information and links

Change checklist

[x] I have performed a self-review of my own code,
[x] I have made corresponding changes to the documentation,
[x] I have added tests that prove my fix is effective or that my feature works (if possible),
[x] I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

WIBNI you checked in a comment to the reference code, so readers can understand why it is the way it is.

@aatifsyed link added!


New project: after creation from template, main.tact should be shown

It displays these tiles:

I checked but couldn’t replicate the issue. After creating a project using the "New Project" popup or selecting from the Tact template list, main.tact opened automatically. Could you help me reproduce the issue?

https://github.com/user-attachments/assets/04025c4d-f32d-4538-bf9e-ffbffcc73b9c

Understood. The issue occurs when an existing project with open tabs is present, and we attempt to create a new project. In this scenario, the new project fails to open default file. I'll fix it.


Subtle difference in priorities compared to manual creation

I've been trying to work out a layout issue I'm running into related to NSWindow and its top-level views. It turns out it is being caused by the ConstraintPriority default value of .high.
// works
self.view.heightAnchor.constraint(equalToConstant: 100).isActive = true

// works
view.height(100, priority: .required, isActive: true)

// doesn't work
view.height(100)

This is because a system-created constraint, by default, has the required priority. TinyConstraints creates all with the .high default, which is < required. This creates very subtly different behavior.
I recognize that changing this has some serious compatibility implications. What do you think?

Hi @mattmassicotte!
I think you are absolutely right and I changed the default priority in TinyConstraints to .required as of version 2.0 which I just released 🚀.
Thank you for pointing this out! 💯


Documenting src/redux/auth/auth.actions.js to explain functionality

File name: src/redux/auth/auth.actions.js

I would like to work on this please!

Great! I assigned you (@RyanGarfinkel) to the issue. Have fun working on it!


"Wait for results" mode

It'd be nice to have a command I can run post-push that will

Find the build for the commit I just pushed
Show the build status
When the build completes, print the bell character (\a) to notify me.

It'd be nice to have the bell ring either when all sub-builds complete successfully or when any single build fails (to get my attention so I can check the logs to find the failure point).
Really, I guess the bell would be pretty useful regardless of mode, so maybe this should be two separate issues (1: find the build for the commit I just pushed; 2: add bells to the build that's currently being observed).

This is a great idea, definitely on my list of things to do! Thanks! :tada:


Identifiers validation failed for dataset Inventario avifaunístico de la sierra de Guerrero (Sierra Madre del Sur)

Identifier validation failed for the dataset Inventario avifaunístico de la sierra de Guerrero (Sierra Madre del Sur):

Crawler attempt: 231
Publishing organization: Comisión nacional para el conocimiento y uso de la biodiversidad
Publishing country: MEXICO
Installation: IPTCONABIO
Number of occurrences indexed for this dataset at the time of the issue: 1826
Cause: GBIF IDs hit maximum allowed - 50%, duplicates - 98%, total records count 1750, absent records count 1720
Pipelines execution steps: http://api.gbif.org/v1/pipelines/history/execution/3072856/step

Publisher email
Hello,
I am contacting you from the GBIF Secretariat about a dataset published by the Inventario avifaunístico de la sierra de Guerrero (Sierra Madre del Sur) : https://doi.org/10.15468/guyxrn.
We noticed that the occurrenceIDs were changed. We have temporarily paused the ingestions of this dataset.
As you might already know, when an occurrence record has a new occurrenceID for a given dataset, our system considers it to be a new occurrence.
This means that it will be given a new gbifid and a new occurrence URL (like this one: https://www.gbif.org/occurrence/1252968762) and the old gbifid and URL will be deprecated.
In this case, this means that the occurrence URLs would be deprecated when ingesting the newest versions of these datasets.
We would like to check with you if those changes were intentional. Do you know if this is the case?
Please let us know, thanks! We are happy to resume the dataset ingestion.
Note that some users rely on those occurrence URLs and gbifids (like https://bionomia.net for example). In an attempt to improve
the stability of the occurrence URLs and gbifids, we have implemented a warning system to detect these type of changes in datasets (see this news item).
If the data publisher can provide us with a list of old and new occurrenceIDs per record, we can avoid the identifier and URL changes. Could that be an option?
Please let us know if you have any question. Thanks!
All the best,

You can skip/fix identifier validation using the registry UI.

Identifier validation still  failing for the dataset Inventario avifaunístico de la sierra de Guerrero (Sierra Madre del Sur):

Crawler attempt: 234
Publishing organization: Comisión nacional para el conocimiento y uso de la biodiversidad
Publishing country: MEXICO
Installation: IPTCONABIO
Number of occurrences indexed for this dataset at the time of the issue: 1826
Cause: GBIF IDs hit maximum allowed - 50%, duplicates - 98%, total records count 1750, absent records count 1720
Pipelines execution steps: http://api.gbif.org/v1/pipelines/history/execution/3093738/step

Publisher email
Hello,
I am contacting you from the GBIF Secretariat about a dataset published by the Inventario avifaunístico de la sierra de Guerrero (Sierra Madre del Sur) : https://doi.org/10.15468/guyxrn.
We noticed that the occurrenceIDs were changed. We have temporarily paused the ingestions of this dataset.
As you might already know, when an occurrence record has a new occurrenceID for a given dataset, our system considers it to be a new occurrence.
This means that it will be given a new gbifid and a new occurrence URL (like this one: https://www.gbif.org/occurrence/1252968762) and the old gbifid and URL will be deprecated.
In this case, this means that the occurrence URLs would be deprecated when ingesting the newest versions of these datasets.
We would like to check with you if those changes were intentional. Do you know if this is the case?
Please let us know, thanks! We are happy to resume the dataset ingestion.
Note that some users rely on those occurrence URLs and gbifids (like https://bionomia.net for example). In an attempt to improve
the stability of the occurrence URLs and gbifids, we have implemented a warning system to detect these type of changes in datasets (see this news item).
If the data publisher can provide us with a list of old and new occurrenceIDs per record, we can avoid the identifier and URL changes. Could that be an option?
Please let us know if you have any question. Thanks!
All the best,

You can skip/fix identifier validation using the registry UI.


add OPTION to build with OpenMP

Add option for building for STIR with OpenMP https://github.com/UCL/STIR/compare/OPENMP

done I believe?

closed with 5735d748a3edfde1dadd4ce9aff187bffc5a1892


Support mapping to/from Set

Sometimes a set better represents the behaviour of some data. It doesn't seem like this is currently supported by ObjectMapper.
It's not exactly difficult to workaround this (I just use an Array in my model objects and convert to a Set when needed), but it would be nice if a workaround wasn't needed.

I agree, I think this would be a good feature addition.
I will add it when I have some free time.
Thanks

i already send a pull request with that
https://github.com/Hearst-DD/ObjectMapper/pull/159

Closing this issue as it will be supported when swift-2.0 is merged into master.

Thanks @Busta117!


chore(store-ui): Component architecture

What's the purpose of this pull request?
This PR adds a document with all conditions of satisfaction to have a component on store-ui.
How it works?

How to test it?

References

another reference link to accessibility docs, in addition to this one 👀


add more functional information into Unipept

From a brainstorm this morning with Klaas Van De Poele, we figured out that for the tryptic peptide ENFVYIAK, UniProt record E1U3Z1 is missing GO annotations, but it has links to InterPro domains. Since InterPro provides a mapping to GO (InterPro2GO), it is strange that no GO annotations were included in the UniProt record. But given the mapping,and the addition of the InterPro cross-references to Unipept, we could make the mapping ourselves.
As we are gradually adding more functional cross-references to Unipept, we might consider to add all available cross-references from the UniProt record (or at least those in the category "Family domain databases"). Instead of adding another table for each cross-referenced database in Unipept, we might merge all cross-references in a single table, that also has a column to indicate what database the cross-reference is referring to.
Original issue by @pdawyndt on Thu Mar 19 2015 at 22:05.

Some considerations:

We need to make a good estimation of the length of the possible cross_reference_id field and of the number of rows we would have (100M entries * 10-20 cross references?)
A single table for all cross references is not a viable option. Some cross references are used in joins, so we need an index on them for performance reasons. A single table for all cross references would contain 1+ billion rows. We will already have to create an index on the uniprot_entry_id and creating an extra index on a text column in a table of that size is not a good idea. tl;dr: cross references used in queries must have their own table, the rest can be pooled in one table.

Original comment by @bmesuere on Sat Mar 21 2015 at 19:29.

More functional data can be found at http://proteininformationresource.org/pirwww/dbinfo/
Original comment by @bmesuere on Fri May 08 2015 at 14:43.


w3 schools.md

W3 schools

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

added w3 schools reference

Hi @MUSSONT,
We avoid adding w3schools as reference because they are unreliable source with incomplete or inaccurate information.
I'm closing this PR but feel free to make a new one in future.
Happy coding.


Make layout in side panels allowed to code tab

Hello! I think it may be good feature if VSCode interface will allow to pin code tabs in left/right/bottom panels like in JetBrains Fleet or Zed redactor.

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Happy Coding!


No Sound on Android 4.4+

Everything works well except no sound while running on background mode.

@iwanjunaid There's no sound option

@katzer What do you mean there is no sound option? Why does it come with appbeep.wav file? Have you tried adding this feature or it's not possible? It would be nice to be able to have a beeping sound when you get a notification (or any other sound)

@iwanjunaid That file is internal and been used to keep the running in background.


[WIP] Allow assuming all roles offered by IDP, regardless of account.

Uses AssumeRoleWithSAML for all roles rather than just the main role.
I know we spoke about this being possible to disable, but I feel that I was able to keep the impact of the change down to a minimum and I don't believe this is likely to negatively impact users in any way. Please let me know what you think.
P.S.: Sorry for the wait; life got in the way a bit.

Short update: I've got a bunch of people using samlogin now, so the functions in that tool are being tested pretty well and I'm finding a number of things which could stand to be improved.
In the meantime, I'm working on CI/CD tests/builds based on two things:
1. Your earlier comment that refactoring is on your list of TODOs; having this in place should make it significantly easier to use libraries from the NPM repository without much extra added effort during the development, build or release processes.
2. I'm using a libary, now, in samlogin that handles a lot of the parsing of SAML responses. It would be beneficial to be able to use that library for this extension as well. It would certainly be possible to just copy the code to a lib directory, but I feel that managing dependencies with NPM or Yarn will be beneficial in the long run.
I'd love to get your thoughts on item 2 in particular. The lib in question is at https://www.npmjs.com/package/libsaml.

Hi Brian, I see you are already actively working on this, so I needed to make some time to reply.
I don't want to discourage all your great efforts, but I do have some thought of my own for these particular topics.
CI/ID is great and it has been on my mind in the past. But frankly for completely different reasons. When I think about what is costing me the most time to maintain this extension, its the changing API's in Chrome. So what I once thought about is to create an automated pipeline for testing mainly. The pipeline would launch the latest beta release of Chromium with the extension, launch a docker container with an open source SAML provider (like shibboleth), and run some of the common use patterns. This would make me able to detect issues with the extension in a early stage, before users will actually notice it.
Building the extension is not costing me time at all. Its so simple I don't need to build. Even better, while coding the extension, all I have to do to see the changes in Chrome is reload the extension.
I appreciate your effort, but I'd like to believe we should only spend our time in things which makes our lives easier. I think for me adding build tools is only creating unnecessary overhead for something really simple. Feel free to convince me otherwise of course :-)
As for your second point:
I'm not against using libraries. That would be really strange if I was. But I do like to keep it to a minimum. So only for those cases where it very clearly saves me coding dozens of extra lines. Obviously for jQuery and the AWS SDK this is the case. I'm not sure yet what the advantage would be of using the libsaml library, so please help me out here. The way I see it, once you have the saml document as string, it isn't that much effort to get an attribute value.
Sure, you need this one off:
  parser = new DOMParser()
  domDoc = parser.parseFromString(samlXmlDoc, "text/xml");

But after that, its really just simple one liner:
// Get a list of claims (= AWS roles) from the SAML assertion
var roleDomNodes = domDoc.querySelectorAll('[Name="https://aws.amazon.com/SAML/Attributes/Role"]')[0].childNodes

Don't get me wrong. I really appreciate the efforts you are putting into this in making the extension even better. But I'm also thinking about what it means for me, next time there is another issue with the extension because of a changed API in Chrome (or something else). As this extension is just one of my many hobby projects I don't like to be dependent on another library when I don't need to. I'm sure you know how these things work out in reality.
Just being honest here with you. Let me know your thoughts.

I totally understand the concerns. I'll post more to explain my reasoning for the decisions I've made (including how they might benefit your goal of automated testing) shortly.  :-)

Indeed, you're absolutely right about the libsaml. It's been a good amount of time since I began working on samlogin, so I completely forgot that I used that because querySelectorAll(...) doesn't exist in Node.js! So, I appreciate the push-back, as you're most certainly right about not needing that library in the browser.
As for the build process, I understand that you want to automate testing in chromium. I think Mocha and  Puppeteer could help with that quite a bit. Both of these tools run in the Node.js/commonjs environment, which isn't directly compatible with the browser. That's really where builds are coming in at this point. If you take a look at gulpfile.js there's a step called browserify which essentially embeds scripts which are called by require(...). I suspect this will come into play for automated testing against chromium, but it probably isn't warranted for this particular PR. Let me see what I can do to slim things down a bit and maybe I can start experimenting on testing against Chromium in another branch after that.


Use .xcode-version file

I am using fastlane and chxcode, and they read Xcode's version from the .xcode-version file.
How about making this action read version from the file?
If it comes true, the '.xcode-version' file becomes SSOT, Single Source of Truth for the version of Xcode.
I think it could become a part of the best practice for iOS engineers.
Thanks.

Hi 👋 ,
One possible problem that I see here is different syntax format.
This action uses semver notation. Fastlane docs describes the different notation (Gem::Version notation I guess?).
For example:

8.1 will be resolved to 8.1.0 by fastlane and as 8.1.* (for example 8.1.2 as latest available) in this action
~> 8.1.0 is not semver notation and won't work at all. And I guess some other differences

it can cause confusion and different selected Xcode. Correct me if I am wrong.

@maxim-lobanov:

Fastlane docs describes the different notation ([Gem::Version notation (https://www.rubydoc.info/github/rubygems/rubygems/Gem/Version) I guess?).

I believe the idea of the .xcode-version file comes from the (now defunct) fastlane ci project: https://github.com/fastlane/ci/blob/master/docs/xcode-version.md, and in the examples there only a plain version number string is allowed, not any match syntax such as ~> 8.1.0.
Also https://github.com/klaaspieter/chxcode, mentioned above, just matches on a plain string as far as I can see.
To alleviate this confusion, we could even add a (proposed) canonical description of the .xcode-version file format to this repo. Especially so since is https://github.com/fastlane/ci/blob/master/docs/xcode-version.md is archived.

8.1 will be resolved to 8.1.0 by fastlane and as 8.1.* (for example 8.1.2 as latest available) in this action

I think we could see this as a bug in fastlane, and that setup-xcode is doing the right thing.
Related, there's also use of a .swift-version file in the community, for example by SwiftFormat: https://github.com/nicklockwood/SwiftFormat/blob/master/README.md#swift-version
It could be interesting to make setup-xcode select an Xcode version based on .swift-version if .xcode-version isn't present.

FYI if you want to get this feature right now you can use @bobergj's fork. Replace
       - uses: maxim-lobanov/setup-xcode@v1
         with:
           xcode-version: 14.3

with
- uses<EMAIL_ADDRESS>
in your Github Actions workflow yaml.


Reverse reveal animation

Is it possible to create a reverse reveal animation while closing the search view?

@MiguelCatalan not sure if you've attempted this, but I just got it working. Gonna do some cleanup and I'll have a PR for you

@MiguelCatalan What does prevent from merging this PR? It would be nice to have such animation


Human joint points

Hello! I'd like to ask about the human joints. What are the names of 3: rank and 6: lank? I hope to get your reply. thank you! @HowieMa

It stands for "right ankle" and "left ankle". I directly adopt the code from multiview-human-pose

Hello, I have another question about the key points. Many projects use 16 key points, and this article uses 20. I can't find this structure diagram, so I want to ask. In posture estimation, 10: upper neck and 13: top of head, which key point points to them respectively. 0: root points to 7: abdomen, 7: abdomen points to 8: chest, is that right? Looking forward to your reply, thank you!
@HowieMa

Hi, thanks for asking.
Firstly, different datasets have different keypoint definitions of the human joint.
For example, the COCO dataset has 17 key points, as shown below:
.
You can also find some examples on their official website.
For the MPII dataset, it has 16 key points, you can find the definition at our code.

For the Human 3.6M, it has 17 key points,

Thus, there is no "root" joint for COCO, but there is "root" joint in MPII and Human 3.6M. Usually, the root joint is around the belly or waist.
Note that, all of these key points are defined by the dataset officially, rather than a special definition in our paper.
Secondly, as said above, the 20 union key points are adapted from the multiview-human-pose. This is a union of keypoint graphs of both Human 3.6M and MPII, rather than a special type of graph. That's why there are both "neck" and "upper neck" in the 20-joint set.

Thank you for your reply


InfiniteScroll: fix avoid event trigger when element invisible

Please make sure these boxes are checked before submitting your PR, thank you!

[x] Make sure you follow Element's contributing guide (中文 | English | Español | Français).
[x] Make sure you are merging your commits to dev branch.
[x] Add some descriptions and refer relative issues for you PR.

#16673

scroll event does not trigger after component visible.
When contents don't fill the container at first, InfiniteScroll can not do anything.

scroll event does not trigger after component visible.
When contents don't fill the container at first, InfiniteScroll can not do anything.
I think when component hidden, it should create a observer to watch it if visible, and then emit 'scroll' event to compute should trigger callback or not.

yeah. when the element is invisible,may be its parent element or self invisible. now when trigger scroll event,it will check the element visible status,if true ,go on ,if  false,just return. the scroll event like a observer.

scroll event does not trigger after component visible.
When contents don't fill the container at first, InfiniteScroll can not do anything.
I think when component hidden, it should create a observer to watch it if visible, and then emit 'scroll' event to compute should trigger callback or not.

yeah. when the element is invisible,may be its parent element or self invisible. now when trigger scroll event,it will check the element visible status,if true ,go on ,if false,just return. the scroll event like a observer.

yeah, but the problem is no scroll at first.
when component invisible, load will not trigger, and count equal 0. and then component invisible, but count still equal 0, there are no scroll and we have no way to trgger it. unless dispatch event
like this this.$refs.table.$el.dispatchEvent(new CustomEvent('scroll')).
template
...

{{ i }}

...

js
...
data() {
  return {
    count: 0
  }
}
...

scroll event does not trigger after component visible.
When contents don't fill the container at first, InfiniteScroll can not do anything.
I think when component hidden, it should create a observer to watch it if visible, and then emit 'scroll' event to compute should trigger callback or not.

yeah. when the element is invisible,may be its parent element or self invisible. now when trigger scroll event,it will check the element visible status,if true ,go on ,if false,just return. the scroll event like a observer.

yeah, but the problem is no scroll at first.
when component invisible, load will not trigger, and count equal 0. and then component visible, but count still equal 0, there are no scroll and we have no way to trgger it. unless dispatch event
like this this.$refs.table.$el.dispatchEvent(new CustomEvent('scroll')).
template
...

{{ i }}

...

js
...
data() {
  return {
    count: 0
  }
}
...

v-infinite-scroll directive will bind the container's  scroll event on inserted hooks. so if word is not correct.you can provider a reproduction link?

link
https://codepen.io/a631807682/pen/jgqqJy?editors=1011#0
i chang the link to //deploy-preview-16681--element.netlify.com/element-ui.4b9a2bf.js , is a way to provider a reproduction link?
setp

click change visible button
can not scroll ( contents don't fill the container what infinite-scroll-immediate do)

@qingdengyue

link
https://codepen.io/a631807682/pen/jgqqJy?editors=1011#0
i chang the link to //deploy-preview-16681--element.netlify.com/element-ui.4b9a2bf.js , is a way to provider a reproduction link?
setp

click change visible button
can not scroll ( contents don't fill the container what infinite-scroll-immediate do)

@qingdengyue

@qingdengyue same problem to me, please check the link above


chore(deps): upgrade dev dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-dev-dependencies-k8s-27-main" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 3210

Questions ?
Please refer to the Backport tool documentation


Please add support for artycok.tv

It hosts art-related videos mainly but not only somehow connected to the Czech Republic. It would be great if it were supported.

Post an example URL.

Ah, sorry, Ihad one ready but forgot to include it. The site is here: http://artycok.tv/lang/en-us/ but an example url would be here: http://artycok.tv/lang/cs-cz/27072/dox-alternativa-zvrchu
Youtube-dl actually tries to do something that looks smart but fails:
youtube-dl http://artycok.tv/lang/cs-cz/27072/dox-alternativa-zvrchu
[generic] dox-alternativa-zvrchu: Requesting header
WARNING: Falling back on generic information extractor.
[generic] dox-alternativa-zvrchu: Downloading webpage
[generic] dox-alternativa-zvrchu: Extracting information
[generic] apl_playlist: Downloading SMIL file
[download] Destination: DOX, alternativa shora on Artyčok-apl_playlist.flv
[rtmpdump] 0 bytes

ERROR: rtmpdump exited with code 1


Installation Guide, please add all the requirements

Please add that the following node libraries are required for installation:
-bower
-gulp
-grunt( not sure but in my experience installation did not work unril I installed it.)
It seems obvious but having spent half a day trying to  get it to work and with such a simple solution left me feeling quite frustrated. But otherwise thank you for this, and your active support.

This is stated in the Wiki:

Since Koel is written in Vue and Laravel, it is assumed that your server has npm and composer installed.

And that's about it actually. Bower and gulp will be automatically installed and used with npm install, and Grunt is not required.


hyperf使用redis报错了

[ERROR] No entry or class found for 'Hyperf\Redis\Redis'[79] in /home/hyperf-skeleton/vendor/hyperf/di/src/Container.php
[ERROR] #0 /home/hyperf-skeleton/vendor/hyperf/di/src/Container.php(117): Hyperf\Di\Container->make('Hyperf\\Redis\\Re...')
#1 /home/hyperf-skeleton/app/Controller/IndexController.php(33): Hyperf\Di\Container->get('Hyperf\\Redis\\Re...')
#2 /home/hyperf-skeleton/vendor/hyperf/http-server/src/CoreMiddleware.php(161): App\Controller\IndexController->index()
#3 /home/hyperf-skeleton/vendor/hyperf/http-server/src/CoreMiddleware.php(113): Hyperf\HttpServer\CoreMiddleware->handleFound(Object(Hyperf\HttpServer\Router\Dispatched), Object(Hyperf\HttpMessage\Server\Request))
#4 /home/hyperf-skeleton/vendor/hyperf/dispatcher/src/AbstractRequestHandler.php(64): Hyperf\HttpServer\CoreMiddleware->process(Object(Hyperf\HttpMessage\Server\Request), Object(Hyperf\Dispatcher\HttpRequestHandler))
#5 /home/hyperf-skeleton/vendor/hyperf/dispatcher/src/HttpRequestHandler.php(26): Hyperf\Dispatcher\AbstractRequestHandler->handleRequest(Object(Hyperf\HttpMessage\Server\Request))
#6 /home/hyperf-skeleton/vendor/hyperf/dispatcher/src/HttpDispatcher.php(40): Hyperf\Dispatcher\HttpRequestHandler->handle(Object(Hyperf\HttpMessage\Server\Request))
#7 /home/hyperf-skeleton/vendor/hyperf/http-server/src/Server.php(116): Hyperf\Dispatcher\HttpDispatcher->dispatch(Object(Hyperf\HttpMessage\Server\Request), Array, Object(Hyperf\HttpServer\CoreMiddleware))
#8 {main}

我看了下/vendor/hyperf/文件夹下并没有redis      我安装提示是成功的呀
`Continue as root/super user [yes]? y
Using version ^2.1 for hyperf/redis
./composer.json has been created
Running composer update hyperf/redis
Loading composer repositories with package information
Updating dependencies
Lock file operations: 7 installs, 0 updates, 0 removals

Locking doctrine/inflector (2.0.3)
Locking hyperf/contract (v2.1.3)
Locking hyperf/engine (v1.0.2)
Locking hyperf/pool (v2.1.0)
Locking hyperf/redis (v2.1.3)
Locking hyperf/utils (v2.1.5)
Locking psr/container (1.0.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 7 installs, 0 updates, 0 removals
Downloading hyperf/redis (v2.1.3)
Installing psr/container (1.0.0): Extracting archive
Installing hyperf/engine (v1.0.2): Extracting archive
Installing hyperf/contract (v2.1.3): Extracting archive
Installing doctrine/inflector (2.0.3): Extracting archive
Installing hyperf/utils (v2.1.5): Extracting archive
Installing hyperf/pool (v2.1.0): Extracting archive
Installing hyperf/redis (v2.1.3): Extracting archive
`

composer update -o


[Improvement] "You must log in first" error message should tell you how to login

What Happpened
I called an api endpoint like so (psuedo-code)
circleci.Client{Token: circleToken}.ListProjects()

and got this error message

401: You must log in first

What I Was Expecting
When I call an api endpoint without being authorized, I get an error message like this

401: You must log in first. You can log in via ...

To followup:

this was definitely user error on my part 😭
and the error should still be better
but since its piped straight back from CircleCI's api, it should be changed in the API (not this package). I'll make in issue there 🏃♀

:+1: thanks for the thoughts! I agree that given this library is just a light wrapper around the API, I would hesitate to modify Circle's response, but I welcome additional ideas to make this error clearer and easier to handle by users of the library.
Right now, you can look for an APIError with a StatusCode of 401 to identify unauthorized errors.

Yeah I think I'm gonna look for 401 and print the messages my coworkers would be expecting (eg. "Invalid API key" or similar)
Thanks for checking in ^_^!


⚠ Bofrost.gr has degraded performance

In 3a60fab, Bofrost.gr (https://www.bofrost.gr) experienced degraded performance:

HTTP code: 200
Response time: 10421 ms

Resolved: Bofrost.gr performance has improved in 7a4dec8 after 305 days, 14 hours, 18 minutes.


CX SQL_Injection @ core/appHandler.js [master]

SQL_Injection issue exists @ core/appHandler.js in branch master
The application's function method executes an SQL query with query, at line 11 of core\appHandler.js. The application constructs this SQL query by embedding an untrusted string into the query without proper sanitization. The concatenated string is submitted to the database, where it is parsed and executed accordingly.
An attacker would be able to inject arbitrary syntax and data into the SQL query, by crafting a malicious payload and providing it via the input login; this input is then read by the function method at line 10 of core\appHandler.js. This input then flows through the code, into a query and to the database server - without sanitization.
This may enable an SQL Injection attack.

Issue still exists.

Issue still exists.

Issue still exists.

Issue still exists.

Issue still exists.


App is slowing down because of a post request being sent every second in background

A post request is being sent to "https://monorail-edge.shopifysvc.com/v1/produce" every second in app background. The issue appeared after updating the app to the latest version. Attaching a snapshot that shows number of requests that were sent in about half hour. It keeps on going up without ever stopping. This is dramatically slowing down the app.

Kindly help,
Best Regards
Prashant Angiras

This is down to the session token request that happens every two seconds by default.
You can do what I've done in my own apps and change to using an interceptor within AXIOS and stop the polling from happening inside token_handler.blade
Or just up the SESSION_TOKEN_REFRESH_INTERVAL interval to a higher number. Session tokens are valid for around 60 seconds anyways.
it might be worth moving this refresh time into a ENV var so it can be controller a bit better.

@pangiras I got same problem can you explain how you have done with sample plz

Hi @Noido
The solution is in my comment above ☝

Thanks @Kyon147 i have try add that in my .env but not work
SESSION_TOKEN_REFRESH_INTERVAL=3600000

Hi @Noido
It is not an ENV setting at the moment. If you read my solution above you'll see you need to go to the token_handler.blade file which is in the vendor folder as part of the osiset/laravel-shopify-package package.

Thnkas @Kyon147 it s ok now
But got a little bug when i click on a link i got 3 to 5 produce call it s normal ?


Support mydomain.com and www.mydomain.com in same certificate

Would be useful to add info on how SAN is used to create one secrtificate for www and non www version of a domain

Agreed, I missed the reference to adding both names in the LetsEncrypt wizard and had a bit of trouble straightening out why. Making it explicit in the tutorial would be super!

That's a great point. I just updated the tutorial with a note: https://code.lengstorf.com/deploy-nodejs-ssl-digitalocean/#generate-the-ssl-certificate


ZOOM

Description of the new feature / enhancement
Please implement a feature that can be zoomed like on a touchpad but on the mouse. It would be wonderful ⭐⭐
Scenario when this would be used?
It can be used in the browser for example and could be activated with a key combination "CTRL + SHIFT + SCROLLING WHEEL"
Supporting information
No response

I think this might be an application by application thing. However maybe there is a way to override the behavior from an OS level.
What scenarios and in which applications would this be useful? /needinfo