feat(rust): refactoring the care-pet with the scylladb driver latest release

Motivation
Since I have a task to setup care-pet in the Instruqt soon, it will be better if the application that the users will be playing with is in the latest release.
It was a jump from scylla-rust-driver 0.3 to 0.13 so the entire project was deprecated.
CheckList

[x] Web

[x] Owner Endpoint
[x] Pet Endpoint
[x] Pet Sensors Endpoint
[x] Sensor Values Endpoint
[x] Sensor Average Endpoint

[x] Migrate
[x] Load Test

Thanks for the review @timkoopmans and @wprzytula! I did the major changes and the only left was the one about caching the queries (mentioned by @wprzytula).
I'll merge it and open a new Pull Request to focus on that only.


WechatyEventListenerMessage cannot receive miniProgram message

When I send a new miniProgram, WechatyEventListenerMessage without access to messages sent to me, but send miniProgram repeat before sending can be received. How do I solve this problem so that I can send new miniProgram and still receive them

But until yesterday it was working fine and my code didn't change at all

I took a token from somewhere else to replace it, and then he was normal. Is there some kind of restriction on getting miniProgram messages?

I'm not sure if I completly understand your question. You wish to send a miniprogram message and get that message in the linstener? If you want the sent message, you can get the return of say.
e.g.
const new message = await contact.say(miniProgram)

This is not a coding problem, it may be a Token problem. The business here was running normally until the day I submitted the work order, and then the problem I mentioned at the beginning appeared that day: the miniProgram I had sent could be captured if I sent it again, but I could not get any new information when I sent a miniProgram I had not sent before. When I replaced it with a new Token, it returned to normal, but when I switched the Token back to the one with the problem in the first place, it was still unable to capture. It wasn't until the next afternoon that I tried again to switch the Token to the one that had initially gone wrong, but this time it normal
@hcfw007

Maybe you should contact the token provider.


Automated test of ipxe config to confirm sanboot functionality

Description
While this doesn't directly exercise the ipxe binaries we bake into boots,
it does use the ipxe configs to build an ipxe.lkrn binary to use for testing features.
This test uses expect and qemu to exercise the sanboot feature.
Why is this needed
Related to #157
How Has This Been Tested?
make test-sanboot succeeds.
Additionally, cherry-picking this commit onto 5d563d8 fails as expected.
How are existing users impacted? What migration steps/scripts do we need?
N/A
Checklist:
I have:

[ ] updated the documentation and/or roadmap (if required)
[x] added unit or e2e tests
[ ] provided instructions on how to upgrade

@nshalman can you rebase on top of latest master please?

@rawkode have you been able to figure out something todo with the self-hosted builders? Would be nice to wire boots in and use them to run qemu for this test.

:thinking: though maybe thats not really necessary if we can make use of qemu's emulation.

@nshalman can you rebase on top of latest master please?

Will do either tonight or tomorrow.

@mmlb Is this the issue you need taken care of?
https://github.com/tinkerbell/infrastructure/issues/10

Yep!

Sorry, I dropped the ball on that. I'll fix that this weekend

From what I can tell, this PR is still waiting on https://github.com/tinkerbell/infrastructure/pull/12. Is it correct to say that once that gets merged, this PR can be rebased and merged, or is there further work left to do here? Just following up on some stale PRs.

@nshalman want to rebase and add to GHA to see if it works in CI?


docker pid = 1 running sshd

Trying with docker, my mon-node1 is running sshd
[root@6d7c4ff37de7 ~]# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  82476  6184 ?        Ss   00:53   0:00 /usr/sbin/sshd -D
this makes the PID = 1 running sshd.
I guess this makes the setup think
"ansible_service_mgr": "sshd",
so that it failed if systemd is not present. The system is centos 7 (the daemon image of ceph-docker).
Is there a way to override the ansible_service_mgr = "systemd"?
Tried to to add into all.yml
ceph_conf_overrides:
mons:
ansible_service_mgr: systemd
it doesn't help. Any suggestions?
TASK [ceph.ceph-common : fail if systemd is not present] ***********************
fatal: [mon-node1]: FAILED! => {"changed": false, "failed": true, "msg": "Systemd must be present"}
fatal: [mon-node2]: FAILED! => {"changed": false, "failed": true, "msg": "Systemd must be present"}
fatal: [mon-node3]: FAILED! => {"changed": false, "failed": true, "msg": "Systemd must be present"}

Not sure what you're trying to achieve but putting sshd inside a container is not recommended and nor is running ansible inside a container...

I thought I could use ansible to install ceph on containers. If not please let me know and I will close this.

@gator1 yes you can, start with vagrant for this. Set docker https://github.com/ceph/ceph-ansible/blob/master/vagrant_variables.yml.sample#L4 to true and then run vagrant up.


msal-angular unable to find cached access token

Please follow the issue template below. Failure to do so will result in a delay in answering your question.

Library

[ ]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>
Framework
Angular 8
Description
MSAL does not locate a valid access token in the cache, causing it to try, and fail, to invoke a silent refresh.
I have debugged this issue and found why this is happening:
To get a hit on the token cache, the account needs a matching homeAccountIdentifier. In my case, the homeAccountIdentifier is not being set.
In the code below, from ClientInfo.js, msal attempts to obtain a uid and utid from the clientInfo. My observation is that it fails to obtain the uid. This subsequently causes homeAccountIdentifier to be undefined, hence the cache miss.
When attempting to get the uid, ClientInfo.stripPolicyFromUid is called, to remove the B2C policy. I guess the idea is that this would leave the user id. However, the clientInfo looks like this:
{uid: "-b2c_1a_hpsignin{VALID-CUSTOM-POLICY-NAME-HERE}", utid: "valid-guid-here"}
After stripping the policy name a blank uid remains. This results in account.homeAccountIdentitifer to be undefined, resulting in the cache miss.
In debug, I can set accounbt.homeAccountIdentifier to the expected value (taken from local storage), and the access token is retrieved from cache as expected.
It is unclear to me whether this is a bug in msal, or whether there is something in our B2C configuration that results in the omission of the user id from the Client Info hashed fragment. Whatever, the outcome is that msal is not working as expected.
    function ClientInfo(rawClientInfo, authority) {         if (!rawClientInfo || StringUtils.isEmpty(rawClientInfo)) {             this.uid = "";             this.utid = "";             return;         }         try {             var decodedClientInfo = CryptoUtils.base64Decode(rawClientInfo);             var clientInfo = JSON.parse(decodedClientInfo);             if (clientInfo) {                 if (clientInfo.hasOwnProperty("uid")) {                     this.uid = authority ? ClientInfo.stripPolicyFromUid(clientInfo.uid, authority) : clientInfo.uid;                 }                 if (clientInfo.hasOwnProperty("utid")) {                     this.utid = clientInfo.utid;                 }             }         }         catch (e) {             throw ClientAuthError.createClientInfoDecodingError(e);         }
Error Message
Refused to display 'https://login.microsoftonline.com/[guid]/oauth2/authorize?client_id=[remainder omitted]' in a frame because it set 'X-Frame-Options' to 'deny'.
app.component.ts:56 MSAL Logging:  Wed, 18 Nov 2020 17:47:14 GMT:1b584bd7-829c-44e3-b23e-655948817e4d-1.4.4-Error monitorIframeForHash unable to find hash in url, timing out
main.ts:51 Wed, 18 Nov 2020 17:47:14 GMT:1234-1.4.4-Verbose Telemetry Event stopped: 8bbd560b-4597-422c-a7b6-b202310f8d93_53999ab9-1f4f-4cc0-aef5-766d6eaa502e-msal.api_event
main.ts:51 Wed, 18 Nov 2020 17:47:14 GMT:1234-1.4.4-Verbose Flushing telemetry events: 8bbd560b-4597-422c-a7b6-b202310f8d93
app.component.ts:56 MSAL Logging:  Wed, 18 Nov 2020 17:47:14 GMT:1b584bd7-829c-44e3-b23e-655948817e4d-1.4.4-Error Error when acquiring token for scopes: [valid scope] ClientAuthError: Token renewal operation failed due to timeout.
Security

[ ] Is this issue security related?

Regression

[ ] Did this behavior work before?  Unknown
Version:

MSAL Configuration
// Provide configuration values here.
// For Azure B2C issues, please include your policies.
msal-angular b2c login with custom signin policy.

Reproduction steps
// Provide relevant code snippets here.
// For Azure B2C issues, please include your policies.
code is simple and standard, calling msal-angular login and using the msal interceptor to apply access-token to api calls.

`    const isIE = window.navigator.userAgent.indexOf('MSIE ') > -1 || window.navigator.userAgent.indexOf('Trident/') > -1;

    if (isIE) {
      this.authService.loginRedirect();
    } else {
      this.authService.loginPopup();
    }`

Expected behavior
interceptor applies access token to api calls.
Browsers/Environment

[X] Chrome
[X] Firefox
[X] Edge
[X] Safari
[X] IE
[X] Other (Please add browser name here)

@JeffFisher-sitekit This looks like a problem with the custom policy configuration. We're still waiting to hear back from the B2C service team to find out what you need to change to get the correct uid but in the meantime you can also open a B2C Support Ticket, they may be able to answer you quicker through that channel.

Not using Angular, but potentially suffering from the same issue.
We're currently using a legacy user flow/policy for sign in. For debugging purposes (with access tokens failing to refresh), we created a new user flow for sign in/sign up (not legacy) with token lifetime set to minimum. However, when we switch to use the new policy, we experience a cache miss every time the access token is acquired silently. It results in a huge performance hit.
Not sure if we have configured something wrong (tried to mimic the old user flow as much as possible) or if this is a bug in MSAL/B2C? Any pointers how we would go about debugging this further? Kind of stuck right now. Thanks 🙏.

I spent some time debugging this in Angular. My conclusion is that it's not a bug in MSAL. However, the MSAL implementation depends on 3 things coming back from B2C:

the 'uid' claim, as a unique identifier for the user in this context,
the 'tid' claim - the tenant id,
the scope.  I think this normally comes back in the json response that contains the access token.

MSAL caches the token using both a 'homeAccountIdentifier' and the scope to identify the correct access token for the given user in the context of the given scope. The 'homeAccountIdentifier' appears to be set to a string value ${uid.tid}.
We use custom policies in B2C. It seems that our policies are not returning a uid claim, and do not include the scope in the access token response. This prevented MSAL from finding the token, causing issues.
Because we only use one custom SCOPE, the code below can be used as a workaround. it rewrites the cached value, using a key that includes our SCOPE, and sets the account.homeAccountIdentifier to the incomplete value that MSAL used. This code is in our user service, and gets fired when MSAL broadcasts 'msal:loginSuccess'. I hope it helps.
Jeff.
`    this.account = this.authService.getAccount();
if (this.account && !this.account.homeAccountIdentifier) {
  let keys = new Array<string>();

  let storage: Storage = window[this.authService.getCurrentConfiguration().cache.cacheLocation];
  let oldStorageKey = '';
  let newStorageKey = '';
  let keyFound = false;

  let k = Object.keys(window[this.authService.getCurrentConfiguration().cache.cacheLocation]).reduce((tokens, key) => {
    if (key.startsWith('{')) {
      let o = JSON.parse(key);
      tokens = {
        authority: o.authority as string,
        clientId: o.clientId as string,
        homeAccountIdentifier: o.homeAccountIdentifier as string,
        scopes: [CONFIGURED SCOPES VALUE HERE]
      };

      oldStorageKey = key;
      keyFound = true;
    }
    return tokens;
  }, { authority: '', clientId: '', homeAccountIdentifier: '', scopes: '' });

  if (keyFound) {
    // our B2C Policies don't return the scope.
    // MSAL checks a) that the cache key contains a 'scope' property, and b) that the scope matches the requested scope.
    if (!oldStorageKey.match('scopes')) {
      newStorageKey = JSON.stringify(k);
      storage.setItem(newStorageKey, storage.getItem(oldStorageKey));
      storage.removeItem(oldStorageKey);
      console.log("Authorised User Service set scopes to ", k.scopes);
    }

    // our B2C policies are missing something that allows the homeAccountIdentifier to be properly determined
    // this is *possibly* a 'uid' claim that would come from the federated directory.
    // homeAccountIdentifier  still has a value in the cache, and look like this: 'uid.tid',
    // where uid is the (missing) user id, and tid is the value of the tid claim.
    // We are missing uid, so the stored value looks like '.tid', where tid is the tenantId.
    // we can set the value of account.homeAccountIdentifier to the value that has been used for the cache.
    this.account.homeAccountIdentifier = k.homeAccountIdentifier;
    console.log("Authorised User Service set homeAccountIdentifier to ", this.account.homeAccountIdentifier);
  }
}

`

@ulken Your issue may or may not be the same as what's being discussed in this thread, its hard to say without more info. Can you please open a new issue and share the version of msal you're using, a reproduction and any other pertinent information? Thanks
@JeffFisher-sitekit Thanks for following up, we're still waiting to hear back from the service about any guidance they may have in this case, you can also open a ticket with the service directly. If there's something you think the library could do to better handle this scenario feel free to open a PR and we'd be happy to take a look!

@tnorling Sure thing. I'll do some digging around what @JeffFisher-sitekit mentions and open a separate ticket.

Update - we see this issue with msal 1.4.4, and there is no issue when using msal 1.3.1. In both cases running angular-msal 1.1.2.
It's possibly a bug with msal 1.4.4.


Correct order of i5/i7 primer assignment and remove reformat option

fixes #335 Correct order of i5/i7 primer assignment in LibraryPrepShotgunProcess.create
fixes #322 Remove "Reformat" option from Normalize gDNA Plates page

@antgonza is it ok with you if I merge this PR, or do you have other requests?

Hi, @antgonza I have put in explanatory comments whenever the +1 or -1 is used, e.g.:
# Note subtracting 1 from positions in Well, as those
# are 1-based while the positions in layout are 0-based.
and
# Note adding 1 to the row/col from p, as those are
# 0-based while the positions in Well are 1-based
Can you clarify for me what you want to me to open an issue about? (Or you could open it, if that is easier than explaining it to me!)  I can't realistically make the indexes of the layout property 1-based, since it is a list of lists ... do you want to change the row and column positions in the database to be 0-based instead of 1-based so they match the layout indexes?  Or do you have something else in mind?

Thanks for the explanation.
I guess the best will be to make them 0 based so devs don't need to know when they have to +1 / -1 the indices ... I just feel like if someone else needs to make changes to those indexes, they are gonna need to be aware of when +/-1 ...


method chrome? always return boolean value

According to rails convention methods ending with '?' should always return boolean value
Rails console example:
2.1.1 :001 > browser = Browser.new({:ua => "Safari"})
=> #
2.1.1 :004 > browser.safari?
=> true
2.1.1 :003 > browser.firefox?
=> false
2.1.1 :002 > browser.chrome?
=> nil
In ruby 'if false' and 'if nil' give the same result but for example when you need to generate server side javascript and you do 'if(browser.chrome?)' and it returns nil, javascript fails

Commited as 915eb5c7c5fd600a561f5f86c9014d469e58167b.


The conversation handle "7F3FE62D-7E62-E811-912A-A4BF011A4992" is not found. An error was raised during trigger execution. The batch has been aborted and the user transaction, if any, has been rolled back

The database trigger was created but the conversation was not.
The triggered events didn't throw any error, but when I try to execute an INSERT statement in the database, the error in the title is thrown.
The message types were not created either.
As you can see in the following screenshot, the message type it's trying to use does not exist in the database.

Can you send me the SQL script to create your table, as well as the INSERT statement causing the your issue?

USE [RavexV3_Nucleo_Producao]
GO
INSERT INTO [dbo].[Equipamento]
([CriadoDatahora]
,[ModificadoDatahora]
,[Excluido]
,[CriadoPor]
,[IdEquipamentoTipo]
,[NumeroSerial]
,[IdVeiculoAtual])
VALUES
(<CriadoDatahora, datetime,>
,<ModificadoDatahora, datetime,>
,<Excluido, bit,>
,<CriadoPor, int,>
,<IdEquipamentoTipo, int,>
,<NumeroSerial, varchar(16),>
,<IdVeiculoAtual, int,>)
GO
INSERT INTO [dbo].[Equipamento]
(
[CriadoDatahora]
,[CriadoPor]
,[Excluido]
,IdEquipamentoTipo
,NumeroSerial
) VALUES
(
GETUTCDATE()
,@CriadoPor
,@Excluido
,@IdEquipamentoTipo
,@NumeroSerial
);
SELECT SCOPE_IDENTITY()

I tested using your SQL scripts and it works with no problem as you can see from video uploaded here.

Hi, I work with @wzuqui ,
The problem is that this issue doesn't happen every time, I'm not really sure if there's some kind of specific scenario that leads to it, but it happens from time to time.
If I get any further information that could help in finding the issue, I or @wzuqui will share it here, for now, that's all we got.

If this "...happens from time to time", I guess that is due to DEBUG or a long task associated to your ONCHANGE EVENT HANDLER. If some activity takes more the 3 minuted to complete, the SQL Server watch dog will dispose every SqlTableDependency object, resulting the error "The conversation handle XXX is not found."
Can you please test simply adding a Thread.Slepp (1000 * 60 * 5) in the OnChange event handler ?

It should be fixed.
However, C# model property mapping FLOAT table column, must be a decimal:

This is the table:

And this is the result I get now:

Fix available with version 7.4.0.

Please have a look at Remark section

@christiandelbianco The link is broken

First of all, thanks for the package and assisting us in this issue.
Second, we couldn't reproduce the issue using Thread.Sleep(1000 * 60 * 5).
Third, we may have found a reason why this is happening, we got 2 applications in our scenario using your package in the same database and tables, what happens is that when one of our applications restarts, instead of 2 triggers, we end up with 3 triggers.
Sounds like somehow the old trigger is not being removed.
Do you have any thoughts on this? Is this related to the issue?

Another question. in addition to this third trigger, can you see also third Queue, Service Broker?

Hi, today i created i windows service hosted on my Windows virtual machine. This windows service uses SqlTableDependency. I left this service working for 5 hours and my PC also goes in sleep mode. However, Windows service using SqlTalbeDependency works without any issue: it receives notification on record table change.

THANKS!
Can you check if other SqlTableDependency's database object are not deleted too?
For example, there should be two queue with name that is similar to Trigger name but ending with "_sender" and "_receiver".

Yes, they didn't get deleted either.
On Fri, Jun 8, 2018, 3:52 AM Christian Del Bianco<EMAIL_ADDRESS>wrote:

THANKS!
Can you check if other SqlTableDependency's database object are not
deleted too?
For example, there should be two queue with name that is similar to
Trigger name but ending with "_sender" and "_receiver".
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/christiandelbianco/monitor-table-change-with-sqltabledependency/issues/72#issuecomment-395666296,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJm6w8cmTQogne5-FkBbKHeAMBF2A_pfks5t6h8dgaJpZM4UQUIU
.

Thanks.
Last question: these DB object are still present after 3 minutes since you stop your web application?

Yes, they do, we tried waiting for about 10 minutes, and they were still there.

I really do not know what to say you. Please have a look to my videos https://ufile.io/ribbk where i have a MVC WebAPI application. As you can see, stopping the Visual Studio debugger, after 3 minutes, trigger is automatically removed from the table.

Another Question. Fail trigger deletion happened EVERY TIME or from time to time?
In the first case, may be, your user SQL has no enough grants

Can you check Accessing SQL Server Using Windows Integrated Security?

We updated the package to the latest version and changed some code, now it works like a charm.
We can't reproduce the issue anymore, you can close it now.
Thanks for the support.

@christiandelbianco sorry for returning to an old issue, but I have the exact same problem.
I'm using version 8.5.3 and I'm trying to integrate Your awesome package into ASP.NET Core 2.2 application.
Everything works great until I stop debugging my app (I run app via F5 from VS).
After some time I'm unable to do an update on my table because I get this error:

Msg 50000, Level 16, State 4, Procedure tr_dbo_PIV_Wniosek_1f546e17-6db4-4b8b-9152-09feb4c8e5b5_Sender, Line 202 [Batch Start Line 0]
The conversation handle "8FDDD6BA-1168-E911-80F2-00155D009A84" is not found.
Msg 3616, Level 16, State 1, Line 7
An error was raised during trigger execution. The batch has been aborted and the user transaction, if any, has been rolled back.

I must manually remove the trigger to be able to update my table. I've examined the trigger, everything is in try/catch, but there is RAISERROR, is there an option to generate trigger without that? I can't imagine having that error on the production system.
I've also noticed that every time I stop debugging (Shift + F5) message types, contracts, queues, and services don't get removed.
From what I understand DB objects should get removed after some time (3 minutes). The cleanup is done by DB? How can I validate that this mechanism works?
Must I remove all unneeded DB objects by hand in case my app crashes or I stop debugger/terminate process and I don't call Stop?

@Misiu The fact SqlTableDependency database object (that are Service Broker, trigger, queue ect...) are still in DB after 3 minutes is very strange. I have a lot of tests checking that after 3 minutes these object are dropped.
For example: https://github.com/christiandelbianco/monitor-table-change-with-sqltabledependency/blob/master/TableDependency.SqlClient.Test/DatabaseObjectAutoCleanUpAfter2InsertsTest.cs
In this test, i check with the methods:
Assert.IsTrue(base.AreAllDbObjectDisposed(dbObjectsNaming));
Assert.IsTrue(base.CountConversationEndpoints(dbObjectsNaming) == 0);

evaluate that SqlTableDependency's objects are removed from DB.
Can you execute this test and check if SqlTableDependency's objects are still in DB?

@christiandelbianco , Did you try running multiple MVC applications with signalr sql server backplane? I have a MVC Web project and API project hosted on 2 servers for load balancing and the SqlTableDependency is used with signal r only in web project to provide real time updates from the DB and I get this issue. All the triggers, SP, Messages, Contracts, Services etc are not deleted and stops pushing the updates to the UI. i am using the latest version SQLTableDependency 8.5.3. Any help will be appreciated. Thanks

Same for me when since i using SqlTableDependecy <IP_ADDRESS> i have randomly an error :
The conversation handle "9779B522-A491-E911-B065-0CC47A9A767B" is not found.
Do you have any solutions to unlock my situation because now each time it is using SqlTableDependency it throw this error... ?
I have already tested : Alter database MyDBName set trustworthy on but it changes nothing.

Please help us

I got a same problem while using SqlTableDependency. I am not able to update the data in table. here is the error I am getting. Could you please help me
Msg 50000, Level 16, State 4, Procedure tr_dbo_WorkflowObject_c4aef18b-8d8c-4ca6-be61-dcf40b5e73e8_Sender, Line 347 [Batch Start Line 14]
The conversation handle "3D164326-47A7-E911-90F5-005056B02440" is not found.
Msg 3616, Level 16, State 1, Line 16
An error was raised during trigger execution. The batch has been aborted and the user transaction, if any, has been rolled back.

Hi,
I work on an ASP.NET MVC 5 application and use SqlTableDependency 8.5.4 with SignalR 2.4.1.
After some time, i get the same error :

Msg 50000, Level 16, State 4, Procedure tr_dbo__Sender, Line 176 [Batch Start Line 0]
The conversation handle "" is not found.
Msg 3616, Level 16, State 1, Line 23
An error was raised during trigger execution. The batch has been aborted and the user transaction, if any, has been rolled back.

One other thing, some time i have many triggers and stored procedures in database. They are not dropped.
Do you have any suggestion ?
Some ideas :

In trigger, add some checks to avoid errors and rollbacks
Change IIS app pool elapsed time recycle
In code behind, check if database objects exist and recreate them if necessary

Thanks for your work and your help.

Faced the same problem, When I checked found two triggers on one table. Which I am tracking.
When I deleted SQL broker trigger and again started broker services this worked fine.

maybe i can help,
Our team  uses an inheritance of SqlTableDependency and an override of the GetBaseObjectsNamingConvention method, and that didn't solve all the problems, but it helps us find which service is unstable. With triggers on zabbix we eventually fixed the tables and restarted the service. For the time being it is serving very well for the 7 running services.

Hi christian,
I know this is very old thread, but I see same problem mentioned above and I not sure folk who rectified issue may be provided solution or approach so that it will be useful for others.
I am using MVC 5, EF, SQL Server 2016, SignalR ASP.NET, SQLTableDependency.
SqlTableDependency is in WindowsService and I have made code not to go to ideal state as suggested.
Windows Service will be restarted every day at night time in production and I see very occasionally
issue is getting
ERROR TableDependency_Error : server SQLP5AGL02, Sender : dbo_DeptDetails_1a3df6fa-1a3b-4847-adb7-a4b86ca9ff3a, Msg : Invalid object name 'dbo.dbo_DeptDetails_1a3df6fa-1a3b-4847-adb7-a4b86ca9ff3a_Receiver'., InnerEx :
Windows Service is stopping and not able to realise it is getting stopped

We updated the package to the latest version and changed some code, now it works like a charm.
We can't reproduce the issue anymore, you can close it now.
Thanks for the support.

which Version you have moved and what is the steps you have taken to resolve this issue?

Hi christian,
I know this is very old thread, but I see same problem mentioned above and I not sure folk who rectified issue may be provided solution or approach so that it will be useful for others.
I am using MVC 5, EF, SQL Server 2016, SignalR ASP.NET, SQLTableDependency.
SqlTableDependency is in WindowsService and I have made code not to go to ideal state as suggested.
Windows Service will be restarted every day at night time in production and I see very occasionally
issue is getting
ERROR TableDependency_Error : server SQLP5AGL02, Sender : dbo_DeptDetails_1a3df6fa-1a3b-4847-adb7-a4b86ca9ff3a, Msg : Invalid object name 'dbo.dbo_DeptDetails_1a3df6fa-1a3b-4847-adb7-a4b86ca9ff3a_Receiver'., InnerEx :
Windows Service is stopping and not able to realise it is getting stopped

Hi everyone,
lets solve this finally. The problem with not dropped database objects was probably already fixed. I found out in the past that the watch dog wasn't created in the same database transaction, and Christian made some other changes too. I'm using a slightly modified version which tries to reconnect to the same conversation handle. Since then I didn't find any orphaned SqlTableDependency database objects in our environment.
Be aware that in the latest version a bug was introduced inside the trigger, which can block your table.
I found recently the above mentioned Invalid object name exception only in my development environment. It can be reproduced by putting and hitting a breakpoint somewhere in your code, to stop the execution longer then the timeout period defined in Start. After that period you can Continue the execution of your service and the exception will be thrown, because the watchdog has already dropped all the database objects, due to no response from the client I suppose.
@Suresh9sb What do you mean by:
Windows Service is stopping and not able to realise it is getting stopped
In my opinion its not necessary to restart your Windows service every day.
Is it possible that something blocks your code for longer period then 180s?
Regards, Tomas


Merge request for RASopathy + Noonan Syndrome and Noonan-related Syndrome

For new term requests, please provide the following information:
There are two terms
MONDO:0021060 (RASopathy) with no equivalent ids
and
MONDO:0020297 (Noonan Syndrome and Noonan-Related Syndromes) which originates from Orphanet:98733
The ClinGen consortium's RASopathy Variant Curation Expert Panel relies on MONDO with their tooling to perform expert curations in this domain. When curation users lookup 'RASopathy' in MONDO they get the first MONDO id above.  However, the end result needs to be shared in ClinVar. Since ClinVar is driven by MedGen and not MONDO, they map the "Orphanet:98733" term to "RASopathy" as an equivalent.  ClinVar requires the submitters to use MedGen or Orphanet or OMIM or MeSH ids during submission. The ClinGen tooling is designed to rely on MONDO's equivalent ids to find a match that is suitable for ClinVar.
When we hit situations like this, we think it would be best for the overall community to be able to work with the resource that is able to provide the best solution. We request that MONDO merge these two terms as they appear to be equivalent or make the argument for keeping them separate and thus requesting Orphanet or OMIM to create an equivalent term that would allow better harmony with downstream system's like ClinVar and ClinGen.
Please let us know if this is possible.

@Orphanet do you agree and will you consider adding a synonym "RASopathy" to Orphanet:98733?
The list of classified diseases
https://www.ebi.ac.uk/ols/ontologies/ordo/terms?iri=http%3A%2F%2Fwww.orpha.net%2FORDO%2FOrphanet_98733
Corresponds with the classic RASopathies: https://rasopathiesnet.org/rasopathies/syndromes/

Has there been any progress or updates to report on this request?

Not sure if the obsolete label was an accident or because we consider merges to involve deprecation
@nicolevasilevsky can you coordinate with orphanet on this one?

Noonan Syndrome and Noonan-Related Syndrome ORPHA:98733 could very likely be renamed rasopathies if we add NF1 and legius to this group. Before doing so, we need to reassess the different annotations/ressources linked to this group for consistency.

Thanks @annieolry. @cmungall what are the next steps for us? Should we wait until Orphanet has renamed their terms, or should we move forward with merging these classes in MONDO?

As Rasopathy and Noonan-Related Syndrome are concepts slightly different, they will have different Orpha numbers in the next ORDO release (Rasopathy ORPHA:536391 and Noonan Syndrome and Noonan-Related Syndrome ORPHA:98733). The first one including the second one and also Neurofibromatosis type 1 ORPHA:636, Legius syndrome ORPHA:137605 and Capillary malformation-arteriovenous malformation ORPHA:137667.

I see this has not been touched after Orphanet created  ORPHA:536391.  What are the next steps?  Thanks.

I see this has not been touched after Orphanet created ORPHA:536391. What are the next steps? Thanks.

Yes, ClinGen is anxious to resolve this on their downstream systems that rely on both MONDO and MedGen. This is particularly troublesome for ClinGen in that they have an expert domain group focused on Rasopathies and would like to consolidate the representation of all of the various ontological and hierarchical associations between the sub-classifications of these diseases.  If there's anything ClinGen can do to assist with the integration of this solution between Orphanet and Monarch so that it is available to downstream users, please let us know.

@nicolevasilevsky can you add the equivalence axioms to Orphanet:536391 and check for consistency with ORDO structure

@cmungall not sure what you are asking for?

I just need to add an xref to RASopathy (Orphanet:536391)
source: this ticket

@maglott Hey can you help me understand how long it may take MedGen to ingest this change once it is released?
The ClinGen Rasopathy group has been waiting on this for a while and we'd love to remove our workarounds for having a MONDO rasopathy term that does not map equivalently to a MedGen id. (We are currently using the "noonan and noonan related syndrome" orphanet id which is currently aliased as "Rasopathy" in Medgen.
Any ideas or direction on who I can get this info from would be appreciated.
@nicolevasilevsky Do you have any estimates on when this will be available in EBI OLS or MonarchIntiative's website?

@larrybabb , we have no automated exchange set up, so the mention is the best way to move this along.
If I understand you correctly,  MedGen needs to  split ORPHA:98733 out of RASopathy, so Noonan will be under both RASopathy and Noonan and Noonan related syndrome

@maglott Here's the classification hierarchy that Orphanet ended up with (which will be reflected and mapped into MONDO - once the linked pull requests associated to this thread is committed.)

And here's how Noonan and Noonan Related Syndrome's children were impacted (if at all)

OK, I now see that the MONDO changes were not merged yet.
Sure, MedGen will add a term for Noonan and Noonan related syndrome and move the Orphanet ID there.

@larrybabb I created a pull request with the changes and am waiting for @cmungall to review and merge it. Mondo is released around the first of every month and OLS is released around the 15th of each month - so the edits should be visible in OLS then.
@cmungall or @kshefchek when will changes in Mondo be visible in Monarch? I don't know the answer to the question.

@nicolevasilevsky after this change will Noonan Syndrome be removed from Rasopathy as a child? In Orphanet's ontology Noonan Syndrome is not a Rasopathy child element. Also, will Noonan and Noonan-Related Syndromes end up as a child of Rasopathy in MONDO, so that all of these concepts end up with a consistent set of associations and thus equivalent conceptual meaning to the domain experts that would like to apply these terms in the knowledge they are building and ClinGen and sharing publicly in ClinVar?

Hi @larrybabb
'Noonan Syndrome' is still a child of 'Rasopathy'

'Noonan Syndrome' is also classified as a child of 'Noonan syndrome and Noonan-related syndrome' (which is not a child of Rasopathy)

In Orphanet, it looks like 'Noonan Syndrome' is a child of 'Noonan and Noonan-Related Syndrome', which is a child of 'Noonan Syndrome':

I am unsure if we properly addressed this ticket, but I am a bit confused what is needed.
Orphanet:536391 RASopathy is now equivalent to MONDO_0021060 RASopathy

I really think this is outside my area of expertise, but I feel fairly certain that folks will be quite confused if Noonan syndrome and Noonan-related syndrome is a child of Rasopathy in Orphanet but not in MONDO.  When the Rasopathy expert group asked to have the Rasopathy Orpha id associated with the Rasopathy mondo term (originating from EFO I think?), I believe they presumed that MONDO would follow the prefered hierarchical/ontological structure for Rasopathy in Orphanet.  They still seem quite different, which from my perspective makes the concepts seem quite different.  Doesn't the association to terms (parent and children) give meaning to the concept itself? If so, then how can we claim equivalence if they share very different hierarchical relationships?
So sorry for all the questions and confusion. I'm simply trying to help the ClinGen users understand how we can leverage MONDO to represent the organization of diseases that best represents the way they understand the concepts in play.

In reviewing the thread above, I believe @annieolry from Orphanet made a decision to add the Rasopathy->"Noonan syndrome and Noonan-related syndrome"->Noonan Syndrome structure versus renaming or merging the Rasopathy and "Noonan syndrome and Noonan-related syndrome" concepts together. This may be where the more comprehensive change in Mondo got lost.
From the Mar 20 comment above:

As Rasopathy and Noonan-Related Syndrome are concepts slightly different, they will have different Orpha numbers in the next ORDO release (Rasopathy ORPHA:536391 and Noonan Syndrome and Noonan-Related Syndrome ORPHA:98733). The first one including the second one and also Neurofibromatosis type 1 ORPHA:636, Legius syndrome ORPHA:137605 and Capillary malformation-arteriovenous malformation ORPHA:137667.

@larrybabb thanks for clarifying! I will

The PR was merged, so I think this can be closed now


fixed HISAT2 route

PR checklist

[x] This comment contains a description of changes (with reason).
[ ] If you've fixed a bug or added code that should be tested, add tests!

[ ] If you've added a new tool - have you followed the pipeline conventions in the contribution docs
[ ] If necessary, also make a PR on the nf-core/rnaseq branch on the nf-core/test-datasets repository.

[ ] Make sure your code lints (nf-core lint).
[ ] Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
[ ] Usage Documentation in docs/usage.md is updated.
[ ] Output Documentation in docs/output.md is updated.
[ ] CHANGELOG.md is updated.
[ ] README.md is updated (including new tool citations and authors/contributors).

Oh yeah, I didn't see it took the old name again, thanks for the heads up!

The prettier linting test fails but I didn't touch the incriminated file and the prettier --check . command runs fine on my machine :thinking:
What did I miss?

It's ok. I'll fix it! Think it's because I just merged https://github.com/nf-core/rnaseq/pull/790

Thank you! :D


Writing a new layer

Is there any way to write into a psd object a new layer ? for example if I just want to append a white mask onto the existing list of psd_tools.Layer s and then save it as a new psd file ? I could not find an encoding method

Currently writing support is not available.

Dear kyamagu,
I appreciate that you are working on Writing/Editing support. Meanwhile, do you know of other programmatic or scripting solutions that are available to edit layer content right now? I am trying to replace images and text for selected layers in existing PSD files. I started looking at (a) Adobe's Photoshop Scripting in javascript, and (b) ImageMagick command line tool. I am experienced in python and writing shell scripts, but I never used javascript. Do you have any opinions?
Thanks again for a very nice tool.

@genemiller Adobe's official scripting API is the only reliable option.
https://www.adobe.com/jp/devnet/scripting.html
Also there seems what's called Adobe CEP right now, but I have never played with that.
https://github.com/Adobe-CEP
In any case, Adobe's tools are proprietary and seems requiring specific scripting knowledge.

Thank you. I will check back at a later time to see how Writing/Editing support is progressing. Meanwhile I can follow javascript examples for Adobe's Photoshop Scripting. (Adobe CEP is is used to create plugins, which is overkill. And ImageMagic seems useless for what I need.)

Is there any way to change the raw image data in the layer of psd ? I want to do some image processing，such as resize, move and rotate, and save it into a new psd. Is it possible?

@rivergold Nope, writing support is not available

hi @rivergold

Is there any way to change the raw image data in the layer of psd ? I want to do some image processing，such as resize, move and rotate, and save it into a new psd. Is it possible?

here is simple script, saves the numpy image list as psd layers. (only rgb, rgba images, not masks etc)
https://gist.github.com/hazar-e/6a7ebcd3c267b0245456cc9d9cf6bcdf
pip3 requirements;

pytoshop
numpy
psd_tools

usage;
import cv2
from ps import savePSD, openPSD

inputpsd = openPSD("input.psd")

# resize bottom layer of psd
inputpsd[0] = cv2.resize(inputpsd[0], None, fx=0.5, fy=0.5, interpolation=cv2.INTER_AREA)

savePSD(inputpsd, "output.psd")

Is there writing support yet?

Dear kyamagu,
I appreciate that you are working on Writing/Editing support. Meanwhile, do you know of other programmatic or scripting solutions that are available to edit layer content right now? I am trying to replace images and text for selected layers in existing PSD files. I started looking at (a) Adobe's Photoshop Scripting in javascript, and (b) ImageMagick command line tool. I am experienced in python and writing shell scripts, but I never used javascript. Do you have any opinions?
Thanks again for this very nice tool.

You might try GIMP. I've been testing some things I need to automate with modifying PSDs using both GIMP and psd-tools. I have successfully added raster layers and changed colors of fill layers in GIMP, whereas psd-tools has been great for quickly reading layer structure but I have not had luck with changing anything using psd-tools yet as the changes I'd like to make are not supported (even for exporting a composite).

Dear kyamagu,
I appreciate that you are working on Writing/Editing support. Meanwhile, do you know of other programmatic or scripting solutions that are available to edit layer content right now? I am trying to replace images and text for selected layers in existing PSD files. I started looking at (a) Adobe's Photoshop Scripting in javascript, and (b) ImageMagick command line tool. I am experienced in python and writing shell scripts, but I never used javascript. Do you have any opinions?
Thanks again for this very nice tool.

You might try GIMP. I've been testing some things I need to automate with modifying PSDs using both GIMP and psd-tools. I have successfully added raster layers and changed colors of fill layers in GIMP, whereas psd-tools has been great for quickly reading layer structure but I have not had luck with changing anything using psd-tools yet as the changes I'd like to make are not supported (even for exporting a composite).

Dear kyamagu,
I appreciate that you are working on Writing/Editing support. Meanwhile, do you know of other programmatic or scripting solutions that are available to edit layer content right now? I am trying to replace images and text for selected layers in existing PSD files. I started looking at (a) Adobe's Photoshop Scripting in javascript, and (b) ImageMagick command line tool. I am experienced in python and writing shell scripts, but I never used javascript. Do you have any opinions?
Thanks again for this very nice tool.

@genemiller You might try GIMP. I've been testing some things I need to automate with modifying PSDs using both GIMP and psd-tools. I have successfully added raster layers and changed colors of fill layers in GIMP, whereas psd-tools has been great for quickly reading layer structure but I have not had luck with changing anything using psd-tools yet as the changes I'd like to make are not supported (even for exporting a composite).

How would you use GIMP programmatically to edit layers such as a text layer?

Dear kyamagu,
I appreciate that you are working on Writing/Editing support. Meanwhile, do you know of other programmatic or scripting solutions that are available to edit layer content right now? I am trying to replace images and text for selected layers in existing PSD files. I started looking at (a) Adobe's Photoshop Scripting in javascript, and (b) ImageMagick command line tool. I am experienced in python and writing shell scripts, but I never used javascript. Do you have any opinions?
Thanks again for this very nice tool.

@genemiller You might try GIMP. I've been testing some things I need to automate with modifying PSDs using both GIMP and psd-tools. I have successfully added raster layers and changed colors of fill layers in GIMP, whereas psd-tools has been great for quickly reading layer structure but I have not had luck with changing anything using psd-tools yet as the changes I'd like to make are not supported (even for exporting a composite).

How would you use GIMP programmatically to edit layers such as a text layer?

I recommend the open source Openraster file format. Krita and Gimp can open .ora files. Python script that can read and write ORA layers as python image list. All kinds of operations can be done on layers with Numpy and Pillow;  https://github.com/hazarek/halftone-gif-tool/blob/master/tools.py

.psd is Photoshop’s internal file format. For some reason, people like to use it as an interchange format, even though it is not designed for this.
.psd, unlike actual interchange formats like *.pdf, *.tiff, *.exr, *.ora and *.svg doesn’t have an official spec online. Which means that it needs to be reverse engineered. Furthermore, as an internal file format, it doesn’t have much of a philosophy to its structure, as it’s only purpose is to save what Photoshop is busy with, or rather, what all the past versions of Photoshop have been busy with. This means that the inside of a PSD looks somewhat like Photoshop’s virtual brains, and PSD is in general a very disliked file-format.
Due to .psd being used as an interchange format, this leads to confusion amongst people using these programs, as to why not all programs support opening these. Sometimes, you might even see users saying that a certain program is terrible because it doesn’t support opening PSDs properly. But as PSD is an internal file-format without online specs, it is impossible to have any program outside it support it 100%.
Krita supports loading and saving raster layers, blending modes, layerstyles, layer groups, and transparency masks from PSD. It will likely never support vector and text layers, as these are just too difficult to program properly.
We recommend using any other file format instead of PSD if possible, with a strong preference towards *.ora or *.tiff.
As a working file format, PSDs can be expected to become very heavy and most websites won’t accept them.
https://docs.krita.org/en/general_concepts/file_formats/file_psd.html

I recommend the open source Openraster file format. Krita and Gimp can open .ora files. Python script that can read and write ORA layers as python image list. All kinds of operations can be done on layers with Numpy and Pillow;  https://github.com/hazarek/halftone-gif-tool/blob/master/tools.py

.psd is Photoshop’s internal file format. For some reason, people like to use it as an interchange format, even though it is not designed for this.
.psd, unlike actual interchange formats like *.pdf, *.tiff, *.exr, *.ora and *.svg doesn’t have an official spec online. Which means that it needs to be reverse engineered. Furthermore, as an internal file format, it doesn’t have much of a philosophy to its structure, as it’s only purpose is to save what Photoshop is busy with, or rather, what all the past versions of Photoshop have been busy with. This means that the inside of a PSD looks somewhat like Photoshop’s virtual brains, and PSD is in general a very disliked file-format.
Due to .psd being used as an interchange format, this leads to confusion amongst people using these programs, as to why not all programs support opening these. Sometimes, you might even see users saying that a certain program is terrible because it doesn’t support opening PSDs properly. But as PSD is an internal file-format without online specs, it is impossible to have any program outside it support it 100%.
Krita supports loading and saving raster layers, blending modes, layerstyles, layer groups, and transparency masks from PSD. It will likely never support vector and text layers, as these are just too difficult to program properly.
We recommend using any other file format instead of PSD if possible, with a strong preference towards *.ora or *.tiff.
As a working file format, PSDs can be expected to become very heavy and most websites won’t accept them.
https://docs.krita.org/en/general_concepts/file_formats/file_psd.html

How would you use GIMP programmatically to edit layers such as a text layer?

The short answer is that GIMP supports automation, and one way to do it is with "Python Fu". It is a little clunky in that you have to jump through some hoops to capture stdout/stderr and so debugging your scripts is a bit of a pain (and it's Python 2.7), but you can do just about anything you can do in GIMP from the command-line in background mode with Python. See https://stackoverflow.com/questions/44430081/how-to-run-python-scripts-using-gimpfu-from-command-line for example. You can change the properties of layers, add layers, etc. If you dive into it for a couple days and do a lot of googling you'll probably find what you need.

How would you use GIMP programmatically to edit layers such as a text layer?

The short answer is that GIMP supports automation, and one way to do it is with "Python Fu". It is a little clunky in that you have to jump through some hoops to capture stdout/stderr and so debugging your scripts is a bit of a pain (and it's Python 2.7), but you can do just about anything you can do in GIMP from the command-line in background mode with Python. See https://stackoverflow.com/questions/44430081/how-to-run-python-scripts-using-gimpfu-from-command-line for example. You can change the properties of layers, add layers, etc. If you dive into it for a couple days and do a lot of googling you'll probably find what you need.

I recommend the open source Openraster file format. Krita and Gimp can open .ora files. Python script that can read and write ORA layers as python image list. All kinds of operations can be done on layers with Numpy and Pillow; https://github.com/hazarek/halftone-gif-tool/blob/master/tools.py

That looks really promising and I hope it gains traction. I work with a design time that uses Photoshop heavily, so unfortunately my use case requires handling of PSD files -- probably true for many other folks too.

I recommend the open source Openraster file format. Krita and Gimp can open .ora files. Python script that can read and write ORA layers as python image list. All kinds of operations can be done on layers with Numpy and Pillow; https://github.com/hazarek/halftone-gif-tool/blob/master/tools.py

That looks really promising and I hope it gains traction. I work with a design time that uses Photoshop heavily, so unfortunately my use case requires handling of PSD files -- probably true for many other folks too.

You can force companies like Adobe, Affinity to support ORA. or making PSD open source. designers should not be slaves to companies.

You can force companies like Adobe, Affinity to support ORA. or making PSD open source. designers should not be slaves to companies.

Dear kyamagu,
I appreciate that you are working on Writing/Editing support. Meanwhile, do you know of other programmatic or scripting solutions that are available to edit layer content right now? I am trying to replace images and text for selected layers in existing PSD files. I started looking at (a) Adobe's Photoshop Scripting in javascript, and (b) ImageMagick command line tool. I am experienced in python and writing shell scripts, but I never used javascript. Do you have any opinions?
Thanks again for this very nice tool.

@genemiller You might try GIMP. I've been testing some things I need to automate with modifying PSDs using both GIMP and psd-tools. I have successfully added raster layers and changed colors of fill layers in GIMP, whereas psd-tools has been great for quickly reading layer structure but I have not had luck with changing anything using psd-tools yet as the changes I'd like to make are not supported (even for exporting a composite).

How would you use GIMP programmatically to edit layers such as a text layer?

Recently I was trying this thing, made it work. Here you can find the script-fu script: https://gist.github.com/log10/4ab0ce259b999386008585f4c2d772d1 there I mentioned how to store and execute from powershell.
In my case, I need to create psd files for given list of images. I couldn't directly run these gimp commands from python. So I first generate the commands and save it in a .bat file and run that using python through powershell.

Using the available low-level methods, it is possible to create arbitrary new layers and insert them into the layer_records and channel_data. Effectively adding new layers to the PSD document when saving.
The code provided below can add two layers from PIL objects into a given PSD (it's for testing purpose so kinda rough around the edges don't mind it). Interesting behavior found through tests : the ImageData made from the initial PSDImage.frompil disappears when adding layers this way. May be due to missing metadatas and such.
from psd_tools.psd import *
from psd_tools.psd.header import FileHeader
from psd_tools.constants import ColorMode, Compression, Tag, ChannelID
import PIL

def add_layer(psd_img, layer_record, channel_data_list):

    psd_img._record.layer_and_mask_information.layer_info.layer_records.append(layer_record)
    psd_img._record.layer_and_mask_information.layer_info.channel_image_data.append(channel_data_list)

    psd_img._record.layer_and_mask_information.layer_info.layer_count += 1

    return psd_img

def layer_from_pil(pil_im, top = 0, left = 0):

    layer_record = layer_and_mask.LayerRecord(top=top, left=left, bottom=top + pil_im.height, right=left + pil_im.width)

    layer_record.name = "test"

    layer_record.channel_info = []
    channel_data_list = layer_and_mask.ChannelDataList()

    for channel in range(len(pil_im.getbands())):

        channel_data = layer_and_mask.ChannelData(compression=Compression.ZIP)
        channel_data.set_data(pil_im.getchannel(channel).tobytes(), pil_im.height, pil_im.width, 8)

        channel_data_list.append( channel_data )

        c_info = layer_and_mask.ChannelInfo()
        c_info.length = len(channel_data.data) + 2

        if pil_im.getbands()[channel] == 'R':
            c_info.id = ChannelID.CHANNEL_0
        elif pil_im.getbands()[channel] == 'G':
            c_info.id = ChannelID.CHANNEL_1
        elif pil_im.getbands()[channel] == 'B':
            c_info.id = ChannelID.CHANNEL_2
        elif pil_im.getbands()[channel] == 'A':
            c_info.id = ChannelID.TRANSPARENCY_MASK

        layer_record.channel_info.append(c_info)

    return (layer_record, channel_data_list)

IMG1 = PIL.Image.open("PATH1")
IMG2 = PIL.Image.open("PATH2")
psdi = psd_tools.PSDImage.frompil(IMG2)

layer_info = layer_and_mask.LayerInfo(layer_count = 0, layer_records = layer_and_mask.LayerRecords(), channel_image_data = layer_and_mask.ChannelImageData())

psdi._record.layer_and_mask_information.layer_info = layer_info

(layer_record, channel_data) = layer_from_pil(IMG2)
psdi = add_layer(psdi, layer_record, channel_data)

(layer_record, channel_data) = layer_from_pil(IMG1)
psdi = add_layer(psdi, layer_record, channel_data)

psdi.save("test.psd")

Using the available low-level methods, it is possible to create arbitrary new layers and insert them into the layer_records and channel_data. Effectively adding new layers to the PSD document when saving.
The code provided below can add two layers from PIL objects into a given PSD (it's for testing purpose so kinda rough around the edges don't mind it). Interesting behavior found through tests : the ImageData made from the initial PSDImage.frompil disappears when adding layers this way. May be due to missing metadatas and such.
from psd_tools.psd import *
from psd_tools.psd.header import FileHeader
from psd_tools.constants import ColorMode, Compression, Tag, ChannelID
import PIL

def add_layer(psd_img, layer_record, channel_data_list):

    psd_img._record.layer_and_mask_information.layer_info.layer_records.append(layer_record)
    psd_img._record.layer_and_mask_information.layer_info.channel_image_data.append(channel_data_list)

    psd_img._record.layer_and_mask_information.layer_info.layer_count += 1

    return psd_img

def layer_from_pil(pil_im, top = 0, left = 0):

    layer_record = layer_and_mask.LayerRecord(top=top, left=left, bottom=top + pil_im.height, right=left + pil_im.width)

    layer_record.name = "test"

    layer_record.channel_info = []
    channel_data_list = layer_and_mask.ChannelDataList()

    for channel in range(len(pil_im.getbands())):

        channel_data = layer_and_mask.ChannelData(compression=Compression.ZIP)
        channel_data.set_data(pil_im.getchannel(channel).tobytes(), pil_im.height, pil_im.width, 8)

        channel_data_list.append( channel_data )

        c_info = layer_and_mask.ChannelInfo()
        c_info.length = len(channel_data.data) + 2

        if pil_im.getbands()[channel] == 'R':
            c_info.id = ChannelID.CHANNEL_0
        elif pil_im.getbands()[channel] == 'G':
            c_info.id = ChannelID.CHANNEL_1
        elif pil_im.getbands()[channel] == 'B':
            c_info.id = ChannelID.CHANNEL_2
        elif pil_im.getbands()[channel] == 'A':
            c_info.id = ChannelID.TRANSPARENCY_MASK

        layer_record.channel_info.append(c_info)

    return (layer_record, channel_data_list)

IMG1 = PIL.Image.open("PATH1")
IMG2 = PIL.Image.open("PATH2")
psdi = psd_tools.PSDImage.frompil(IMG2)

layer_info = layer_and_mask.LayerInfo(layer_count = 0, layer_records = layer_and_mask.LayerRecords(), channel_image_data = layer_and_mask.ChannelImageData())

psdi._record.layer_and_mask_information.layer_info = layer_info

(layer_record, channel_data) = layer_from_pil(IMG2)
psdi = add_layer(psdi, layer_record, channel_data)

(layer_record, channel_data) = layer_from_pil(IMG1)
psdi = add_layer(psdi, layer_record, channel_data)

psdi.save("test.psd")

wow its cool!
I'm curious why, if you take
file_1._record...layer_records
and
file_1._record...channel_image_data
and try to place this information into file_2, it doesn't produce the expected result.

wow its cool!
I'm curious why, if you take file_1._record...layer_records and file_1._record...channel_image_data
and try to place this information into file_2, it doesn't produce the expected result.

You need to properly set the layer_count to the length of the layer_record list (which should be equal to channel_image_data btw). I don't know what steps you did exactly so i can't help more without additional context.
I'm currently writing code in the high level API to update the layer records depending on the layer tree structure from the api, i can already move around and delete layers arbitrarily. so if you want you might wait for a bit till i make a few functions for layer/group creation (first only pixel layers and normal groups).

wow its cool!
I'm curious why, if you take file_1._record...layer_records and file_1._record...channel_image_data
and try to place this information into file_2, it doesn't produce the expected result.

You need to properly set the layer_count to the length of the layer_record list (which should be equal to channel_image_data btw). I don't know what steps you did exactly so i can't help more without additional context.
I'm currently writing code in the high level API to update the layer records depending on the layer tree structure from the api, i can already move around and delete layers arbitrarily. so if you want you might wait for a bit till i make a few functions for layer/group creation (first only pixel layers and normal groups).

I tried doing this, but I'm getting an error in Photoshop :D
def layer_from_psd(psd_layer):

    top = psd_layer.top
    left = psd_layer.left
    bottom = psd_layer.bottom
    right = psd_layer.right

    layer_record = layer_and_mask.LayerRecord(top=top, left=left, bottom=bottom, right=right)

    layer_record.name = psd_layer._record.name

    layer_record.channel_info = []
    channel_data_list = layer_and_mask.ChannelDataList()

    for channel_info, channel_data in zip(psd_layer._record.channel_info, psd_layer._channels):

        channel_data_list.append(channel_data)

        layer_record.channel_info.append(channel_info)

    return (layer_record, channel_data_list)

psdi = psd_tools.PSDImage.open('1.psd')
psdi_2 = psd_tools.PSDImage.open('2.psd')

layer_record, channel_data_list = layer_from_psd(psdi[0])

psdi_2._record.layer_and_mask_information.layer_info.layer_records.append(layer_record)
psdi_2._record.layer_and_mask_information.layer_info.channel_image_data.append(channel_data_list)
psdi_2._record.layer_and_mask_information.layer_info.layer_count += 1

psdi_2.save("test.psd")

I can't pinpoint the exact issue in your code, but from what i've tested it was due to difference in the number of channels available for layers, adding a 4 channel image on a 3 channel doesn't work (the opposite does) and somehow writes a file with corrupted end of file


MINOR: test PR for benchmarking

Do not merge. I'll use this to test a new benchmarking feature.

Waiting for https://github.com/apache/arrow/issues/37106 to be fixed so I can test properly.

@ursabot please benchmark lang=C++

@ursabot please benchmark lang=C++


LOG_EVERY_N seems not thread safe in C++11 and newer

Consider the code
  static std::atomic<int> LOG_OCCURRENCES(0), LOG_OCCURRENCES_MOD_N(0); \
  ++LOG_OCCURRENCES; \
  if (++LOG_OCCURRENCES_MOD_N > n) LOG_OCCURRENCES_MOD_N -= n; \
  if (LOG_OCCURRENCES_MOD_N == 1)

Although every statement here is an atomic operation, other threads may fall into the first if condition even though LOG_OCCURRENCES_MOD_N already subtracts n
Simple test
#include <glog/logging.h>
#include <thread>
#include <atomic>

void bar() {
    static std::atomic<int> n(0);
    LOG_EVERY_N(INFO, 2) << ++n;
}
int main() {
    std::vector<std::thread> threads;
    for (size_t i = 0; i < 4000; ++i) {
        std::thread t(&bar);
        threads.emplace_back(std::move(t));
    }
    for (auto& thread : threads) {
        thread.join();
    }
}

Sometimes the output will not be equal to 2000.
I have no idea if it is thread-safe in the older compilers.

Will this fix?
  static std::atomic<int> LOG_OCCURRENCES(0); \
  int LOG_OCCURRENCES_MOD_N = LOG_OCCURRENCES.fetch_add(1, std::memory_order_relaxed); \ // LOG_OCCURRENCES_MOD_N  = ++LOG_OCCURRENCES;
  if (++LOG_OCCURRENCES_MOD_N % n == 1)  \

Declare LOG_OCCURRENCES_MOD_N as non-static variable. For every call, LOG_OCCURRENCES_MOD_N will be a different value.

LOG_FIRST_N is not thread-safe either.
Simple test
#include <glog/logging.h>
#include <thread>
#include <atomic>

void bar() {
    LOG_FIRST_N(INFO, 1) << "Should be logged exactly once.";
}
int main() {
    std::vector<std::thread> threads;
    for (size_t i = 0; i < 4000; ++i) {
        std::thread t(&bar);
        threads.emplace_back(std::move(t));
    }
    for (auto& thread : threads) {
        thread.join();
    }
}

Sometimes no corresponding message is logged.
Considered fix
  static std::atomic<int> LOG_OCCURRENCES(0); \
  int LOG_OCCURRENCES_MOD_N = LOG_OCCURRENCES.fetch_add(1, std::memory_order_relaxed);
  if (LOG_OCCURRENCES_MOD_N <= n)  \


Add fullscreen workspace selector

Describe your PR, what does it fix/add?
Add a workspace selector for fullscreen states. This allows more control for fullscreen workspaces, e.g. specifying the gaps when maximized etc.
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
not really
Is it ready for merging, or does it need work?
ready

wiki mr neededd


NoneType error after adding player on clean install

Steps to produce:

Fresh install
Run server
Add new user
Navigate to player roster page

I'll try to fix this later when I have some free time.
Here's the traceback:
Environment:

Request Method: GET
Request URL: http://localhost:8000/player-roster/

Django Version: 1.7.8
Python Version: 2.7.6
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'bughouse',
 'pipeline',
 'argonauts',
 'rest_framework',
 'sorl.thumbnail')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')

Traceback:
File "/Users/jeff/.virtualenvs/bughouse/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  111.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/jeff/.virtualenvs/bughouse/lib/python2.7/site-packages/django/views/generic/base.py" in view
  69.             return self.dispatch(request, *args, **kwargs)
File "/Users/jeff/.virtualenvs/bughouse/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
  87.         return handler(request, *args, **kwargs)
File "/Users/jeff/.virtualenvs/bughouse/lib/python2.7/site-packages/django/views/generic/base.py" in get
  154.         context = self.get_context_data(**kwargs)
File "/Users/jeff/code/bughouse-ranking/bughouse/views.py" in get_context_data
  20.         context['players'] = self.get_player_data()
File "/Users/jeff/code/bughouse-ranking/bughouse/views.py" in get_player_data
  26.         return serializer.data
File "/Users/jeff/.virtualenvs/bughouse/lib/python2.7/site-packages/rest_framework/serializers.py" in data
  615.         ret = super(ListSerializer, self).data
File "/Users/jeff/.virtualenvs/bughouse/lib/python2.7/site-packages/rest_framework/serializers.py" in data
  212.                 self._data = self.to_representation(self.instance)
File "/Users/jeff/.virtualenvs/bughouse/lib/python2.7/site-packages/rest_framework/serializers.py" in to_representation
  565.             self.child.to_representation(item) for item in iterable
File "/Users/jeff/.virtualenvs/bughouse/lib/python2.7/site-packages/rest_framework/serializers.py" in to_representation
  432.                 ret[field.field_name] = field.to_representation(attribute)
File "/Users/jeff/code/bughouse-ranking/bughouse/api/v1/serializers.py" in to_representation
  30.         return im.url

Exception Type: AttributeError at /player-roster/
Exception Value: 'NoneType' object has no attribute 'url'

I think the location of this bug is that the API allowed for a player to be created without an Image where the image should be required.  Probably acceptable to enforce this validation on the front-end, though Ideally the serializer would do it too.


Spaced repetition algorithm

Algorithm Design:
Data structure
Security measures
What is being between different interfacing systems
Scalability
Availability
Two key points when developing this algorithm:
How often does a question
Does it depend on a user’s specific knowledge/expertise
The weights and biases that are attached to a specific question
How will questions be organized to maximize the user’s learning/experience
How many new types of questions will we show a user?

interested


Xiaomi quick initialization

Based on original idea of https://github.com/zigpy/zha-device-handlers/pull/550 and https://github.com/zigpy/zigpy/pull/531 add direct initialization of some xiaomi devices and keeps xiaomi specific initialization in zha-device-handlers
To add any other xiaomi device, the signature must contain:

models_info or manufacturer
node_desc
each endpoint signature must contain

profile_id
device_type
input_clusters
output_clusters

It was tested with the all devices that were updated in this PR

Codecov Report

Merging #594 (0cfde73) into dev (347b508) will decrease coverage by 0.51%.
The diff coverage is 64.00%.

@@            Coverage Diff             @@
##              dev     #594      +/-   ##
==========================================
- Coverage   79.05%   78.54%   -0.52%
==========================================
  Files         152      153       +1
  Lines        3319     3407      +88
==========================================
+ Hits         2624     2676      +52
- Misses        695      731      +36

Impacted Files
Coverage Δ

zhaquirks/xiaomi/__init__.py
54.00% <18.18%> (-6.65%)
:arrow_down:

zhaquirks/__init__.py
73.88% <100.00%> (+5.64%)
:arrow_up:

zhaquirks/const.py
100.00% <100.00%> (ø)

zhaquirks/xiaomi/aqara/cube.py
72.38% <100.00%> (ø)

zhaquirks/xiaomi/aqara/magnet_aq2.py
85.71% <100.00%> (ø)

zhaquirks/xiaomi/aqara/motion_aq2.py
100.00% <100.00%> (ø)

zhaquirks/xiaomi/aqara/remote_b186acn01.py
75.00% <100.00%> (ø)

zhaquirks/xiaomi/aqara/vibration_aq1.py
60.24% <100.00%> (ø)

zhaquirks/xiaomi/aqara/weather.py
80.00% <100.00%> (ø)

zhaquirks/xiaomi/aqara/wleak_aq1.py
81.25% <100.00%> (ø)

... and 3 more

Continue to review full report at Codecov.

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

Pull Request Test Coverage Report for Build 376509612

64 of 100 (64.0%)  changed or added relevant lines in 10 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.6%) to 78.544%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

zhaquirks/xiaomi/init.py
8
44
18.18%

Totals

Change from base Build 375662125:
-0.6%

Covered Lines:
2676

Relevant Lines:
3407

💛  - Coveralls


fix: generated always as identity just for Registry

Closes: https://github.com/metarhia/metasql/issues/176

[x] tests and linter show no problems (npm t)
[x] code is properly formatted (npm run fmt)
[x] description of changes is added in CHANGELOG.md

Landed in https://github.com/metarhia/metasql/commit/5df826aadb275f6aa3149c80859d0d7e80e07e44


Removed logging "Received native event"

I noticed console logging on manifold.markets and thought that might not be intended.

Thanks for taking this out! Ideally we'd have a lint check that prevents us from checking in random console.log messages by accident, haha

FWIW I think console logging (including on prod) is totally fine iff it's logging something useful to see, no idea whether this was useful or not. So I wouldn't make that lint.

Hm, this is useful to me during mobile app dev. If none of our ft engineers had a problem with it cluttering the console I'd rather keep it in.


[GCLB] Fix mapsEqual out of bounds error

This change is

mapsEqual could use a unit test in the future.


[$1000] Password Protected -  keyboard is open but the cursor does not appear.

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Open any chat
Send an image
Send password protected PDF
Click and open password protected PDF in preview
Click 'enter the password' and enter any password
Drag to navigate next
Focus on input, Notice that the keyboard is open but the cursor is not visible

Expected Result:
Cursor appears when keyboard is open
Actual Result:
Cursor is not appears when keyboard is open
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[x] iOS / Safari
[ ] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: 1.3.56-16
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/38435837/ef5d1425-5fa8-440f-a22c-c6c4256a1287
https://github.com/Expensify/App/assets/38435837/1045eb2a-58b9-4fb5-b453-60ee96b0bb2d
Expensify/Expensify Issue URL:
Issue reported by: @namhihi237
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692005371991179
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~013b0c0a37fb3237cb
Upwork Job ID:<PHONE_NUMBER>260748288
Last Price Increase: 2023-09-13

I can't reproduce the issue, I tried both in staging and production site with iPhone in Safari
https://github.com/Expensify/App/assets/18050952/a4d8da67-d2d2-4323-a893-79f1b418b80c

Ohh, I see, my bad, let me try again

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/freelancers/~011a061814c08969cc

Sorry still can't reproduce the issue @namhihi237 , or am I miss any step?
https://github.com/Expensify/App/assets/18050952/1d780390-0252-4eea-990b-32aabc8b306d

is it safari in ios?

Proposal
Please re-state the problem that we are trying to solve in this issue.
Password Protected - The keyboard is open but the cursor does not appear
What is the root cause of that problem?
https://github.com/Skalakid/App/blob/70000a49ea00e48e6c81c5184dc1d42d8f0cbff7/src/components/PDFView/PDFPasswordForm.js?#L70
https://github.com/Skalakid/App/blob/70000a49ea00e48e6c81c5184dc1d42d8f0cbff7/src/components/PDFView/PDFPasswordForm.js?#L130
If you're using both "autoFocus" and JavaScript to manage focus, the order of execution might be causing conflicts. For example, the JavaScript code might be trying to change the focus after the "autoFocus" attribute has already set the initial focus.
What changes do you think we should make in order to solve the problem?
We can remove autoFocus and fix the useEffect work on javascript focus

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/freelancers/~01705ceac19ede7858

Proposal
Please re-state the problem that we are trying to solve in this issue.
Password Protected - keyboard is open but the cursor does not appear
What is the root cause of that problem?
In the useEffect we are setting the focus but not the selection position. When we swipe right the blur even it triggered and below line sends the focus back to the text box. But this doesn't set the position of the cursor
https://github.com/Expensify/App/blob/329cac3b49fc47da8eac1b7a74a511171fe22345/src/components/PDFView/PDFPasswordForm.js#L70
What changes do you think we should make in order to solve the problem?
To solve the problem manually set the position of the cursor before focus.
The following code does that
        textInputRef.current.setSelectionRange(password.length, password.length);
        textInputRef.current.focus();

Result :
https://github.com/Expensify/App/assets/2232432/85e0b604-ef6b-4bc9-8a2a-c568f4078930
What alternative solutions did you explore? (Optional)
None

@kameshwarnayak Why does it not set a cursor?
Is there any particular reason?

@shubham1206agra https://stackoverflow.com/a/72465972 The explanation given in the comment is very similar to what happens here. The text input blurs and then because of the re-render the focus is set back causing the issue.
The above comment helped to find the solution.

@namhihi237 I don't think I understood the issue here. Can you please elaborate the issue? Is this the same issue?

I have gone through the proposals as well. But none of them have good problem statement and root cause analysis. More details and well-explained RCA can lead to better solution.

@sobitneupane That is a different issue that is more like a safari issue https://bugs.webkit.org/show_bug.cgi?id=195884
but here this issue happens on iOS/Chrome.
here when have more attachments we can navigate left or right in the preview. so at the time one of the attachments had a PDF with a password.   that component will have an input box. when the input box is focused and starts to type something after that slightly moved to the next attachment it will go next and come back to the current input box. at the time the blur of focus happens keyboard is opened when we tab the input box but the cursor is hidden still, so we are able to enter text.

I agree with @kameshwarnayak as well because in the same case of Safari, sometimes the position is misleading.
so the correct solution is
useEffect(() => {
if (!isFocused) {
return;
}
if (!textInputRef.current) {
return;
}
if(!textInputRef.current.isFocused() && shouldShowForm) {
textInputRef.current.setSelectionRange(password.length, password.length);
textInputRef.current.focus();
}
}, [isFocused, password, shouldShowForm]);
and we should remove autoFocus for ordering issue

@sobitneupane The issue happens because the password protected pdf is part of the Attachment carousel. If the report has just one pdf which is password protected, we have no issues. Please find the video below
https://github.com/Expensify/App/assets/2232432/c8f26950-3ae8-4452-9727-3f9a64c5d93b
The issue is that the Blur event is triggered when we scroll and soon after that the focus event is triggered. Somehow the caret is not being displayed and setting the Selection range solves the issue. Observed another issue when when we come back to the pdf view, the focus is not set to the text box. This can be solved by using focusTextInputAfterAnimation function. I am modifying the proposal accordingly.
@pradeepmdk  removing autoFocus doesn't solve the issue (Video attached below) and induces a new bug in web where the focus is lost when you first open the password page
https://github.com/Expensify/App/assets/2232432/cd47237f-3c6d-4426-9a5f-d7d3805d55b9

@kameshwarnayak I agree on the issue we should not remove autofocus I already updated https://github.com/Expensify/App/issues/25739#issuecomment-1689906344. and   focusTextInputAfterAnimation  functions having the setTimeout only that I already included in my proposal.

@pradeepmdk - Yes..
The right solution is adding the following lines to useEffect
        textInputRef.current.setSelectionRange(password.length, password.length);
        focusTextInputAfterAnimation(textInputRef.current, 100);

@sobitneupane will be checking new/updated proposals next!

Thanks for the proposal @pradeepmdk
We don't prefer the use of setTimeout.

Thanks for the proposal @kameshwarnayak
focusTextInputAfterAnimation adds setTimeout (not preferable) to native. And our issue exists on web. I am not sure why was it necessary.

In the useEffect we are setting the focus but not the selection position. When we swipe right the blur even it triggered and below line sends the focus back to the text box. But this doesn't set the position of the cursor

I don't agree with the above reasoning. If that was the case, set timeout shouldn't have solved the case.
So, why was this change needed textInputRef.current.setSelectionRange(password.length, password.length);?

@sobitneupane I was trying to addresses two issues.

Auto focus of the input form when you get back to the PDFPasswordForm in the attachment carousel

https://github.com/Expensify/App/assets/2232432/5817fce7-5ab4-49e7-80c2-92a2dc3f24b6
My bad, focusTextInputAfterAnimation was directly imported from the .native.js file.  So it was adding setTimeout.
The root cause for this issue is that PDFPasswordForm is loaded in a flatlist and when you get back to the PDFPasswordForm in the carousel it opens in the blurred state.
textInputRef.current.focus();

This tries to set the focus but onBlur and onFocus are triggered exactly at the same time. Please find the screenshot below

The console log clearly shows that the onBlur and onFocus are triggered exactly at the same time.
Two ways to solve this.
One way is delay focus using setTimeout.
Second way is to re-render the TextInput Component when we come back to PDFPasswordForm. I will edit my proposal and add this as an alternative solution.

Second issue I am addressing is the original bug where the cursor doesn't appear.

https://github.com/Expensify/App/assets/2232432/1b77f30f-7245-450b-a993-2684adf80e48
Even if we solve the auto focus issue, the cursor won't appear. To display the cursor, we can set the selection programatically using this textInputRef.current.setSelectionRange(password.length, password.length);
https://github.com/Expensify/App/assets/2232432/e1692ccc-58e0-4cb8-93d5-01694996cb3e
I agree setTimeout may not be ideal. I will modify the proposal with alternative solution to load the TextInput in its original state

@sobitneupane I have added both solutions with screenshots to my proposal here https://github.com/Expensify/App/issues/25739#issuecomment-1691635820

@tienifr I tested your proposal and it didn't work for me. The issue is easily reproducible only on mWeb/Chrome.

@kameshwarnayak Let's focus only on this issue. The other issue you are raising might be an intended behavior. You can report it or open a discussion on expensify-bug.
Regarding the original issue, the Root Cause Analysis is still not convincing.

@sobitneupane This probably looks like a iOS Safari issue. Did quite a bit of research on this and this stack overflow question  has similar issue even if the steps to re-create are different.
This solution to the above question uses setting selection to solve the issue.
The issue arises when blur and focus is triggered within a very short amount of time.

Delaying the Focus with timeout works but not an ideal solution. Instead manually set the selection using setSelectionRange
Will edit the proposal to address just the original issue.

@sobitneupane  - Edited the proposal to address just the original issue here https://github.com/Expensify/App/issues/25739#issuecomment-1691635820

Awaiting updated proposal review

Thanks for the update @kameshwarnayak.
This is definitely not a ideal solution.  If the root cause is conflict between focus and blur, we should try to remove the conflict.
Let's wait and see if we can get other ways to solve the issue.

@sobitneupane - Let me have a relook at it again.

How are we doing here @tienifr @sobitneupane as far as reproduction/updating proposal?

Okay got it! Let's see what he has to say.

@tienifr I did test it on https://github.com/Expensify/App/pull/24482 branch with the changes you proposed. The issue is "keyboard is open but the cursor does not appear"
https://github.com/Expensify/App/assets/25876548/7a0732b2-87de-4c75-86c3-8973cb6aaebd

do you have a thought on that last comment @tienifr ?

@sobitneupane @greg-schroeder I did quite a lot of research on this.
This happens when blur and focus happen almost at the same time on Safari. The root cause is primarily because of how safari is handling this.
There are two ways to solve this. Both of these solutions work.

Use setTimeout to delay the focus in useEffect. But this is not ideal
This is more of a workaround than a fix to the root cause. Use setSelectionRange as mentioned in this proposal

I think these are the only two solutions that we have for this issue.
I tested the weird behaviour of safari on instantaneous blur and focus  by creating another test react application with just a text input and have a code to focus back onBlur.  Even though the behaviour is not exactly same, it is similar where the focus is back on the input but it is incomplete; as in I cant type. The same code works perfectly well on Android chrome. Check the video below. Have pushed the code here
https://github.com/Expensify/App/assets/2232432/ee86c446-5840-43b5-84a2-06a2f0baf4d8
I think the above two are the only working solutions to this issue or we may have to wait for Safari to handle this in a better way.

Thanks for the proposal @pradeepmdk
We don't prefer the use of setTimeout.

@sobitneupane here in the latest docs also using setTimeout only
https://github.com/Expensify/App/pull/27808/files

The issue is easily reproducible and can be reproduced on mWeb/Chrome only.

@kameshwarnayak  this issue only  on mWeb/Chrome not in safari.

Appreciate the update, everyone. We're eagerly anticipating more promising proposals. Should no new ones surface, I'll delve into the existing ones.

@pradeepmdk I meant iOS Safari and corrected it in my comment. I don't see the issue with Chrome. It is on iOS Safari only I suppose

Proposals continue

Same as above

@sobitneupane seems we haven't had any new proposals, so sounds like you're diving into the existing ones per this comment?

If we don't get any new proposals by the weekend, I will delve into the existing ones

@sobitneupane - Updated my proposal to add alternative solution using setTimeout. These two might be the only solutions as per my research.

I'll be unavailable next week. If any action is needed, please feel free to reassign the task to another C+.

Okay I will re-assign!

This is known iOS Safari issue

@situchan this is a different and this issue is in mWeb/chrome only. the cursor is missing after opening a keyboard.

@situchan - This is a different issue and I believe this is because of iOS Safari and not our code. However, the first solution in this proposal is a workaround to solve this issue of cursor not appearing. This solves the issue and not the root cause which is a iOS Safari issue.

Is this still reproducible? I see cursor when keyboard is open
https://github.com/Expensify/App/assets/108292595/54b01b38-d038-4e48-97df-d7e95dccaef1

@situchan - Looks like the bug is fixed in the latest master

@situchan - Looks like the bug is fixed in the latest master

Still curious which PR fixed this

Seems to be fixed, so closing.


Revert "refactor(jenkins/pipelines,pipelines): use the new dockerfile url location"

Reverts PingCAP-QE/ci#2958
It broken the dev-builds since of the issue, we must solve it atomic:
[2024-05-10T10:29:43.850Z] + docker build --pull -t 325168c9-8528-454b-9e0f-2041080ee440 . --build-arg 'BASE_IMG='

/review default

/approve


Implement analyzer for go modules (>=1.11)

Fixes Issue
Lack of support for Go modules.
Description of Change
This implementation supports the native go mod way of working with dependencies, which is enabled since go 1.11 and will be the default as of go 1.13.
Have test cases been added to cover the new functionality?
Yes

Related to #1560.

@jeremylong

Hi! @mvdbos @jeremylong I was wondering, is this PR going to be merged soon?

Hi! @mvdbos @jeremylong I was wondering, is this PR going to be merged soon?

@jeremylong When do you think you might have some time to look at it? If there is anything I can help with, or need to change, please let me know.

Yes - this PR will get merged before the next release (which should happen before June 29th).  I have already done some initial review and I have a few minor updates to make that will help with the analysis.

@mvdbos due to an issue with a .DS_Store being checked into this PR - I ended up creating a new PR (see #2018).


Allow flags for context menu to be set or change defaults?

Nativefier uses https://github.com/sindresorhus/electron-context-menu and I'd really like to enable the native macOS services menu for my apps. It has alot of OS integrations like adding links directly to my "read later" list, add selection as a reminder, send text to other applications, etc.
This could either be done by setting showServices to true by default, or adding config flags for toggling this.

Closing as duplicate of https://github.com/jiahaog/nativefier/issues/913

Isn't that issue about adding custom elements? I want the native macOS elements, which can't be implemented in javascript.

Not my understanding, from what I understand you're both asking the same thing.


s/lid_switch/switch_device

Rename lid_switch to switch_device to disambiguate lid and tablet mode switches. Required for https://github.com/swaywm/sway/pull/3340

Can we just call this "switch" instead?

It conflicts with the switch keyword in a number of places.

Gotcha.

Thanks!


Allow user to specify storage account for deployment packages

When Set-AzureDeployment is run it will use whichever storage account is currently set in the subscription context under CurrentStorageAccountName (can be seen by running Get-AzureSubscription). If this is unset it will fail with the error CurrentStorageAccountName is not set. Use Set-AzureSubscription subname -CurrentStorageAccountName storageaccount to set it..
This PR will allow the user to specify the classic storage account to use for deployment packages to resolve this error.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: EwanNoble sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

@jack-education This would make life easier. 👍

@chshrikh  @Vijay-train  any chance to look at this?

@EwanNoble Is this PR still required ?

@EwanNoble Is this PR still required ?

Yes, I'll sort the conflicts

Any idea when this PR will be merged and released? The issue blocks us for moving to ARM Storage Accounts.


variableForUser and basic config handling, still some tests failing

This adds the minimum integration with the DVCClient so that tests can run. Some tests are still failing, and the event queue tests have been configured to skip against the native implementation for now.

Current dependencies on/for this PR:

main

PR #152

PR #154

PR #155   👈

This comment was auto-generated by Graphite.


Error reporting in HQL insert

Search before asking

[X] I searched the issues and found no similar issues.

Linkis Component
linkis-commons
What happened + What you expected to happen
Error reporting in HQL insert
Relevent platform
.
Reproduction script
.
Anything else
This question comes from the QA documentation of the Linkis community
Are you willing to submit a PR?

[X] Yes I am willing to submit a PR!

A: The jar package of yarn is missing from hive em, hadoop-yarn-common-2.7.2 Copy jar package to DSS_ In the directory of linkis / linkis / linkis ujes hive enginemanager / lib, restart the linkis service


Keystore certificate list pagination occurs in service and UI layer both

Describe the issue:
When keystore information including the list of certificates and keycertificates are retrived from the backend, pagination occurs in the backend (service layer) code and also again in the frontend.
In the current implementation, a set of 50 (A pre-defined constant at code level) certificates are returned from the BE regardless of the number of certificates in the keystore[1].
Once in FE, the 50 certificates are again limited to 50 (A pre-defined constant at code level) and paginated into pages based on no. of items for page (another constant)[2].
Expected behavior:
Pagination should occur exclusively in the backend.
Ideal behavior would be to get the keystore info separately, and request for the certificates (Ex: 10 at a time/ predefined constant at a time) from backend based on the page number.
[1] https://github.com/wso2/carbon-identity-framework/blob/430bb4661555b2c3e8dfac0b34f3bf49ba343a94/components/security-mgt/org.wso2.carbon.security.mgt/src/main/java/org/wso2/carbon/security/keystore/KeyStoreAdmin.java#L665
[2] https://github.com/wso2/carbon-identity-framework/blob/430bb4661555b2c3e8dfac0b34f3bf49ba343a94/components/security-mgt/org.wso2.carbon.security.mgt.ui/src/main/java/org/wso2/carbon/security/ui/Util.java#L35

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!


End of install error: Error: No such image: whalebrew/whalesay

Started receiving this error at the end of a brew bundle install. Reporting this bug as requested
Error: No such image: whalebrew/whalesay
Error: undefined method `chomp' for nil:NilClass
Please report this bug:
  https://github.com/Homebrew/homebrew-bundle/issues
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle/lib/bundle/locker.rb:130:in `block in whalebrew_list'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle/lib/bundle/locker.rb:128:in `each'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle/lib/bundle/locker.rb:128:in `each_with_object'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle/lib/bundle/locker.rb:128:in `whalebrew_list'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle/lib/bundle/locker.rb:52:in `block in lock'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle/lib/bundle/locker.rb:36:in `each'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle/lib/bundle/locker.rb:36:in `lock'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle/lib/bundle/installer.rb:64:in `install'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle/lib/bundle/commands/install.rb:10:in `run'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle/cmd/bundle.rb:94:in `bundle'
/usr/local/Homebrew/Library/Homebrew/brew.rb:110:in `<main>'

Let me know if there are deeper debugging settings for more logging to help out.

Please provide the contents of the Brewfile that you're using.

While you're at it, gather the brew config output and brew doctor output and put them in a gist and link it here, please.

Brewfile: https://gist.github.com/abarring-pinc/511cf8e475346ee82a75cece1b27c430
brew output: https://gist.github.com/abarring-pinc/9133e6cc7734951f476162e56b8705bc
Thanks!

Are you able to successfully execute docker pull whalebrew/whalesay? whalebrew/whalesay definitely still exists. Maybe it was a transient error. Have you tried again?
I'll look into the other failure there.

WAIT. Before you do that:
What do you see when you run docker image inspect whalebrew/whalesay --format '{{ index .RepoDigests 0 }}'?
https://github.com/Homebrew/homebrew-bundle/blob/e11704f58688da7e9d0192d08ff2b31c252a2f6b/lib/bundle/locker.rb#L127-L132
It looks we've got an assumption of the data format output by that command, but it outputs something we didn't expect when it fails. I'll look into making that safer while we figure out what your system is outputting that isn't what we expect out of Docker, esp if whalesay is installed (and if it isn't, why does whalebrew list include it but it's not pulled/otherwise available).

$ docker image inspect whalebrew/wget --format '{{ index .RepoDigests 0 }}'
whalebrew/wget@sha256:dff6b84c2e317d4c1a6a81c55e6f91d46b73dc19713f53d06cf3a3b19b0c7815


v1.4.4 use did-resolver v0.4.4 for updated polkadot apis

https://app.clubhouse.io/caelum-labs/story/991/update-all-libraries-with-latest-polkadot-api

note: verifyCredential test broken because of labtest blockchain reset


Stack overflow when used from nVim

LSP log obtained with vim.lsp.set_log_level 'trace'
[TRACE][2024-01-16 00:51:51] ...lsp/handlers.lua:618    "default_handler"       "workspace/configuration"       {  ctx = '{\n  client_id = 1,\n  method = "workspace/configuration"\n}',  result = {    items = { { section = "files.autoSave"      } }  }}
[DEBUG][2024-01-16 00:51:51] .../vim/lsp/rpc.lua:403    "server_request: callback result"       {  result = { vim.NIL },  status = true}
[DEBUG][2024-01-16 00:51:51] .../vim/lsp/rpc.lua:284    "rpc.send"      {  id = 10001,  jsonrpc = "2.0",  result = { vim.NIL }}
[TRACE][2024-01-16 00:51:51] .../lua/vim/lsp.lua:1066   "server_request"        "window/workDoneProgress/create"        {  token = "els/start_workspace_diagnostics"}
[TRACE][2024-01-16 00:51:51] .../lua/vim/lsp.lua:1069   "server_request: found handler for"     "window/workDoneProgress/create"
[TRACE][2024-01-16 00:51:51] ...lsp/handlers.lua:618    "default_handler"       "window/workDoneProgress/create"        {  ctx = '{\n  client_id = 1,\n  method = "window/workDoneProgress/create"\n}',  result = { token = "els/start_workspace_diagnostics"  }}
[DEBUG][2024-01-16 00:51:51] .../vim/lsp/rpc.lua:403    "server_request: callback result"       {  result = vim.NIL,  status = true}
[DEBUG][2024-01-16 00:51:51] .../vim/lsp/rpc.lua:284    "rpc.send"      {  id = 1,  jsonrpc = "2.0",  result = vim.NIL}
[ERROR][2024-01-16 00:51:52] .../vim/lsp/rpc.lua:734    "rpc"   "/home/bin/pylyzer"   "stderr"        "\nthread 'pylyzer' has overflowed its stack\nfatal runtime error: stack overflow\n"
[INFO][2024-01-16 00:51:57] .../lua/vim/lsp.lua:1875    "exit_handler"  {}

In :messages
Client 1 quit with exit code 0 and signal 6

I have tried overriding cmd = { 'pylyzer', '--server', '--verbose', '2' }, but this hasn't introduced any additional information in the LSP log or stderr/out.

Any update on this?

Bugs that cause stack overflows are common in the type checker, but are continually being fixed. If the problem is still not resolved in the latest version, please provide us with more information such as the code where the problem occurred, so we can help fix the bug.

I can reproduce it with _main.py in python httpx 0.27.2. Simply open the file and wait for pylyzer's error to occur.


main.go:Modify some information

Signed-off-by: zhouhao<EMAIL_ADDRESS>

Previous description should be acceptable, because it want to unpack source file to the rootfs.
Refer to https://github.com/opencontainers/image-tools/pull/47#discussion_r84600849

updated,But this way, and this note will not contradict each other, in addition，I think this is need to modify the error message

It looks goo to me.

c8145385 looks fine to me, although I'm fine with the previous language too.

@stevvooe  @vbatts  @philips PTAL

LGTM

LGTM


Content-Security-Policy

I got the error in the js console:
Unrecognized Content-Security-Policy directive 'prefetch-src'.
In OIDplus.class.php I commented out:
				/*    	"prefetch-src" => array( 				 	"'self'", 					 	"blob:" 				 	),*/`
I'm not quite sure about this, first I thought it came from a plugin, but it also appears on the viathink-oidplus!?

According to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/prefetch-src ,
"prefetch-src" is non-standard and deprecated.
Deprecated are:

CSP: block-all-mixed-content
Deprecated

CSP: plugin-types
Non-standardDeprecated

CSP: prefetch-src
Non-standardDeprecated

CSP: referrer
Non-standardDeprecated

CSP: report-uri
Deprecated

Non-Standard and not deprecated:

CSP: require-trusted-types-for
Experimental

CSP: trusted-types
Experimental

TODO: Remove them from OIDplus::init()

Fixed in SVN Rev 1304