DS-2777 : Fix OAI-PMH to work with Service API refactor

https://jira.duraspace.org/browse/DS-2777
This PR officially fixes OAI-PMH to work properly (at least at a minimal level) after the Service API refactor.  Note: I have not tested EVERY feature in OAI-PMH, but OAI-PMH now loads properly and functions at a basic level.
Involved the following:

Updates OAI-PMH to use the same 'applicationContext.xml' as all other webapps (to initialize DSpace Services)
Stops attempting to inject HandleService and just loads it via its provided Factory
Restores DSpaceSetRepository classes (accidentally removed during the initial refactor). They are required for OAI-PMH sets to work.
Adds a new CommunityService.findAll() method that supports limit/offset. I based this off the method of the same name/type in the CollectionService. This was required to support the DSpaceSetRepository.

@KevinVdV , if you have a moment, can you give this a sanity check?  It all seems to work, but I'd like your opinion as the Service-based API creator/expert.

Just realized the diff for the *SetRepository classes doesn't actually show up in this PR.  These classes both existed in 5.x. They were accidentally deleted during the API refactor, and they needed to be restored for OAI Sets to function.

The restored DSpaceSetRepositoryResolver class is unchanged between 5.x and pre-6.
But, the restored DSpaceSetRepository class needed to be updated to use the new Service-based API (previously it had hardcoded SQL queries). Here's the 5.x versions of this class for reference: https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-oai/src/main/java/org/dspace/xoai/services/impl/xoai/DSpaceSetRepository.java

exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.hibernate.hql.internal.ast.QuerySyntaxException: metadatavalue is not mapped [SELECT m FROM metadatavalue m WHERE metadata_field_i
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:965)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
root cause

org.hibernate.hql.internal.ast.QuerySyntaxException: metadatavalue is not mapped [SELECT m FROM metadatavalue m WHERE metadata_field_id = :metadata_field_id ORDER BY value]
    org.hibernate.hql.internal.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:180)
    org.hibernate.hql.internal.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:110)
    org.hibernate.hql.internal.ast.tree.FromClause.addFromElement(FromClause.java:93)
    org.hibernate.hql.internal.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:325)
    org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3544)
    org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:3433)
    org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:708)
    org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:564)
    org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:301)
    org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:249)
    org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:250)
    org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185)
    org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:138)
    org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:104)
    org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:79)
    org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:168)
    org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:222)
    org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:200)
    org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1739)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:606)
    org.hibernate.context.internal.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:352)
    com.sun.proxy.$Proxy79.createQuery(Unknown Source)
    org.dspace.core.AbstractHibernateDAO.createQuery(AbstractHibernateDAO.java:108)
    org.dspace.content.dao.impl.MetadataValueDAOImpl.getMinimum(MetadataValueDAOImpl.java:64)
    org.dspace.content.MetadataValueServiceImpl.getMinimum(MetadataValueServiceImpl.java:110)
    org.dspace.xoai.services.impl.DSpaceEarliestDateResolver.getEarliestDate(DSpaceEarliestDateResolver.java:36)
    org.dspace.xoai.services.impl.xoai.DSpaceRepositoryConfiguration.getEarliestDate(DSpaceRepositoryConfiguration.java:95)
    com.lyncode.xoai.dataprovider.handlers.IdentifyHandler.handle(IdentifyHandler.java:44)
    com.lyncode.xoai.dataprovider.OAIDataProvider.handle(OAIDataProvider.java:198)
    org.dspace.xoai.controller.DSpaceOAIDataProvider.contextAction(DSpaceOAIDataProvider.java:104)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:606)
    org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
    org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
    org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
    org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:743)
    org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:672)
    org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:82)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:933)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

Yeah looking at that hql query it should be "WHERE m.metadata_field_id = " instead of "WHERE metadata_field_id =".

I'm not following where/how this error occurs?  More context would be nice here, as this error seems unrelated to my fixes.  The goal of this PR is to get OAI-PMH to actually run...at least on my end, it now runs (though I haven't fully tested all OAI-PMH functionality quite yet).
Currently on "master" the OAI-PMH interface doesn't even load...an immediate error is thrown and a blank screen appears.

I got the stack trace in the browser after loading /oai/request?verb=Identify
After fixing the query (case sensitive table/class name), OAI started up for me:
https://github.com/tdonohue/DSpace/pull/5
Unrelated to this issue, the query above also seems sketchy, there is no metadataField column in the metadatavalue table. As far as I can see, this query is not yet called from anywhere. @KevinVdV, can you please confirm?
https://github.com/tdonohue/DSpace/blob/57eae5388941a9f96a44d85b49730c3b806f70fa/dspace-api/src/main/java/org/dspace/content/dao/impl/MetadataValueDAOImpl.java#L53

Next issue:
$ /dspace/bin/dspace oai import -c
OAI 2.0 manager action started
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.dspace.xoai.app.XOAI': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.dspace.authorize.service.AuthorizeService org.dspace.xoai.app.XOAI.authorizeService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.dspace.authorize.service.AuthorizeService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.inject.Inject()}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:298)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1148)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBean(AbstractAutowireCapableBeanFactory.java:299)
at org.dspace.xoai.app.XOAI.main(XOAI.java:382)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.dspace.authorize.service.AuthorizeService org.dspace.xoai.app.XOAI.authorizeService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.dspace.authorize.service.AuthorizeService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.inject.Inject()}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:531)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:295)
... 9 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.dspace.authorize.service.AuthorizeService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.inject.Inject()}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:997)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:867)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:779)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:503)
... 11 more

I've merged @helix84's bug fix to MetadataValueDAOImpl into this branch, after confirming that it works correctly.
There are still "known" issues with the CLI tools. They don't yet load our ServiceManager properly. But, at this point, the webapp itself should "work".  (I'll dig around into the CLI tooling next)

Just pushed up two fixes which allow "dspace oai import -c" to function without throwing an error.
However, oddly, it doesn't seem to find any content to index.  So, it returns successfully, but always says that it indexed "0" items.  I'm guessing something may still be wrong with the Hibernate queries here?
$ ./dspace oai import -c
OAI 2.0 manager action started
Clearing index
Index cleared
Using full import.
Full import
Total: 0 items
OAI 2.0 manager action ended. It took 4 seconds

Pushed up a new fix.

The dates should be compared as Timestamps, since the Item "last_modified" column is defined as a Timestamp: https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/content/Item.java#L58
When a full reindex is performed, the date is passed as "null". So we need to account for that.

One final fix.  OAI-PMH now loads for me, and ./dspace oai import -c now functions properly and indexes all content.

Solr's schema must treat Item IDs as UUIDs (instead of integers)

This PR is ready for review & merging.

Tested this pull request & the OAI is operational, the code looks good so +1 from me.

Great work, Tim. Regarding null in last_modified, I only had one such item which looks like this:
item_id,in_archive,withdrawn,last_modified,discoverable,uuid,submitter_id,owning_collection
4720,f,f,,t,c7ddd4cc-7ec8-46d2-b20a-395ead851cf9,,
It's some kind of item that's not in archive. Perhaps special handling of these items will be needed because oai import should also keep track of deleted items:
https://jira.duraspace.org/browse/DS-527
One more hiccup during import:
java.lang.NullPointerException
at org.dspace.xoai.util.ItemUtils.retrieveMetadata(ItemUtils.java:171)
at org.dspace.xoai.app.XOAI.index(XOAI.java:267)
at org.dspace.xoai.app.XOAI.index(XOAI.java:209)
at org.dspace.xoai.app.XOAI.indexAll(XOAI.java:196)
at org.dspace.xoai.app.XOAI.index(XOAI.java:143)
at org.dspace.xoai.app.XOAI.main(XOAI.java:393)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)

@helix84 This "nullpointer" is part of an another problem that I ran into while testing: https://jira.duraspace.org/browse/DS-2807. Since it is unrelated to the OAI I don't want to hold it against this pull request. (The view item page will also be broken because of this bug).

@helix84 , you misunderstood my statement about accounting for "null". It's not that the data is null, it's that null gets passed into the method as the last modified date.  This line to be exact:
https://github.com/DSpace/DSpace/blob/master/dspace-oai/src/main/java/org/dspace/xoai/app/XOAI.java#L185
In any case, I agree with @KevinVdV that we probably should get this merged ASAP. It minimally "works" and allows others to use (or build PRs against) OAI-PMH.  There may still be other bugs around, but they should be fixed in new PRs

:+1:


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-target/pull/1087 is merged into live branch.
Auto archive content to https://github.com/opstest2/docs-archive-test-target.git

Docs Build status updates of commit 9ba1173:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error: GitBranchDeletedOrForcePushed] Cannot sync git repo to specified commit because branch Release_Archive_main_2022-03-14-05-51-29 has been deleted or has been force pushed

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


pgapp:with_transaction() does not work as expected

The README file contains this example:
    pgapp:with_transaction(fun() ->
                                 pgapp:squery("update ..."),
                                 pgapp:squery("delete from ..."),
                                 pgapp:equery("select ? from ?", ["*", Table])
                           end).

The problem in this approach is that "BEGIN" and "COMMIT" actually happens in one connection, but all the queries inside happens in another.
Look at the following code of pgapp_worker.erl:
equery(PoolName, Sql, Params, Timeout) ->
    middle_man_transaction(PoolName,
                           fun (W) ->
                                   gen_server:call(W, {equery, Sql, Params},
                                                   Timeout)
                           end, Timeout).
...
with_transaction(PoolName, Fun, Timeout) ->
    middle_man_transaction(PoolName,
                           fun (W) ->
                                   gen_server:call(W, {transaction, Fun},
                                                   Timeout)
                           end, Timeout).

middle_man_transaction() will dedicate a separate poolboy worker for each query, including a transaction itself. So when with_transaction() is called, it gets a poolboy worker and runs "BEGIN" in it (inside epsql.erl). Thus the worker is busy waiting for the queries to be executed. But the queries run as separate calls to poolboy which means they get different workers.

Ah, now I see. There is a trick:
squery(Sql) ->
    case get(?STATE_VAR) of
        undefined ->
            squery(epgsql_pool, Sql);
        Conn ->
            epgsql:squery(Conn, Sql)
    end.

But the trick only does its work when you do not specify PoolName explicitly.
So this works:
    pgapp:with_transaction(fun() ->
                                 pgapp:squery("update ..."),
                                 pgapp:squery("delete from ..."),
                                 pgapp:equery("select ? from ?", ["*", Table])
                           end).

But this doesn't:
    pgapp:with_transaction(pool1, fun() ->
                                 pgapp:squery(pool1, "update ..."),
                                 pgapp:squery(pool1, "delete from ..."),
                                 pgapp:equery(pool1, "select ? from ?", ["*", Table])
                           end).

I think @edhollandAL wrote some of this code - have time to take a look?

Just made a fix for the issue. Please have a look.

Thinking out loud: rather than using the process dictionary, is there a way to, say, pass the Conn into the fun() or something?

@lukyanov it's intended behaviour, You shouldn't be able to specify Pool (and Timeout) in squery/equery functions that are running inside with_transaction, so yes, in your second example:
    pgapp:with_transaction(pool1, fun() ->
                                 pgapp:squery(pool1, "update ..."),
                                 pgapp:squery(pool1, "delete from ..."),
                                 pgapp:equery(pool1, "select ? from ?", ["*", Table])
                           end).

Functions inside fun() -> ...  end will be executed outside of transaction scope.
I agree that README is not comprehensive enough and I suggest that it should be fixed instead of current behaviour.

Ok, I see now. But then I would agree with @davidw that passing Conn would be a better approach here. The problem in the current approach is that it is not possible to have nested transactions.
doing_stuff1/0 below would not work as a transaction:
doing_stuff1() ->
    pgapp:with_transaction(pool1, fun() ->
                                 pgapp:squery("update ..."),
                                 doing_stuff2()
                           end).

doing_stuff2() ->
    pgapp:with_transaction(pool1, fun() ->
                                 pgapp:squery("update ..."),
                           end).

You will need explicit communication about the connection you are using.

New variant of the changes: https://github.com/epgsql/pgapp/pull/23

@lukyanov: postgres does not have true subtransactions feature - so the example code you show would not work as intended anyway

I like the new code without the process dictionary - it feels cleaner in any case.  Other thoughts?

I made another PR which is an alternative for #23: https://github.com/epgsql/pgapp/pull/24
@davidw While I agree with you that operating directly with the connection looks clearer and more comprehensible, using kind of 'dirty' approach with process dictionary has the following advantages:

It does not break backwards compatibility of the library (otherwise all who are using pgapp would need to rewrite there code around with_transaction calls when updated).

The usage of with_transaction is more handful when you are not thinking in terms of connections. It hides unnecessary details. Imagine the following code:
register_user() ->
   pgapp:with_transaction(fun() ->
         users:create_user(),
         stats:update_stats()
   end).

users:create_user() and stats:update_stats() may be independent functions which, in a different context` is called separately. Here they need to be called together inside a transaction. If you are forced to work with the connection directly, you would need to pass it to those functions, which may break the abstraction you intended to have when creating the functions.

Thanks for the updated PR @lukyanov, I agree that the benefits you cite above are important and should be maintained. The register_user example makes a compelling case for supporting the pseudo-nested transactions. I'm less clear on the use case for supporting the cross-connection transactions.
If we allow this it is possible (likely) a user will attempt to create some sort of distributed  transaction mechanism on top of pgapp; without proper two phase commit (which is only available as postgres extension) any such implementation would bound to be unreliable. I'm not sure that's something the project is willing to support.

@edholland Thanks for the response!
Let me more clear on the second point which you mention as cross-connection transactions.
My point here is not to support complex multi-connection transactions. It is rather to make pgapp aware of the same connection inside the with_transaction callback. When you call with_transaction on the pool pool1 and use pool1 inside the callback, I want pgapp to assume that your intention is to use the same connection.
By the way, the example with register_user is also very good to support my point if we consider the app which uses multiple connection pools. Let me extend the example:
register_user() ->
   pgapp:with_transaction(pool1, fun() ->
         users:create_user(),
         stats:update_stats()
   end).

% module users.erl
create_user() ->
   pgapp:with_transaction(pool1, fun() ->
      pgapp:squery("insert ..."),
      pgapp:squery("update ...")
   end).

% module stats.erl
update_stats() ->
   pgapp:squery(pool1, "update ...").

So, my app uses different databases so I need a connection pool for each database. This means I must specify a pool I want to use every time I do a query or start a transaction. In the example above all the queries are for pool1. Here is the point. users:create_user() and stats:update_stats() are dedicated functions which may be called separately in a different context. So we cannot omit pool1 as an argument in pgapp:with_transaction and pgapp:squery. But here they are called within a single transaction. The equivalent query sequence would look like this:
register_user() ->
   pgapp:with_transaction(pool1, fun() ->
      pgapp:squery("insert ..."),
      pgapp:squery("update ...")
      pgapp:squery(pool1, "update ...").
   end).

In the current pgapp code this approach won't work because the last query contains pool1 as a first argument. pgapp will use a separate poolboy worker and the transaction will only contain first two queries.
P.S.

If we allow this it is possible (likely) a user will attempt to create some sort of distributed transaction mechanism on top of pgapp

We cannot stop the user doing something like this anyway, even in the current pgapp version. Anyone is and was able to specify a pool name inside the callback.

In your examples you're using pool1 for all queries, if this is behaviour required then you can just omit the poolname. Assuming that the inner pool should be pool2, as below, then it's possible that the update on pool2 succeeded while the sql on pool1 is rollback. We currently don't support this behaviour by serialising all calls within a transaction to a single connection
register_user() ->
   pgapp:with_transaction(pool1, fun() ->
      pgapp:squery("insert ..."),
      pgapp:squery("update ...")
      pgapp:squery(pool2, "update ...").
   end).

@edholland For the same reason it is ok to allow to specify timeout inside the callback. It must be ignored by pgapp, that's true, but it should not be prohibited as the same function may work differently depending on whether it was called inside the transaction or as standalone.

@edholland My example is correct. All queries are using pool1. That is the intention. And I cannot ommit pool1, because update_stats() is a standalone function.

I'll have to think about this some, but I do think that, given the small number of users, if we need to change the API to improve the code, it's best to do so.

Couldn't this issue be simplified by not running the queries in a worker? Instead use the pool only to checkout a connection, use it and return it? This would also help solve #20 .


Load profile support for sql project deploy

This PR fixes #10924. This adds support for reading database name and SQLCMD variables from a publish profile. Support for other profile options will be added in later PRs.

Right now, the only indication that the profile has been loaded is that the database name changes if it was different in the profile. I created #10947 to track showing the loaded SQLCMD variables (support for editing them in the UI can come later).

Coverage remained the same at 35.027% when pulling 3351bb53a33afac9050d3a1ca4ad628c9a64f1f9 on kisantia/profileSqlCmd into fb4e4009196b18806e9fa6630094bb97c51b815d on main.


Remove continue-on-error from github actions

The intention of this option was that as long as compilation succeeded
we would run all test steps, even if some one of the test steps failed.
This would allows us to potentially find multiple failures in a single
build instead of just the first failure.
Unfortunately, this option just makes it so the step is considered a
success regardless of pass/fail, so this actually hid errors. We
definitely don't want that, so remove the option where it is used.
DAFFODIL-2215

Codecov Report

Merging #277 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master    #277   +/-   ##
======================================
  Coverage    80.5%   80.5%
======================================
  Files         394     394
  Lines       23312   23312
  Branches     2712    2749   +37
======================================
  Hits        18767   18767
  Misses       4545    4545

Continue to review full report at Codecov.

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


Test failed : Expected spy init to have been called

I'm creating an angular application with ui-tinymce.
I tried to test my code, bu that test (same in ui-tinymce source) fail :
 it('should save signature calling Api', function () {
        httpBackend.when('GET', 'api/signature').respond({});
        spyOn(tinymce, 'init');
        compile();
        expect(tinymce.init).toHaveBeenCalled();
    })

And here the full code :
   describe('controllers', function () {
    beforeEach(module('lsi.controllers'));
    beforeEach(module('lsi.services'));
    beforeEach(module('ngResource'));
    beforeEach(module('ui.tinymce'));
    beforeEach(module('oitozero.ngSweetAlert'));

describe('Signature Controller', function () {

    var scope, rootScope, httpBackend, api, $compile, $timeout, element, directiveElement, id;

    beforeEach(function() {
        // throw some garbage in the tinymce cfg to be sure it's getting thru to the directive
        angular.module('ui.tinymce').value('uiTinymceConfig', {tinymce: {bar: 'baz'}});
    });

    beforeEach(inject(function ($rootScope, $controller, $httpBackend, $resource, $http, Api, _$compile_, _$timeout_) {

        scope       = $rootScope.$new();
        rootScope   = $rootScope;
        httpBackend = $httpBackend;
        api         = Api;
        $compile    = _$compile_;
        $timeout    = _$timeout_;

        $controller('SignatureController', {
            $scope: scope,
            Api : Api,
            $http: $http
        });
    }));

    afterEach(function() {
        angular.module('ui.tinymce').value('uiTinymceConfig', {});
        tinymce.remove('textarea');
    });

    function compile() {
        element = $compile('<form><textarea ui-tinymce="{foo: \'bar\', setup: setupFooBar }" data-ng-model="foo"></textarea></form>')(scope);
        angular.element(document.getElementsByTagName('body')[0]).append(element);
        scope.$apply();
        $timeout.flush();
        directiveElement = element.find('textarea');
        id = directiveElement.attr('id');
    }

    it('should initialize an empty signature', function () {
        expect(scope.signature).toEqual({
            name : '',
            content : '',
            client : null
        });
    });

    it('should save signature calling Api', function () {
        httpBackend.when('GET', 'api/signature').respond({});
        spyOn(tinymce, 'init');
        compile();
        expect(tinymce.init).toHaveBeenCalled();
    })
});
});

Thank !
`

Why do you need to add that test to your code? What exactly are you trying to test?
I am going to close this issue as I don't believe there is a bug, but I can continue to help you if you comment back here.

I'm creating a web application with angularJS.
I would test that tiny mce is correctly initialized in my controller.
My controller :
angular.module('lsi.controllers', ['ui.tinymce', 'oitozero.ngSweetAlert'])
    .controller('SignatureController', function ($scope, Api, $http, $sce, SweetAlert, $q) {

        $scope.tinymceOptions = {
            setup: function (editor) {
                $scope.editor = editor;
                editor.on("change", function () {
                    $scope.content = $sce.trustAsHtml(editor.getContent());
                });
            },
            inline: false,
            plugins: 'image textcolor colorpicker',
            image_advtab: true,
            menubar: 'file edit format',
            toolbar: 'undo redo | ' +
            'bold italic underline | ' +
            'link hr | ' +
            'alignleft aligncenter alignright | ' +
            'blockquote bullist numlist outdent indent | ' +
            'image | ' +
            'forecolor backcolor gold',
            skin: 'lightgray',
            theme: 'modern'
        };

    });

If I were testing this controller, I would just test that $scope.tinymceOptions is an object and test any values of the configuration on that object that you want to make sure is correct.
I would argue you do not need to test tinymce initializing as part of this controller.
Let me know if you need any more help.

Tank for your help.
Just another question, how can I test edtir on change event ?
In my example to test $scope.content has changed.

Not sure what testing framework you are using, but the general concept I would use is:

Get a handle on $scope.tinymceOptions
Call $scope.tinymceOptions.setup(spy) while passing in a spy you make for editor.
Verify $scope.editor is the spy
Verify editor.on spy is called with correct arguments
Then you can get ahold of the second argument of the call to '.on' if you want and call that and verify $scope.content get sets correctly
** You can have your spy, editor.getContent return a known value so you can test $scope.content

Hope that helps.

It works, thanks for your help.


#215 createkeyfn use namedb

the createKeyAttributes and createToKeyFn did not use the nameDb definition if it was defined

closes #215

Coverage decreased (-0.09%) to 94.806% when pulling ae086d760d0cff0678636ea3d6bef8cfd1198352 on #215-createkeyfn-use-namedb into fb45e71d7537374880d346ff0e926ecf52d7b998 on master.

@simonmumenthaler Could you please review and merge this? 🙏

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


tests: move TypeScript test to its own suite

As discussed with @gerhard and it order to improve current CI, I'm making an experimentation by moving the TypeScript tests to its own suite so we can run it independently from other's suites.
The long term idea is to move group of tests into their suites so they can be run into different engine and hopefully remove flakes.
Local CI run: https://dagger.cloud/Quartz/traces/a2c3a4a24346f31efac7dc52f23b6137
I'll try to paralize some tests and see if it can also make it faster.
@gerhard I let you create a GA job to run this suite 🚀
Local CI took 7minutes to exec tests (https://dagger.cloud/Quartz/traces/a2c3a4a24346f31efac7dc52f23b6137#7c9a8264d0620b45) (4 min setup on my local machine)

It seems I cannot add t.Parallel because everything is already parallized.
panic: testing: t.Parallel called multiple times [recovered]
        panic: testing: t.Parallel called multiple times

I'm not sure I can also mutualize connect since it might break traces... I'm looking for some optimization

It seems I cannot add t.Parallel because everything is already parallized.

See the test middleware WithParallel introduced in https://github.com/dagger/dagger/pull/7532. If the tests are run with that middleware, they're already in parallel and can't be parallelized again.

See the test middleware WithParallel introduced in https://github.com/dagger/dagger/pull/7532. If the tests are run with that middleware, they're already in parallel and can't be parallelized again.

Yep exactly! I'm not sure I have much area to optimize the TS test generally, it's still going decently but some tests are still long and traces are not as helpful.


Parse error

Lately, I have seen a lot of errors like this in my logs. I do not yet have enough information on the particular Redis instance that is producing this, but I will investigate it further. I wanted to open an issue though in case anybody knows what could produce an error like this. Note that the error does not come from ioredis itself but from the module "redis-parser" (https://www.npmjs.com/package/redis-parser) I am a bit worried that this module which has not been maintained in 6 years may have issues with newer versions of Redis 🤔
"Protocol error, got \"S\" as reply type byte. Please report this.",
        "stack": "ParserError: Protocol error, got \"S\" as reply type byte. Please report this.\n    at handleError (/var/www/server/node_modules/redis-parser/lib/parser.js:190:15)\n    at parseType (/var/www/server/node_modules/redis-parser/lib/parser.js:304:14)",

There are similar issues reported already but no action has been taken: https://github.com/NodeRedis/node-redis-parser/issues/64


Adding sections to reports via {'type':'break'} element.

Reports can now be split up into multiple sections using "white-band" divs.

Coverage increased (+0.08%) to 91.788% when pulling 60883296de262fe927b76e9fc329f08f7ac716e0 on report-sections into 2b5c7fd6683731b3b75e9c841cee2003b69daa4f on search-pagination.


Update normalize to ^4.0.0

Added an additional test for box-sizing and fixed the test path

lg2m


Scalar Flow Type does not exist in imported subsystem

https://github.com/modelint/shlaer-mellor-metamodel/blob/e96cbdb2eb04550820b3726c23f190d7fa41e0fa/action-language-metamodel/access-action-subsystem/access-action-subsystem.xmm#L89

I'm going to review this once I finish the Event Specification Subsystem.  Those names are going to shift around a bit as I make progress. Will announce when I feel they are reasonably stable.


Individual in biodata

Adds Individual to biodata protocol and updates the branch with the latest master schema (which now includes variant annotation, hence all the extra commits).
This functionality will allow more metadata to be stored regarding individual samples, as well as the individual a sample may derive from.
Endpoints added:

POST /biosamples/search
GET /biosamples/<id>
POST /individuals/search
GET /individuals/<id>

Endpoints altered:

callsets/search has optional bioSampleId field
readgroupsets/search has optional bioSampleId field

Most importantly:
https://github.com/david4096/schemas/blob/biodata/src/main/resources/avro/biodatamethods.avdl
https://github.com/david4096/schemas/blob/biodata/src/main/resources/avro/biodata.avdl

@david4096 I had added some more time format documentation to /doc/source/api/metadata.rst, as req. by @diekhans. Should find its way in somewhere...
https://github.com/mbaudis/schemas/blob/biosample/doc/source/api/metadata.rst

Added @mbaudis' updated metadata docs with the modification: createTime -> createDateTime and updateTime -> updateDateTime.


refactor(lnurl-auth): better user pairing with LnurlAuthUserPairingService

Resolves #112.
Note: This is a breaking change!
Replaces LnurlAuthPairingService with LnurlAuthUserPairingService.
This should make it more clear what a downstream implementation should provide and has more flexibility regarding persistence.
e.g. before a user has always been retrieved with UserDetailsService#loadUserByUsername.

@straumat can you look over the changes and report if that would serve your needs? :pray:

@theborakompanioni yes, i just wait for https://github.com/theborakompanioni/bitcoin-spring-boot-starter/issues/118 to implement it

is there a build on a repository I could use to make my test?

is there a build on a repository I could use to make my test?

refactor~lnurl-auth-pairing-service-SNAPSHOT - still building though :sweat_smile:

@theborakompanioni great! Will try to implement it this week-end

@theborakompanioni great! Will try to implement it this week-end

Great - with your approval, I will merge it release v0.13.0 soon. :raised_hands:

Thanks for the update. I plan to try the latest release on monday.
The blog post is out : https://lab.scub.net/authentication-made-simple-with-bitcoin-java-5cb07c883b5f?fbclid=IwAR2SO6oXcJ1BSBFRmNUppLFl2JmOB-BqO99mMuXYXwFgj5wEasPAqzTf6mk

Thanks for the update. I plan to try the latest release on monday. The blog post is out : https://lab.scub.net/authentication-made-simple-with-bitcoin-java-5cb07c883b5f?fbclid=IwAR2SO6oXcJ1BSBFRmNUppLFl2JmOB-BqO99mMuXYXwFgj5wEasPAqzTf6mk

:orange_heart: :muscle:

HI. I think I might need some help on my unit tests:
In my UserDetailsServiceTest, I'm testing my loadUserByUsername method
I used to simulate a lnurlAuthPairingService.pairK1WithLinkingKey(user1K1Test1, user1LinkingKeyTest1);
That would create a user. how can I do it now ?

Sorry, i forgot to push my code. I implemented the new methods here and there.
But in my unit test, i have to call pairK1WithLinkingKey() with a SignedLnurlAuth
To do so,  : create(LnurlAuth lnurlAuth, LinkingKey linkingKey, Signature signature)
In my test, what parameters should I give to the create method that would work ?

I tried this, what do you think for a unit test:
// New user.
String user1K1Value = "e2af6254a8df433264fa23f67eb8188635d15ce883e8fc020989d5f82ae6f11e";
String user1linkingKey1Value = "02c3b844b8104f0c1b15c507774c9ba7fc609f58f343b9b149122e944dd20c9362";
K1 user1K1Test1 = SimpleK1.fromHex(user1K1Value);
LinkingKey user1LinkingKeyTest1 = SimpleLinkingKey.fromHex(user1linkingKey1Value);

// We create a new user.
SimpleLnurlAuth simpleLnurlAuth = SimpleLnurlAuth.create(new URI("http://locahost"), user1K1Test1);
Signature signature = SimpleSignature.fromHex("3046022100cd9f98eb6cda6d0b5f479a1709baed16d8e09e49a697d1f2a5315b933b29ff65022100983e4c03206656c67d849c142d55d7c6c80ec70b87a01bbffa6fb71464381b4e");
SignedLnurlAuth user1SignedLnurlAuth = SimpleSignedLnurlAuth.create(simpleLnurlAuth, user1LinkingKeyTest1, signature);
lnurlAuthPairingService.pairUserWithK1(user1SignedLnurlAuth);

maybe you should take a look at https://github.com/theborakompanioni/bitcoin-spring-boot-starter/issues/122 before releasing

It works! you can release!


Add GitHub actions to build master and each PR

Add GitHub actions to build master and each PR.
I did not see a Makefile target to build for Windows, so I did not add the stanzas for that.
There are also no integration tests otherwise they could be added as well.
This PR additionally moves from Go 1.12 to Go 1.13 because of the modules support, which allows to not have a deps target anymore, since Go does that automatically. Build was failing without upgrading to Go 1.13

This is cool! We now don't need to do deps manually.
But do you know whether it still work when I concurrently build doh-server and doh-client at the same time by issuing make -j999 if I remove deps?

But do you know whether it still works when I concurrently build doh-server and doh-client at the same time by issuing make -j999 if I remove deps?

Go handles that gracefully, it locks the file objects it uses from within the Go build cache.


display message when control results are empty

User Story
When viewing a node report on the node details screen of Automate, we show users "results" and "source" sections.
Sometimes a control does not have tests:

In these cases, the results section is empty and the ui appears broken.
I discussed this with ux (@jonong1972) and we concluded some kind of wording would be the best way to resolve this (i.e. "No tests were executed")
Designs
Before

After

Definition of Done
UI shows something /doesn't look broken when viewing a control with no results.

@vjeffrey - Any way to populate a result that doesn't have a test associated?  I've looked through the adding data documentation but this seems to be a far more specific scenario

oh yes, let me spin up a quick profile -- you can then upload profile into automate and use it for a scan job to get an example report

my-test-tagging-0.2.0.tar.gz


cannot unpack non-iterable NoneType object

TypeError:
Uploading 075251ac-edaa-4e24-b72a-03530e5336a1.zip…
Traceback:
File "C:\Users\hourp\anaconda3\envs\MoneyPrinterTurbo\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 542, in _run_script
exec(code, module.dict)
File "C:\Users\hourp\Downloads\MoneyPrinterTurbo-main\webui\Main.py", line 376, in
tm.start(task_id=task_id, params=params)
File "C:\Users\hourp\Downloads\MoneyPrinterTurbo-main\app\services\task.py", line 158, in start
video.generate_video(video_path=combined_video_path,
File "C:\Users\hourp\Downloads\MoneyPrinterTurbo-main\app\services\video.py", line 225, in generate_video
sub = SubtitlesClip(subtitles=subtitle_path, make_textclip=generator, encoding='utf-8')
File "C:\Users\hourp\anaconda3\envs\MoneyPrinterTurbo\lib\site-packages\moviepy\video\tools\subtitles.py", line 69, in init
self.duration = max([tb for ((ta, tb), txt) in self.subtitles])
File "C:\Users\hourp\anaconda3\envs\MoneyPrinterTurbo\lib\site-packages\moviepy\video\tools\subtitles.py", line 69, in
self.duration = max([tb for ((ta, tb), txt) in self.subtitles])

Thank you for your feedback.
Could you please package and upload the subtitle.srt, audio.mp3 and script.json files from the task output directory here?
This will help me locate and resolve the issue.
Thank you.

It has been fixed.
You can try again after updating the code.
If there are any issues, feel free to provide feedback.

thank you so much, appreciated your hard work <3


Generalize add and eq methods of PolynomialTensor

As discussed in #240, we should be able to add and compare PolynomialTensors with different sets of keys (if the key is not present then it counts as the zero tensor). Currently, attempting these operations raises an error.

+1, closed the old issue. The only thing remaining from the old issue is to add new tests addressing Python 2/3 differences. Importing dict from builtins is one good way to address this for the class, but we could also do something more order independent (with the downside perhaps of more time).

@kevinsung and @idk3, quick clarification question. Did you resolve in #240 that:

Attempting to add, subtract, and multiply PolynomialTensors of differing keys should always raise a ValueError (instead of the current TypeError)
OR that
Attempting to add, subtract, and multiply PolynomialTensors of differing keys should be permissible iff the differing keys correspond to zero-arrays. If the differing keys correspond to non-zero arrays then we should raise a ValueError.
OR that
Attempting to add, subtract, and multiply PolynomialTensors of differing keys should always be permitted. Differing keys should be incorporated into the result.

The last one (everything should always be allowed). A lack of key should be considered the presence of a zero tensor (array of all zeros).


pliny install on mac with any command segfaults

When running pliny install on mac results in segfault e.g.
zsh: segmentation fault  pliny install add-classic

There is no additional output
To Reproduce
Steps to reproduce the behavior:

Install pliny as per instructions: npm i -g @pliny/cli (pliny --version outputs '0.0.5')
Try to use pliny install e.g. pliny install add-blog ContentDir=content ContentName=Blog
See error: zsh: segmentation fault  pliny install add-blog ContentDir=content ContentName=Blog

Note that pliny install works and puts up a prompt. if you select any option from list it seg faults.
Expected behavior
Command to work and add the template.
Screenshots
If applicable, add screenshots to help explain your problem.
System Info (if dev / build issue):
Output of version command
@pliny/cli/0.0.5 darwin-x64 node-v16.5.0

Fixed in https://github.com/timlrx/pliny/pull/74 and published as 0.0.6


[HUDI-7874] Ensure Parquet can interoperate different level structures

Change Logs
Continuation of https://github.com/apache/hudi/pull/11450 for 0.x branch.
The issue still reproduces with the previous code and still fixes with this PR.
The biggest difference for me between 1.x and 0.x is that collected rows have different order of fields(even if I have the same level settings between writes). But if I compare by field names - works correctly.
If I use default spark Row equals - it shows different order + in problematic cases loses arrays replacing them with null(as in the initial issue).
Impact
Users should have no impact except now will not loose data/experience errors in certain setups.
Risk level (write none, low medium or high below)
Medium - since logic is complicated and I'm not aware of all potential use-cases, but at least existing tests pass + custom ones created which should cover 20 possible combinations(initialLevel, listNullability, targetLevel, listItemsNullability) - with levels covering 2 explicit setting and the default one.
Documentation Update
Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".

The config description must be updated if new configs are added or the default value of the configs are changed
Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
ticket number here and follow the instruction to make
changes to the website.

Contributor's checklist

[ ] Read through contributor's guide
[ ] Change Logs and Impact were stated clearly
[ ] Adequate tests were added if applicable
[ ] CI passed

@yihua you can merge if you plan so


Removing the quimb backend from lightning.tensor

Context: This PR removes the quimb backend and the corresponding interface from the lightning.tensor device. Instead, a new default.tensor device has been introduced in PennyLane. Due to requirements change, it has been decided to create a default.tensor device and move it to the PennyLane repository.
Description of the Change: As above.
Benefits: Having two separate devices simplifies the distinction between the C++ and the Python components. The relationship between lightning.tensor and default.tensor will be similar to that between lightning.qubit and default.qubit.
Possible Drawbacks: As we are removing an interface from an existing device, all the codes using the quimb interface in lightning.tensor now should use default.tensor, which lives in a different repository.
Related GitHub Issues: None.
Related Shortcut Stories:
[sc-63277]
[sc-62257]

Once the PR is update and green, I'll approve.

@mlxd I am updating it now, but I am afraid it will never be green since our friend @codecov will fail anyway (although all lines are covered by tests)


Avoid calling 'this.emit' when 'this.newListener' is false

Instead of always calling this.emit from EventEmitter.prototype.on and making the check for this.newListener in the emit method, wouldn't it be better just to make a conditional call to this.emit from EventEmitter.prototype.on only if this.newListener is true?. Eg, replacing line 356 by:
if (this.newListener === true) {
    this.emit('newListener', type, listener);
}

Maybe I'm missing something, but the current behaviour may be strange for someone extending EventEmitter2 and the emit method, as I was doing :-)
Regards.

I'm reading some of these old issues and I'm wondering if ones like this are closable, or if the project is stagnant..

Closing


Fixed spelling error

Summary

This pull request is made so a simple spelling error can be corrected and make reading said file easier

This would have to get fixed in all files the alias created, although thanks for bringing it to our attention!


allow to specify a uuid version to validate method

Is your feature request related to a problem? Please describe.
Cross referencing https://github.com/thenativeweb/uuidv4/issues/221
There is currently no way to know if a given string is a valid uuid of a specific version.  We can only know if it is a valid uuid (regardless of the version)
Describe the solution you'd like
add a 2nd argument to validate where we can specify the version of the uuid to check against.
Describe alternatives you've considered
add methods such as validateV4, validateV5, ....
Additional context
See the uuidv4 issue linked on top of the feature request

You can use uuid.version(), which calls validate under the hood and returns the version as a number. It throws the same error as uuid.validate() when call with a malformed uuid.
Does that work for you?

If you don't want to catch the error you can also do something like:
function validateV4(str) {
  return uuid.validate(str) && uuid.version(str) === 4;
}

Sounds great!
Indeed using.version is a satisfying approach.
Thanks
Closing for now.


Update index.mdx

What is it?

[ ] Feature / enhancement
[ ] Bug
[x] Docs / tests

Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Use cases and why

One use case

Another use case

Checklist:

[x] My code follows the developer guidelines of this project
[x] I have performed a self-review of my own code
[x] I have made corresponding changes to the documentation
[x] Added new tests to cover the fix / functionality

thx


[Issue#115] : add onboarding page when extension is first installed

This PR is part of issue#115
Changes made:

add a new onboarding page when the extension is installed the first time
refactor the code to add bootsrap.js to have common functionalities which can used by both popup and onboarding

Things to further improve (This could be on a separate PR) :

add values in other locales for newly added string
The popup & onboarding have JS duplicated, this could be overcome by adding a bootstrap for popup and utilizing the bootstrap.js
The common CSS could be extracted into its own file
add git changelogs
remove Enable Survol on this page from onboarding and popup when on onboarding page/empty tab (this is more of a question, if so I can create a separate PR for that )

I've changed some things, trying to make the onboarding page looking like the popup. Also I removed the "enable on survol on this page" parameter as it doesn't make any sense here.
I'm unsure about the gif idea honestly. I think we should use something else. Also maybe we could add a way to show the changelog using the Git releases feed ?

I'm unsure about the gif idea honestly. I think we should use something else. Also maybe we could add a way to show the changelog using the Git releases feed ?

Let me know if you have other thoughts around, I can remove the gif. I kind of looks gigantic now. I'll look at the git releases feed

Hey @mdolr,
I had some look around the git release, I feel we could use github api for the latest release instead of the feeds.
Let me know your thoughts

Added github changes, exclude prerelease check, display last release

Great changes, I'm waiting for #131 which adds a new setting and then I'll be able to merge this


decode-entities incorrectly decodes

Not sure where all this is used besides #30, but I noticed that   is being decoded to ASCII space U+0020. It should be decoded to U+00A0 (NO-BREAK SPACE).

Fixed in https://github.com/scmorrison/uzu/commit/f2d4a65d3027c1f31b64e51fcf06d4fd05b418f8


broken logo in home page

Broken in fedora > firefox

I'll work on that

@Grigory57 Sure go ahead.

Sorry, It needs Fedora. I don't have it.


Not at all, funny enough I also started working on one, might join efforts and work on yours if you've gotten protobuf files working.

@keyphact Yeah, got it working a few hours ago. I managed to to get exports working with https://github.com/AeonLucid/POGOLib and I'm currently providing them as a package.

Bloody brilliant, would you care to work on this from an organization? and I can give all the admin access you need? I'll also update the reddit thread.

@keyphact Absolutely! That sounds great.

@keyphact Name? "pogogo"? xD

I actually don't mind, I started calling mine PokeGo, but I don't mind too much.
Pogogo sounds catchy and funny, so we could go with that :) !

@keyphact Do you want me to set it up, or are you on it?

I've created an organization for maintaining the awesome-pokemongo list, so we might as well use the same one, have invited you.
https://github.com/pkmngo-odi

@keyphact Transferred the repositories and fixed their import paths.


Support custom facts defined by spec_helper

Fixes #14. Allows users to register additional custom facts.
Simple:
add_custom_fact :root_home, '/root'
Confine to an OS:
add_custom_fact :root_home, '/root', :confine => 'redhat-7-x86_64'
Exclude an OS:
add_custom_fact :root_home, '/root', :exclude => 'redhat-7-x86_64'
Call a proc to get a value:
add_custom_fact :root_home, ->(_os,facts) { "/tmp/#{facts['hostname']}"

Coverage remained the same at 100.0% when pulling 702631fad1e320582458676c1c011e9a1abcc57a on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling a68fa120584c14356f9e09f90d3e1fb2cb4e8993 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling a68fa120584c14356f9e09f90d3e1fb2cb4e8993 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling a68fa120584c14356f9e09f90d3e1fb2cb4e8993 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling a68fa120584c14356f9e09f90d3e1fb2cb4e8993 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling a68fa120584c14356f9e09f90d3e1fb2cb4e8993 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling a68fa120584c14356f9e09f90d3e1fb2cb4e8993 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling a68fa120584c14356f9e09f90d3e1fb2cb4e8993 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Oops, sorry for the noise from @coveralls.
The current test failure is here: https://travis-ci.org/mcanevet/rspec-puppet-facts/jobs/156923825#L190
It seems to want to pul in tins 1.12 which isn't compatible with Ruby 1.9.3 anymore. I'm a bit baffled by this, as tins is a dependency of the coveralls gem which just had a release to fix this: https://github.com/lemurheavy/coveralls-ruby/blob/master/Gemfile#L26.

I have some troubles to see the point of this PR. It is already possible to append facts to the hash using this syntax:
      let(:facts) do
        facts.merge({
          :foo => 'bar',
        })
      end

Some of our modules have many classes that need testing:
https://github.com/theforeman/puppet-foreman/tree/master/spec/classes
And each one needs to have the same facts added:
https://github.com/theforeman/puppet-foreman/blob/master/spec/classes/foreman_install_spec.rb
And we just had to do it again for one of the modules' specs, and it was quite a pain.

This would remove a LOT of duplication in our specs and DRY up the specs. Is there a reason (other than that it's additional code) not to want this?

Coverage remained the same at 100.0% when pulling d6ea9bbf0d8e69ce22fa7f9d03d9c1f9296d6544 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling d6ea9bbf0d8e69ce22fa7f9d03d9c1f9296d6544 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling d6ea9bbf0d8e69ce22fa7f9d03d9c1f9296d6544 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling d6ea9bbf0d8e69ce22fa7f9d03d9c1f9296d6544 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling d6ea9bbf0d8e69ce22fa7f9d03d9c1f9296d6544 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling d6ea9bbf0d8e69ce22fa7f9d03d9c1f9296d6544 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling aec305538e129b9748f55a1bf2a2eb3f70f7dd51 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling aec305538e129b9748f55a1bf2a2eb3f70f7dd51 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling aec305538e129b9748f55a1bf2a2eb3f70f7dd51 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling aec305538e129b9748f55a1bf2a2eb3f70f7dd51 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling d69cd29b05c71608ad2e7b42b644c2e8400e8943 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling d69cd29b05c71608ad2e7b42b644c2e8400e8943 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling d69cd29b05c71608ad2e7b42b644c2e8400e8943 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling d69cd29b05c71608ad2e7b42b644c2e8400e8943 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

Coverage remained the same at 100.0% when pulling d69cd29b05c71608ad2e7b42b644c2e8400e8943 on stbenjam:custom into fd9ffad53f25b19d59c20df6dac056ec19abe919 on mcanevet:master.

@stbenjam thanks

Thanks!


feat: Improved membership option page

Title and Issue number

Title : Improved the Pricing/membership page
Issue No. : #1382
Code Stack :  HTML, CSS JS
Close #1382

Description

fixed navbar
modified the card designs with scaling for different categories of plans
Added a floating get help option
Modified dark-mode styles
Added options in the plans
Shadow effects also improved in the buttons
responsiveness maintained

Video/Screenshots (mandatory)

before

after

Type of PR

[x] Bug fix
[x] Feature enhancement
[ ] Documentation update
[ ] Other (specify): _______________

Checklist:

[x] I have performed a self-review of my code.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have tested the changes thoroughly before submitting this pull request.
[x] I have provided relevant issue numbers, screenshots, and videos after making the changes.
[x] I have gone through the  contributing.md file before contributing

Additional context:

##Are you contributing under any Open-source programme?

[x] I am contributing under GSSOC'24
[ ] I am contributing under VSOC'24

@sau-mili there is a deployment problem in your PR , please try to submit a new PR , though I will merge this PR , but none of your changes will be shown in the website . Please try to fix this ASAP within 7 pm

okay

Done, please check


Add markers to Pipfile when parsing requirements.txt

If there are markers specified in requirements.txt they are not currently transferred to Pipfile while generating it. This commit adds markers to Pipfile as defined in requirements.txt
The issue
Using Pipenv with requirements.txt fails when generating Pipfile if there are markers defined in requirements.txt and those markers are for example specifying diffrent os.  For example this requirements.txt:
windows-curses==2.3.1 ; sys_platform == 'win32' and python_version == '3.11'
When run under Linux OS with:
pipenv install -r requirements.txt
Throws the following error:
[ResolutionFailure]:   File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/resolver.py", line 704, in _main
[ResolutionFailure]:       resolve_packages(
[ResolutionFailure]:   File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/resolver.py", line 662, in resolve_packages
[ResolutionFailure]:       results, resolver = resolve(
[ResolutionFailure]:       ^^^^^^^^
[ResolutionFailure]:   File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/resolver.py", line 642, in resolve
[ResolutionFailure]:       return resolve_deps(
[ResolutionFailure]:       ^^^^^^^^^^^^^
[ResolutionFailure]:   File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 1173, in resolve_deps
[ResolutionFailure]:       results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
[ResolutionFailure]:       ^^^^^^^^^^^^^^^^^^^^^^
[ResolutionFailure]:   File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 953, in actually_resolve_deps
[ResolutionFailure]:       resolver.resolve()
[ResolutionFailure]:   File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 694, in resolve
[ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  You can use $ pipenv run pip install <requirement_name> to bypass this mechanism, then run $ pipenv graph to inspect the versions actually installed in the virtualenv.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: No matching distribution found for windows-curses==2.3.1

Traceback (most recent call last):
  File "/home/geonik/Project/piptest/venv/bin/pipenv", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/cli/options.py", line 58, in main
    return super().main(*args, **kwargs, windows_expand_args=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/cli/command.py", line 233, in install
    do_install(
  File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/routines/install.py", line 170, in do_install
    do_init(
  File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/routines/install.py", line 743, in do_init
    do_lock(
  File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/routines/lock.py", line 65, in do_lock
    venv_resolve_deps(
  File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 1116, in venv_resolve_deps
    c = resolve(cmd, st, project=project)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/geonik/Project/piptest/venv/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 991, in resolve
    raise RuntimeError("Failed to lock Pipfile.lock!")
RuntimeError: Failed to lock Pipfile.lock!

The fix
This PR fixes the problem mentioned by supplying back the markers to Pipfile generator
The checklist

[] Associated issue
[ ] A news fragment in the news/ directory to describe this fix with the extension .bugfix.rst, .feature.rst, .behavior.rst, .doc.rst. .vendor.rst. or .trivial.rst (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

@geonik-code Can you adjust the lint failure and add a news fragment?

Following up on this again -- can  the lint issue be addressed so the CI will run?


Test tiff images on Cantaloupe 4.1.7

Goal is to remove the separate Cantaloupe server for tiff files

Resolved - updated to Cantaloupe 5.0.4


Create 404 & 500 page

perhaps using raku doc's 404 as a model, we need to add a 404 handler page instead of relying on the nginx handler.
Related to https://github.com/Raku/doc/issues/4214

@coke there is a 404.html that is generated and is in the root directory, but it is not being served by NGINX. So, the default NGINX 404 handler needs changing.

Also look at new-raku 404

See #171

There are templates for 404 and 500 errors fitting the design, please do use them: http://<IP_ADDRESS>:10010/baka
See https://github.com/Altai-man/docs.raku.org/blob/master/templates/404.crotmp and https://github.com/Altai-man/docs.raku.org/blob/master/templates/500.crotmp for templates.

The 404 page is created in the build and the website is now using it.
I can add the website rules for the 500 error once that page is generated during the build.

The 404 currently used on the site is generated from a .rakudoc file, so it can be consistently edited.
The 404/500 pages suggested by @Altai-man are crotmp templates. Like the index.html page, these could be just hacked into structure-source pages like index.rakdoc.
But note the text on Altai-man's page 'this error is already been reported'  What does this mean. How is it reported?

Please see my suggested version in https://github.com/Raku/doc-website/pull/178

But note the text on Altai-man's page 'this error is already been reported' What does this mean. How is it reported?

I assume "it's in the logs"; we should definitely be reporting out on the logs, or at least investigating occasionally. Odds of getting a 500 on the static site are slim, though.

What changes did you want?

What changes did you want?

The ones I submitted in the PR?

@coke I missed the PR request. Just approved.

But note the text on Altai-man's page 'this error is already been reported' What does this mean. How is it reported?

The idea was that the engine will be smart enough to, on replying to a 404/500 request, report the error somewhere so that we could check what broke or what's the URL in question someone couldn't access, hence the line.


How to best create an HTTP client?

My web application needs an http client to query elasticsearch. I want to have following two lines at one place and use req variable after that:
auto client = HttpClient::newHttpClient(es_host);
auto req = HttpRequest::newHttpRequest();

What would be the best place to keep these?

You could put it any where you like, if you want to keep a long connection to es_host, you can create a class member of HttpClient type, or if you want to have several connections, you can make a vector to hold them.

Say if I create a static variable for this in a function will it be thread-safe? I do not want to recreate these objects all the time.

Say if I create a static variable for this in a function will it be thread-safe? I do not want to recreate these objects all the time or a singleton object?

Yes, you can do that.

Thanks.


 does not have property isPreselected

Bug report
Summary
It is mentioned in docs for  , that  has prop isPreselected and tappable.  However in code it does not. I checked just these two props but maybe there are inconsistencies with more props. I need to be able to move the marker without any tapping and these props could help at least a little bit.
Environment info
"react-native": "~0.63.4",
"react-native-maps": "^0.29.3",

The tappable prop is iOS Google Maps only (as stated in the docs), and is included in v0.30.0.
isPreselected is Apple Maps only (as stated in the docs), and should be included in the source code, but is missing from the typescript declaration file. This should be fixed when #3985 is merged at some point.

Hmmm okay I found a reference to the isPreselected in MapMarker.js in propTypes. When I put it on the Marker it still didn't work. But that might be caused by the bug that makes other props (on ) not working. (Controls not showing up).

Closing for now. See: #4084. If you believe that this is still an issue, please feel free to open a new issue following the issue template.

@Simon-TechForm Speaking of, any chance we could have that #4084 reviewed? It's a small change and easy to test.


[New game]: Powers combined

🎮 Game Request
The Land of Peeps is a proud but needful place and you have been appointed as its benevolent protector. But the elements you possess are not easy to control, and the Peeps are hardly careful with their lives.
Point down the features
Try to keep everyone happy and alive for as long as you can!
Use numerics 1-4 to switch through elements.
Select program in which you are contributing
GSSoC23
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey @S-ishita !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹

Hey @S-ishita ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇


Support for cassandra with datastax driver 4.x

Version:3.6.0
Module: quill-cassandra, probably also quill-cassandra-monix
Db: cassandra
Is there any plan to upgrade datastax java driver from 3.x to 4.x:

latest version as for now https://docs.datastax.com/en/developer/java-driver/4.10/
version in quill 3.7.2

If I had time to start work on it, do you want to keep support for 3.x and add something like module quill-cassandra_dsx-driver-4 or quill-cassandra-4? Or you would be ok with upgrade in place on the already existing modules?
@getquill/maintainers

@zhrebicek  Any alternate solutions you got?
Anyone planning to look at this one ?


Parser error when no newline at end of file

It looks like the parser can't handle the final line of the module not having a newline.  I'm getting parse errors such as:
Syntax error
ERROR:VerilogModule::_ast: :125: before: / while parsing /some/path/to/verilog.v
endmodule   //modulename<nonewline>

Thanks! I can remove this bug by adding empty line to the imported text inside.


assert instr.opname.startswith("CALL_") throws on Python 3.11

Hello!
Similar to this StackOverflow message I've got the same error while trying to (indirectly) use docopt-ng with Python 3.11.
I've added print(instr.opname) right after the line 941 and the resulting list of  instructions indeed doesn't have anything stareted with CALL_ (see file atached). On the contrary here is a move shorter list of instructions when I run the same with Python 3.10:
LOAD_GLOBAL
LOAD_GLOBAL
LOAD_CONST
LOAD_CONST
CALL_FUNCTION_KW

If I remove the following block completely along with output_value_assigned variable then everything seems to work just fine with Python 3.11:
https://github.com/jazzband/docopt-ng/blob/130a5422feab5d4233a5a81102b02054634e36ce/docopt/__init__.py#L937-L950

Thanks for the report!
It was inevitable that something would break with how we are reaching into internals like this. The whole "magic" thing was a mistake of a feature I think, oh well.
I'll take a look and try to come up with some workaround.

So, apparently CALL_FUNCTION, CALL_FUNCTION_KW, CALL_METHOD, CALL_METHOD_KW were removed from Python 3.11. See python/cpython#88691 for the details.

Thanks for the report!
It was inevitable that something would break with how we are reaching into internals like this. The whole "magic" thing was a mistake of a feature I think, oh well.
I'll take a look and try to come up with some workaround.

Thanks! Looking forward to it!

OK, so brownie is using a vendored version of docopt, so if I fix the bug here then you won't see that change unless they pull that in. I still will look for the bug and probably fix it, but FYI you are going to have to go through more steps.


Does this efi support hidpi?

Hi, i have a asus a550jk notebook with the same internal GPU with k550. Have you tested 2k/4k hidpi using this efi?
Thank you!

Yes.


test_azure_firewall_management_ip_config failed.

If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at Azure/azure-cli

Extension name (the extension in question)
test_azure_firewall_management_ip_config failed. I think released package should fail.
Description of issue (in as much detail as possible)
E           Message: AzureFirewall af1 management IP configuration cannot be added to an existing firewall. Redeploy with a management IP configuration if you want to use forced tunneling support.

msrestazure.azure_exceptions.CloudError: Azure Error: AzureFirewallManagementIpConfigCannotBeAdded

add to S172

close this issue since it's been solved


Missing cycle duration for a new subscription in an invoice

Creating a new subscription results in an invoice without the cycle being noted.
Debugging the code i found that it runs createProcessedFromItems function which runs the $process_items always set at false, (src/Order/Order.php at line 151) . Hence the reason why description_extra_lines for order_item is never set and why the cycle is missing from the invoice.

Solved here https://github.com/mollie/laravel-cashier-mollie/pull/99

This can be closed, it's solved.

Thanks @ciungulete !


Changes to meet expected standards

Changes
Setup to meet standards outlined:

Unit tests
Logging
Linting (pep8/flake8)
Error/exception handling
Travis build
README up to date

How to test
Run the unit tests (see if travis starts them).
Who can test
Anyone but @iwootten

👍


Validate Timestamp conversion from SystemTimes before UTC Epoch time

The protobuf spec for Timestamp states that:
negative second values with fractions must still have
non-negative nanos values that count forward in time

... but in v0.6.1 and earlier of prost_types, this is handled wrongly when converting to SystemTime, with the nanos value contributing to the Duration that is to be subtracted from the UNIX_EPOCH:
https://github.com/danburkert/prost/blob/v0.6.1/prost-types/src/lib.rs#L142-L145
let mut duration = Duration {
    seconds: -timestamp.seconds,
    nanos: timestamp.nanos,
};

So, for example Timestamp { seconds: -20, nanos: 999_999_999 } would result in a Duration { seconds: 20, nanos: 999_999_999 } to subtract from UNIX_EPOCH, instead of the correct value of 19 seconds + 1 nano before UNIX_EPOCH.
The bug was fixed in commit 4ad5e3451fcd2e2192406351671a962e2e2be909 (https://github.com/danburkert/prost/pull/297), which replaces the old TryFrom implementation with a full From<Timestamp> for SystemTime, and adds From<SystemTime> for Timestamp support for pre-UTC Epoch time SystemTime values.  However, the existing unittests do not include any specific validation for timestamps earlier than the UTC epoch time.
This patch therefore adds a set of representative test cases which make sure that the protobuf spec is respected.  This should prevent the risk of regressions in future.
Part of https://github.com/danburkert/prost/issues/327.

This is excellent, thanks @joseph-wakeling-frequenz .  Are you working on a fix?  If not I'll take a crack at it, at least before doing the next release.

@danburkert thanks!  About fixes: the bug itself is actually fixed in current master (it was addressed by https://github.com/danburkert/prost/pull/297), so it depends on your plans for a next release.  If you'd like a patch to the 0.6.x release series that can be released as v0.6.2, then I'm happy to submit that, but can you advise on how I should best do that given that master is now well ahead of 0.6.1?
OTOH the test failures in the current patch appear to be related to platform specific implementations of SystemTime.  Specifically on the windows build:
---- tests::check_timestamp_negative_seconds stdout ----
thread 'tests::check_timestamp_negative_seconds' panicked at 'assertion failed: `(left == right)`
  left: `Timestamp { seconds: -1, nanos: 100 }`,
 right: `Timestamp { seconds: -1, nanos: 1 }`', prost-types\src\lib.rs:192:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I'd overlooked that on Windows the smallest SystemTime interval is 100 ns rather than 1 ns.  See:
https://github.com/rust-lang/rust/blob/09c817eeb29e764cfc12d0a8d94841e3ffe34023/src/libstd/sys/windows/time.rs#L20-L23
https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime
So these tests can be rewritten to use 100-nsec smallest increments.  It doesn't make any difference to the behaviour we actually want to test.  I'll submit an updated patch shortly.

I've updated the test cases to split between (i) general cases with 100 ns precision and (ii) POSIX-only cases with 1ns precision.  This should resolve the Windows CI failure.
diff --git a/prost-types/src/lib.rs b/prost-types/src/lib.rs
index 1f28a00..366d295 100644
--- a/prost-types/src/lib.rs
+++ b/prost-types/src/lib.rs
@@ -178,10 +178,15 @@ mod tests {
     #[cfg(feature = "std")]
     #[test]
     fn check_timestamp_negative_seconds() {
-        // representative tests for the case of timestamps before the UTC Epoch time:
+        // Representative tests for the case of timestamps before the UTC Epoch time:
         // validate the expected behaviour that "negative second values with fractions
         // must still have non-negative nanos values that count forward in time"
         // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp
+        //
+        // To ensure cross-platform compatibility, all nanosecond values in these
+        // tests are in minimum 100 ns increments.  This does not affect the general
+        // character of the behaviour being tested, but ensures that the tests are
+        // valid for both POSIX (1 ns precision) and Windows (100 ns precision).
         assert_eq!(
             Timestamp::from(UNIX_EPOCH - Duration::new(1_001, 0)),
             Timestamp {
@@ -189,6 +194,33 @@ mod tests {
                 nanos: 0
             }
         );
+        assert_eq!(
+            Timestamp::from(UNIX_EPOCH - Duration::new(0, 999_999_900)),
+            Timestamp {
+                seconds: -1,
+                nanos: 100
+            }
+        );
+        assert_eq!(
+            Timestamp::from(UNIX_EPOCH - Duration::new(2_001_234, 12_300)),
+            Timestamp {
+                seconds: -2_001_235,
+                nanos: 999_987_700
+            }
+        );
+        assert_eq!(
+            Timestamp::from(UNIX_EPOCH - Duration::new(768, 65_432_100)),
+            Timestamp {
+                seconds: -769,
+                nanos: 934_567_900
+            }
+        );
+    }
+
+    #[cfg(all(unix, feature = "std"))]
+    #[test]
+    fn check_timestamp_negative_seconds_1ns() {
+        // UNIX-only test cases with 1 ns precision
         assert_eq!(
             Timestamp::from(UNIX_EPOCH - Duration::new(0, 999_999_999)),
             Timestamp {
@@ -197,17 +229,17 @@ mod tests {
             }
         );
         assert_eq!(
-            Timestamp::from(UNIX_EPOCH - Duration::new(2_001_234, 123)),
+            Timestamp::from(UNIX_EPOCH - Duration::new(1_234_567, 123)),
             Timestamp {
-                seconds: -2_001_235,
+                seconds: -1_234_568,
                 nanos: 999_999_877
             }
         );
         assert_eq!(
-            Timestamp::from(UNIX_EPOCH - Duration::new(768, 987_654_321)),
+            Timestamp::from(UNIX_EPOCH - Duration::new(890, 987_654_321)),
             Timestamp {
-                seconds: -769,
-                nanos: 12345679
+                seconds: -891,
+                nanos: 12_345_679
             }
         );
     }

I'm seeing a bunch of annotations in the CI along the following lines:
no global memory allocator found but one is required; link to std or add `#[global_allocator]` to a static item that implements the GlobalAlloc trait.

... which look like errors but don't seem to be causing CI failure.  Is that expected behaviour or has it been inadvertently introduced by this patch?

I'm seeing a bunch of annotations in the CI along the following lines

OK, having checked out a few other PRs, looks like it's nothing specific to this one.  So this patch should be ready for review.

@danburkert is there anything that needs updating or clarifying here?  I think this patch is good to go.

... ping?  Any chance of either feedback or a merge?

Great, thanks!  Sorry for slow response.

No worries, busy times happen to us all :-)  Thanks for the merge!


Chore/merge v4 dev@bdab948

[x] Check spinner rendering
[x] Check shortcodes (from b0cd2078f74f9f83f8d2e441c1707288e088d0ae) - Especially the placeholder one
Check if it is possible to find a way of doing:

divide(50%, #{$custom-control-indicator-bg-size})
divide(50%, 1.5rem)
divide(50%, $accordion-arrow-size)
divide(50%, .75rem)
divide(50%, $o-megamenu-icon-size)
divide(add(50%, 1px), #{$custom-select-bg-size})
divide(50%, #{$pagination-icon-width}
divide(center, $spacer)

Fix GitHub CI:

[x] npm run docs
[x] npm run lint
[x] npm run bundlewatch
[x] npm run dist

[x] Check tab.js modifications

That was expensive to review 🥵 Fortunately changes were redundant. I didn't see anything bad around here, so that's good for me.

Yep, that's why I want to merge the commits more often. Thanks for the code review 👌


Previous value of an Atom

Hey, Is there a way to get previous value of an [Atom] property inside of Reaction?

No, there is no way get the previous value of an atom. Alternatively, you can write reaction that remembers the previous value.
private void Start()
{
    Reaction(
        () => Counter,
        (current, previous) => Debug.Log($"Counter changed from {previous} to {current}")
    );
}

private static Reaction Reaction<T>(AtomPull<T> reaction, Action<T, T> effect)
{
    var hasPrevious = false;
    var previous = default(T);
    return Atom.Reaction(reaction, value =>
    {
        if (hasPrevious)
        {
            effect(value, previous);
        }

        previous = value;
        hasPrevious = true;
    });
}


Fixed broken link for "9 key lightning tricks". #738

"Research seed"  seed still missing as the repo seems to be not existing any longer
Before submitting

[ ] Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
[ ] Did you read the contributor guideline?
[ ] Did you make sure to update the docs?
[ ] Did you write any new necessary tests?

What does this PR do?
Fixes # (issue).
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃

https://github.com/williamFalcon/pytorch-lightning-conference-seed

what about moving the "Research seed" under PyTorchLightning org? :]

@Borda done! https://github.com/PyTorchLightning


Fix the --version option

The --version option as implemented doesn't work with required
arguments. This is how you're supposed to do it.

Pardon a dumb question, but what is the process for testing a change like this in a downstream project?

Apologies, just added testing instructions


No such File or Directory in Google drive on first time connection

Google drive sometimes displays no such file or directory when re-logged in.

@atulsam and I found that If the oauth token isn't being used, it expires. By default the timeout is 1 hour.

So it is not the problem with the code. If the user is active on the website then it will be no issue and when user login to the website then before using Google Drive we need to renew the token.

Fixed it by using the Refresh Token. Cheers!!!


feature: Collection template

I found my self having to recreate dozens of collections with exactly the same templated graphes.
For instance, I did 5 templated graphs following different metric around a docker instance (cpu, memory, io, network ...). The only template variable is the name of the docker. Template graphs where tremendously useful already in this first stage.
But when I had to put all graph together in a collection, I found myself in dire need of the same feature for collections. I want to aggregate the exact same 5 graphs and I have to do it for each new docker instance I have. I figured that a template collection would only require me to fill the name of the docker, and the 5 graphs could then be fed the correct values.
What do you think about this ?

Work in progress, see https://github.com/facette/facette/issues/170 ;)

Ok, so this is a duplicate. Thanks.


Publish this information in a structured format

Investigating this information in this format is not easy. It would be really helpful if you could publish this information in a machine readable format e.g. a database file or XML
Example: which workloads require and Android component to be installed? (Background: those fail download using the --layout parameter)

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: b29a1009-5ef4-707b-258e-fe8bbe7275b6
Version Independent ID: 00fac5a7-fc6d-c9cb-2d26-d820c7055890
Content: Visual Studio Enterprise 2017 workload and component IDs
Content Source: docs/install/workload-component-id-vs-enterprise.md
Product: visual-studio-dev15
GitHub Login: @TerryGLee
Microsoft Alias: tglee

Would it be possible to post the WorkloadIDs and ComponentIDs per Visual Studio product in a file that is visible from github similar to what the dotnet team does for their release index that is differentiated for each release (15.0, 15.9, 16.0, 16.1, etc.)? I'm hoping to create a friendly "bundler" utility that would allow me to define "must have" ComponentIDs while also only requiring workload IDs to be specified when installing. For example, I typically would like to install specific dotnetcore and .net framework targeting packs ComponentIDs which are either optional or recommended for WorkloadIDs that I am specifying. Arguably, this would be better than specifying all optional and recommended components be installed for WorkloadIDs I'm installing. By differentiating such a file by version, I can clearly tell what ComponentID has been added to a WorkloadID instead of having to visit a page. Even then, it's not clearly which release this table of WorkloadIDs and ComponentIDs is valid for. I've noticed that a minor version can have changes in ComponentIDs, such as what happened with TypeScript. Some versions ended up in the Unaffiliated list, while the current/newer TypeScript version is installed as required by its parent WorkloadID.

@hjrb @tristanbarcelon Respectfully, we decline to publish the information in another format than that which we have currently. We appreciate the suggestions, however, and will keep them in mind going forward.


Radiance of the Dawn not working

As discussed some days ago on Discord, the feature on the title is not automated. It is with DDBImporter, though.

Looks to be working as expected (imported with the CPR integration enabled), here:

I managed to make it work by uninstalling DBImporter, but the animations are now missing.

The presence/absence of DDBI doesn't seem to change much here, so, beats me
I don't have animations in either case, unless I use https://foundryvtt.com/packages/dnd5e-animations (which I'd recommend doing generally anyway), so I think that's Working As Intended

When I first installed Plutonium, its Automation and all its dependencies, Radiance of the Dawn had a big flash animation, but the damage was being applied to allies and enemies. Then it started working fine, but the animation went away for some reason.
I use JB2A Complete Patreon Animations, DndD5e Animations and Automated Animations. I don't know if they could create conflicts with each other, but the three of them were installed because they were recommended by some other module.


Adjustments of dimensions of the event container and for the landing …

…page search bar container.

Commit Id: 4cd903f


About Section and Works Section

[ ] I Made sure the content of the "About myself" section is aligned with flexbox.

Thank you for everything, I look forward to your corrections and appreciations

I corrected recommendations


firstOrCreate is missing

Fixes #344

Thank you.

Thank you.
But you forgot to add a test case for this. Can you add that also?

Thank you.
But you forgot to add a test case for this. Can you add that also?

ok


Implement conditional put operation

Terrastore should support conditional put operation, in order to provide
atomic "compare-and-swap" semantics (very useful for optimistic concurrency
control and alike).

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 4 Mar 2010 at 6:39

Blocked on: #37

Original comment by<EMAIL_ADDRESS>on 4 Mar 2010 at 6:43

Changed state: Started

Implemented, just pass a "predicate" through the query string (example with
jxpath
conditions):

PUT
http://host:port/bucket/key?predicate=jxpath:/field[.='value']
<JSON BODY>

Original comment by<EMAIL_ADDRESS>on 4 Mar 2010 at 6:42

Original comment by<EMAIL_ADDRESS>on 10 Mar 2010 at 9:57

Changed state: Fixed

Original comment by<EMAIL_ADDRESS>on 17 Apr 2010 at 10:41

Added labels: Milestone-0.5.0
Removed labels: Milestone-0.4.3


Track timeout/slowmode status

Pull request checklist:

[x] CHANGELOG.md was updated, if applicable

Description
This PR adds a timer to the chat input box (on the left side of the message length counter) that reflects how long until you can chat again. It supports timeouts (on CLEARCHAT and on error notice) and slowmode (including the error notice), but doesn't query e.g. an existing timeout on application restart.
Some of the choices were made in good faith but may be a bit arbitrary, so please nitpick away and let me know if anything should be changed:

The color: gold text for the timer label
Minor refactor/cleanup of how notices are handled (nb: the PR makes sure to keep logic with side-effects in the handle* function instead of parse*, which does mean parsing the notice twice)
Technically, if the timer is between 1s and 0s Twitch will still block you from sending, ~but at <1s the timer label goes away~. Let me know if this is something that should be "fixed".

I found the edge case, but it's probably not that important.
When you attempt to send a message in a channel with verified chat restrictions (phone number in this example [#bobross]), the timer will start and refresh on each message, although the slowmode restriction is likely not applying.
I don't know if we should handle these messages or just ignore this "issue".

Being a subscriber does not bypass the slow-mode timer, despite subs being immune to slow-mode.

Whether subs are affected is actually a setting for affiliate+ , in Dashboard -> Settings -> Affiliate: "Allow subscribers to chat freely in your channel when chat is in slow mode" and I believe it's disabled by default. Regardless, there doesn't seem to be a public way to query this. We could err on the safe side I guess and only show the countdown if you end up sending too fast.

Messages that are sent in channels where you don't meet the verified chat restrictions (phone number etc.. - [#bobross as example]), trigger the timer despite the fact that no message was sent. (Can be handled as you receive back a message).

I considered showing the timer upon receiving USERSTATE instead of after sending the message, but thought it would add extra (UI) latency so decided against it. It does however feel more correct, especially considering things like that^.

Messages that are sent in hyper-fast chats trigger the timer, despite the fact that no message was sent. (Probably not handle-able as you do not receive a message when these are dropped).

You tested that I assume? For example, for the Twitch-side duplicate message check it doesn't matter if your message was actually shown in chat or not, so I would assume it works like that for slowmode as well. (?)

I believe it's disabled by default.

Yes, it is 100% disabled by default.

it's disabled by default.

I forgot about this fact.

I considered showing the timer upon receiving USERSTATE instead of after sending the message, but thought it would add extra (UI) latency so decided against it. It does however feel more correct, especially considering things like that^.

I'm indifferent about this one anyway, we are probably better off letting people think said message attempt triggered slow-mode anyway.

You tested that I assume? For example, for the Twitch-side duplicate message check it doesn't matter if your message was actually shown in chat or not, so I would assume it works like that for slowmode as well. (?)

You're likely to be correct about this one as well, I'll re-test later today when somebody else with a hyper-fast chat goes live.

as the only light/white mode user of chatterino, please ensure the timer has enough contrast in chatterino light/white modes, because judging by the fact it uses a bright yellow color which is not a normal chatterino color, it is going to end up being almost completely invisible

as the only light/white mode user of chatterino, please ensure the timer has enough contrast in chatterino light/white modes, because judging by the fact it uses a bright yellow color which is not a normal chatterino color, it is going to end up being almost completely invisible

This is a good point
white

light

i suggest using a different color hue all together, i tested some things here and there and found out #00526D works pretty well

In general, functionality looks good. There's some further code review/refactoring that I'd like to see but will leave it for tomorrow or next week.
Will need a little bit more testing with edge-cases but they're pretty well documented here or in the code already which is nice.

I've let this become stale for long enough that it's not something I'm comfortable implementing right now, given the turbulence with chat over EventSub chat & Helix message sending


⚠ Bofrost.de has degraded performance

In 8f2d4ac, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1633 ms

Resolved: Bofrost.de performance has improved in 7f460b6 after 44 minutes.


Can't import from node_modules

When I import the module
import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock';
and then try to build the app I get the following error:
Error: 'disableBodyScroll' is not exported by ..\..\node_modules\body-scroll-lock\lib\bodyScrollLock.min.js.
I tried the approach in #79 (as they also use Rollup)
import { disableBodyScroll, enableBodyScroll, clearAllBodyScrollLocks } from 'body-scroll-lock/lib/bodyScrollLock.es6.js'; but it doesn't seem to work.

I'm not the author, but does
import { disableBodyScroll, enableBodyScroll, clearAllBodyScrollLocks } from 'body-scroll-lock/lib/bodyScrollLock.es6
work? This fixed it for me on v2.6.4

@willmcpo need "module": "lib/bodyScrollLock.es6.js" in package.json