SQLite binding

This ticket will hold discussion about how to bind the object store to an sqlite database. This is an extension of my capstone project :sweat_smile:, but it's easier to write here.
Summarizing, constraints are:

Every object in the store is represented in the database.
It's value, scope, and (most) metadata are stored.
Changes in the database trigger updates on the store.
Changes in the store trigger changes on the database.

Nice-to-haves for the future:

An object store can be built bottom-up from an existing database.
The architecture proposal should work for different DBMSs.
Consider more than one database schema for the same object store.

Solution proposal
Architecture
Database connection object
The database connection object holds the necessary information to connect to the database. This is dependent on the DBMS in question. Inheritance or interfacing (which should be better?) will achieve this.
A study about how to do DB connections can be made looking at other general-purpose frameworks. Also, checking http://www.connectionstrings.com/.
Take:
interface DbConnection::
    string connectionString() // What's the syntax for this?

class SqliteConnection::
    member location: string
    // todo, take in consideration how to run in-memory databases

Translation rules
Are a class of objects that take in Cortex objects and produce SQL.
These are better defined in the second iteration. (In a few weeks' time).
Things to think about:

Rules for initial type definitions (DDL).
(Sub?)Rules for name translation. I.e. we may want a Cortex class Point to become SQL DDL like CREATE TABLE Points? These are also applied when translating an object during DML.
Rules for runtime definitions (more DDL, which might just look the same as the first).
Rules for DML.

How to create rules? For example, name translation rules:
There are two opposite approaches:

Name translation rules are fully automated.
Name translation rules are fully manually written.

Out of the two, the first one seems more desirable but it is not perfect. For example, when objects' names are DBMS reserved keywords, an automatic attempt to solve it may class with another object's name.
To deal with this, translation rules will first look for a database name annotation in the object (Consider #169), then fall back to a default name resolution strategy.
Database management layer (find better name)
Coordinates translation, connection objects, listens for objects.
The database management layer subscribes for changes in objects. It may need to be connected to object history.
In order for different DB connection object types and SQL serializers to be aggregated correctly, then simple object aggregation is not enough. I.e. what if we had an SQL Server connection object with an Oracle serializer?
For that, subclassing the database management layer could be necessary. One could then work with a know set of serializers and connection strings and any other DBMS-dependent tidbit.
Object history
Where does it reside? Who defines how many levels?

This is moved to https://github.com/cortexlang/sqlite/issues/1


Derives from must not (!) be reflexive

You should never redefine the semantics of RO properties in your ontologies! We are trying to re-use ONS, but this "Reflexive" property causes all ontologies using ONS (with BFO) to be inconsistent.. Please remove the reflexivity!

Awesome, thank you for the prompt fix :)

Sorry for the inconvenience, I am trying to fix all of those bugs in the next release. Please, consider that those changes are not in the ONS version that is referred by ontobee or OLS, but rather in this file https://raw.githubusercontent.com/enpadasi/Ontology-for-Nutritional-Studies/master/ons.owl which will be (hopefully very soon) tracked by ontobee.
Sorry for this, but I would like to also solve the double labels bug before committing to the ontobee track.
I will also check for other problems with original RO properties in root ONS file.

Sounds great :)


Fix navbar overlap issue on Meshery Branding page when scrolling/signoff

Description
This PR fixes #1853
Notes for Reviewers
Signed commits

[X] Yes, I signed my commits.

@rahulrana701 Thanks for your contribution, let's discuss this on the website's call. Please add this as an agenda item to the meeting minutes.

@amitamrutiya would you like to offer review on this PR?


perf: lazy load completion deps (for WASM)

Lazy load some dependencies so they don't block the notebook code from rendering.

ill make the updates. pinning will help with perf

@akshayka - i was wrong about pinning versions. it doesn't matter since they are downloaded from pyodide custom wheels which are pinned by default


fix: can report on a async mdapi format deploy

What does this PR do?
to replicate the gh issue, you

convert project do mdapi format
deploy that using project deploy start with --metadata-dir

The error is coming from SDR componentSetBuilder because mdapi format deployments don't use componentSet.
This PR

adds a isMdapi boolean to the DeployCache records, which is "true" whenever metada-dir is given
skips the componentSet stuff whenisMdapi is in the retrieved deployCache record

What issues does this PR fix or reference?
@W-12992462@

QA Notes

✅ : able to sync deploy still
✅ : able to async deploy
✅ : reports on async deploys
✅ : reports on sync deploys (MD)
✅ : reports on async source deploys


EnvironmentInterface seems to be a useless type to expect / depend on

Slim\Container declares default environment service to be an implementation of EnvironmentInterface.
Slim\App expects a container that implements Psr\Container\ContainerInterface
with these service keys configured and ready for use:

 - environment: an instance of \Slim\Interfaces\Http\EnvironmentInterface

@property-read \Slim\Interfaces\Http\EnvironmentInterface environment

Thing is EnvironmentInterface doesn’t contain anything actually needed for it to work, only test–related mock().
This means that this  $app->getContainer()->environment->get('foo'); won’t be understood by any tools, because the interface doesn’t have get().
Also the classes that depend on environment like Slim\Http\Request::createFromEnvironment(Environment $environment) all require specific Slim\Environment class, not the interface. So trying to replace environment service with something that implements EnvironmentInterface would break the app.
It feels like either:

EnvironmentInterface should be expanded to comprehensively describe a generic replaceable service, in analogue to ContainerInterface. Other components of the app should be changed to depend on the interface, not the implementation.
Inline documentation should reflect the de–facto dependency on concrete Environment implementation, not the interface.

Hey, I noticed this was tagged as a workable issue... But I could use some feedback on which approach is desirable here?

I made a small PR that implements one of your proposals: https://github.com/slimphp/Slim/pull/2625.
If it's decided to go with this, I'm more than willing to do the same for the documentation.


[DOC] Add runtime exception Javadocs to our public facing API

Add runtime exceptions like AmqpExceptions to our public-facing API for Service Bus

Hi @conniey @anuchandy @ki1729 ,
I'd like to confirm that:

There may be several AmqpException throw out in a public API, for example, sendMessages(Iterable<ServiceBusMessage> messages) messages can reach the max size of message batch, get link from a disposed session, create session timeout, they all can throw an AmqpException. How to write these exception on the JavaDoc?
Do I need to put other runtime exception in JavaDoc? such as, the dispatcher invoke some task, if the dispatcher is closed, it will throw a runtime exception.

@ZejiaJiang Yes. Those are the types of runtime exceptions we want to document. If we try to schedule work on the dispatcher and it throws, we should document that as well.


Improve mocks by overriding noSuchMethod

There are a couple of handwritten mocks which override each method, even those we don't care for.
Instead of overriding each method, we should override noSuchMethod so we don't have to update the mocks in case unrelated stuff gets added or removed.

can I take this?

@AliAkberAakash yes please :)

Should I just override in all the handwritten mocks in every module? And should I override them like the following code? :
class Person {   @override  //overring noSuchMethod     noSuchMethod(Invocation invocation) => 'Got the ${invocation.memberName} with arguments ${invocation.positionalArguments}'; }
Also, can I create a mixin that overrides this method and extend every handwritten mocks with that mixin?

like this:
 mixin NoSuchMethodProvider {   @override   void noSuchMethod(Invocation invocation) {     'Method ${invocation.memberName} was called '         'with arguments ${invocation.positionalArguments}';   } }
and then on the mock class:
class MockSentryClient with NoSuchMethodProvider implements SentryClient

@AliAkberAakash That would address the DRY principle, so yes.


CSS parsing error

Found a number of errors in my log file, advising that mod_pagespeed hit a "CSS parsing error" on a particular CSS file.
I found that @charset utf-8; at the top of the CSS file was causing the issue.  Once I changed this to @charset "utf-8"; the file was able to be parsed correctly by mod_pagespeed.
Not sure if this was an error by the designer of the CSS file, and the quotes are required at all times, or an issue with mod_pagespeed not picking up the charset without quotes.

http://www.w3.org/International/questions/qa-css-charset gives the syntax with the quotes.  It does not state that the quotes are optional.
https://developer.mozilla.org/en-US/docs/Web/CSS/@charset specifically calls out the missing quotes as a syntax error.

Thanks @jmarantz

Also getting this error with some css files with bad characters in them - I had a third party css with a strange char in the end, removing that, and it works again.


health: Split out passive mode into separate binary

This change introduces a new binary called cilium-health-probe, which replaces the 'passive' mode the existing cilium-heath executable. Its purpose is emulating an endpoint by running a HTTP server in the cilium-health namespace for testing endpoint connectivity.
To reduce memory consumption, the new TCP-only server in the new binary is based on net/http instead of go-openapi and comes with a small client. The old /hello endpoint of the cilium-health API is still there, as it is also accessed by commands such as cilium-health ping on the "admin API" (exposed via unix socket only), but I plan to eventually remove it in a follow-up PR.
The new binary reduces the resident set size (RSS) of the endpoint process by roughly 12-15MB.

This change is

test-me-please

Coverage decreased (-0.004%) to 41.953% when pulling a3a2a8218e9620369d01c1c5b304d8bc960a0409 on pr/gandro/split-healthcheck-endpoint-binary into 5337067cbf52d39039329db4f33dc6359ff225e5 on master.

@gandro looks like the checks we have in the CI for cilium-health got broken by this: https://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-Validated/13051/
I suspect you will have to do additional changes to our CI to account for those changes. Feel free to reach out if you need some help getting started with our CI infrastructure!

@joestringer Thanks a lot for the pointers! Will address them once I figure out what I broke in CI ;)
With regards to the binary size, the current version of the binary adds 7.3MB. Not great, but still worth it I believe. I haven't added it to the Makefile, but we could of course also strip it to get it down to 5.4MB.

test-me-please

test-me-please

test-me-please

Okay, this is now ready for review. The CI issue was a missing timeout in probe.Client causing it to block indefinitely.
I decided to not strip the logging from pkg/pidfile, since I find it quite useful there. But I'm also not using it in the responder binary, as logrusdoes add almost 8MB of binary bloat.

I decided to not strip the logging from pkg/pidfile, since I find it quite useful there. But I'm also not using it in the responder binary, as logrusdoes add almost 8MB of binary bloat. But if folks feel differently, I'm happy to change that.

@gandro If you decide otherwise, I think we could actually strip out the debug logs from that package, make sure that the error logs return the error up the stack, and from kill() / Kill() return the pid if the process was killed successfully. That way, callers of the package could do something like:
log.WithFields(logfields.PIDFile, path).Debug("Killing old process")
pid, err := pidfile.Kill(path)
if err == nil && pid != 0 {
    log.WithFields(...).Info("Killed old process")
} else {
    log.WithError(err).Warning("Could not remove old process via pidfile")
}

(That said, it's not a big deal and certainly not a blocker for this PR)

@joestringer Oh, that's a fantastic idea! Why didn't I think of that, will do a PR for this.


Revert back to 0591c7026e0972ff2f2da0be7caf26f1590e73f6

This reverts the repo back to where it was after https://github.com/dotnet/razor/pull/8320 merged, which had a green CI build

It's vaguely interesting that this failed, but ultimately not useful.


Question: Is there something similar to eslint plugin?

Thinking about seting up in a set of repository (#microservicesOblige),
was wondering if it was possible to keep configuration DRY,
with a master config that is refered by disciples config in each repo.
Something similar to eslint plugins:
http://eslint.org/docs/developer-guide/working-with-plugins.html
Thanks in advance for the dedicated time to read and answer :smiley:

@AdrieanKhisbe and what would be the reference to or implication to this project? Please be more specific.

@AdrieanKhisbe Hi. I do not have the plan to support the feature of configuration.


Implement withCArrayOfStrings non-recursive

For very large inputs the recursive implemenation might hit a stack overflow.
rdar://88132779

@swift-ci please smoke test


How to use this library if I only want to use in ios module?

I'm using sqlcipher for android now but how I use this library for ios ? any guidance?

Sorry, I haven't gotten to writing a howto yet!
I didn't want different implementations of SQLite on different platforms. That's why I wrote this library.
It uses the same SQLite c++ library on Desktop/Android/iOS!
You can add the dependencies to a Maven SNAPSHOT like this.
 ext {
        gdxSqliteVersion = '0.5.5-SNAPSHOT'
    }

//CORE
       compile "de.longri.gdx-sqlite:gdx-sqlite:$gdxSqliteVersion"

//DEKTOP
       compile "de.longri.gdx-sqlite:gdx-sqlite-platform:$gdxSqliteVersion:natives-desktop"

//ANDROID
        compile "de.longri.gdx-sqlite:gdx-sqlite:$gdxSqliteVersion"
        natives "de.longri.gdx-sqlite:gdx-sqlite-platform:$gdxSqliteVersion:natives-armeabi"
        natives "de.longri.gdx-sqlite:gdx-sqlite-platform:$gdxSqliteVersion:natives-armeabi-v7a"
        natives "de.longri.gdx-sqlite:gdx-sqlite-platform:$gdxSqliteVersion:natives-arm64-v8a"
        natives "de.longri.gdx-sqlite:gdx-sqlite-platform:$gdxSqliteVersion:natives-x86"
        natives "de.longri.gdx-sqlite:gdx-sqlite-platform:$gdxSqliteVersion:natives-x86_64"

//iOS
        natives "de.longri.gdx-sqlite:gdx-sqlite-platform:$gdxSqliteVersion:natives-ios"

You will find examples of use in the test classes!

thanks for respond. Can I only use it in the ios module? similar configure the ios project
//iOS
compile "de.longri.gdx-sqlite:gdx-sqlite:$gdxSqliteVersion"
natives "de.longri.gdx-sqlite:gdx-sqlite-platform:$gdxSqliteVersion:natives-ios"

Since for android, I already have sqlcipher in path. I only need this works for ios.

Yes of course

Thanks Longri, I found interfaces have many differences between the android and gdx sql lite. e.g
in android
            Cursor countCursor = null;
            try {
                countCursor = db
                        .rawQuery(
                                "SELECT COUNT(*) FROM ally_inst WHERE gameId=? and (force1Code||force2Code=? or force1Code||force2Code=?);",
                                new String[] { String.valueOf(ally.getGameId()),
                                        ally.getForce1Code() + ally.getForce2Code(),
                                        ally.getForce2Code() + ally.getForce1Code() });
                if (countCursor.moveToFirst()) {
                    count = countCursor.getInt(0);
                }
            } finally {
                countCursor.close();
            }

but for gdx sqlite, I can't use rawQuery like the upper ones. If I change it to preparestatement, but I can find any example to return cursor using the preparestatement even in the test. Any idea?

You must resolve your variables in SQL text!
 "SELECT COUNT(*) FROM ally_inst WHERE gameId="
+ String.valueOf(ally.getGameId()
+ " and (force1Code||force2Code="
+ ally.getForce1Code() + ally.getForce2Code()
+ " or force1Code||force2Code="
+ ally.getForce2Code() + ally.getForce1Code()
+ ");"

you are right. I'm using the approach now, but you know that I can't abstract the rawQuery method for both android and ios. I'm wondering android & ios both are using sqlite, why we can't provide a method like that? do you have any idea for this?

sqlcipher has a additional implementation of 'rawQuery'


nested replication construct rejected syntax

Describe the bug
Does not pass Verible's SyntaxCheck, despite seeming to be valid according to the Verilog LRM 4.14. Nested concatenations are allowed, and replications are specified as "another form of concatenation", although no nested replications are included in the examples.
To Reproduce
package example_pkg;
  parameter integer FIFTEEN_NESTED_REPLICATION = {2{2{1'b1}}};
endpackage

Expected behavior
Syntax should be accepted.

b/176992014


Provisioning failure

Hello Jeanie,
When I go to install the provisioning package on the PC I get a provision failure error.  I have tried like a thousand times and just can't get it to go.  Could you assist or point me in the right direction?  Thank you!  Error is attached.

Hi kcmotmac76! I'm sorry but I can't provide troubleshooting support. Your best approach is to contact Microsoft Support (https://support.microsoft.com/en-us) or post your issue in the IT Pro forum (https://social.technet.microsoft.com/Forums/en-US/home?forum=win10itprosetup).


Add/additional metadata

Content was copied from here. The JSONs there were mainly created based on our SH docs.

Should / could line 18 of collections/landsat-1-5-mss-l1.yaml be fixed so it only contains one / at the end of the url?
Provider: "[USGS](https://www.usgs.gov//)"


Add Inmar bidder adapter

Inmar bidder adapter documentation

The code PR has been closed to due staleness, seemingly abandoned. Closing the docs PR as well, can be re-opened if the code is revived.


Unable to search or filter on Enum values

** Which Category is your question related to? **
GraphQL API
** What AWS Services are you utilizing? **
Appsync / Amplify CLI / GraphQL
** Provide additional details e.g. code snippets **
I would like to be able to search for Enum values and in this specific use case, I would like to search for all Responses that do not have the status of draft and verified. I don't see a way to do this using the generated code for base List function, or trying to use the @key or using @searchable.
Sample excerpt schema:
type Response
  @model
  @key(name: "ResponseStatus", fields: ["status", "updatedAt"], queryField: "responseStatus")
  @searchable
{
  id: ID!,
  status: Status,
  updatedAt: AWSDate
  ...
}

enum Status {
  draft
  submitted
  reviewed
  modified
  resubmitted
  verified
  inactive
  unknown
}

At this point, the only option I see moving forward is to change this enum to a String ... which is really frustrating.
Basically, I'm asking for first level support of enums. Any help?

Anyone have any updates on this?
@sammartinez - thanks for moving this, but I'm blocked right now, can this get elevated?

So this appears to be "fixed". It wasn't working and then I had to delete my API and rebuild for another reason. After that, things are working great.

Also facing this issue where enum-typed properties are missing in the Searchable filters. I had added the @searchable directive some time later after creating the initial @model, perhaps this could be the reason.


Delete bank account key from bankAccountList

Details
We never delete the bankAccountID key from the bankAccountList object, we just set the value to null here. We end up getting errors when looping over the object and trying to access properties on null - e.g. here and here.
Fixed Issues
$ https://github.com/Expensify/App/issues/7391
Tests

Log into the app
Go to any Workspace and click Connect bank account
Select Connect online with Plaid
Use the info in this SO to add an OPEN bank account.
After Bank connected successfully click on Disconnect bank account
Verify that there is no error and the bank account is deleted.

[X] Verify that no errors appear in the JS console

QA Steps
Steps above.

[x] Verify that no errors appear in the JS console

Tested On

[X] Web
[x] Mobile Web
[x] Desktop
[x] iOS
[x] Android

Screenshots

Web
https://user-images.githubusercontent.com/22219519/152430895-325d0f9b-d404-4591-b64d-92b8b0c5de2e.mov
Mobile Web
https://user-images.githubusercontent.com/22219519/152434637-0dc581e2-9f2d-41f9-a64e-267fd32aa4ed.mov
Desktop
https://user-images.githubusercontent.com/22219519/152434578-54ee53e0-bcc2-4183-83fc-d3ffb48c21f7.mov
iOS
https://user-images.githubusercontent.com/22219519/152434561-f24969b2-0f36-43d0-bf04-65dadac3c0a7.mov
Android
https://user-images.githubusercontent.com/22219519/152434610-d0b6c7b1-0821-4648-ba60-9ef4aa6e5a86.mov

Hi @luacmartins, I don't think that this is due to your PR, but I am getting redirected to the Routing number / Account number step when trying to add an open account via Plaid 😕
Did you happen to see this during testing? I see it on both main and cmartins-deleteAccountFromBankAccountList. I have updated all repos too. I shared in Slack here for more help.
https://user-images.githubusercontent.com/10736861/152791683-f62495f0-c372-4ab9-aeab-b22ce8a2849a.mov

I don't recall seeing that particular redirect, but I had some issues with the flow where I wasn't seeing the savings account option - https://expensify.slack.com/archives/C01GTK53T8Q/p1643906776673469

Hmm, I'm still having problems after rebuilding the vm, and I'm not seeing any logs which stand out to me. I'm not sure what else to try at this point. I might need to reprovision as a last resort.

I reprovisioned today, created a new account, but I see the same issue 😞

I updated my repos today and also saw the redirect when selecting Chase. However, it works if I select Wells Fargo. Maybe it's related to Nick's comment.

Alright, sorry for the delay here. Until today I thought the only Plaid staging back that worked was Chase!
It worked flawlessly on web and mobile once I tested with an open Wells Fargo bank 👍

No worries! Thanks for raising this issue! I updated the SO from Chase to Wells Fargo!

Self-merging with approval!

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by @luacmartins in version: 1.1.38-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by @Julesssss in version: 1.1.38-3 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Add working memory abstraction

In the real world :

A rule condition is evaluated against a set of known facts
A rule action acts on these facts and may add/remove/modify facts

The set of known facts is the working memory of a rules engine. It allows rules to add/remove/modify facts. This is a key concept to implement backward/forward chaining.
Moreover, having a separate working memory decouples a rule from data it operates on. This was the major drawback in Easy Rules v2 which caused a lot of issues regarding thread safety.
So having the following signature of evaluate and execute methods in the Rule API should make sense:
/**
 * Rule condition : return true if the rule should be applied given the known facts, false otherwise
 */
boolean evaluate(Facts facts);

/**
 * Rule action : may add/remove/modify facts
 */
void execute(Facts facts) throws Exception;

The goal is to add a Facts abstraction to represent a set of named facts and a @Fact annotation to mark a parameter as a fact when using a POJO as a rule. Any java object can be used as a fact.
Here is an example of a rule:
@Rule
class WeatherRule {
    @Condition
    public boolean itRains(@Fact("rain") boolean rain) {
        return rain;
    }

    @Action
    public void takeAnUmbrella(Facts facts) {
        System.out.println("It rains, take an umbrella!");
        // can add/remove/modify facts
    }
}

And how to use it:
@Test
public void test() throws Exception {
    // define facts
    Facts facts = new Facts();
    facts.add("rain", true);

    // define rules
    Rules rules = new Rules(new WeatherRule());

    // fire rules on known facts
    RulesEngine rulesEngine = new DefaultRulesEngine();
    rulesEngine.fire(rules, facts);
}

Easy Rules should make sure to inject the facts (by name) in the parameters of condition and action methods. If a parameter is of type Facts, the engine will inject all facts (by type).
This new API design should address the major thread safety issue of v2:

The rules are stateless and separated from the working memory
The rules engine is stateless and can be safely shared between threads
The working memory acts as a session for the fire method and should be created for each thread (each thread has its own set of data to operate on but the rules and the engine can be reused)

Version 3.0.0-SNAPSHOT has been deployed (use this repo to import it).
Here is sample output for the previous example:
[INFO] Engine name: engine
[INFO] Rule priority threshold: 2,147,483,647
[INFO] Skip on first applied rule: false
[INFO] Skip on first non triggered rule: false
[INFO] Skip on first failed rule: false
[INFO] Registered rules:
[INFO] Rule { name = 'WeatherRule', description = 'when itRains then takeAnUmbrella', priority = '2147483646'}
[INFO] Known facts:
[INFO] Fact { rain : true }
[INFO] Rules evaluation started
[INFO] Rule 'WeatherRule' triggered
It rains, take an umbrella!
[INFO] Rule 'WeatherRule' performed successfully

Thanks for the update, will check the new version out.


Stop incrementing LMP after a certain point ctd

I rule and have completed some work on Case Manager that's ready for review!
Very small syntactic bump to #1031 to get tests to pass.
This pull request makes the following changes:

remove patient from initial call date ref

It relates to the following issue #s:

stems from  #1031
Fixes #1008

Codecov Report

Merging #1079 into master will decrease coverage by 0.09%.
The diff coverage is 66.66%.

@@            Coverage Diff            @@
##           master    #1079     +/-   ##
=========================================
- Coverage    96.5%   96.41%   -0.1%
=========================================
  Files          50       50
  Lines        1031     1033      +2
=========================================
+ Hits          995      996      +1
- Misses         36       37      +1

Impacted Files
Coverage Δ

...dels/concerns/last_menstrual_period_measureable.rb
96.15% <66.66%> (-3.85%)
:arrow_down:

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 9f6cccc...ee7bd76. Read the comment docs.

@DarthHater can I get a quick review on this?

(or @KatSDC if you're on the grid this weekend)


java.lang.boolean cannot be cast to java.lang.double in expo 48.0.4

****in expo 48.0.4

working in expo 45

facing same problem
no solution?

Check this #5


Added autoconf tooling

Hi,
for my purposes I find useful having a standard way to package and install subs.
With the change in the pull request, after issuing the command:
prepare.sh xyz
you would have available the autoconf options; i.e.:
./configure --prefix=/opt/whatever
and you will be able to  install the subs by simply issuing the command:
make install
A further step could be to add *.deb, *.rpm creation on top of the standard autoconf tooling

I'm going to say no to this one, sorry. If you want an autoconf-sub that's up to you, but keeping the "core" we have extracted from rbenv generic.


Request: Include Markdown documentations in the respository

Hello,
I suggest you to add separated Markdown documentations to this repository because I don't have patience to open a new tab and go to your site several times, for scrolling and checking the documentations there.

@gusbemacbe.
Unfortunately it is too complicated to have  to update the documentation on the site and in the repository every time a new version comes out.
I used to do this in the past, but the documentation was sometimes out of sync and very extensive in the repository.
It is now more centralized and organized.
But do not you want to go to the site to read the documentation because you are lazy?
Is that serious? But you were not lazy in downloading a free project, right?
I almost do not have free time and I'm here keeping the project in the air, even without gaining anything.
I only do this out of passion, to help the community and gain knowledge.
And I ask the same of who uses. I did not force you to use it, it's here and it's free, use whoever, help whoever wants it.
I only ask that you have more caring and consideration for people and projects like this.
If you do not want to access the site, download it as a pdf, it's simple.

You misunderstood and misinterpreted me. You need to read attentively and carefully. I was not rude with you.

But do not you want to go to the site to read the documentation because you are lazy?
Is that serious? But you were not lazy in downloading a free project, right?

I download the repository, but it doesn't have documentations. Because of my internet and to economise my time. My internet isn't fast to load the full page. Separated offline Markdown documentations are quick to open and load.

I only do this out of passion, to help the community and gain knowledge.
And I ask the same of who uses. I did not force you to use it, it's here and it's free, use whoever, help whoever wants it.

Not liking to go to your site several times  doesn't mean disliking your site. You need to be careful for not misinterpreting.

I almost do not have free time and I'm here keeping the project in the air, even without gaining anything.

You didn't gain anything because you are distributing free project and everybody thinks they do not have or need to pay you. Why didn't you become into a donationware project, use the licences CC BY-SA CC BY-ND, CC BY-NC or CC BY-NC-SA, and charge us for the commercial use and require us to atribute you? You should do it. The Animate.css, Fancybox and Slidebars developers do it and charge who uses for commercial projects.
And moreover, to gain, sell components and templates in the sites CreativeMarket and Themeforest, and as you are specialist in JavaScript, be a partner of Alex Paduaru, @timcreative, maybe they are looking for some full stack developer (back-end and front-end) because they only design.

I only ask that you have more caring and consideration for people and projects like this.
I have already said you in the start of this answer. You misinterpreted me.

If you do not want to access the site, download it as a pdf, it's simple.
PDF is bad. I prefer Markdown and HTML. Thank you, I'll save and download your page.

Next time, do not accuse anybody of nothing, or they will think something and will desconsider your project.

I did not accuse you of anything, you just said that you did not have the patience to access the site. You, not me.
I did not make any money because I opted to leave the project open, as I said earlier the reasons. Donate whoever, use whoever.
It was all interpreted according to what you wrote.
Next time, do not be rude, among thousands of iziModal and iziToast downloads, you were the one to act like that, enjoy what you have for free, and think you should improve? Contribute, it is open to all!
Good luck!

I did not accuse you of anything, you just said that you did not have the patience to open a new tab, access the site, and scroll the screen. You, not me.
I did not make any money because I opted to leave the project open, as I said earlier the reasons. Donate whoever, use whoever.
It was all interpreted according to what you wrote.
Next time, do not be rude, among thousands of iziModal and iziToast downloads, you were the one to act like that, enjoy what you have for free, and think you should improve? Contribute, it is open to all!
Good luck!


geo-partition the gin index in the vehicles table

in the short term, I'm going to remove this index. If we want to demo gin searching / filtering, we will just have to add the index manually before the demo. cc @jseldess @awoods187

Should we close this out, as we no longer manually partition tables/indexes?

yeah


Generic parameter defaults in arrow functions confused as jsx elements in tsx files

const OkInTsx = function <A = string>() {
  return 'ok in ts file';
};

export const BrokeInTsx = <A = string>() => {
  return 'ok in ts file';
};

To replicate, copy that code in a ts file (v3.3+ tested, updated vscode). It should be ok. Rename ts to tsx and the generic parameter default will be considered a jsx element and therefore a syntax error. I discovered this doing some codegen into a tsx file. If we are writing our own code, we can work around, but it seems jsx and generic parameter defaults on arrow functions aren't working together at the moment.

You forgot to fill out the issue template. It asks for search terms you used to find existing issues. Duplicate of #15713.

Whoops, don't know why I didn't get a template that time. This is a slightly different issue which I show in the ts playground here. Basically, there are workarounds for generics on arrow functions, but not for generic parameter defaults with the = in there. I can repost   with template if it's actually new. I searched for typescript generic aliases, typescript generic renaming, typescript generics, advanced typescript generics, generic parameter defaults.
// Known similar issue with generics https://github.com/microsoft/TypeScript/issues/15713

//Work arrounds
export const CommaWorkArroundForGenerics = <A,>() => {
  return 'ok in ts file';
};

export const ExtendsWorkArroundForGenerics = <A extends unknown>() => {
  return 'ok in ts file';
};

export const DontUseArrowFunctionsWorkArround = function <T = string>(x:T) {
  return x
};

// I believe a new issue without work arrounds for generic parameter defaults in arrow functions
export const Broke1 = <IX = string,>(x:Ix) => { // no comma workarround
  return 'ok in ts file';
};

export const Broke2 = <IX = string extends unknown>(x:Ix) => { // no extends workarround
  return 'ok in ts file';
};

Your last example gets the syntax wrong in general—the constraint needs to come before the default. It works if you fix that, except that the second-to-last example breaks parsing for everything after it. So the one thing that doesn’t work is an arrow function with a default but no constraint (as in Broke1), but for all intents and purposes you can always add extends unknown, so there’s still at least one workaround for everything you could need to do.

Aha, got it, thanks.
  return 'ok in ts file';
};```


Update to latest OpenSTA

Marking DCO as passed (sorry for forgetting about this).

@tspyrou @maliberty : PR to get the latest OpenSTA code. I have already run all regressions locally and they passed.

@tspyrou @maliberty @oharboe : PR to get the latest OpenSTA code. I have already run all regressions locally and they passed.

Great! Since I have already tested this, I will wait for it to go into master before trying to upgrade our build server.

Seems to have CI/CD issues @vvbandeira

./etc/Build.sh -no-warnings
<EMAIL_ADDRESS>line 1: ./etc/Build.sh: No such file or directory
script returned exit code 1

Seems to have CI/CD issues @vvbandeira

./etc/Build.sh -no-warnings
<EMAIL_ADDRESS>line 1: ./etc/Build.sh: No such file or directory
script returned exit code 1

Do you have a link @openroadie ? Looks like it is all passing:


Failed to fetch gas estimate when sending erc20

Trying to send an erc20 token but getting a Web3Error "Failed to fetch gas estimate".
Here is a snippet of my code:
   let amount = Web3.Utils.parseToBigUInt(tokenAmount, units: .eth)
        var options = TransactionOptions.defaultOptions
        options.gasPrice = gasPrice // is calculated as follows web3Main.eth.getGasPrice()
        options.gasLimit = gasLimit //set to BigUInt(50000)
        options.from = EthereumAddress(from)
        options.to = ethToAddress
        options.value = amount

      guard let myTransaction = contract.method("transfer", parameters: [ethToAddress, amount] as [AnyObject], extraData: Data(), transactionOptions: options) else {
            throw Web3Error.transactionSerializationError
        }

        let myRes = try myTransaction.send(password: "PASSWORD", transactionOptions: options)

Produces error on the last line. Any ideas?

I’m also getting a “Failed to fetch gas estimate” error when attempting to submit txns.
This started yesterday. Could it be a problem with Infura?

On Apr 2, 2019, at 5:47 AM, Kim-ios<EMAIL_ADDRESS>wrote:
Trying to send an erc20 token but getting a Web3Error processing error "Failed to fetch gas estimate".
Here is a snippet of my code:
let amount = Web3.Utils.parseToBigUInt(tokenAmount, units: .eth)
var options = TransactionOptions.defaultOptions
options.gasPrice = gasPrice
options.gasLimit = gasLimit
options.from = EthereumAddress(from)
options.to = ethToAddress
options.value = amount
  guard let myTransaction = contract.method("transfer", parameters: [ethToAddress, amount] as [AnyObject], extraData: Data(), transactionOptions: options) else {
        throw Web3Error.transactionSerializationError
    }

    let myRes = try myTransaction.send(password: "PASSWORD", transactionOptions: options)

Produces error on the last line. Any ideas?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@Kim-ios , @barrasso hi!
Such error almost always means that your transaction does not satisfy the requirements of a smart-contract method and will fail. Please check the passed parameters (ethToAddress, amount) and how you create contract variable

@BaldyAsh - That is what I thought, however, I have not changed any of my code in the past few months. It has been working fine up until yesterday. I will continue to monitor and let you know.

@BaldyAsh unfortunately, yes. I am still getting this same error.  I just migrated to 2.1.3 and tried again, still no luck calling the ENS Registrar. I am moving onto the new ENS Registrar contract... so I will let you know how that goes.

I am also facing the same issue with master branch
using this line to my pod file for dependency.
pod 'web3swift', :git => 'https://github.com/matter-labs/web3swift.git', :branch => 'master'

There are a lot of optional uses in public API, and EhtereumAddress pod, for example, had changes in constructors for capitalization checks. So you can supply nil even while your code did not change

any new update for that error?

 static func sendERC20Token(smartContract: String,                                toAddress: String,                                value: Double,                                gasPrice: Double,                                gasLimit: Double,                                data: Data = Data(),                                password: String) throws -> TransactionSendingResult? {         guard let wallet = Wallet.sharedWallet, let web3 = web3 else {             return nil         }         let walletAddress = EthereumAddress(wallet.walletAddress)         let toAddress = EthereumAddress(toAddress)         let erc20ContractAddress = EthereumAddress(smartContract)         let amount = Web3.Utils.parseToBigUInt(String(value), units: .eth)         var options = TransactionOptions.defaultOptions         let parameters = [toAddress, amount] as [AnyObject]         options.value = amount         options.from = walletAddress         options.gasPrice = .manual(BigUInt(gasPrice))         options.gasLimit = .manual(BigUInt(gasLimit))         let method = "transfer"         guard let contract = web3.contract(Web3.Utils.erc20ABI,                                            at: erc20ContractAddress,                                            abiVersion: 2),               let transaction = contract.write(method,                                                parameters: parameters,                                                extraData: data,                                                transactionOptions: options)         else {             return  nil         }         return (try transaction.send(password: password))     }
My source code, same error :3

static func sendERC20Token(smartContract: String,
toAddress: String,
value: Double,
gasPrice: Double,
gasLimit: Double,
data: Data = Data(),
password: String) throws -> TransactionSendingResult? {
guard let wallet = Wallet.sharedWallet, let web3 = web3 else {
return nil
}
let walletAddress = EthereumAddress(wallet.walletAddress)
let toAddress = EthereumAddress(toAddress)
let erc20ContractAddress = EthereumAddress(smartContract)
let amount = Web3.Utils.parseToBigUInt(String(value), units: .eth)
var options = TransactionOptions.defaultOptions
let parameters = [toAddress, amount] as [AnyObject]
options.value = amount
options.from = walletAddress
options.gasPrice = .manual(BigUInt(gasPrice))
options.gasLimit = .manual(BigUInt(gasLimit))
let method = "transfer"
guard let contract = web3.contract(Web3.Utils.erc20ABI,
at: erc20ContractAddress,
abiVersion: 2),
let transaction = contract.write(method,
parameters: parameters,
extraData: data,
transactionOptions: options)
else {
return  nil
}
return (try transaction.send(password: password))
}

My source code, same error :3

Is your issue got fixed?

The problem here is when sending ERC20 tokens the options.value field should not be set. That field is supposed to be used for sending ETH. Notice the amount is already specified in the parameters array. So just delete the line options.value = amount.
This should probably be fixed in the example in the documentation as that sets the options.value field which will always result in this error.

@inn0vative1 thanks! Will be fixed

You should update document for everyone, please...

Please fix it in document for everyone! thanks

The problem here is when sending ERC20 tokens the options.value field should not be set. That field is supposed to be used for sending ETH. Notice the amount is already specified in the parameters array. So just delete the line options.value = amount.
This should probably be fixed in the example in the documentation as that sets the options.value field which will always result in this error.

but there's another question, where do I set transfer amount

Hi there,
I am getting the same error, although I am not setting options.value. I am using pod 'web3swift', :git => 'https://github.com/matter-labs/web3swift', :branch => 'master'
my code:
        let contractAddress = Constants.Basic.SmartContract
        let gasLimit = Constants.Basic.GasLimit // 21000
        //let gasPrice = TransferBLX.sharedInstance.gasPrice

        DispatchQueue.global(qos: .background).async {
            // TODO: Use InfuraMainnetWeb3
            let web3 = Web3.InfuraRinkebyWeb3()

            let data = Web3Wallet.sharedInstance.data
            let keystoreManager: KeystoreManager
            if Web3Wallet.sharedInstance.isHD! {
                let keystore = BIP32Keystore(data!)!
                keystoreManager = KeystoreManager([keystore])
            } else {
                let keystore = EthereumKeystoreV3(data!)!
                keystoreManager = KeystoreManager([keystore])
            }
            web3.addKeystoreManager(keystoreManager)

            let walletAddress = EthereumAddress(Web3Wallet.sharedInstance.address!)
            let toAddress = EthereumAddress(toAddressString)

            let erc20ContractAddress = EthereumAddress(contractAddress)
            let contract = web3.contract(Web3.Utils.erc20ABI, at: erc20ContractAddress, abiVersion: 2)!

            let method = "transfer"
            let amount = Web3.Utils.parseToBigUInt(amount, units: .eth)
            let parameters: [AnyObject] = [toAddress!, amount!] as [AnyObject]

            var options = TransactionOptions.defaultOptions
            options.from = walletAddress
            options.gasLimit = .manual(BigUInt(gasLimit))
            options.gasPrice = .manual(BigUInt(gasLimit)) // should be .automatic

            let transaction = contract.write(method, parameters: parameters, extraData: Data(), transactionOptions: options)!

            if let password = self.getWalletPassword() {
                do {
                    let result = try transaction.send(password: password)

                    let pendingTransactionObj = PendingTransaction(context: CoreDataManager.sharedInstance.backgroundContext)
                    pendingTransactionObj.amount = TransferBLX.sharedInstance.amount
                    pendingTransactionObj.created = Date().timeIntervalSince1970
                    pendingTransactionObj.confirmationTime = TransferBLX.sharedInstance.confirmationTime
                    pendingTransactionObj.tokenName = TransferBLX.sharedInstance.tokenName
                    pendingTransactionObj.tokenSymbol = Constants.Basic.DefaultToken
                    pendingTransactionObj.transactionFee = TransferBLX.sharedInstance.predictedTransactionFee()
                    pendingTransactionObj.txhash = result.transaction.txhash

                    CoreDataManager.sharedInstance.saveContext()

                    completion(result, nil)
                    return
                } catch {

                    // TODO: Define errors?

                    completion(nil, error)
                    return
                }
            }

            completion(nil, ApiClientError.Unhandled)

I tried to debug this a bit and got the following response.error.message in line 22 of Promise+Web3+Eth+EstimateGas.swift
(lldb) e response.error?.message
(String?) $R0 = "gas required exceeds allowance (10000000) or always failing transaction"
(lldb)

here:
//  web3swift
//
//  Created by Alex Vlasov.
//  Copyright © 2018 Alex Vlasov. All rights reserved.
//

import Foundation
import BigInt
import PromiseKit

extension web3.Eth {

    public func estimateGasPromise(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions?) -> Promise<BigUInt>{
        let queue = web3.requestDispatcher.queue
        do {
            guard let request = EthereumTransaction.createRequest(method: .estimateGas, transaction: transaction, transactionOptions: transactionOptions) else {
                throw Web3Error.processingError(desc: "Transaction is invalid")
            }
            let rp = web3.dispatch(request)
            return rp.map(on: queue ) { response in
                guard let value: BigUInt = response.getValue() else {
-->                    if response.error != nil {
                        throw Web3Error.nodeError(desc: response.error!.message)
                    }
                    throw Web3Error.nodeError(desc: "Invalid value from Ethereum node")
                }
                return value
            }
        } catch {
            let returnPromise = Promise<BigUInt>.pending()
            queue.async {
                returnPromise.resolver.reject(error)
            }
            return returnPromise.promise
        }
    }
}

Does this ring any bells?

I got this resolved, the following code works, even on Rinkeby:
    func transferERC20Token(toAddressString: String, amount: String, completion: @escaping (TransactionSendingResult?, _ error: Error?)  -> Void) {
        let contractAddress = Constants.Basic.SmartContract

        DispatchQueue.global(qos: .background).async {
            // TODO: Use InfuraMainnetWeb3
            let web3 = Web3.InfuraRinkebyWeb3()

            let data = Web3Wallet.sharedInstance.data
            let keystoreManager: KeystoreManager
            if Web3Wallet.sharedInstance.isHD! {
                let keystore = BIP32Keystore(data!)!
                keystoreManager = KeystoreManager([keystore])
            } else {
                let keystore = EthereumKeystoreV3(data!)!
                keystoreManager = KeystoreManager([keystore])
            }
            web3.addKeystoreManager(keystoreManager)

            let walletAddress = EthereumAddress(Web3Wallet.sharedInstance.address!)
            let toAddress = EthereumAddress(toAddressString)

            let erc20ContractAddress = EthereumAddress(contractAddress)
            let contract = web3.contract(Web3.Utils.erc20ABI, at: erc20ContractAddress, abiVersion: 2)!

            let method = "transfer"
            let amount = Web3.Utils.parseToBigUInt(amount, units: .eth)
            let parameters: [AnyObject] = [toAddress!, amount!] as [AnyObject]

            var options = TransactionOptions.defaultOptions
            options.from = walletAddress
            options.gasLimit = .automatic
            options.gasPrice = .automatic

            if let transaction = contract.write(method, parameters: parameters, extraData: Data(), transactionOptions: options) {

                if let password = self.getWalletPassword() {
                    do {
                        let result = try transaction.send(password: password)

                        let pendingTransactionObj = PendingTransaction(context: CoreDataManager.sharedInstance.backgroundContext)
                        pendingTransactionObj.amount = TransferBLX.sharedInstance.amount
                        pendingTransactionObj.created = Date().timeIntervalSince1970
                        pendingTransactionObj.confirmationTime = TransferBLX.sharedInstance.confirmationTime
                        pendingTransactionObj.tokenName = TransferBLX.sharedInstance.tokenName
                        pendingTransactionObj.tokenSymbol = Constants.Basic.DefaultToken
                        pendingTransactionObj.transactionFee = TransferBLX.sharedInstance.predictedTransactionFee()
                        pendingTransactionObj.txhash = result.transaction.txhash

                        CoreDataManager.sharedInstance.saveContext()

                        completion(result, nil)
                        return
                    } catch {

                        // TODO: Define errors?

                        completion(nil, error)
                        return
                    }
                }
            }

            completion(nil, ApiClientError.Unhandled)
        }
    }

cause for the failure was the ERC20 smart contract, which rejected transactions for small amounts, had to transfer 500 tokens at least. The clue for this I found on our Android version, on which I got this Error: Transaction 0x86747212143260cc5bbc01441febbf0d6b9d2ed0c69067ac3cd564145d7b1288 has failed with status: 0x0. Gas used: 24682. Revert reason: 'Transfer amount under the transfer floor'. This is clearly a bug in our smart contract which is done by other guys (different company).
Nevermind, web3swift has no bug here!

@BaldyAsh have you already fixed it in docs?
@inn0vative1 Thank you for clarification, much appreciated!

Announcement about contributors program:
Keep in mind, guys, that your enchantments & pull requests (even documentation improvements) to this repo is eligible for the GitCoin grant program that we received.
So if you are willing to contribute - don't hesitate to do this. I will make a bounty (by ETH or Dai) to reward your contribution!
You can find more information on our [GitCoin Grant page] (https://gitcoin.co/grants/358/web3swift).


npm shrinkwrap and snyk

Added npm shrinkwrap and ran snyk policy to patch vulnerable dependencies
Additions

Added npm shrinkwrap and ran snyk policy to patch vulnerable dependencies
Added .npmrc file to keep our dependencies fixed

Removals

Removed gulp-sitespeedio since we weren't using it and the project isn't updated often enough to address their old dependencies

Testing

run frontend.sh

Review

@anselmbradford
@jimmynotjim
@sebworks
@ascott1

Notes

There's still some vulnerabilities with browser-sync's dependencies, but since we're only using that locally, it should be okay for now.

Checklist

[ ] Changes are limited to a single goal (no scope creep)
[ ] Code can be automatically merged (no conflicts)
[ ] Code follows the standards laid out in the front end playbook
[ ] Passes all existing automated tests
[ ] New functions include new tests
[ ] New functions are documented (with a description, list of inputs, and expected output)
[ ] Placeholder code is flagged
[ ] Visually tested in supported browsers and devices
[ ] Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)

@KimberlyMunoz This looks great!
Waht does snyk protect do in the build? Could that be removed from the Travis file/build?

I'll remove it and see how Travis responds.

:+1:

:+1:


the model can not convergence when adding compactor

Hi author, thank you for your grate work.
I implemented the resrep pruner in tensorflow environment according to your paper and code. below is what  I did:
firstly I add compactors to the conv layers to be pruned. and then I restore the parameter from original model be to pruned. I confirmed the restored model have the same output with the original model.  I also implemented others works such as adding regularization to compactor's grad , mask  schedule, etc.
after that  I begin to train the model, but I found the model can't  convergence, the loss is become bigger as the training on going( the mask is not set yet as the steps is not enough)，it seems like grad explosion？
did you meet the same issue before？
my environment：
tf2.2
network: mobilenetv2 + fpn + centernet. (the compactors only added to the mobilenetv2 backbone)
thank you！

optimizer: adam
lr schedule:
learning_rate: {
manual_step_learning_rate {
initial_learning_rate: 1e-3
schedule {
step: 80000
learning_rate: 1e-4
}
schedule {
step:120000
learning_rate: 1e-5
}
schedule {
step:160000
learning_rate: 1e-6
}
schedule {
step: 200000
learning_rate: 1e-3
}
}
}

after I adjusted the initial lr from 1e-3 to 1e-4. the loss is normal. I think the cause seems like the  compactor may cause the model's error surface's landscape be rugged.


updated sfx to otel for dotnet

The only extra step required here is to open jaeger thrift udp on the otel-collector.
This is because
a) ZipkinExporter doesn't read AddAttributes nor OTEL_RESOURCE_ATTRIBUTES
b) JaegerExporter also doesn't read OTEL_RESOURCE_ATTRIBUTES but it can read AddAttributes (for an environment) and it only sends over thrift udp atm
Once OTEL_RESOURCE_ATTRIBUTES is merged, we can revisit and use Zipkin instead.

I'm not sure how mature dot net otel is. Please consult @pjanotti before merging.

I'm also pretty sure sfx dot net context prop will work with other otel services.

ack, will ask @pjanotti to review!

this is correct but here we are using only OTel, correct?

We are now. We were not yesterday :)

We are now. We were not yesterday :)

:)


QA NCDA Child Scorecard [16h]

Issue
NCDA (National Childhood Development Agency) Child scorecard is a module that has activities both for CHW (Community level) and Nurses (Health Center level).
For Health centers, activites are included under "child scorecard" subactivities in: Standard pediatric visits, Group nutrition visits (FBF and PMTCT), and Individual nutrition.
For CHWs, the module is contained in a single activity called "Child Scorecard" that can be accessed under Individual Encounters.
Each of the modules (for HCs and CHWs feed data into the "Child ScoreCard" which can be viewed next to the progress report for any child 2 years old and under.
Much of this module has already been QA-ed but there have been many changes, so a review based on the analysis sheet is required
Tasks

Compare questions in HC-level activity to the questions on the analysis sheet (Column B)
Compare questions in CHW-level activities to the questions on the analysis sheet (Column A)
Assure that proper guidance is given in the case of certain conditional answers (Column C)
Confirm that mapping logic to the child scorecard is correct according to the analysis sheet (Columns D-H)

https://nutrition-ihangane.pantheonsite.io/app
QA Review
Found issues and questions:

The text for no ANC visit differs from the one in the Analysis sheet, but it is more logical, as an unborn child cannot actually have a visit, only the mother, so I think it's OK.

With 4 ANC encounter dates the guidance texts is not displayed.

QA Review - Universal Interventions
Found issues and questions:

I think the 'the' should be omitted just like in other guidance texts

It should be child's vaccine record

Should be Provide, as in other guidance texts

Checked and approved:

Texts and guidance texts display correctly, see above images.

QA Review - Nutrition behavior
Found issues and questions:

I think the first questions should be 'Did the child receive food items...",
I think the guidance text should say 'based on the ones they have in their area'.

QA Review - Targeted interventions
Found issues and questions

Guidance text should day 'Provide counseling...'

Receipt of conditional food items including small livestock is phrased differently than the text on the Analysis sheet.

Checked and approved:

Questions and guidance texts display correctly.

QA Review - Infrastructure & environment
Found issues and questions:
None
Checked and approved:

Questions and guidance texts display correctly.

@balagan73

The green immunization checkmarks do not display after entering vaccination dates.

Can you describe how you tested? This checkmark is received not just if a child received vaccination but if the child is "on track" with vaccinations overall.

The question 'Please check MUAC. Does the child have acute malnutrition?' is missing. The mapping logic says:

This has been changed according to https://github.com/TIP-Global-Health/eheza-app/issues/904
Also: did you check each of the HC cases? I only see one note there.
@anvmn

Under Universal Interventions, please check the immunization record (point 1, per @balagan73's explanation above) and fix the grammatical issues that @balagan73 has suggested (points 2, 3 and 4).
Under Nutrition behavior, please fix the grammatical issues (points 1 and 2)
under Targeted interventions, please fix grammatical issues (points 2 and 3)

@adamhstewart

Under Universal Interventions, please check the immunization record (point 1, per @balagan73's explanation above) and fix the grammatical issues that @balagan73 has suggested (points 2, 3 and 4).

Waiting for @balagan73 explanation. In addition, I need to know the patient that was tested, so I can check the reason for suspected incorrect result.
Gramar fixd.

Under Nutrition behavior, please fix the grammatical issues (points 1 and 2)

Fixed

Targeted interventions, please fix grammatical issues (points 2 and 3)

Point 2 fixed. Point 3 shall remain as is, per #886.

@adamhstewart @anvmn
Regarding the immunization:
After filling out the Child scorecard, the Vaccination history activity was available, and I have filled that. Today going back to the same patient, the Vaccination history was available, as I have entered that vaccination data is not up to date.
Here entering a new Rotarix vaccination date the immunization checkmarks got updated.

I think this is working fine, but some vaccinations are missing for the first four months
I have checked all the HC cases and compared the questions with the ones on the analysis sheet. They were correct.

Further checking the immunization, I have noticed some weird things:
BCG and Rotarix vaccination date was given, but BCG and Rotarix activity was not marked as finished.

After refreshing the app, Rotarix was marked as finished, and I could enter the BCG vaccination date again:
After entering the same date as before, BCG activity was marked finished.

Although all the vaccinations were entered, third month is still not marked with checkbox. (Baby name is 'Baby Another')

@balagan73
It's not enoough to set date. You also need to press Save button on the bottom of the form.
My guess is that you did not.


[Bug]: refusing to create the primary instance while the latest generated serial is not zero

Is there an existing issue already for this bug?

[X] I have searched for an existing issue, and could not find anything. I believe this is a new bug.

I have read the troubleshooting guide

[X] I have read the troubleshooting guide and I think this is a new bug.

I am running a supported version of CloudNativePG

[X] I have read the troubleshooting guide and I think this is a new bug.

Contact Details
<EMAIL_ADDRESS>Version
older in 1.23.x
What version of Kubernetes are you using?
1.29
What is your Kubernetes environment?
Other
How did you install the operator?
Helm
What happened?
While doing my initial deployment I notice that it always got stuck after completing the "cnpg-cluster-1-initdb", checking the logs of it I see that it start but then it got shutdown. From the operator all that I see is the error of the title of this issue.
Cluster resource
Name:             cnpg-cluster-1-initdb-z9clj
Namespace:        cnpg-database
Priority:         0
Service Account:  cnpg-cluster
Node:             node2/<IP_ADDRESS>
Start Time:       Wed, 07 Aug 2024 00:42:16 +0000
Labels:           batch.kubernetes.io/controller-uid=afc0e4dd-5485-48d4-a468-c9e5859df8c4
                  batch.kubernetes.io/job-name=cnpg-cluster-1-initdb
                  cnpg.io/cluster=cnpg-cluster
                  cnpg.io/instanceName=cnpg-cluster-1
                  cnpg.io/jobRole=initdb
                  controller-uid=afc0e4dd-5485-48d4-a468-c9e5859df8c4
                  job-name=cnpg-cluster-1-initdb
Annotations:      cni.projectcalico.org/containerID: ada0bee1e7733875ba10ad29ace85779c3b39b9ce1d4ee19e65a63970d1e9e01
                  cni.projectcalico.org/podIP:
                  cni.projectcalico.org/podIPs:
Status:           Succeeded
SeccompProfile:   RuntimeDefault
IP:               <IP_ADDRESS>
IPs:
  IP:           <IP_ADDRESS>
Controlled By:  Job/cnpg-cluster-1-initdb
Init Containers:
  bootstrap-controller:
    Container ID:    containerd://6254af8b43c4c395038b9da674b484f79ee8b3667455639b03e633a691f406b8
    Image:           ghcr.io/cloudnative-pg/cloudnative-pg:1.23.3
    Image ID:        ghcr.io/cloudnative-pg/cloudnative-pg@sha256:09e65ad4891b4a45052d1334171d86e9ede1625c4cb04d372e3c8699cb4529ae
    Port:            <none>
    Host Port:       <none>
    SeccompProfile:  RuntimeDefault
    Command:
      /manager
      bootstrap
      /controller/manager
      --log-level=info
    State:          Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Wed, 07 Aug 2024 00:42:16 +0000
      Finished:     Wed, 07 Aug 2024 00:42:16 +0000
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /controller from scratch-data (rw)
      /dev/shm from shm (rw)
      /etc/app-secret from app-secret (rw)
      /etc/superuser-secret from superuser-secret (rw)
      /run from scratch-data (rw)
      /var/lib/postgresql/data from pgdata (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-nrtsn (ro)
Containers:
  initdb:
    Container ID:    containerd://ceb1c64fbb50448c0c436e09b1a2bbfcdf9e018d8406eafb0ac9264c1067ca2a
    Image:           ghcr.io/cloudnative-pg/postgresql:15.2
    Image ID:        ghcr.io/cloudnative-pg/postgresql@sha256:4c5c7266afcaffb736e6181d9bb71f05c67cba971afd9aab76207e6be312c546
    Port:            <none>
    Host Port:       <none>
    SeccompProfile:  RuntimeDefault
    Command:
      /controller/manager
      instance
      init
      --initdb-flags
      --encoding=UTF8 --lc-collate=C --lc-ctype=C
      --app-db-name
      app
      --app-user
      app
      --log-level=info
    State:          Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Wed, 07 Aug 2024 00:43:37 +0000
      Finished:     Wed, 07 Aug 2024 00:43:38 +0000
    Ready:          False
    Restart Count:  0
    Environment:
      PGDATA:        /var/lib/postgresql/data/pgdata
      POD_NAME:      cnpg-cluster-1-initdb
      NAMESPACE:     cnpg-database
      CLUSTER_NAME:  cnpg-cluster
      PGPORT:        5432
      PGHOST:        /controller/run
    Mounts:
      /controller from scratch-data (rw)
      /dev/shm from shm (rw)
      /etc/app-secret from app-secret (rw)
      /etc/superuser-secret from superuser-secret (rw)
      /run from scratch-data (rw)
      /var/lib/postgresql/data from pgdata (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-nrtsn (ro)
Conditions:
  Type                        Status
  PodReadyToStartContainers   False
  Initialized                 True
  Ready                       False
  ContainersReady             False
  PodScheduled                True
Volumes:
  pgdata:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  cnpg-cluster-1
    ReadOnly:   false
  scratch-data:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:  <unset>
  shm:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:     Memory
    SizeLimit:  <unset>
  superuser-secret:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  cnpg-cluster-superuser
    Optional:    false
  app-secret:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  cnpg-cluster-app
    Optional:    false
  kube-api-access-nrtsn:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type    Reason     Age   From               Message
  ----    ------     ----  ----               -------
  Normal  Scheduled  26m   default-scheduler  Successfully assigned cnpg-database/cnpg-cluster-1-initdb-z9clj to node2
  Normal  Pulled     26m   kubelet            Container image "ghcr.io/cloudnative-pg/cloudnative-pg:1.23.3" already present on machine
  Normal  Created    26m   kubelet            Created container bootstrap-controller
  Normal  Started    26m   kubelet            Started container bootstrap-controller
  Normal  Pulling    26m   kubelet            Pulling image "ghcr.io/cloudnative-pg/postgresql:15.2"
  Normal  Pulled     25m   kubelet            Successfully pulled image "ghcr.io/cloudnative-pg/postgresql:15.2" in 1m19.068s (1m19.068s including waiting)
  Normal  Created    25m   kubelet            Created container initdb
  Normal  Started    25m   kubelet            Started container initdb

Relevant log output
{"level":"info","ts":"2024-08-07T00:43:38Z","logger":"pg_ctl","msg":" done","pipe":"stdout","logging_pod":"cnpg-cluster-1-initdb"}
{"level":"info","ts":"2024-08-07T00:43:38Z","logger":"pg_ctl","msg":"server started","pipe":"stdout","logging_pod":"cnpg-cluster-1-initdb"}
{"level":"info","ts":"2024-08-07T00:43:38Z","msg":"Configuring new PostgreSQL instance","logging_pod":"cnpg-cluster-1-initdb"}
{"level":"info","ts":"2024-08-07T00:43:38Z","msg":"Executing post-init SQL instructions","logging_pod":"cnpg-cluster-1-initdb"}
{"level":"info","ts":"2024-08-07T00:43:38Z","msg":"Executing post-init template SQL instructions","logging_pod":"cnpg-cluster-1-initdb"}
{"level":"info","ts":"2024-08-07T00:43:38Z","msg":"executing Application instructions","logging_pod":"cnpg-cluster-1-initdb"}
{"level":"info","ts":"2024-08-07T00:43:38Z","logger":"pg_ctl","msg":"pg_ctl: server is running (PID: 33)\n/usr/lib/postgresql/15/bin/postgres \"-D\" \"/var/lib/postgresql/data/pgdata\" \"-c\" \"port=5432\" \"-c\" \"unix_socket_directories=/controller/run\" \"-c\" \"listen_addresses=<IP_ADDRESS>\"\n","pipe":"stdout","logging_pod":"cnpg-cluster-1-initdb"}
{"level":"info","ts":"2024-08-07T00:43:38Z","msg":"Shutting down instance","logging_pod":"cnpg-cluster-1-initdb","pgdata":"/var/lib/postgresql/data/pgdata","mode":"fast","timeout":null}
{"level":"info","ts":"2024-08-07T00:43:38Z","logger":"postgres","msg":"record","logging_pod":"cnpg-cluster-1-initdb","record":{"log_time":"2024-08-07 00:43:38.598 UTC","process_id":"33","session_id":"66b2c33a.21","session_line_num":"6","session_start_time":"2024-08-07 00:43:38 UTC","transaction_id":"0","error_severity":"LOG","sql_state_code":"00000","message":"received fast shutdown request","backend_type":"postmaster","query_id":"0"}}

{"level":"info","ts":"2024-08-07T01:13:40Z","msg":"refusing to create the primary instance while the latest generated serial is not zero","controller":"cluster","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster","Cluster":{"name":"cnpg-cluster","namespace":"cnpg-database"},"namespace":"cnpg-database","name":"cnpg-cluster","reconcileID":"746f21f2-6437-4faf-8a0d-9a39a5c242cf","latestGeneratedNode":1}
{"level":"info","ts":"2024-08-07T01:13:41Z","msg":"refusing to create the primary instance while the latest generated serial is not zero","controller":"cluster","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster","Cluster":{"name":"cnpg-cluster","namespace":"cnpg-database"},"namespace":"cnpg-database","name":"cnpg-cluster","reconcileID":"52019bfa-ed3d-4fb8-8c1e-a762bc5708d1","latestGeneratedNode":1}
{"level":"info","ts":"2024-08-07T01:13:42Z","msg":"refusing to create the primary instance while the latest generated serial is not zero","controller":"cluster","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster","Cluster":{"name":"cnpg-cluster","namespace":"cnpg-database"},"namespace":"cnpg-database","name":"cnpg-cluster","reconcileID":"60a1ceb5-794c-4192-9397-1b79319e933b","latestGeneratedNode":1}
{"level":"info","ts":"2024-08-07T01:13:43Z","msg":"refusing to create the primary instance while the latest generated serial is not zero","controller":"cluster","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster","Cluster":{"name":"cnpg-cluster","namespace":"cnpg-database"},"namespace":"cnpg-database","name":"cnpg-cluster","reconcileID":"dd832645-ac6e-4cc3-b9ba-3f3f78fc39d0","latestGeneratedNode":1}
{"level":"info","ts":"2024-08-07T01:13:44Z","msg":"refusing to create the primary instance while the latest generated serial is not zero","controller":"cluster","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster","Cluster":{"name":"cnpg-cluster","namespace":"cnpg-database"},"namespace":"cnpg-database","name":"cnpg-cluster","reconcileID":"61cb1bba-7c05-4ba2-82ba-a62885b66dd8","latestGeneratedNode":1}
{"level":"info","ts":"2024-08-07T01:13:45Z","msg":"refusing to create the primary instance while the latest generated serial is not zero","controller":"cluster","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster","Cluster":{"name":"cnpg-cluster","namespace":"cnpg-database"},"namespace":"cnpg-database","name":"cnpg-cluster","reconcileID":"7309533e-31ec-4235-b1e2-e63ac8c9f5f6","latestGeneratedNode":1}

Code of Conduct

[X] I agree to follow this project's Code of Conduct

I'm having the same issue here 😢

facing this too, using following:
apiVersion: v1
kind: PersistentVolume
metadata:
  name: postgres-0
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: /mnt/postgres-data-0
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: postgres-0
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: ""
  volumeName: postgres-0
  resources:
    requests:
      storage: 1Gi
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: postgres-1
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: /mnt/postgres-data-1
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: postgres-1
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: ""
  volumeName: postgres-1
  resources:
    requests:
      storage: 1Gi
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: postgres-2
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: /mnt/postgres-data-2
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: postgres-2
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: ""
  volumeName: postgres-2
  resources:
    requests:
      storage: 1Gi
---
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
  name: postgres
spec:
  affinity:
    enablePodAntiAffinity: true
  imageName: ghcr.io/cloudnative-pg/postgresql:15.2
  instances: 1
  monitoring:
    enablePodMonitor: true
  postgresql:
    parameters:
      huge_pages: "off"
  storage:
    resizeInUseVolumes: false
    size: 1Gi
    pvcTemplate:
      dataSource:
        apiGroup: v1
        name: postgres-0
        kind: PersistentVolumeClaim

same here... after deleting all pods and pvcs of an existing cluster manually the operator doesn't spin up new ones.
k8s 1.29, cnpg operator helm install 0.18.2

I'm facing the same issue. Anyone here come up with a work around for this?

Also have trhis same issue. InitJob starts but the cluster is not being (re)deployed. It only happens to a cluster that is being reployed with the same resources.

In our case deleting the cluster resource and re creating it solved the problem.
Bear in mind we used Retain storageclass for the PVs

Hi @marthydavid When deleting a postgres cluster with a Retain claim on PVs, does this result data lost when the cluster get recreated?

@Lolliip0p you are correct if you mark the storageclass retain the PV Claim will not be deleted from the volume so in this case the volume will be reused upon recreation of the clusters.postgresql.cnpg.io resource.
But you need to use this type of storageclass beforehand.
In the storageclass spec there's this field:
reclaimPolicy: Retain
Example:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  annotations:
    storageclass.beta.kubernetes.io/is-default-class: "true"
    storageclass.kubernetes.io/is-default-class: "true"
  name: openebs-zfspv
allowVolumeExpansion: true
parameters:
  fstype: zfs
  poolname: data
  shared: "no"
provisioner: zfs.csi.openebs.io
reclaimPolicy: Retain
volumeBindingMode: WaitForFirstConsumer

I'm getting this quite often even when I completely remove the PVC, PV, Cluster-object and the complete helm chart of the affected application.
Seems to be quite related to latest releases of CNPG to be frank

Well I now have to helm charts, that I completely nuke every trace off.

Its so bad and untraceable that I'm even rethinking my choice of going for CNPG to begin with.
I am lucky this wasn't a production cluster. But otherwise I would be royally screwed.
@sxd @mnencia
Can this PLEASE be triaged. This is for sure not limited to people with remaining PVs or PVCs.

quick glance showed that cnpg heavily relies on annotations in its logic.
i got the same err msg when i precreated pvc and cnpg cannot find appropritate annotation.
i let cnpg create pvc itself and cluster is running now.

quick glance showed that cnpg heavily relies on annotations in its logic. i got the same err msg when i precreated pvc and cnpg cannot find appropritate annotation. i let cnpg create pvc itself and cluster is running now.

I have no PVC or PV, everything is 100% a clean slate, so it should be creating them.
This error shouldnt show if there is no PVC or PV afaik.

I have no PVC or PV, everything is 100% a clean slate, so it should be creating them.
This error shouldnt show if there is no PVC or PV afaik.

probably, idk :) but code shows why it could happen.
maybe some orphans objects are still existed.
you can check it easily with something like this:
kubectl get pvc -A | grep cnpg.io

I have no PVC or PV, everything is 100% a clean slate, so it should be creating them.
This error shouldnt show if there is no PVC or PV afaik.

probably, idk :) but code shows why it could happen.
maybe some orphans objects are still existed. you can check it easily with something like this:
kubectl get pvc -A | grep cnpg.io

When I say no objects exist, I mean it.
NONE.
Including their namespace.

I have run into this issue as well - cant reinstall cnpg cluster. So there is no fix / workaround at the moment ?

I found at least one case where this could be reproduced somewhat:
Cases where somehow the storageClass was invalid and it wasn't creating PVCs might, in some cases, not start as well with this error.

I found at least one case where this could be reproduced somewhat: Cases where somehow the storageClass was invalid and it wasn't creating PVCs might, in some cases, not start as well with this error.

@PrivatePuffin  Did you manage to get it to work? In my case, I am using Longhorn. I see the storage being provisioned on longhorn, then they are detached again after the initdb fails to provision. Worked perfectly before. But I decided to redo the cnpg install - uninstalled everything , including all storage items and namespaces. Ensured there was nothing left and rebooted the cluster. Still cant get it installed again. Always goes into an error loop during the provision of the first node in the cnpg cluster.

@vacquah Can you give me the name of your storageClass?

@vacquah Can you give me the name of your storageClass?

longhorn-postgres-storage

Is there no solution to this? I still cant install.

Same here, cordoned the nodes, deleted pods + pvcs, -> refusing to create the primary instance while the latest generated serial is not zero
Nuking the cluster as well helped.

In my case, this happens when I manually delete the pvc/pv.
See also: https://github.com/cloudnative-pg/cloudnative-pg/blob/b3b6dbe7899d27dd65b42d4ecd89c9d0c3d780b0/internal/controller/cluster_create.go#L1063
If you really know what you are doing, you can override the lastGeneratedNode.
kubectl patch clusters.postgresql.cnpg.io mydb --type=merge --subresource status --patch 'status: {latestGeneratedNode: 0}'

Than the cluster comes back for me.

In my case, this happens when I manually delete the pvc/pv. See also:
cloudnative-pg/internal/controller/cluster_create.go
Line 1063 in b3b6dbe
contextLogger.Info("refusing to create the primary instance while the latest generated serial is not zero",

I can confirm this, although I'm not sure why deleting and recreating the cluster resource wouldn't solve it.

If you really know what you are doing, you can override the lastGeneratedNode.
kubectl patch clusters.postgresql.cnpg.io mydb --type=merge --subresource status --patch 'status: {latestGeneratedNode: 0}'
Than the cluster comes back for me.

This is good shit!

I had totally missed this issue. We will look into it ASAP. Thanks.

facing this too, using following:
apiVersion: v1
kind: PersistentVolume
metadata:
  name: postgres-0
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: /mnt/postgres-data-0
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: postgres-0
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: ""
  volumeName: postgres-0
  resources:
    requests:
      storage: 1Gi
... <snipped>

Why do you create the storage before-hand instead of using dynamic provisioning?

Why do you create the storage before-hand instead of using dynamic provisioning?

Might be best to ignore this weird setup when bug tracing this.
As most of the other people affected here have the same issue without weird customizations.

I can see why creating storage before hand can make sense in some scenarios...

Can we please just all ignore this?
As it has absolutely zero to do with the issue.
Its rather annoying getting notifications for comments like these that have nothing really to do with the issue itself.


Automatic statistics

Couldn't find my old scripts, but I'll dump what I used today here for future reference:

>>> from reviews.models import Review
>>> all_reviews = Review.objects.filter(date_start__year=2020)
>>> all_reviews = all_reviews.filter(proposal__reviewing_committee=1) # 1 = LK, 3 = AK
>>> all_reviews = all_reviews.exclude(stage=0) # Exclude supervisor reviews
>>> from collections import Counter
>>> Counter([ x.continuation for x in all_reviews]) # Use the review model to find out what these numbers mean
Counter({1: 86, 0: 81, 5: 5, 6: 1})
>>> sum([1 if x.short_route else 0 for x in all_reviews]) # is short route
132
>>> sum([1 if x.short_route == False else 0 for x in all_reviews]) # is long route
32
>>> sum([1 if x.short_route == None else 0 for x in all_reviews]) # straight to revision
9
>>> from proposals.models import Proposal
>>> Proposal.objects.filter(date_submitted__year=2020, reviewing_committee=1, is
_revision=True, parent__status_review=True).count()
7
>>> x = Counter([ (x.date_end - x.date_start).days if x.date_end else -1 for x i
n all_reviews])
>>> xx = list(x.elements())
>>> x
Counter({-1: 24, 0: 21, 1: 18, 6: 12, 3: 10, 5: 10, 2: 9, 4: 9, 7: 9, 10: 7, 9:
5, 8: 4, 15: 4, 20: 4, 17: 3, 18: 3, 21: 3, 11: 2, 14: 2, 16: 2, 22: 2, 24: 2, 3
1: 2, 12: 1, 13: 1, 23: 1, 27: 1, 30: 1, 38: 1})
>>> for i in range(24):  # Derp method to remove non-ended reviews. Number read from looking at `x`
...     xx.remove(-1)
...
>>> x = Counter(xx) # REALLY a derp method, isn't it? :P
>>> for d, n in x.items():
...     print("{} dagen: {}".format(d, n))
...
[snip]
>>> sum(x.elements())/len(list(x.elements())) # calculate average
7.523489932885906

Small update:
Desiree and I decided it might be better to just export an CSV (maybe excel, if possible?) with all attributes relavent for these statistiscs.
This way, the secraty can see the individual studies that are counted in the statistics instead of it being a black box.

Existing CSV code can be found under proposals/management/command/export_csv.py

2022 requests from FETC
Per chamber:

Number of submitted studies (excluding revisions)
Number of those assigned to the short route
Number of those assigned to the long route
Number of those submitted by bachelor, master (and RMA) students (total and splitted out)
(If possible) turnaround time, total and per route (short/long)

2022 requests from UiL OTS Labs management:
For linguistic chamber:

Registration kinds (EEG, ET, reaction time, questionaire, etc)

The stats we would need for our annual report are (as discussed with chairs both chambers yesterday, and see above comment):
Per chamber:
-Number of submitted studies (excluding revisions)
-Number of revisions (we hope to reduce this number in the future (privacy check, DMPs))
-Number of those assigned to the short route
-Number of those assigned to the long route
-Number of those submitted by bachelor, master (and RMA) students (total and splitted out) [see issue #380]
-(If possible) Turnaround time, total and per route (short/long) (for the first decision! revision reviews should be excluded [dc1: turnaround time 'submission date' until 'first decision date' is meant; applications that are immediately returned for 'revision' by choosing 'straight to revision' should be ignored]

[dc2: I would like to be able to calculate e.g. the average, range, and median myself: could I get a csv file with applications per chamber and per route, or at least that chamber and route are included in the table columns? I would also like to see whether it concerns research by students.]
-Turnaround time 'submission date' until 'final decision'; applications for which the procedure was discontinued should be excluded. As above, I would like to be able to calculate median and average etc. myself.
For linguistic chamber:
-Registration kinds (EEG, ET, reaction time, questionaire, etc)

Statistics for the 2023 report were gathered with the new management command in the feature/get_stats branch. This command, which returns a CSV, is the preferred method of getting statistics going forward because it allows for manual detection of outliers.
Some additions to this CSV have been requested for the future:

aanvraagnummer (dus het middelste deel van het referentienummer): op deze manier kan ik op aanvraagnummer sorteren om de hoogste versie te kunnen krijgen, zodat ik het gemiddeld aantal revisies kan berekenen.
versienummer (dus het laatste deel van het referentienummer): om te kunnen sorteren op ‘eerste versie’, zodat ik de tijd tot eerste beslissing kon berekenen, zie tweede tabblad, maar ook om het gemiddelde aantal revisies te kunnen berekenen.
datum ingediend (= ‘ingediend op’, maar dan zonder de tijd): om de tijd tot eerste beslissing te kunnen berekenen.
maand (= gehaald uit ‘ingediend op’): om een grafiek van aantallen aanvragen/revisies per maand te kunnen maken.
datum eerste beslissing (= Besloten op’, maar dan zonder de tijd): om de tijd tot eerste beslissing te kunnen berekenen.
first decision (= ‘datum eerste beslissing’ min ‘datum ingediend’): als dit meegeleverd kan worden, fijn, maar ik kan het dus ook uitrekenen.
route soort: ik heb nu als smaken ‘korte route’, ‘lange route’ en ‘amendement’, maar eigenlijk wil ik daar ook ‘elders goedgekeurd’ en ‘voortoetsing’ bij hebben, kan dat?

See the secretary email dated today for reference and a supporting excel sheet.

Isn't it the mail of 5 July 2024?


Lung terms (3/3): add new terms associated with genes

Note: one term was added as a synonym for an existing term:
Immunodeficiency, autosomal recessive due to ZNFX1 deficiency, I believe is equivalent to OMIM:619644
close #5261

@pnrobinson please let me know if you have any comments about these new terms. I'll go ahead and merge them tomorrow if I don't hear any objections. We can always go back and change them later too, if needed.

Update - I talked to Peter, we'll review these with Ada before merging

will redo


Update MicrosoftTeams.schema.json

@robin-liao can you also have a look at this PR?

If we do this change, then when should we also do it for devPreview? Otherwise, when the devPreview merge into master, it'll probably overwrite to old one? I mean, why not we opt in this change in devPreview instead of master? So next release of snapping we can just override the master content instead of resolving conflicts?
@MattSFT @hamenon-ms ?


Section for optimization is missing under webpack.js.org/configuration/#options

Section for optimization is missing in https://webpack.js.org/configuration/#options.
Has to be added.

There is a page under concepts/mode, maybe that should be moved under configuration section?

I mean optimization.

Oh my bad, misread that one 👍

i believe this is now added ? https://webpack.js.org/configuration/optimization/

i believe this is now added ? https://webpack.js.org/configuration/optimization/

Seems so, thanks for heads-up


facing installation issue with importing hub from s3prl

I am facing this error while running the upstream model for a new downstream task. Seems like a conflict between python3 version, numpy and numba.
I am using python 3.9, numpy 1.20.0, numba 0.55.1...please let me know if anyone has faced similar issues with this repo.

Hi, I'm encounter the same problem as you. This is because dtw-python==1.1.6 requires numpy>=1.22 under python 3.9, but the installation of s3prl requires numpy>=1.19.5,<=1.21, so it causes a conflict. I put . /s3prl/downstream/quesst14_dtw to solve the problem, so that when importing the hub, quesst14_dtw will not be imported, and then dtw will not be imported either. If you don't use downstearm/quesst14_dtw then everything is fine!

Hi, I'm encounter the same problem as you. This is because dtw-python==1.1.6 requires numpy>=1.22 under python 3.9, but the installation of s3prl requires numpy>=1.19.5,<=1.21, so it causes a conflict. I remove ./s3prl/downstream/quesst14_dtw to solve the problem, so that when importing the hub, quesst14_dtw will not be imported, and then dtw will not be imported either. If you don't use downstearm/quesst14_dtw then everything is fine!

Hi, just a quick question, I have removed the quesst14_dtw module, still I keep on having the same bug....seems like it is there in the miniconda environment that I am using, do you mind sharing how do you install s3prl without the quesst14_dtw downstream module...thanks a lot for your help...:)

Maybe you could try  to install it again, you need run ‘pip install -e . /’ in the ’s3prl‘ directory. For some reason, my installation process is complicated and may not be very helpful to you.

I used the same technique that you mentioned and got rid of the error. Thanks for the help..:)


Please add a ThirdStats icon to the Thunderbird Spaces Toolbar

Thunderbird version 102 has a Spaces Toolbar.
https://blog.thunderbird.net/2022/09/thunderbird-tip-customize-colors-in-the-spaces-toolbar/
Can a ThirdStats icon please be added to the Thunderbird Spaces Toolbar?
Perhaps code pointers from the CardBook add-on can help as a CardBook icon shows in the Spaces Toolbar.
https://addons.thunderbird.net/thunderbird/addon/cardbook/
https://gitlab.com/CardBook/CardBook/
What do you think?
Thank you

Thanks @ovari that is a great idea! I checked the webextension API and found that there already is an API for that:
https://webextension-api.thunderbird.net/en/102/spacesToolbar.html#functions
Will definitely implement this 👌🏻

This is implemented now and part of the next release.

Thank you


Clarify the language ID list

@dbaeumer I also went through similar issue mentioned in #593 and felt that whole language id in LSP is highly opinionated with an actual implementation.
We have a new stuff in a Spring space which is an attempt to provide higher level lsp services to a users and this language id always felt like slightly weird concepts in a LSP itself to define some hard coded values. Taking a simple example of reconciling an arbitrary document, higher level component can have knowledge of reconciling only a single document type or it could know to reconcile everything regardless of a document type.
That's a reason why we came up with isCompatibleWith in a higher level abstraction of a LanguageId. Higher level class can then then decide which types of language id's it actually supports and we added something more like LanguageId.ALL and LanguageId.TXT.
https://github.com/spring-projects/spring-dsl/blob/f3acd5e61a59550a23c1e8ad7053600193305f99/spring-dsl-core/src/main/java/org/springframework/dsl/model/LanguageId.java#L168-L181
Then any service consuming this can deside if particular component supports this language id, etc, and having special check for * can then accept all. As far I understood this is a way to use language id in your library.
Just my 2 cents when deciding what to write to a LSP docs.

Forget to mention that I think this issue is more than how to use language id rather that how it is defined in a LSP itself. I've yet to find any realistic use case for these id's to actually exist in a protocol itself other than have have some id's defined there what LSP server impl's might support.

@jvalkeal it is not the intention that a client can only send a language id that is in the list. All we ask is that if a client for example send a TypeScript language id it sends the right id value that is know in the spec. I will clarify this.


[DO NOT MERGE]Dev resourcemover microsoft.migrate 2021 08 01

MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Changelog
Add a changelog entry for this PR by answering the following questions:

What's the purpose of the update?

[ ] new service onboarding
[X] new API version
[ ] update existing version for new feature
[ ] update existing version to fix swagger quality issue in s360
[ ] Other, please clarify

When are you targeting to deploy the new service/feature to public regions? Please provide the date or, if the date is not yet available, the month.- October
When do you expect to publish the swagger? Please provide date or, the the date is not yet available, the month. - October
If updating an existing version, please select the specific langauge SDKs and CLIs that must be refreshed after the swagger is published.

[ ] SDK of .NET (need service team to ensure code readiness)
[ ] SDK of Python
[ ] SDK of Java
[ ] SDK of Js
[ ] SDK of Go
[ ] PowerShell
[ ] CLI
[ ] Terraform
[ ] No refresh required for updates in this PR

Contribution checklist:

[X] I commit to follow the Breaking Change Policy of "no breaking changes"
[X] I have reviewed the documentation for the workflow.
[X] Validation tools were run on swagger spec(s) and errors have all been fixed in this PR. How to fix?

If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist

Applicability: :warning:
If your changes encompass only the following scenarios, you should SKIP this section, as these scenarios do not require ARM review.

Change to data plane APIs
Adding new properties
All removals

Otherwise your PR may be subject to ARM review requirements. Complete the following:

[X] Check this box if any of the following apply to the PR so that label “WaitForARMFeedback” will be added automatically to begin ARM API Review. Failure to comply may result in delays to the manifest.

Adding a new service
Adding new API(s)
Adding a new API version
-[X] To review changes efficiently, ensure you copy the existing version into the new directory structure for first commit (including refactoring) and then push new changes, including version updates, in separate commits.

[X] Ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.

[ ] If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist
If any of the following scenarios apply to the PR, request approval from the Breaking Change Review Board as defined in the Breaking Change Policy.

[ ] Removing API(s) in a stable version
[ ] Removing properties in a stable version
[ ] Removing API version(s) in a stable version
[ ] Updating API in a stable or public preview version with Breaking Change Validation errors
[ ] Updating API(s) in public preview over 1 year (refer to Retirement of Previews)

Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
Please follow the link to find more details on PR review process.

Please go through the contribution checklist added as part of the review and mark them completed. It will help you fix most of the issues and improve the quality of swagger and help close the PR faster. This is a requirement before review can be continued.

Please go through the contribution checklist added as part of the review and mark them completed. It will help you fix most of the issues and improve the quality of swagger and help close the PR faster. This is a requirement before review can be continued.

Went through the contribution checklist and have mark them completed.

@qwordy Can you please help us with merging this PR?

/azp run

/azp run