Netstandard not available in .net framework projects

Hi! Thank you for contributing this helper :)
I am trying to use your helper to solve some assembly resolving issues we have when using Mono.Cecil on Xamarin projects. Your resolver solved our problems, however we can now no longer resolve .NET framework projects due to netstandard not being in the list of referenced assemblies. I was wondering if you had some guidance as to how to overcome this problem.
For reference we are implementing your assembly resolver here: https://github.com/stryker-mutator/stryker-net/pull/1770
The .NET framework test project that is failing is here: https://github.com/stryker-mutator/stryker-net/tree/master/integrationtest/TargetProjects/NetFramework
The list of referenced assemblies as we get them from Buildalyzer (msbuild wrapper basically) is:
C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\Microsoft.CSharp.dll
C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\mscorlib.dll
C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.Core.dll
C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.Data.DataSetExtensions.dll
C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.Data.dll
C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.dll
C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.Net.Http.dll
C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.Xml.dll
C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.Xml.Linq.dll
C:\\git\\stryker\\stryker-net\\integrationtest\\TargetProjects\\NetFramework\\packages\\Newtonsoft.Json.13.0.1\\lib\\net45\\Newtonsoft.Json.dll

It may be possible to rework the helper to not rely on having a netstandard reference, but the use case I developed it for does not require it and I don't have time to experiment. Since you're targeting v4.6.1 which technically implements netstandard2.0, try referencing it from your project directly:
<PropertyGroup>
  <!-- see %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.NETFramework.targets -->
  <!-- this property is not necessary in projects targeting net472 and later -->
  <DependsOnNETStandard>true</DependsOnNETStandard>
</PropertyGroup>
<ItemGroup
  <Reference Include="netstandard" />
</ItemGroup>

This pulls in a bunch of facade assemblies into the referenced assembly list which are then copied to the output directory, but the output assembly does not depend on them. It may be possible to avoid copying them with some additional MSBuild processing of reference lists (see targets file mentioned in the snippet above). I'm not sure if this trick will work (a) with older versions of Visual Studio, or (b) with a packages.config-style project, as the build process may behave slightly differently. If it doesn't, upgrade your project to PackageReference-style - that should be painless.

Thank you for your reply! The problem is that we are a tool that is run on our external users projects so we don't have any control over their environment. In this case my test project is 4.6 but it could be anything.

The problem is that we are a tool that is run on our external users projects so we don't have any control over their environment. In this case my test project is 4.6 but it could be anything.

If you were distributing your tool as a nuget package included in external users' projects, you could put these directives in build\<tfm>\Your.props files in your package. But if I understand correctly you're distributing it as a dotnet tool that is run as a MSBuild wrapper of some kind. In this case you could try injecting a .props file with suitable conditional property and item groups into the build you are wrapping using one of the build extensibility points, such as MSBuild property CustomBeforeMicrosoftCommonProps. Caveat: I haven't tried this.

I see. We are a mutation testing tool. We run as a dotnet (core) global tool where we scan the users project to gather all relevant project information because we need to modify the project source code and recompile. For the compilation we use Cecil to extract embedded resources from the unmutated assemblies so we don't have to figure out exactly how they gathered their embedded resources originally. In the case of xamarin Cecil in its default configuration for some reason cannot open assemblies using xamarin due to missing the xamarin core assembly. Since we already need all referenced assemblies to be able to compile we already know where to find the xamarin core assembly so with your assembly resolver we can pass the path directly to Cecil. But since your method relies on netstandard this now fails for netframework projects. Gain some, lose some 😂


SWAP as gate primitive

It would be good to have SWAP as a gate primitive in the quantum circuit. Decomposition algorithms can then map it later into CNOTs, or CZ, or other circuits.

Done.


Dashboard approvals could have som more detailed information

Today we have no information about the user that is applying except their name and possibly what they are applying to.
Possible data which could be displayed in a drop down style manner like what happens when you press "avslå" today, could include:

previous applications
current field of study
when they started on informatics

By no means limited to this, think about any information related to applicants which could assist a person tending to the applications.

It seems like parts of this issue has been implemented in the four years since it was opened. The remainders can be considered when we get around to making a new dashboard for the new frontend.


feather write/load changes dataframe

Can you please open a JIRA issue?

I suppose the reason is because your DataFrame will have integer column names, and writing/reading to/from parquet converted those to string column names.
Not sure if feather is supposed to restore that (with parquet we store pandas metadata, which we don't with feather I think)

That's right, so this may fall into the "won't fix" category


[#425] regex fixes

Added pronom to DATE REGEX
Using multiple_words function instead of (le|la|les|aux..) in order to allow all types of pronoms to be captured

Last commit skewed the ML results. Please test the ml_service before merging and post the results

LATEST (THIS BRANCH)
INFO: Total precedents parsed: 40003
INFO: Total precedents with apartment_dirty                           : 913
INFO: Total precedents with asker_is_landlord                         : 29696
INFO: Total precedents with asker_is_tenant                           : 2830
INFO: Total precedents with bothers_others                            : 40
INFO: Total precedents with disrespect_previous_judgement             : 126
INFO: Total precedents with landlord_inspector_fees                   : 508
INFO: Total precedents with landlord_notifies_tenant_retake_apartment : 437
INFO: Total precedents with landlord_pays_indemnity                   : 47
INFO: Total precedents with landlord_relocation_indemnity_fees        : 513
INFO: Total precedents with landlord_rent_change                      : 2420
INFO: Total precedents with landlord_rent_change_doc_renseignements   : 310
INFO: Total precedents with landlord_retakes_apartment                : 1721
INFO: Total precedents with landlord_sends_demand_regie_logement      : 132
INFO: Total precedents with tenant_sends_demand_regie_logement        : 1
INFO: Total precedents with signed_proof_of_rent_debt                 : 29
INFO: Total precedents with rent_increased                            : 1426
INFO: Total precedents with tenant_continuous_late_payment            : 4063
INFO: Total precedents with tenant_damaged_rental                     : 694
INFO: Total precedents with tenant_dead                               : 31
INFO: Total precedents with tenant_financial_problem                  : 307
INFO: Total precedents with tenant_group_responsability               : 1256
INFO: Total precedents with tenant_individual_responsability          : 3780
INFO: Total precedents with tenant_is_bothered                        : 27
INFO: Total precedents with tenant_lease_indeterminate                : 1405
INFO: Total precedents with tenant_left_without_paying                : 7119
INFO: Total precedents with tenant_monthly_payment                    : 34191
INFO: Total precedents with tenant_owes_rent                          : 21902
INFO: Total precedents with tenant_refuses_retake_apartment           : 409
INFO: Total precedents with tenant_rent_not_paid_more_3_weeks         : 20734
INFO: Total precedents with tenant_withold_rent_without_permission    : 90
INFO: Total precedents with violent                                   : 418
INFO: Total precedents with tenant_not_paid_lease_timespan            : 145
INFO: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO: Total precedents with additional_indemnity_money                : 13968
INFO: Total precedents with declares_resiliation_is_correct           : 5477
INFO: Total precedents with landlord_serious_prejudice                : 2547
INFO: Total precedents with orders_expulsion                          : 19223
INFO: Total precedents with orders_immediate_execution                : 13657
INFO: Total precedents with orders_resiliation                        : 19831
INFO: Total precedents with orders_tenant_pay_first_of_month          : 742
INFO: Total precedents with tenant_ordered_to_pay_landlord            : 27088
INFO: Total precedents with tenant_ordered_to_pay_landlord_legal_fees : 26926
INFO: Total precedents with landlord_prejudice_justified              : 19249
INFO: Total precedents with landlord_retakes_apartment_indemnity      : 100
INFO: Total precedents with authorize_landlord_retake_apartment       : 282
INFO: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO: Loading classifier_labels.bin
INFO: classifier_labels.bin is successfully loaded
INFO: Loading precedent_vectors.bin
INFO: precedent_vectors.bin is successfully loaded
INFO: Formatting data
INFO: Training SVM classifier
INFO: Sample size: 40003
INFO: Train size: 32002
INFO: Test size: 8001
INFO: Training Classifier Using Multi Class SVM
INFO: Loading model_metrics.bin
INFO: model_metrics.bin is successfully loaded
INFO: Testing Classifier
INFO: Classifier results:
INFO: Column: additional_indemnity_money
INFO: Test accuracy: 79.56505436820397%
INFO: Precision: [ 0.87372014  0.6851796 ]
INFO: Recall: [ 0.79704223  0.79315164]
INFO: F1: [ 0.83362165  0.73522267]
INFO: Column: declares_resiliation_is_correct
INFO: Test accuracy: 91.3885764279465%
INFO: Precision: [ 0.96064746  0.66535122]
INFO: Recall: [ 0.93848832  0.76083032]
INFO: F1: [ 0.94943861  0.70989474]
INFO: Column: landlord_serious_prejudice
INFO: Test accuracy: 96.4379452568429%
INFO: Precision: [ 0.99036374  0.66192733]
INFO: Recall: [ 0.97150845  0.85510204]
INFO: F1: [ 0.98084549  0.74621549]
INFO: Column: orders_expulsion
INFO: Test accuracy: 91.98850143732034%
INFO: Precision: [ 0.95244249  0.88939981]
INFO: Recall: [ 0.88966683  0.95231925]
INFO: F1: [ 0.91998502  0.91978476]
INFO: Column: orders_immediate_execution
INFO: Test accuracy: 84.06449193850769%
INFO: Precision: [ 0.92366412  0.72146119]
INFO: Recall: [ 0.82640865  0.86813187]
INFO: F1: [ 0.87233403  0.78802993]
INFO: Column: orders_resiliation
INFO: Test accuracy: 93.63829521309836%
INFO: Precision: [ 0.95244249  0.9213456 ]
INFO: Recall: [ 0.91895262  0.95389627]
INFO: F1: [ 0.93539789  0.93733842]
'precision', 'predicted', average, warn_for)
INFO: Column: orders_tenant_pay_first_of_month
INFO: Test accuracy: 98.20022497187851%
INFO: Precision: [ 0.98200225  0.        ]
INFO: Recall: [ 1.  0.]
INFO: F1: [ 0.99091941  0.        ]
INFO: Column: tenant_ordered_to_pay_landlord
INFO: Test accuracy: 85.02687164104486%
INFO: Precision: [ 0.79529617  0.87239264]
INFO: Recall: [ 0.71495693  0.91371397]
INFO: F1: [ 0.75298969  0.89257532]
INFO: Column: tenant_ordered_to_pay_landlord_legal_fees
INFO: Test accuracy: 89.78877640294964%
INFO: Precision: [ 0.87827557  0.90612245]
INFO: Recall: [ 0.79708477  0.94660734]
INFO: F1: [ 0.83571285  0.92592257]
INFO: Column: landlord_prejudice_justified
INFO: Test accuracy: 82.42719660042495%
INFO: Precision: [ 0.82282353  0.82591309]
INFO: Recall: [ 0.8426506   0.80446637]
INFO: F1: [ 0.83261905  0.81504867]
INFO: Column: landlord_retakes_apartment_indemnity
INFO: Test accuracy: 99.76252968378952%
INFO: Precision: [ 0.9976253  0.       ]
INFO: Recall: [ 1.  0.]
INFO: F1: [ 0.99881124  0.        ]
INFO: Column: authorize_landlord_retake_apartment
INFO: Test accuracy: 99.60004999375079%
INFO: Precision: [ 0.99786325  0.66666667]
INFO: Recall: [ 0.99811416  0.63829787]
INFO: F1: [ 0.99798869  0.65217391]
INFO: Training multi output regression
INFO: Size of dataset: 27086
2018-04-02 10:13:47.291798: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
INFO: R2: 0.81
INFO: Explained Variance: 0.81
INFO: Mean Absolute Error: 337.85
INFO: Mean Squared Error: 868862.55

OLD (commit #a5c58700 from March 26th. Before any regex changes were made)
INFO: Total precedents parsed: 40003
INFO: Total precedents with apartment_dirty                           : 913
INFO: Total precedents with asker_is_landlord                         : 29606
INFO: Total precedents with asker_is_tenant                           : 2699
INFO: Total precedents with bothers_others                            : 40
INFO: Total precedents with disrespect_previous_judgement             : 126
INFO: Total precedents with landlord_inspector_fees                   : 508
INFO: Total precedents with landlord_notifies_tenant_retake_apartment : 437
INFO: Total precedents with landlord_pays_indemnity                   : 47
INFO: Total precedents with landlord_relocation_indemnity_fees        : 513
INFO: Total precedents with landlord_rent_change                      : 2420
INFO: Total precedents with landlord_rent_change_doc_renseignements   : 310
INFO: Total precedents with landlord_retakes_apartment                : 1721
INFO: Total precedents with landlord_sends_demand_regie_logement      : 132
INFO: Total precedents with tenant_sends_demand_regie_logement        : 1
INFO: Total precedents with signed_proof_of_rent_debt                 : 29
INFO: Total precedents with rent_increased                            : 1426
INFO: Total precedents with tenant_continuous_late_payment            : 4063
INFO: Total precedents with tenant_damaged_rental                     : 694
INFO: Total precedents with tenant_dead                               : 31
INFO: Total precedents with tenant_financial_problem                  : 307
INFO: Total precedents with tenant_group_responsability               : 1256
INFO: Total precedents with tenant_individual_responsability          : 3780
INFO: Total precedents with tenant_is_bothered                        : 26
INFO: Total precedents with tenant_lease_indeterminate                : 1405
INFO: Total precedents with tenant_left_without_paying                : 7115
INFO: Total precedents with tenant_monthly_payment                    : 34191
INFO: Total precedents with tenant_owes_rent                          : 21902
INFO: Total precedents with tenant_refuses_retake_apartment           : 409
INFO: Total precedents with tenant_rent_not_paid_more_3_weeks         : 20734
INFO: Total precedents with tenant_withold_rent_without_permission    : 90
INFO: Total precedents with violent                                   : 418
INFO: Total precedents with tenant_not_paid_lease_timespan            : 112
INFO: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO: Total precedents with additional_indemnity_money                : 13968
INFO: Total precedents with declares_resiliation_is_correct           : 5477
INFO: Total precedents with landlord_serious_prejudice                : 2508
INFO: Total precedents with orders_expulsion                          : 19212
INFO: Total precedents with orders_immediate_execution                : 13657
INFO: Total precedents with orders_resiliation                        : 19831
INFO: Total precedents with orders_tenant_pay_first_of_month          : 742
INFO: Total precedents with tenant_ordered_to_pay_landlord            : 26596
INFO: Total precedents with tenant_ordered_to_pay_landlord_legal_fees : 26926
INFO: Total precedents with landlord_prejudice_justified              : 18320
INFO: Total precedents with landlord_retakes_apartment_indemnity      : 100
INFO: Total precedents with authorize_landlord_retake_apartment       : 270
INFO: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO: Loading classifier_labels.bin
INFO: classifier_labels.bin is successfully loaded
INFO: Loading precedent_vectors.bin
INFO: precedent_vectors.bin is successfully loaded
INFO: Formatting data
INFO: Training SVM classifier
INFO: Sample size: 40003
INFO: Train size: 32002
INFO: Test size: 8001
INFO: Training Classifier Using Multi Class SVM
INFO: Loading model_metrics.bin
INFO: model_metrics.bin is successfully loaded
INFO: Testing Classifier
INFO: Classifier results:
INFO: Column: additional_indemnity_money
INFO: Test accuracy: 79.55255593050869%
INFO: Precision: [ 0.8735338   0.68508454]
INFO: Recall: [ 0.79704223  0.79280224]
INFO: F1: [ 0.83353683  0.73501782]
INFO: Column: declares_resiliation_is_correct
INFO: Test accuracy: 91.37607799025122%
INFO: Precision: [ 0.96064162  0.6648265 ]
INFO: Recall: [ 0.93834325  0.76083032]
INFO: F1: [ 0.94936151  0.70959596]
INFO: Column: landlord_serious_prejudice
INFO: Test accuracy: 96.42544681914761%
INFO: Precision: [ 0.99063645  0.65664557]
INFO: Recall: [ 0.9711321   0.85743802]
INFO: F1: [ 0.98078732  0.7437276 ]
INFO: Column: orders_expulsion
INFO: Test accuracy: 91.98850143732034%
INFO: Precision: [ 0.95244249  0.88939981]
INFO: Recall: [ 0.88966683  0.95231925]
INFO: F1: [ 0.91998502  0.91978476]
INFO: Column: orders_immediate_execution
INFO: Test accuracy: 84.06449193850769%
INFO: Precision: [ 0.92348453  0.7215961 ]
INFO: Recall: [ 0.82659837  0.86776557]
INFO: F1: [ 0.8723596   0.78795942]
INFO: Column: orders_resiliation
INFO: Test accuracy: 93.63829521309836%
INFO: Precision: [ 0.95244249  0.9213456 ]
INFO: Recall: [ 0.91895262  0.95389627]
INFO: F1: [ 0.93539789  0.93733842]
'precision', 'predicted', average, warn_for)
INFO: Column: orders_tenant_pay_first_of_month
INFO: Test accuracy: 98.20022497187851%
INFO: Precision: [ 0.98200225  0.        ]
INFO: Recall: [ 1.  0.]
INFO: F1: [ 0.99091941  0.        ]
INFO: Column: tenant_ordered_to_pay_landlord
INFO: Test accuracy: 84.53943257092864%
INFO: Precision: [ 0.8058337   0.86132539]
INFO: Recall: [ 0.7006056   0.91677552]
INFO: F1: [ 0.74954444  0.88818584]
INFO: Column: tenant_ordered_to_pay_landlord_legal_fees
INFO: Test accuracy: 89.98875140607424%
INFO: Precision: [ 0.8790932   0.90870262]
INFO: Recall: [ 0.80322209  0.94660734]
INFO: F1: [ 0.83944678  0.92726777]
INFO: Column: landlord_prejudice_justified
INFO: Test accuracy: 79.99000124984377%
INFO: Precision: [ 0.82267168  0.77407309]
INFO: Recall: [ 0.80506329  0.79376368]
INFO: F1: [ 0.81377225  0.78379473]
INFO: Column: landlord_retakes_apartment_indemnity
INFO: Test accuracy: 99.76252968378952%
INFO: Precision: [ 0.9976253  0.       ]
INFO: Recall: [ 1.  0.]
INFO: F1: [ 0.99881124  0.        ]
INFO: Column: authorize_landlord_retake_apartment
INFO: Test accuracy: 99.66254218222723%
INFO: Precision: [ 0.99811581  0.7       ]
INFO: Recall: [ 0.99849208  0.65116279]
INFO: F1: [ 0.99830391  0.6746988 ]
INFO: Training multi output regression
INFO: Size of dataset: 26594
2018-04-01 20:44:22.703471: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
INFO: R2: 0.81
INFO: Explained Variance: 0.81
INFO: Mean Absolute Error: 377.99
INFO: Mean Squared Error: 863114.49


Channel type filtering

Below is my suggestion:
Having the easy ability to set an option in each command where people can decide whether the command can be performed in DMs only, Guilds only OR Guilds & DMs.
AJFire14#1004

It "should" perform automatically inside dms, but a bug makes it error in the message handler,
i will look into that.
I will also add the ability to filter out specific channels, something like:
exports.ignoredchannels = ["dm", "group", "main"]
Unless you have improvements to make on that.


Questions about length parameters

Hello, thanks for your great work! It's novel and inspiring.
I am trying to extend PPLM for some downstream applications (with a different pre-trained model and a different discriminator). I went through your code, but am not sure of the function of parameters --length and --grad_length.
From my understanding so far, --length is used to create this generation loop that decodes a token at a time, so I guess it controls the generation length. Can you please confirm this?
If so, this condition does not seem straightforward to me: stepsize is set to 0 for generation steps in [grad_length, length], and as a result, this leads to no update to the model (gradient=0).
But I also noticed the default value of grad_length is 10000, which is much larger than length (whose default value is 100). If grad_length>length, the above condition will always be False and the original stepsize will always be used. Therefore, I am confused about the use of this condition. Can you also please clarify this?
Thanks!

Hello,
That is correct. -- length is to control the generation length.
--grad-length is the number of time-steps where the key-value pairs are updated to steer generation. Step-size is set 0, but we the updated latents for the previous time-steps stay the same (they are not reset), so the generation is likely to retain some of the conditioning. We found that this can help prevent some degeneration of the language. See Table S19 in the Appendix -- it shows how grad-length can be used to help preserve fluency when generating longer passages.


Test Istio release "Istio 1.8.4"

Istio recently (2021-03-10 19:48:17 +0000 UTC) released "Istio 1.8.4". Let's test it :rocket:.

Support of Istio 1.8.x will end next month. We should update istio-stable to 1.9.x. https://istio.io/latest/news/support/announcing-1.8-eol/
/cc @arturenault

/assign


Add WB disease annotation test file and Person class update

Correct branch this time!
Identifier for Person class set as unique_id to prevent inlining in JSON schema.  Test files updated accordingly.
WB disease annotation test file added.

Ah, thanks @markquintontulloch .  @cerivs and I were wondering what the unique_id was for, seems like it's for the Alliance Person ID, and if so, that's great.  I think Ceri is going to talk to Sierra about how ZFIN stores their curator evidence for Disease Annotations at ZFIN, which is a minor heads up, I know Sierra signed off on only getting the 'ZFIN' string.
I'm unclear about why reference became single_reference .  Is that so there can be single_reference objects that just refer to PMIDs, as opposed to a future integration of Alliance Reference IDs once Literature switches over to whatever ID format everyone agrees to ?  Blue has on the backlog to work on the Reference LinkML modeling, and I don't know whether that should be on the single_reference class, or the reference class.
Thanks.

@azurebrd - if I understood and remember the A-Team discussions correctly, for now unique_id will simply be whatever each MOD uses to uniquely identify a person.  This could be a MOD ID, email address, or some sort of generic string if a person cannot be identified.
The change to single_reference was simply because the slot name clashed with the Reference class - this causes build failures on Macs.  It still points to the Reference class, but is single-valued as opposed to the multivalued references slot.  The value in the JSON schema is just a string (as the slot is not 'inlined', the schema just requires a string rather than the full Reference object) but the value of this string should be the identifier of the class the slot points to, in this case the Reference curie.


9166: resolve vulnerability with dependency update

Fixes: https://github.com/testcontainers/testcontainers-java/issues/9166

Thanks for the contribution but I will close for the same reason as described here. For tracking purposes there is #8338. And please before raising and check if there are similar issues or PRs.


Returns null when trying to call accessSecretVersion method

I am using nodev12.14.1
I have a node typescript project and I am calling the accessSecretVersion  with my secret and it return null
import { SecretManagerServiceClient } from '@google-cloud/secret-manager';
import { injectable } from 'inversify';

import { config } from '../config';
import logger from '../server/utils/logger';
import { InterfaceSecretManagerPlugin } from './secret-manager.interface';

const client = new SecretManagerServiceClient();

const secrets: { [key: string]: string } = {};

@injectable()
export class SecretManagerPlugin implements InterfaceSecretManagerPlugin {
  public async initSecret(key: string): Promise<void> {
    try {
      logger.info(`Initializing secret: ${key} started`);
      const [accessResponse] = await client.accessSecretVersion({
        name: config.googleCloudConfig.secrets[key]
      });
      const responsePayload: string | null =
        accessResponse && accessResponse.payload && accessResponse.payload.data
          ? accessResponse.payload.data.toString()
          : null;
      if (responsePayload) {
        secrets[key] = responsePayload;
        logger.info(`Initializing secret: ${key} finished`);
      } else {
        logger.error(`Initializing secret: ${key} failed`);
      }
    } catch (error) {
      logger.error(`Error while initializing secret: ${key}`, {
        error,
        secretName: key
      });
    }
  }

  public async getSecretString(key: string): Promise<string | null> {
    logger.info(`Getting secret: ${key} data`);
    if (secrets[key]) {
      logger.info(`Done getting secret: ${key} data`);
      return secrets[key];
    }
    logger.info(`Secret: ${key} not found in the storage. Calling initSecret`);
    await this.initSecret(key);
    logger.info(`Done getting secret: ${key} data`);
    return secrets[key];
  }

  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  public async getSecretJson(key: string): Promise<any> {
    const secretString = await this.getSecretString(key);
    try {
      if (secretString) {
        return JSON.parse(secretString);
      }
    } catch (error) {
      logger.error(`Error while parsing secret: ${key} to JSON object`, {
        error,
        secretName: key
      });
    }
    return null;
  }
}

Thanks, it started working now! I had the environment variable since the beginning but it was something to do with my environment setup I guess.

@vishvajit79 awesome, I'm glad you're unblocked.

Accessing google secret manager sometimes returns null after the issue was resolved but now it has stopped working completely. I have also added a retry logic that tries to fetch the secret10 times if it fails. Is it because it is still in the beta?

Hi @vishvajit79
It's difficult to say without seeing the code and understanding the steps you have taken. Google Secret Manager is fully operational and has not experienced any outages. I'm also personally using it in a few projects and it has never returned null when accessing a secret.

Is there a way to debug the call being made as it is not throwing error. It just returns null

Can you please share your updated code?

Sure here is the repo link https://gitlab.com/find-nemo/microservice-template

Hi @vishvajit79 I'm able to reproduce the issue on your code, but I honestly have no idea what's going on. I cannot reproduce the issue outside of your code, which makes me believe it's a dependency issue or something is not properly initializing further up your stack.
What happens if you add the following to the bottom of secret-manager.plugin.ts and run it?
const test = async () => {
  const p = new SecretManagerPlugin();
  await p.initSecret('nemoDatabase');
}

test();

In my testing, this properly fetched the secret. However, when I run your code (npm run local), the secret returns nil. My guess is that one of your dependencies is messing with the promise.
It would be really helpful if you could narrow down the problem to a single, runnable node.js file that we could use to reproduce it on our end. Your current application has too many variables and layers of indirection to adequately debug.

@sethvargo @vishvajit79 I would experiment with dropping the bluebird dependency, this shims promises globally, and has caused problems in the past.

Yes, it was due to a bluebird. When I removed it globally, it started working again. Thanks for the response

Awesome :) Looks like this is resolved, so I'm going to go ahead and close this out.  If you are still running into problems, please do let us know!


Fix needless task shutdown on leader switch

Description

The first run of a supervisor tries to resume all actively reading tasks and shuts down any tasks which fail to resume successfully in #13223.
However it included pending / waiting tasks in the set of active tasks and killed them as they failed to resume.

The fix is to check if the task is also running using the TaskRunner before attempting to resume and fail tasks.

Release note

Key changed/added classes in this PR

SeekableStreamSupervisor

This PR has:

[x] been self-reviewed.
[ ] added documentation for new or modified features or behaviors.
[ ] a release note entry in the PR description.
[ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
[ ] added or updated version, license, or notice information in licenses.yaml
[x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
[x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
[ ] added integration tests.
[x] been tested in a test Druid cluster.

The CI failures are a flaky test and code coverage checks. @AmatyaAvadhanula is this patch unit-testable? If not feasible to do a UT fo rit then I think it's OK to bypass the coverage checks.

@gianm @kfaraz thanks for the review.
I've modified the existing UT to test the case where the task hasn't begun running.
However KafkaSupervisorTest / KinesisSupervisorTest don't help with coverage of SeekableStreamSupervisor

However KafkaSupervisorTest / KinesisSupervisorTest don't help with coverage of SeekableStreamSupervisor

OK, in that case I suggest we should bypass the coverage check, since it's getting coverage through test cases that are "invisible" to the coverage checker.


Restructure storage type to support complex types expending

For #2885

Change type to tree structure.
Add List type.

This PR is not ready to be review because there are still a problem to be resolved in this PR:

collection has no type information, so method like cmp can't be implemented.
#2953 must be closed first.

some error


Broken in 1.20.2

Minecraft 1.20.2 changed how GUI textures are stored inside of a resource pack, eg. splitting textures/gui/widgets.png to multiple files inside of textures/gui/sprites/widget with corresponding .mcmeta files if needed, thus rendering the pack incompatible with 23w31a (pack format 16) and newer. Mojang has released a tool to split old GUI textures into new GUI textures.

Mojang has released a tool to split old GUI textures into new GUI textures.

Link?


ModuleFederation remotes are optional

Hello! First, congrats for the awesome work here!
This line throws error when remotes property isnt present, and its common omit it when use dynamic remotes with runtime lazyload.
TypeError: Cannot convert undefined or null to object
    at Function.entries (<anonymous>)

you can replace it with an empty object: {}

Feel free to PR the plugin if there's problems with some options - I've not tested it in the wild so not aware of some of these occasions


Debugging context is lost when stepping out of a list comp

Repro with manualTestFile.py
Start debugging the "Some extra variable types" cell.
In the listcomp line step into the list comp and step a few times.
Then when you step out context should be back in your cell somewhere, but context is not shown anywhere. You can get context back by clicking in the call stack.

What's manualTestFile.py?

@rchiodo It's the test file that I passed off to CTI. IT's checked into the repo. Just has a bunch of jupyter basics that I put in the manual test plan.

Move to debugger team.


Extractors need update for working with nginx in docker container

tl;dr: nginx in a container + log-driver syslog produces messages like
docker/3242b31f11bc[795]: <IP_ADDRESS> - - [16/Aug/2016:13:32:58 +0000] "GET /df-swagger-ui/dist/images/logo-navbar-194x42.png HTTP/2.0" 200 21659 "https://acme.de/df-swagger-ui/dist/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0" "-" <msec=1471354378.222|connection=1|connection_requests=97|millis=0.017>
However the extractors expect the message to start with nginx: but we now have docker/3242b31f11bc[795]: which is docker/CONTAINERID[idontknow]:
So instead of nginx:\s+(\S+) we need to match ^.*:\s+(\S+)
I'm fixing up the extractors and hopefully will have a PR soon
PS: also the condition regexp need to be updated

I got all the access-log-input regex updated and working more generically, however when exporting, the JSON is all in one line and when beautifying, its still not suitable for a clean diff.  I noticed I can aswell only export the extractors. So I updated the gist to only contain the extractors.
error log extractors are working for dockerized nginx.
however I added an extractor for the nginx error level and also a message extractor for cleaning the message field, just as the access.log-input does. lemme know if you are interested in that

I could use this in a PR.  I am trying to get my docker nginx logging to the central graylog services.  However, I am slowly working through manually patching each of the extractors.  It's just tedious.

@CrazyBS as I mentioned, I cant get a clean diff by exporting and would need to manually change all extractors to make a PR. so the best I can offer is that gist. However updating the extractors by copy/paste can be done in like 10mins

So I'm kinda trying to understand this. I send my access logs to STDOUT and my error logs to STDERR. But with gelf-address I can only specify one port so I can't send to the access_log and error_log input because they are seperate? How is it supposed to work?

@Kiina that is true: docker log-drivers send both the STDOUT and STDERR to the same host+port as you can only specify one set.
What I did to solve this is running a separate tiny log "companion" container that has log dir shared with nginx container. nginx container only outputs access log and the other the error.log
  nginx-log:
    image: busybox
    container_name: nginx-log
    restart: always
    volumes_from:
      - nginx
    command: "tail -F /var/log/nginx/error.log"
    depends_on:
      - "nginx"
    logging:
      driver: gelf
      options:
       gelf-address: "udp://<IP_ADDRESS>:12201"

you can have a look at my issue covering this topic over at https://github.com/docker/docker/issues/25683

Well I wanted to prevent using another docker container for this (because I already have a lot), but if that's the only option. Hopefully someone provides plugin support after 17.05 release. Thank you for your help

@Kiina dont worry about the extra container. its super small thanks to image busybox. it only consumes ~300KB of RAM and like no CPU.

Maybe the Graylog guys who did the GELF logging driver can make an optional logging plugin ontop that will split the merged stdout/stderr stream again based on the message field that holds this info and send both to different (supplied) host+ports.
cc @lennartkoopmann @mariussturm
related to https://github.com/graylog-labs/graylog-contentpack-nginx/issues/4

@philicious I haven't looked at the plugin api yet but for the core driver there was simply no option to distinguish between stderr and stdout.

@mariussturm ye the plugin API is quite new and only available in the upcoming 17.05.
in the GELF driver, the field "level" is populated with the source stream (stderr/out) , see https://github.com/docker/docker/blob/master/daemon/logger/gelf/gelf.go#L127
the actual problem is that you cannot specify more than one host-port in log_opts.
after my discussion with cpuguy here https://github.com/docker/docker/issues/25683 , I have some hope this can be solved without to much effort via a logging plugin. but I havent dived into that yet myself.

Ah right the level field is set. But then you can route the messages based on the value into different streams. Why do you need another input then?

@mariussturm err the problem was/is https://github.com/graylog-labs/graylog-contentpack-nginx/issues/4
so if its doable (meanwhile) , maybe an update to the nginx contentpack also would do the trick?
(but I can think of more generic scenarios where it might be helpful to have the streams separated)

Nja ok, this content pack as it is now makes the assumption of having two inputs. So a user can simply copy&paste the nginx.conf snippet and all is setup. But from a technical standpoint there is no difference in separating messages by input or by a field value. So my suggestion would be to change the contentpack in a way that it works with a single input if you are using the Docker logging driver. That's way easier than changing the log driver.

hm ok. well then maybe a graylog-contentpack-nginx-docker would make sense :)

@philicious Feel free to fork this repository, make the necessary changes, and add it to the Graylog Marketplace.

@joschi unfortunately not working on that project anymore where I build the logging stack like that :/

@joschi @philicious @mariussturm
Took the time to do it as I needed it anyway, welcome to use and make a PR if you have any ideas for improvement :)
Links: github, marketplace

@ronlut Awesome, thanks a lot!

@ronlut awesome ! did you add it to Graylog Marketplace also ?

closing this issue while I salute to @ronlut 🥇


Consistency in enforcing SA1200 (using directives inside namespaces)

#34 moved some using directives inside namespaces, and I'd like to apply that consistently throughout the code, also given the arguments here: https://stackoverflow.com/questions/125319/should-using-directives-be-inside-or-outside-the-namespace
Again, this might have some impact on namespaces and imports, similar to #35, thereby breaking the API. Consider this for a 2.0.0 release.

Added in https://github.com/basdijkstra/rest-assured-net/commit/d03d434282d8b46a80a80573affb378e74fd602c.


Cannot login to Kiali dashboard.

Working through https://preliminary.istio.io/docs/setup/getting-started/ I get to istioctl dashboard kiali which brings up the dashboard in my browser (both Chrome and Safari). I see the Log In button, but clicking it doesn't do anything.
The Documentation and Contribute links to open up in new tabs.

Details? What is your version of Istio and Kiali? What is the command you used to install? What do the Kiali pod logs say?

1.6-alpha-2 install from dev testing day 1. I followed the steps as listed on the pages above. At this point I've moved on to many other tests so no logs at the moment.

Working in #kiali, the Kiali CM that istioctl creates does not have an auth.strategy. It looks like it should be set:
./manifests/charts/istio-telemetry/kiali/templates/configmap.yaml:

release-1.6 branch has the kiali values.yaml correctly setting this (this code hasn't changed between 1.5 and 1.6, so not sure why it isn't taking effect):
https://github.com/istio/istio/blob/release-1.6/manifests/charts/istio-telemetry/kiali/values.yaml#L42

https://github.com/istio/istio/blob/9550ee4a1084ded0df27e516930acf91a3bb8096/manifests/profiles/default.yaml#L599 is the breakage. Good thing we duplicate values.yaml in two places for extra confusion :slightly_smiling_face:

I'm 1.6.0--beta.0 and am still experiencing this issue.


Syncing from upstream zalando/patroni (master)

bt_gitbot

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

56 of 56 (100.0%)  changed or added relevant lines in 4 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.0002%) to 99.852%

Totals

Change from base Build<PHONE_NUMBER>:
0.0002%

Covered Lines:
12113

Relevant Lines:
12131

💛  - Coveralls


Add ability to set HTTP proxy in DSN.

#176

This change is

I tested this locally with tinyproxy pointed at production Sentry it worked. Not entirely sure how we can enforce that in units.

Reviewed 4 of 4 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion.

raven/src/main/java/com/getsentry/raven/connection/HttpConnection.java, line 58 [r1] (raw file):

     * Optional address of an HTTP proxy server to use.
     */
    private final InetSocketAddress proxy;

What's the reasoning behind passing the proxy address rather than a Proxy instance here?

Comments from Reviewable

Reviewed 3 of 3 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks broke.

raven/src/main/java/com/getsentry/raven/DefaultRavenFactory.java, line 210 [r2] (raw file):

        if (proxyHost != null) {
            InetSocketAddress proxyAddr = new InetSocketAddress(proxyHost, proxyPort);
            proxy = new Proxy(Proxy.Type.HTTP, proxyAddr);

:thumbsup:

Comments from Reviewable


Fix /open-stack-frame validation

Summary
React Native is sending a methodName in the payload that fails validation.
Test plan
To reproduce, throw an exception somewhere in your React Native app. From the error screen, tap in one of the stack frames. Haul's log before this would show POST /open-stack-frame 400 and do nothing.
After this change, it should open your editor in the file referenced in the stack frame.

@koke Thank you for your PR 👏

I'll do a release today.


ExternalId: generic incoming bouncer

Should live in waltz-ng/client/entity/routes.js under a state like:
const byExtIdState = {
    url: "/extId/{kind:string}/{extId:string}",
    resolve: { extIdBouncer }  // need to write this
};

...
  .state("main.entity.extId", byExtIdState)
...

The bouncer has to be able to handle 0, 1 or many results for a given extId.  The many version should display enough info to help users disambiguate between similar entries.
We should perhaps allow provenance (system) in the url as an additional (optional) param (perhaps ?provenance=xyz).  The bouncer should take into account ext ids on the target tables and also in the generic external_identifier table.

An example of a similar bouncer can be found in waltz-ng/client/embed/routes.js


Service worker is not caching assets when base-href is different than "/"

Steps to Reproduce

create new project: flutter create demo
build it for web using a custom base-href: flutter build web --base-href /basehreftest/
put the build inside /basehreftest/ and start an http server (one folder up) python -m http.server
note how all assets are always redownloaded 💣(sadly this has a big performance impact for my use-case)

Evidence of service worker not caching assets (such as icons/Icon-192.png)
https://user-images.githubusercontent.com/79719460/201554426-2db03ccc-2a49-4e21-bdc9-629274e61c70.mp4
Expected results:
Service worker must cache assets, (in the developer console you must see "service-worker" on assets requests)
Actual results:
It always reaches the remote server (may affect loading times, it actually happens in my use-case)

[!] Flutter (Channel master, 3.6.0-2.0.pre.14, on Microsoft Windows [Version 10.0.22000.1219], locale en-US)
    • Flutter version 3.6.0-2.0.pre.14 on channel master at E:\developer\flutter_contribution\flutter
    ! Upstream repository https://github.com/davidlanderos-digital/flutter.git is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to https://github.com/davidlanderos-digital/flutter.git to dismiss this
      error.
    • Framework revision f92ff3e06f (26 minutes ago), 2022-11-13 18:39:57 -0600
    • Engine revision b63e6cf558
    • Dart version 2.19.0 (build 2.19.0-394.0.dev)
    • DevTools version 2.19.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly
      to perform update checks and upgrades.

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\david\AppData\Local\Android\Sdk
    • Platform android-33, build-tools 33.0.0
    • ANDROID_SDK_ROOT = C:\Users\david\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • CHROME_EXECUTABLE = C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.5)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.3.32922.545
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[√] VS Code (version 1.73.1)
    • VS Code at C:\Users\david\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.52.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.1219]
    • Chrome (web)      • chrome  • web-javascript • unknown
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 106.0.1370.52

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

I updated web_test.dart to expect the full path in the assets cache manifest, my solution is working perfectly for me, I hope it's useful for anyone facing the same issue..

Hi @davidlanderos-digital, I believe this is a duplicate of https://github.com/flutter/flutter/issues/111866.
Kindly follow up in the issue linked above for updates.
Closing from here as duplicate.
If you disagree, kindly leave a comment below and I will reopen this issue.
Thank you

ah! thanks for pointing it out,  I updated my PR description


Sync Main with Stage

Release Staged code to PROD
Test URLs:

Before: https://main--express--adobecom.hlx.page/express/pricing?martech=off
After: https://stage--express--adobecom.hlx.page/express/pricing?martech=off

Codecov Report
Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (317ac7d) 32.03% compared to head (021569e) 31.98%.
Report is 1 commits behind head on main.

Files
Patch %
Lines

express/blocks/puf/puf.js
0.00%
2 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #566      +/-   ##
==========================================
- Coverage   32.03%   31.98%   -0.05%
==========================================
  Files         126      126
  Lines       24128    24127       -1
==========================================
- Hits         7729     7717      -12
- Misses      16399    16410      +11

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


ServicePath: SwaggerWcf.Attribute.SwaggerWcf() didn't accept string variable value

public class AppSettings
{
    public static readonly string SwaggerBaseRestURL;
    static AppSettings()
    {
        SwaggerBaseRestURL = System.Configuration.ConfigurationManager.AppSettings["SwaggerBaseRestUrl"];
    }
}

[SwaggerWcf.Attributes.SwaggerWcf(AppSettings.SwaggerBaseRestURL)] // error occurs here

That method only accept const value like this
[SwaggerWcf.Attributes.SwaggerWcf("/api/test/")]
. The problem is when the site already deployed/publish how can we change the service path if it is hard coded ?

https://msdn.microsoft.com/en-us/library/aa288454(v=vs.71).aspx
Attribute parameters are restricted to constant values of the following types:

Simple types (bool, byte, char, short, int, long, float, and double)
string
System.Type
enums
object (The argument to an attribute parameter of type object must be a constant value of one of the above types.)
One-dimensional arrays of any of the above types

So, not possible to pass arguments to attributes that are not constant

Do you need to change the URL path?
Or is it about URL host?

I will use it in the url use to test Api method in Swagger UI.

but you need to change path or host?

The Path

Currently it is not possible in SwaggerWcf

Ok thanks.


Updated Icon yaml to support .yaml extension

Fixes #IssueNumber
Changes proposed:

[X] Add
Added support for .yaml extension, as currently yaml icon only support .yml

[ ] Delete
[ ] Fix
[ ] Prepare

.yaml extension is already supported via language id. Indeed I cannot reproduce your issue even with all my extensions disabled. That leads me to think that you may have  some kind of custom mapping for your .yaml extensions. Can you create a .yaml file and check what language is enabled?

Check your settings.

ANd according to this we can lso drop the  manual declaration of yml in our extension. Can't remember why we left it in there...

I couldn't also figure out why we left it... I guess maybe there was a time when it was not supported by the language.

Yeah, that's the case. Looking at the source code it has been always there.

@dstrebel Can you please provide feedback?

Closing this.
@dstrebel If you require additional support please open an issue.


fix(NODE-4423): better type support for nested objects in query & update

Description
What is changing?
Better typing for update & query
Is there new documentation needed for these changes?
What is the motivation for this change?
	interface User {
		pet: {
			name: {
				first: string;
				last: string;
			};
		};
	}

	// This works when it shouldn't
	const query: mongodb.Filter<User> = { "pet.name": { first: 1 } };
	// This doesn't work when it should
	const update: mongodb.UpdateFilter<User> = { $set: { "pet.name": { first: "a", last: "b" } } };

The second error is a regression. This PR fixes both issues
Tickets:

https://jira.mongodb.org/browse/NODE-4423
https://jira.mongodb.org/browse/NODE-4450 (duplicate)

Double check the following

[x] Ran npm run check:lint script
[x] Self-review completed using the steps outlined here
[x] PR title follows the correct format: <type>(NODE-xxxx)<!>: <description>
[x] Changes are covered by tests
[x] New TODOs have a related JIRA ticket

PS: Would it be possible after this and the previous PR #3259 to get a mention in the release notes for 4.8 and / or be added to https://github.com/mongodb/node-mongodb-native/blob/main/CONTRIBUTORS.md ?
All the best!

@coyotte508 Apologies for the oversight on the release notes - we always want to give credit to the community for the contributions, so I'll get that fixed right away. The contributors file is currently not maintained, but we have plans to start generating it from github data.

When is this going to be published? I can't use v4.8 it seems due to the problems this PR intends to fix:

@jaydenseric We're looking to put out a patch tomorrow!

@coyotte508 this kind of updates fail type check:
{ $set: { 'aaa.$.bbb': "ccc" } }
{ $set: { 'aaa.$[].bbb': "ccc" } }
{ $set: { 'aaa.$[ddd].bbb': "ccc" } } (arrayFilters option)

@jer-sen for me there are no TS errors, but it's more lax (allows invalid types).

@coyotte508 I also have an issue with variables in keys:
{ $set: { [aaa.${1 + 1}]: "bbb" } }
It seems that TS give to { [aaa.${1 + 1}]: "bbb" } the type Record<string, 'bbb'>.
Any idea how to fix this without a forced cast?

@jer-sen for me there are no TS errors, but it's more lax (allows invalid types).

I think it's because I use readonly arrays:
const _: MatchKeysAndValues<{ aaa: { bbb: 'ccc' }[] }> = { 'aaa.$.bbb': 'ccc' }; is ok
const _: MatchKeysAndValues<{ aaa: readonly { bbb: 'ccc' }[] }> = { 'aaa.$.bbb': 'ccc' }; is not ok
Could you improve your PR to handle this case?

I think https://github.com/mongodb/node-mongodb-native/blob/main/src/mongo_types.ts#L532 is the problem, you could change [Key, ...NestedPaths<Type[Key]>] to [Key, ...NestedPaths<Type[Key]>] | [Key] like https://github.com/mongodb/node-mongodb-native/blob/main/src/mongo_types.ts#L534 two lines below.
You can do the PR if this changes fixes your issue :), or open an issue for someone of the mongodb team on JIRA.
I'm going on holiday myself!

Thanks @coyotte508 but I am a bit lost...
@dariakp maybe you could have a look?

@coyotte508 @dariakp I have created:

an issue in TS repo for variables in keys: https://github.com/microsoft/TypeScript/issues/50220
a PR for complex nested names which fixes also issue with readonly arrays: https://github.com/mongodb/node-mongodb-native/pull/3349


Update 16_routes.md, removed half a sentence

This sentence seemed a bit half formed to me! Better to take away the second half maybe?

Oh thanks, I think it's just missing a word -- "This should usually be somewhere near the root of your application, wrapping the rest of the app."


Split data into country-specific modules

To support for example abbreviation expansion for other languages than english, it would be better if the data was split into submodules rathen than kept embedded in the class.
For example, add a "data" subpackage to contain language modules with names from the ISO 639-1 standard. So current ones would be in module "data/uk.py".
If this is ok, I can provide an implementation.

I agree, the data looks too crowded in the main code -- it takes up nearly half of the space.  I wanted to split it out a long time ago, but could never really figure out the correct way to do it.  I always envisioned a small sqlite file, but this might be a better way.  Anything you can do here will obviously be appreciated.

Very well. Could you give me commit (write) rights to the repository (see repository settings)? That would perhaps speed up things a bit, given the time zone difference between us. As long as you keep the repository ownership to yourself, you can, if need be, always kick me out and undo any changes you don't like ;-)

You're on here, now.  Glad to have you on board.

Thanks :)

Done in 8f94096


How to use trl\trainer\kto_trainer.py

If I want to use KTO trainer, I could set the parameter [loss_type == "kto_pair"] in dpo_trainer.py. Then what is kto_trainer.py used for? And how to use it?

kto_pair is a variant of KTO that you can use with preference data. I recommend not using this and using KTOTrainer, which doesn't learn from preferences but rather based on whether a particular example is good or bad
like if you have 5 x for which you only have positive examples y_pos and 50 x for which you have only negative examples y_neg, you can't use any preference-based method but you can still use KTO
and even if you do have n preference pairs of the type (x, y_w, y_l), the original kto paper found that if you break it up into 2n  examples (x, y_w), (x, y_l) and use KTO, it usually works better than just learning from the preference data

Do you mean that the results from KTOTrainer would be better than those from kto_pair? And how to use kto_trainer instead of dpo_trainer?  Is there any instrustion?

yes, the results from KTOTrainer should be much better than kto_pair
you can check out the docs here: https://huggingface.co/docs/trl/main/en/kto_trainer


Add Planemo extra params

This should resolve https://github.com/galaxyproject/galaxy-language-server/issues/161
Instead of adding each planemo test argument as a setting in the VSCode extension I just added a single extraParams setting that can contain any desired number of arguments. I hope this solution is simple and flexible enough to support most of the use cases.

Also added a console channel called Planemo Tests that will display the full command and any error in case the arguments provided caused any trouble whenever the tests are run.

@davelopez good idea! I like especially the help text with the most used options.


[examples] Add nextjs-hooks-with-typescript

[x] I have followed (at least) the PR section of the contributing guide.

@oliviertassinari Any idea why deploy/netlify is failing? I don't see a single issue in the details.

I have rerun netlify, it's green now.

@oliviertassinari the import order was modified by VS Code setting:
{"editor.codeActionsOnSave": { "source.organizeImports": true }}

If import order is important, every project using material-ui would need to set that setting to false.
useStyles() caused a typescript error since it requires exactly one parameter.

@virzak It's a great first pull request on Material-UI 👌🏻. Thank you for working on it!


(improvement) Remove historical order selection on clickout

Asana task:
[GHI-786] Remove historical order selection on clickout
UI Demonstration:
https://user-images.githubusercontent.com/35810911/221932683-6c62e82f-6584-4be2-8b97-553be45e51f5.mov

@Blaumaus please help fix conflicting files


Handle utf-8 characters in some episode names

some UTF-8 characters were blowing up

Alright. I might as well add you to Contributors now :p


adding initial test for spark kafka integration

Added integration test using kafka testcontainer that is setup on same network. Intention is only to spin up kafka in independent container, run spark job to read from topic1 and write to topic2.

Nice! Use ./gradlew spotlessApply to apply the linter and fix the related issues in the build.

Codecov Report

Merging #279 (deb6f55) into main (fab1f02) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #279   +/-   ##
=======================================
  Coverage   87.69%   87.69%
=======================================
  Files          31       31
  Lines        1707     1707
=======================================
  Hits         1497     1497
  Misses        210      210

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 fab1f02...deb6f55. Read the comment docs.


#13242: Cleanup set-5 unary backward ops

Issue : #13242
CI : PASSED

https://github.com/tenstorrent/tt-metal/actions/runs/11097436542 - PASSED


[CWS] fix missing opts Tagger on macos

What does this PR do?
fix macos build
Motivation
Describe how to test/QA your changes
Possible Drawbacks / Trade-offs
Additional Notes

/merge


Support fallback to subprocess for launching jobs when DRMAA is not present

This would be good, but is not a priority currently.

Closing as this should be replaced by issue ( https://github.com/jakirkham/splauncher/issues/36 ), which will provide a better solution to this problem than the one proposed here.


Add OpenTelemetry

Signed-off-by: Antoine Toulme<EMAIL_ADDRESS>This adds OpenTelemetry to Fabric Java chaincode.

Hi @atoulme, thanks very much for your pull request. Adding metrics to Fabric looks like it could be really useful and I think it would be good to get this proposal reviewed by the wider Fabric community.
There's a Request For Comments process which would need to be followed before merging any PRs, however it would probably be a good idea discussing on Rocket Chat and on one of the maintainer calls beforehand. For example to discuss the choice of OpenTelemetry/B3 headers over alternatives etc.
From an implementation point of view, I noticed that the protobuf code had been updated, but that wasn't reflected in a change to the protos project, or the peer code.
Thanks again, and I look forward to hearing from you about taking this proposal forward. James

Hi @atoulme, thanks very much for your pull request. Adding metrics to Fabric looks like it could be really useful and I think it would be good to get this proposal reviewed by the wider Fabric community.
There's a Request For Comments process which would need to be followed before merging any PRs, however it would probably be a good idea discussing on Rocket Chat and on one of the maintainer calls beforehand. For example to discuss the choice of OpenTelemetry/B3 headers over alternatives etc.
From an implementation point of view, I noticed that the protobuf code had been updated, but that wasn't reflected in a change to the protos project, or the peer code.
Thanks again, and I look forward to hearing from you about taking this proposal forward. James

Thanks James, I look forward to working with you on this!

Thanks James, I look forward to working with you on this!

The RFC is open here for further discussion: https://github.com/hyperledger/fabric-rfcs/pull/42

@atoulme I'm hoping that your RFC will get a mention at the next maintainers call to get some more visibility

That'd be swell. I've been busy elsewhere, but I can try to join the call to explain what this is all about.

Sounds good- I think these are the meeting details if you are able to join
https://calendar.google.com/calendar/event?eid=XzY0cWpnYzloNzBxNmliYjllMHNrb2JoaDZrczM[…]IHZzZHEwNmpqYnJkOGE0NDZuYmI3aDdjNmNrMmoyNmk1QGk&ctz=Etc/GMT

Closing the PR, note because this is a bad idea, but really needs the RFC as discussed above.

@jt-nti @mbwhite please reopen, the RFC was approved.


🐛 Bug Report: Cannot add passkey, blank account setup page

Reproduction steps
Going to https://mydomain.com/login/setup produces a blank page after clicking continue. Users and application config page are populated but my account page is blank.

Expected behavior
Some type of setup page to add a passkey. I can access the login page but cannot add a passkey to login with.
Actual Behavior
After clicking continue, here is the next page:

Running using docker, private url is domain that points to reverse proxy that points to pocket

Hey, thanks for your report. This should be fixed in v0.3.1.


[ListView] renderRow pass state to prop

Hi all, I'm trying to set scrollY prop with a state value updated by the onscroll function. Is this the correct way of doing this? I need to pass the scrollY offset to my component. I'm able to get a value on my component but it doesn't update as I scroll.
renderRow: function (rowData, sectionID, rowID) {
    return (
        <VideoCard key={rowData.id} data={rowData} rowid={rowID} autoplay={this.state.autoplay} scrollY={this.state.contentOffset} navigator={this.props.navigator}/>
    );
},

Hey, this question may be more appropriate and get answered faster on StackOverflow.
You may investigate having to include the contentOffset in the rowHasChanged calculation? Which may be why your new state isn't being passed in?

Agreed re: StackOverflow - we're more focused on bugs and features here unfortunately (wouldn't that be sweet if we also had the time/resources to answer all questions?) - people on StackOverflow will get back to you much more quickly! Closing, let us know if you don't have any luck on StackOverflow @yamill

@yamill were you able to figure this out?

@arilitan yes - i was able to get this to work properly.

@yamill do you mind pointing me to some sample code. I am trying to do something very similar - I want to update a component in the renderRow function every time the scrollOffset changes. I can't figure out how to get the row to update onScroll. Thanks

@arilitan ahh yes - looks like you are facing the same issue. I created an autoplay video feed as well.
I had to make a slight change to the react-native library to get it to update each time the scrolloffset changes - I think this is a bug because in older releases it was working without this little hack.
You will need to change ListView.js L342-L343:
https://github.com/facebook/react-native/blob/master/Libraries/CustomComponents/ListView/ListView.js#L342-L343
to
var shouldUpdateRow = true;
Let me know how this works out for you.

@yamill  thank you! that worked, it would have taken me forever to think to check the in the ListView.js. its updating the rows on scroll but its affecting performance. throttling it somehow in shouldComponentUpdate seems like it will fix that.
also storing contentOffset in the state of the listview component and setting the state on each onScroll event also seems to have an affect on render performance, did you notice that? Trying to figure out a way around that...

@arilitan glad it worked! yeah it definitely does take a performance toll - i ended up writing a debounce function.
Like this:

var SearchBox = React.createClass({

  componentWillMount: function () {
     this.delayedCallback = _.debounce(function (event) {
       // `event.target` is accessible now
     }, 1000);
  },

  onChange: function (event) {
    event.persist();
    this.delayedCallback(event);
  },

  render: function () {
    return (
      <input type="search" onChange={this.onChange} />
    );
  }

});

You can read more about this here - http://stackoverflow.com/questions/23123138/perform-debounce-in-react-js

will try that, thanks again!


Break can hang if window not visible

The original issue #245 has been mostly fixed but there are edge cases where this can still happen.
Would be good to make this completely reliable.

I think this particular issue is fixed, but only because we've hacked around it to automatically push messages through that arrive before the HUD is loaded. So that's still not correctly handled, and that is what this ticekt is supposed to reflect IIRC

How is this issue fixed? I'm working through the HUD tutorial & cannot even complete it because of Break being broken (as described in 245 - I tried to follow the method used there to bypass the broken Break but couldn't get it to work). If there's a workaround I can use it needs to be better documented than it is now.


How to delete the mention after mentioning.

@basha97 you can use the markupText prop to get the text which would include the ids of the users mention you might need to run some regex to find it.


FreeCodeCamp social media links can be included on both the header and the footer

Is your feature request related to a problem? Please describe.
Including a social link in the header(navbar)will enable sponsors and students to know more about the community with the help of social media.
Describe the solution you'd like
Including a social link in the header(navbar)will enable sponsors and students to know more about the community with the help of social media.
Describe alternatives you've considered
Including a social link in the header(navbar)will enable sponsors and students to know more about the community with the help of social media.
Additional context
No response

Thank you for the feature request. Since there is a link to our moderated community (forum) in the main menu, having links to other social media is not a priority for now.  As a result I will be closing this issue.


Async custom query resolvers

I’m trying to implement the resolver for local state query. If I understand correctly - it should be execute as sync query, but no matter what I do - it’s executed as async and the component wrapped with query rendered twice: with loading = true and with loading = false.
Repo with code: https://github.com/zouxuoz/apollo-local-example
import React from 'react';
import ReactDOM from 'react-dom';
import ApolloClient from 'apollo-client';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { ApolloLink } from 'apollo-link';
import { withClientState } from 'apollo-link-state';
import { ApolloProvider, Query } from 'react-apollo';
import gql from 'graphql-tag';

const cache = new InMemoryCache();

const stateLink = withClientState({
  cache,
  defaults: {
    common: 'common',
  },
  resolvers: {
    Query: {
      custom: () => 'custom',
    },
  },
});

const client = new ApolloClient({
  cache,
  link: ApolloLink.from([
    stateLink,
  ]),
});

const TEST_COMMON_QUERY = gql`
  query {
    common @client
  }
`;

const TEST_CUSTOM_QUERY = gql`
  query {
    custom @client
  }
`;

class Application extends React.Component {
  renderCommonContent = ({ loading, data }) => {
    console.log('renderCommonContent', loading, data);

    return loading ? 'Loading...' : data.common;
  };

  renderCustomContent = ({ loading, data }) => {
    console.log('renderCustomContent', loading, data);

    return loading ? 'Loading...' : data.custom;
  };

  render() {
    return (
      <div className="Application">
        <Query query={TEST_COMMON_QUERY}>
          {this.renderCommonContent}
        </Query>
        <Query query={TEST_CUSTOM_QUERY}>
          {this.renderCustomContent}
        </Query>
      </div>
    );
  }
}

ReactDOM.render((
  <ApolloProvider client={client}>
    <Application />
  </ApolloProvider>
), document.getElementById('root'));

@zouxuoz This is normal behaviour. Your first Query component is pulling the result directly from the cache (that was written there using defaults). Because of this, the Query component never hits a loading state. Your second Query component doesn't find the result it's looking for in the cache, so it proceeds down the link chain with the data request. As far as your second Query component is concerned, a data request is being made and hasn't been fulfilled yet, which means your component is put into a loading state.

I had the same problem using apollo link state in react native, although I already put the @client tag in every queries and mutations, apollo client still renders twice: with loading = true and with loading = false.


Update sql-database-import.md

In Azure Portal Destination credentials must be used, not Source.

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@tosue : Thanks for your contribution to the Azure documentation! The author, @CarlRabeler, has been notified to review your proposed change.

#sign-off

@tosue thank you

@CarlRabeler you're welcome


Working with Intercom and CIO on Expo

Hi, We are trying to move from React native CLI to Expo and I'm trying to configure things as it was but not the same final code that was working on previous project now it doesn't work anymore.
I followed previous issue solution that I'm author of: https://github.com/customerio/customerio-reactnative/issues/120 but now it doesn't work anymore.
SDK version:
    "customerio-expo-plugin": "^1.0.0-beta.15",
    "customerio-reactnative": "^3.7.0",
    "expo": "~51.0.12",
    "react-native": "0.74.2",
   "@intercom/intercom-react-native": "^7.1.2",

google services version on android(I was forced to update as other packages were not working well, I don't think these things are connected though):
        classpath 'com.google.gms:google-services:4.4.1'

Environment: Development
Error:

> Task :app:compileDebugJavaWithJavac FAILED
/Users/*/android/app/src/main/java/com/geraldwallet/MainNotificationService.java:8: error: cannot find symbol
import io.customer.messagingpush.CustomerIOFirebaseMessagingService;
                                ^
  symbol:   class CustomerIOFirebaseMessagingService
  location: package io.customer.messagingpush
/Users/*/android/app/src/main/java/com/geraldwallet/MainNotificationService.java:15: error: package CustomerIOFirebaseMessagingService does not exist
    CustomerIOFirebaseMessagingService.Companion.onNewToken(getApplication(), refreshedToken);
                                      ^
/Users/*/android/app/src/main/java/com/geraldwallet/MainNotificationService.java:20: error: package CustomerIOFirebaseMessagingService does not exist
  boolean didCustomerIOHandlePush = CustomerIOFirebaseMessagingService.Companion.onMessageReceived(getApplication(), remoteMessage);

Hey @beqramo. Thanks for reaching out and sharing the details. We haven't enforced any requirement for newer Google Services libraries. However, starting from 3.7.0, Android apps should be compatible with Gradle 8. Since you have already shared that you are using React Native 0.74.2, it is fully compatible with Gradle 8 and shouldn't be an issue for you.
For the error you are facing, it looks like your app is unable to find the required package and might need updates in build.gradle file. Before I suggest the workaround, can you please confirm if you have tried any of the solutions listed here and if they worked for you? It should be easier for you to manage. If none of them works, can you please share the reason so we can note it down for future improvements?
If the above solutions don't work for you and you want to continue using the older solution, can you try updating your build.gradle file as suggested here? Once you update and clean build your project, it should be able to find the required package and classes. Also, the method now has @JvmStatic annotation added, so you don't need to call with Companion object. You can directly call the method from Java class as follows:
import io.customer.messagingpush.CustomerIOFirebaseMessagingService;

CustomerIOFirebaseMessagingService.onNewToken(getApplication(), refreshedToken);
CustomerIOFirebaseMessagingService.onMessageReceived(getApplication(), remoteMessage);

Do let me know if this doesn't help or if you have more questions.

Hi, thanks for your quick answer @mrehan27 ,
about suggested/recomended solutions:
1st solution: I'm using CIO as my main "notification manager" so I don't have any other way to get the token.
2nd solution: well in that case it will not work for the Intercom as I will not have a way to give token to itnercom on native side.
about the solution:
adding bellow codes was the solution.
 implementation "io.customer.android:tracking"
    implementation "io.customer.android:messaging-push-fcm"
    implementation "io.customer.android:messaging-in-app"

thanks

Thanks for the confirmation @beqramo. I'll note down the feedback internally. Glad the solution worked for you.
In case you haven't noticed this before, you can also set token directly from your JavaScript code by fetching it from any other library like Intercom or others, as this will help you reduce your project's direct dependency on native libraries. However, if you want to continue using native methods directly, you can continue using them.
Also, please note that this isn't the ideal approach, as we want customers to interact mostly with React Native package directly and not the native dependencies. However, I understand the current solutions in React Native package don’t solve the problem for you, so it's completely fine to use native methods at the moment.
Since the issue is resolved, I'm closing this ticket. Even if the issue is closed, please feel free to ask any more questions you have. Have a great day!


Performance drops on camera rotation

Godot version
3.4 beta 4 - 3.4 rc3
System information
Windows 10 64 bit, rtx 3070, GLES3
Issue description
In my top down 2D game the performance drops while rotating the camera by mouse. It doesn't seem to happen, while using a controller.  The mouse camera rotation is handled in _input, while controller camera rotation is handled in _physics_process. The issue isn't necessarily noticeably, as long as you aren't already pushing everything to the limit performance wise. I suppose some changes to _input handling are causing this performance issues.
Steps to reproduce
Read above.
Minimal reproduction project
No response

@Reapetitive Please upload a minimal reproduction project to make this easier to troubleshoot.

@Calinou sure! Not a perfect representation of the problem, but you can hopefully see, if you rotate the camera by right stick of the controller, fps stay constant, while using the mouse through _input drops them by 100-200 for me, or even more if you rotate faster. Sure, this ain't much frame time wise, but it seems to scale not very well as _input commands become more complex and general resource usage becomes higher.

@Calinou nevermind! I can't bypass it. I still have to get the event InputEventMouseMotion from any kind of _input and it seems like this alone kills the performance totally for me. Still, playing with controller doesn't hit the performance what so ever. This is really wierd, i mean im getting pretty stable frames, for example 150. Just moving the mouse drops them to like 10.

This issue still accures in 3.4.1.

Try Input.set_use_accumulated_input(true).
I had massive performance issues when moving the mouse cursor while displaying many canvas items (Control nodes or Node2Ds) since 3.4. Accumulated input fixed it for me.
#55037 states accumulated input is off by default (should be on).
Maybe its a regression of 3.4.x, because 3.3.x was working fine for me.

@TrickMe thank you very much! It seems to have fixed the issue for me!

Duplicate of https://github.com/godotengine/godot/issues/55037 (same cause).


Solenoid linear motion to rotation

Hi @hjonnala  , Just needed to know how did you transform the solenoid linear motion to sorter rotation. Did you use some kind of gears to the conversion form linear to rotation because as far I know solenoid mover in one direction (front or back). Another option is to use Stepper motor which is kind of expensive.

Hello..The mechanism we used is actually provided as 3D files here: https://github.com/google-coral/project-teachable-sorter/tree/master/3D_files/tippy
These are designed to be FDM printed, and turn the solenoids motion into the tippy thing that's seen in the video. The solenoid sits in the part called solenoidholder.stl, which should be adhered to the tab on body.stl. Then the solenoid's output shaft can be connected to the part called track.stl with a small, rigid linkage, we used a paperclip.

Her is the image and small cam looking part that used to create the motion needed: https://github.com/hjonnala/snippets/blob/main/cam.stl


[QUERY] Cannot use LogsQueryClient to query LogAnalytics  data

Library name and version
Azure.Identity           1.5.0       Azure.Monitor.Query      1.1.0
Query/Question
This is my simple script to query data from log analytics

Uri url = new Uri("https://management.usgovcloudapi.net");
var client = new LogsQueryClient(url, new DefaultAzureCredential());
var workspaceId = "xxxxxxxxxxxxxxxxxxxx";
var query = "AzureActivity | count";
var results = client.QueryWorkspace(workspaceId, query, new QueryTimeRange(TimeSpan.FromDays(1)));

But I got this error  The api-version query parameter (?api-version=) is required for all requests
I can query azure monitor metrics with this script without any problems

Uri url = new Uri("https://management.usgovcloudapi.net");
string resourceId = "/subscriptions/xxxxxxxxxx/resourceGroups/ag1-data-platform-core/providers/Microsoft.Storage/storageAccounts/platformdatalaketest";
var metricsClient = new MetricsQueryClient(url, new DefaultAzureCredential());
Response results =  metricsClient.QueryResource(
resourceId,
new[] {"UsedCapacity", "Transactions", "Ingress", "Egress"}
);

As I checked the https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryRestClient.cs#L39 function here doesn't provide api-version param as in https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs#L81 here
Am I missing anything here ?
Environment
.NET SDK (reflecting any global.json):
Version:   6.0.400
Commit:    7771abd614
Runtime Environment:
OS Name:     Mac OS X
OS Version:  12.5
OS Platform: Darwin
RID:         osx.12-x64
Base Path:   /usr/local/share/dotnet/sdk/6.0.400/
IDE: JetBrains Rider 2022.2.2

Sorry I used the azure gov so need to change the url to api.loganalytics.us


stack overflow error

I met a stackoverflow error when using rustfmt-nightly (cargo fmt's result doesn't include the last abort message):
$ rustfmt core/src/lib.rs

thread 'main' has overflowed its stack
fatal runtime error: stack overflow
[2]    28653 abort      rustfmt core/src/lib.rs

$ rustfmt --version
0.3.3-nightly ( )

Unfortunately, I don't know how to get the internal backtrace.

Could you tell us the repository you were working on?
FWIW you could get the backtrace via RUST_BACKTRACE=1 rustfmt core/src/lib.rs.

@topecongiro Sorry it's still a private repository for the time being.
Even RUST_BACKTRACE=full does not provide more information so I guess it's from the unsafe part?

FYI, I remember that last time I used rustfmt (the legacy crate, rather than rustfmt-night one), it also had this issue.

Valgrind output:
$ valgrind  rustfmt ./core/src/lib.rs                                                                                sem < 4:03 PM
==22166== Memcheck, a memory error detector
==22166== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==22166== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==22166== Command: rustfmt ./core/src/lib.rs
==22166==
==22166== Stack overflow in thread #1: can't grow stack to 0xffe801000
==22166== Stack overflow in thread #1: can't grow stack to 0xffe801000
==22166==
==22166== Process terminating with default action of signal 11 (SIGSEGV)
==22166==  Access not within mapped region at address 0xFFE801FF0
==22166== Stack overflow in thread #1: can't grow stack to 0xffe801000
==22166==    at 0x59F8ABA: reserve<u8> (vec.rs:464)
==22166==    by 0x59F8ABA: spec_extend<u8> (vec.rs:1903)
==22166==    by 0x59F8ABA: extend_from_slice<u8> (vec.rs:1276)
==22166==    by 0x59F8ABA: push_str (string.rs:805)
==22166==    by 0x59F8ABA: write_str (string.rs:2178)
==22166==    by 0x59F8ABA: _$LT$core..fmt..Write..write_fmt..Adapter$LT$$u27$a$C$$u20$T$GT$$u20$as$u20$core..fmt..Write$GT$::write_str::he5ed978418471847 (mod.rs:211)
==22166==  If you believe this happened as a result of a stack
==22166==  overflow in your program's main thread (unlikely but
==22166==  possible), you can try to increase the size of the
==22166==  main thread stack using the --main-stacksize= flag.
==22166==  The main thread stack size used in this run was 8388608.
==22166== Stack overflow in thread #1: can't grow stack to 0xffe801000
==22166==
==22166== Process terminating with default action of signal 11 (SIGSEGV)
==22166==  Access not within mapped region at address 0xFFE801FE8
==22166== Stack overflow in thread #1: can't grow stack to 0xffe801000
==22166==    at 0x4A28680: _vgnU_freeres (in /usr/lib/valgrind/vgpreload_core-amd64-linux.so)
==22166==  If you believe this happened as a result of a stack
==22166==  overflow in your program's main thread (unlikely but
==22166==  possible), you can try to increase the size of the
==22166==  main thread stack using the --main-stacksize= flag.
==22166==  The main thread stack size used in this run was 8388608.
==22166==
==22166== FILE DESCRIPTORS: 3 open at exit.
==22166== Open file descriptor 2: /dev/pts/2
==22166==    <inherited from parent>
==22166==
==22166== Open file descriptor 1: /dev/pts/2
==22166==    <inherited from parent>
==22166==
==22166== Open file descriptor 0: /dev/pts/2
==22166==    <inherited from parent>
==22166==
==22166==
==22166== HEAP SUMMARY:
==22166==     in use at exit: 0 bytes in 0 blocks
==22166==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==22166==
==22166== All heap blocks were freed -- no leaks are possible
==22166==
==22166== For counts of detected and suppressed errors, rerun with: -v
==22166== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
[1]    22166 segmentation fault  valgrind rustfmt ./core/src/lib.rs

gdb output (gdb --args rustfmt ./core/src/lib.rs):
gdb$ run
Starting program: /home/hongxu/.cargo/bin/rustfmt ./core/src/lib.rs
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
je_arena_ralloc (tsd=0x7ffff7fb6820, arena=arena@entry=0x0, ptr=ptr@entry=0x7ffff4a8c178, oldsize=oldsize@entry=0x8, size=size@entry=0x4, alignment=alignment@entry=0x0, zero=zero@entry=0x0, tcache=tcache@entry=0x7ffff540d000) at /checkout/src/liballoc_jemalloc/../jemalloc/src/arena.c:3342
warning: Source file is more recent than executable.
3342    {
gdb$ bt -30
#15361 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15362 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15363 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15364 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15365 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15366 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15367 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15368 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15369 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15370 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15371 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15372 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15373 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15374 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15375 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15376 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15377 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15378 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15379 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15380 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15381 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15382 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15383 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15384 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15385 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15386 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15387 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15388 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15389 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15390 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15391 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15392 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15393 0x000055555566811d in rustfmt_nightly::comment::identify_comment::h3c4586c841a6df82 ()
#15394 0x000055555566773d in rustfmt_nightly::comment::rewrite_comment::h9a125eb5ce9c1cad ()
#15395 0x000055555560ecd5 in rustfmt_nightly::lists::write_list::hdefae0ab284d9e00 ()
#15396 0x000055555566057b in rustfmt_nightly::imports::_$LT$impl$u20$rustfmt_nightly..visitor..FmtVisitor$LT$$u27$a$GT$$GT$::format_imports::ha052c19a6d4f3745 ()
#15397 0x00005555555ed8b0 in rustfmt_nightly::visitor::FmtVisitor::walk_items::h338684f57a3a3560 ()
#15398 0x00005555555edaf4 in rustfmt_nightly::visitor::FmtVisitor::walk_mod_items::h933bfc8805b61b8c ()
#15399 0x000055555568067d in rustfmt_nightly::format_ast::h60da206e33caabbf ()
#15400 0x00005555556872d4 in rustfmt_nightly::run::hece53351ef03e1d6 ()
#15401 0x000055555557a71a in rustfmt::execute::h90ea63718dda3a17 ()
#15402 0x000055555557cbc1 in rustfmt::main::h009aeb99fec931f5 ()
#15403 0x00007ffff7034d9f in panic_unwind::__rust_maybe_catch_panic () at /checkout/src/libpanic_unwind/lib.rs:101
#15404 0x00007ffff6ffb250 in std::panicking::try<(),closure> () at /checkout/src/libstd/panicking.rs:459
#15405 std::panic::catch_unwind<closure,()> () at /checkout/src/libstd/panic.rs:365
#15406 std::rt::lang_start () at /checkout/src/libstd/rt.rs:58
#15407 0x00007ffff67c0830 in __libc_start_main (main=0x55555557cff0 <main>, argc=0x2, argv=0x7fffffffbac8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffbab8) at ../csu/libc-start.c:291
#15408 0x0000555555570ac9 in _start ()

Tried rustfmt today on the same project (some updates have been made), and this time it seems to have eaten up the memories and finally got the computer hang. It may result from an update of rustfmt itself.
$ rustfmt --version
0.3.4-nightly ( )
$ ldd `which rustfmt`
        linux-vdso.so.1 =>  (0x00007ffdaf58f000)
        libsyntax-b39c7f2acd529493.so => /home/hongxu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libsyntax-b39c7f2acd529493.so (0x00007fb3be074000)
        librustc_errors-b7dae5623d5b1052.so => /home/hongxu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_errors-b7dae5623d5b1052.so (0x00007fb3bde1e000)
        libsyntax_pos-5d14d9bfa8822062.so => /home/hongxu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libsyntax_pos-5d14d9bfa8822062.so (0x00007fb3bdbf6000)
        libstd-d3700976135c3f09.so => /home/hongxu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libstd-d3700976135c3f09.so (0x00007fb3bd8a1000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb3bd684000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb3bd46d000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb3bd0a3000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fb3beb42000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb3bcd9a000)
        librustc_data_structures-d61b74081518890c.so => /home/hongxu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/../lib/librustc_data_structures-d61b74081518890c.so (0x00007fb3bcb66000)
        libserialize-c26e1cac9f646b78.so => /home/hongxu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/../lib/libserialize-c26e1cac9f646b78.so (0x00007fb3bc939000)
        libterm-143180761cc2014f.so => /home/hongxu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/../lib/libterm-143180761cc2014f.so (0x00007fb3bc704000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb3bc500000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fb3bc2f8000)

@HongxuChen Thank you very much for more information! It looks like stack overflow occurs while formatting use items. Would you tell us if there are any comments between use items in your file?

@topecongiro may i know what kind of use will most likely lead  to this issue?
Another basic question: if some rust source file is not in the module, will rustfmt still reformat it?

Side question: since it is a stackoverflow, is it possible due to a circular reference? Specially, with some use module::*? I myself am new to Rust, and we merely base our development on the rust toolchain hints, but not quite deeply into Rust internals.

@topecongiro This problem doesn't happen anymore it seems. Did you manage to fix it ?

Closing as fixed (some how?)

@nrc I can add the given example as a test case if you want ?

@scampi that would be great, thanks!


Diamond operator with python keyword as file handle generates bad code

Diamond operator with python keyword as file handle generates bad code.  For example (from Date::Manip::TZ_Base):
my @in = <$in>;

Fixed in v1.030


Dependency error on rollup build

🐛 Bug report
Current behavior
Rollup trows this error while building a project usign reakit as a dependency

[!] Error: 'disableBodyScroll' is not exported by node_modules/body-scroll-lock/lib/bodyScrollLock.min.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
node_modules/reakit/es/Dialog/Dialog.js (19:9)

Steps to reproduce the bug
Create a project that uses reakit as a dependency and build it with rollup.
Expected behavior
Is this expected ?
:information_source:  Update : I think the solution or intended thing to do is to move reakit as a peerDependency
Environment
Please, run the command below inside your project directory.
$ npx envinfo --system --binaries --browsers --npmPackages "{react*,reakit*}"

Environment:
  OS:  Linux 4.15
  Node:  10.15.3
  Yarn:  1.19.1
  npm:  6.12.0
  Watchman:  Not Found
  Xcode:  N/A
  Android Studio:  Not Found

Closing this for now:

:information_source:  Update : I think the solution or intended thing to do is to move reakit as a peerDependency

I guess that's an issue on body-scroll-lock? We use this rollup configuration:
https://github.com/reakit/reakit/blob/4931fef3070e0b56e454ae6c888b5dcf6043916c/scripts/build/rollup.config.js#L50-L55

Related: https://github.com/willmcpo/body-scroll-lock/issues/120

By the way, I would love to get rid of the body-scroll-lock dependency as it looks like they're not actively  maintained anymore.

Should I reopen this ?

According to the comments on that issue, it seems that it can be fixed if we import it from body-scroll-lock/lib/bodyScrollLock.es6.js:
import { disableBodyScroll, enableBodyScroll, clearAllBodyScrollLocks } from 'body-scroll-lock/lib/bodyScrollLock.es6.js';

Is anyone already started solving it or can I take it?

@gabrielreisn Go ahead!


Add style encoding for strings

Description
This is the beginning of the visualization style implementation described in the following doc: https://hackmd.io/Ybil_epnQPiBczPcbGRqCw
It introduces the generic StyleEncoding protocol. The public API of this protocol is __call__, which is stateless, and encodes style values from layer feature. This generic protocol should support strings, colors, and any other value that can be stored in array-likes.
This protocol also has a private API that is stateful and needs to be implemented to support napari's current behavior of storing and exposing style values (e.g. Points.text.values). We could consider splitting the private API into a separate StyleStore class or something similar, but I've struggled to make that work well with the rest of napari in experimental PRs. As it's private and if we discourage people from implementing the protocol, then I think it's OK to handle that later if needed/desired.
My long term vision is that only the __call__ public API will remain, and the values will be stored on immutable views/slices of a layer.
It also introduces the specific StringEncoding that encodes strings from features. The public API of that specific type of encoding is covered by tests.
For more context on how this will be used to implement TextManager without any significant changes in behavior, see the following draft PR in my fork: https://github.com/andy-sweet/napari/pull/2
Both new modules are private to start (i.e. with a leading underscore) to avoid expanding the napari public API unnecessarily, but at least string_encoding will be made public when it is used by TextManager.
A few issues/questions to highlight here.

I used DirectStringEncoding to represent a string that comes directly from a specific features column and ManualStringEncoding to represent a string that is manually specified in an array. That's in conflict with the use of DIRECT mode in some places now, which means manual, but I think it's a worthwhile improvement.
The generic types are bound to be subtypes of np.ndarray. This makes sense for colors, but maybe less sense for strings. It makes things a little simpler, but I also think it wouldn't be difficult to define StringValue = str.
__call__ returns either a single style value or multiple style values in an array. Previously I always returned an array that matched the length of the given features, but there is at least one case where that's inefficient in general (i.e. constant encodings), so I'd like to also allow returning the single value as it can easily broadcast to the array.
I did not write tests for the private API yet. We could do that here, but I think that testing through test_text_manager, test_points, etc. in follow-up PRs should be sufficient.
I'm not sure where these new modules should live. napari.layers.utils seems reasonable, but maybe they should go in napari.utils?

Type of change

[ ] Bug-fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

References
Part of #3992.
How has this been tested?

[x] example: all tests in test_string_encoding.py pass

Final checklist:

[ ] My PR is the minimum possible work for the desired functionality
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] I have added tests that prove my fix is effective or that my feature works
[x] If I included new strings, I have used trans. to make them localizable.
For more information see our translations guide.

@jni : I hope you'll be interested in this. Also, no manager classes this time ;)

Thanks for the review @jni - @andy-sweet onwards and upwards! 🚀

Just wanted to chime in and also say thanks for this PR @andy-sweet.  I did look at it a couple times and didn't feel up enough on the topic to say much :) so I never actually posted a review.  The typing is lovely, your explanatory documents are awesome.  I'm perfectly happy moving forward with your lead on this!

Thanks for the reviews!


Service catalog migration keep old instances and bindings

https://github.com/kyma-incubator/reconciler/issues/577#issuecomment-1049792731
It was discussed that we may want to keep the service catalog instances and bindings around for the first iteration of cleanup and verify the migration was successful before triggering further cleanup.

/retest

/retest

/retest

/retest