Why fetch is called every time when getting datas?

I'm using get method, but fetch still get called every time.
I don't know the cache is working or not? 🤔
public void loadPosts() {
    Log.d(TAG, "[loadPosts] start");

    BarCode awwRequest = new BarCode(RedditData.class.getSimpleName(), "aww");

    Log.d(TAG, "[loadPosts] Call provideRedditStore get with key \"aww\"");

    provideRedditStore()
            .get(awwRequest)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(new Subscriber<Integer>() {
                @Override
                public void onCompleted() {
                    Log.d("TAG", "[onCompleted] Hello");
                    Toast.makeText(StoreActivity.this, "Hello", Toast.LENGTH_SHORT).show();
                }

                @Override
                public void onError(Throwable e) {

                }

                @Override
                public void onNext(Integer posts) {

                }
            });
}

private Store<Integer, BarCode> provideRedditStore() {
    return StoreBuilder.<Integer>barcode()
            .fetcher(new Fetcher<Integer, BarCode>() {
                @Nonnull
                @Override
                public Observable<Integer> fetch(@Nonnull BarCode barCode) {
                    try {
                        Thread.sleep(5000);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }

                    Log.d("TAG", "[fetch] return 5");
                    return Observable.just(5);
                }
            })
            .open();
}

@tsaisean Can you also please post the get part of your code?

@pavlospt
        BarCode awwRequest = new BarCode(RedditData.class.getSimpleName(), "aww");
        provideRedditStore()
                .get(awwRequest)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Subscriber<Integer>() {
                    @Override
                    public void onCompleted() {
                        Log.d("TAG", "Hello");
                        Toast.makeText(StoreActivity.this, "Hello", Toast.LENGTH_SHORT).show();
                    }

                    @Override
                    public void onError(Throwable e) {

                    }

                    @Override
                    public void onNext(Integer posts) {

                    }
                });

@tsaisean And what version are you using?

@pavlospt I'm using the sample inside the Store project. "Store/app/src/"

@tsaisean Did you delete the persister or something like that? The first time it is supposed to request from Network due to a cache miss, but the second time it will hit your cache.

It caches as expected. How did you check that it doesn't work on your case?

Hi thank you for submission but we have to trouble reproducing problem. Could you include a failing test case that shows network getting hit on multiple calls.

@pavlospt @digitalbuddha
I'm using StoreActivity, not PersistingStoreActivity.
I intended to use memory cache only, and no disk cache.

Sure but when you say network is being called how do you see that?

I didn't say network. I modify the sample a bit. 😄
private Store<Integer, BarCode> provideRedditStore() {
    return StoreBuilder.<Integer>barcode()
            .fetcher(new Fetcher<Integer, BarCode>() {
                @Nonnull
                @Override
                public Observable<Integer> fetch(@Nonnull BarCode barCode) {
                    try {
                        Thread.sleep(5000);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    return Observable.just(5);
                }
            })
            .open();
}

Pls show me fetch being executed multiple times

Do me a favor. Make fetch return i++ so value changes each time it is executed. I'll  be at work in hour and can see what's up then.

@tsaisean When do you call the Store.get() method? As I see from your screenshot seems like you are sending the app on background and call .get() in onResume() ?

@pavlospt
Yes, I expected to get the value from memory cache directly for the 2nd onResume.

@digitalbuddha
03-07 08:44:26.743 27674-27674/com.nytimes.android.sample D/StoreActivity: onResume
03-07 08:44:26.743 27674-27674/com.nytimes.android.sample D/StoreActivity: [loadPosts] start
03-07 08:44:26.743 27674-27674/com.nytimes.android.sample D/StoreActivity: [loadPosts] Call provideRedditStore get with key "aww"
03-07 08:44:31.817 27674-27751/com.nytimes.android.sample D/StoreActivity: [fetch] return 1
03-07 08:44:31.823 27674-27674/com.nytimes.android.sample D/StoreActivity: [onNext] get 1
03-07 08:44:31.823 27674-27674/com.nytimes.android.sample D/StoreActivity: [onCompleted]
03-07 08:44:41.555 27674-27674/com.nytimes.android.sample D/StoreActivity: onResume
03-07 08:44:41.555 27674-27674/com.nytimes.android.sample D/StoreActivity: [loadPosts] start
03-07 08:44:41.555 27674-27674/com.nytimes.android.sample D/StoreActivity: [loadPosts] Call provideRedditStore get with key "aww"
03-07 08:44:46.556 27674-27751/com.nytimes.android.sample D/StoreActivity: [fetch] return 2
03-07 08:44:46.557 27674-27674/com.nytimes.android.sample D/StoreActivity: [onNext] get 2
03-07 08:44:46.557 27674-27674/com.nytimes.android.sample D/StoreActivity: [onCompleted]

Can you push your code to github I'll look in a few.

@tsaisean I think I know why this is happening! Well, since you are using the sample app, it means that each time you call loadPosts() you create a new Store object. What this does is create it from scratch and then give it back so you can call .get(). Even if you added a memory caching there, it would still not work.
What you need to do is: 1) Create a class variable and instantiate Store. When you are going to use it, check if it is already null and instantiate it.  I'm blind. 😞
Thanks for your help! @pavlospt and @digitalbuddha
Very appreciated!! 🙂

https://github.com/NYTimes/Store/issues/148 sample needs fixing


Make file.encoding default to UTF-8

Previously, the image defaulted to ANSI_X3.4-1968
Closes #32

LGTM

SEXY
LGTM


Revert "Updates job scheduler to use OS 2.0, Gradle 7.3, and fixes br…

…eaking c… (#133)"
This reverts commit ec916373d2a20c268ff8e49a82bbadfbbbfb5c5b.
Signed-off-by: Tianle Huang<EMAIL_ADDRESS>Description
Notice the build of this job during https://github.com/opensearch-project/opensearch-build/issues/1716 Since there is no 1.3 branch and 1.x branch still on 1.2 (https://github.com/opensearch-project/job-scheduler/blob/1.x/build.gradle#L29), decide to revert this commit for now.
Issues Resolved
Check List

[ ] New functionality includes testing.

[ ] All tests pass

[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Easier to just checkout the HEAD~1 commit and push that up as 1.3, closing this.


Multi-Master Replication

Hi,
though there is the mention of multiple targets and master-master replication in the README and issues, I'd like to ask whether multi-master is supported. If so any deployment experiences (first-third hand knowledge)?
We have an upcoming deployment for a 1 central and roughly 10 satellites (over WAN) deployment with little actual load (satellites are POS's - ~1 write/minute) and I'm wondering whether to go for Teleport over Bucardo if possible. DDL propagation is really nice to have in this case. Also it gives kind of a rough time to trust 10k lines Perl for this, even though its one of the nicest Perl scripts I've seen so far.
Thanks,
~lwk

Hi,
Multi-master replication is definitely possible, just add one more target to the target instance. A useful gotcha is obviously not to replicate the same table twice (I.e. from both source to target and target to source) - this may cause unexpected behaviors and compromise replication.
Please let me know if you have any problem.

Great! Will try it out. Thanks a lot.


adlr binary can't parse output from go list

When trying to use the adlr binary with output from go list -m -json all > buildlist.json, the binary returns the error unexpected end of JSON input
This is because go list outputs the imported dependencies of the module in a newline delimited list. It does not put commas after each module's json
{
        "Path": "rsc.io/quote/v3",
        "Version": "v3.1.0",
        "Time": "2019-03-12T14:59:12Z",
        "Indirect": true,
        "GoMod"<EMAIL_ADDRESS>}
{
        "Path": "rsc.io/sampler",
        "Version": "v1.3.0",
        "Time": "2018-02-13T19:05:03Z",
        "Indirect": true,
        "GoMod"<EMAIL_ADDRESS>}
... etc

Currently, using the gotool package included in ADLR for marshaling from the buildlist works, and handles this newline delimited list correctly

The use of go list was removed in ADLR V2 as we simply use go.mod now.


(WIP) Context Menu for side bar items

Started adding the context menu for the side bar items. Still a work in progress trying to figure out why it doesn't show for the file items. But here is a look at it so long.

@lukepistrol  imma stop the context menu for now, we do have actions happening like creating folders/files, deleting it and showing in the finder. But since we planning a custom implementation of the sidebar it's best we wait and see what happens.

You could create it as a package (keyword ViewModifier) of some kind so we can attach it on any view and just pass a document or what else needs to get passed.

You could create it as a package (keyword ViewModifier) of some kind so we can attach it on any view and just pass a document or what else needs to get passed.

Will look into that as soon as i can

You could create it as a package (keyword ViewModifier) of some kind so we can attach it on any view and just pass a document or what else needs to get passed.

Will look into that as soon as i can

No hurry 😉


Support async executors

Let's resurrect @kessler-frost's  asyncio approach but while also supporting synchronous executors. Some immediate beneficiaries include:

Dask is async aware and the executor be modified to take advantage of this.
Network-based executors (SSH and Slurm)

From discussion with @venkatBala , there is a question of where to run the event loop. Each workflow is currently managed by its own thread from the WorkflowsPool. The linked PR runs an event loop in each workflow-level thread to dispatch all the tasks from that workflow. Would it be better to instead use a single event loop to manage all the tasks from all workflows?

Would it be better to instead use a single event loop to manage all the tasks from all workflows?
I don't think so because if one of the workflows is really time consuming then other workflows will also be affected by it. Furthermore, I think we should eventually move towards the new-threadpool-per-workflow and new-proc-per-workflow approach to maintain independence.


Fix NotSerializableException caused by Writers

StringWriter and PrintWriter are not Serializable, so factor the relevant code out into a NonCPS function.

Pre-patch test run
Post-patch test run

@paul-elliott-arm Could you try logging in on https://ci.staging.trustedfirmware.org/ and trying the links again?
It seems to log me out every so often (maybe every time the jenkins instance is restarted?)


Godot 4.0 alpha6 Gdextension bug with GridMap

Godot version
4.0 alpha 6
System information
Windows10  Vulkan
Issue description
I try to make  a class extends different classes  . The classes include “Control”,"Node","Node3D","Camera3D","GridMap".  However, when I choose GridMap, GDextension doesn't work as normal.The class that inherits gridmap is not registered in ClassDB.
Steps to reproduce
#ifndef GRID_MAP_EXTENDS_H
#define GRID_MAP_EXTENDS_H
#include <godot_cpp/classes/grid_map.hpp>
using namespace godot;
using godot::ClassDB;
class GridMapExtends:public Node{
GDCLASS(GridMapExtends, Node)
protected:
static void _bind_methods(){}
};
#endif
Minimal reproduction project
No response

Core extensions are registered before module types currently:
https://github.com/godotengine/godot/blob/12cb05b3040242deebb87262aed8c04218b69044/main/main.cpp#L409-L439

所以大佬，我应该怎么办

So, what should I do?

I believe there's no workaround currently. But until a proper fix is made, you can try moving register_core_extensions() around. I'm not sure.

So, what should I do?

I believe there's no workaround currently. But until a proper fix is made, you can try moving register_core_extensions() around. I'm not sure.

thank you

什么时候可以用上简易使用的C++？

@LiBooks how is this being registered? What is the initialization level (core, driver, scene, editor etc) in the type registration?
You can try the PR timothyqiu mentions. Note it is not designed or tested for this purpose but you can experiment if that works.


[Feature Request] opensearch_data_stream: support usage of multiple, existing index templates

(check apply)

[x] read the contribution guideline

Is your feature request related to a problem? Please describe.
By theory we want to create data streams based on this configuration:
  <match **>
    @type opensearch_data_stream
    @id out_os_ds
    @log_level "info"
    data_stream_name "logs-${kubernetes.cluster_name}-${$.kubernetes.namespace_name}"
    include_tag_key true
    host "opensearch-cluster-master"
    port 9200
    path ""
    scheme https
    ssl_verify false
    ssl_version TLSv1_2
    user "fluentd-cluster1"
    password xxxxxx
    reload_connections false
    reconnect_on_error true
    reload_on_failure true
    log_os_400_reason true
    logstash_format true
    include_timestamp true
    sniffer_class_name "Fluent::Plugin::OpenSearchSimpleSniffer"
    request_timeout 120s
    suppress_type_name false
    <buffer kubernetes.cluster_name, $.kubernetes.namespace_name>
      flush_thread_count 8
      flush_interval 5s
      chunk_limit_size 64M
      total_limit_size 512MB
      retry_max_interval 30
      retry_forever true
    </buffer>
  </match>

With this configuration, since the parameter data_stream_template_name is not given, the plugin would create an index template for each kubernetes.cluster_name + kubernetes.namespace_name.
If we use the parameter data_stream_template_name we can use just one index template for all the different kubernetes namespaces.
Describe the solution you'd like
My intention is to not specify the parameter data_stream_template_name but have different index template on OpenSearch, which are then applied to the data streams based on the index pattern and the priority.
Might this can be achieved by an additional parameter data_stream_use_existing_templates.
Describe alternatives you've considered
We're using regular indices but stucking with the index rollover, see https://github.com/fluent/fluent-plugin-opensearch/discussions/65

Thanks for the suggestion.
I did not try that yet but I guess, if this even works, it requires a template for every namespace which is what I want to avoid.
Basically it's the same behavior as for the "regular" indices.

@anders-swanson
Sorry for my late response!
This is what I have tested.
fluentd.conf
  <match **>
    @type opensearch_data_stream
    @id out_os_ds
    @log_level "info"
    data_stream_name "logsedu4-${$.kubernetes.namespace_name}${tag2}"
    data_stream_template_name "logsedu4-${$.kubernetes.namespace_name}${tag2}_template"
    include_tag_key true
    host "opensearch-cluster-master"
    port 9200
    path ""
    scheme https
    ssl_verify false
    ssl_version TLSv1_2
    user "fluentd-edu4"
    password xxxxxx
    reload_connections false
    reconnect_on_error true
    reload_on_failure true
    log_os_400_reason true
    logstash_format true
    include_timestamp true
    sniffer_class_name "Fluent::Plugin::OpenSearchSimpleSniffer"
    request_timeout 120s
    suppress_type_name false
    <buffer tag, tag2, $.kubernetes.namespace_name>
      flush_thread_count 8
      flush_interval 5s
      chunk_limit_size 64M
      total_limit_size 512MB
      retry_max_interval 30
      retry_forever true
    </buffer>
  </match>

index template to cover all indices and set some basic settings, with prio 200.
PUT _index_template/logsedu4-all_template
{
  "index_patterns" : [
    "logsedu4*"
  ],
  "template" : {
    "settings" : {
      "index" : {
        "number_of_shards" : "1",
        "number_of_replicas" : "0",
        "mapping" : {
          "total_fields" : {
            "limit" : "2000"
          }
        }
      }
    },
    "mappings" : {
      "properties" : {
        "timestamp": {
          "format": "epoch_second||epoch_millis||strict_date_optional_time||strict_date_optional_time_nanos",
          "type": "date"
        }
      }
    }
  },
  "composed_of" : [ ],
  "priority" : 200,
  "data_stream" : {
    "timestamp_field" : {
      "name" : "@timestamp"
    }
  }
}

index template for one specific kubernetes namespace, with a higher priority.
PUT _index_template/logsedu4-kube-infra_template
{
  "index_patterns" : [
    "logsedu4-kube-infra*"
  ],
  "template" : {
    "settings" : {
      "index" : {
        "number_of_shards" : "1",
        "number_of_replicas" : "2",
        "mapping" : {
          "total_fields" : {
            "limit" : "2000"
          }
        }
      }
    },
    "mappings" : {
      "properties" : {
        "timestamp" : {
          "type" : "date"
        }
      }
    }
  },
  "composed_of" : [ ],
  "priority" : 201,
  "data_stream" : {
    "timestamp_field" : {
      "name" : "@timestamp"
    }
  }
}

Result
For all namespaces, except kube-infra, a new index template is created but they're all not used. In my case there will be more than 100 index templates that are not used in the end.
And all namespaces, except kube-infra, are using the logsedu4-all_template.
GET _data_stream/logsedu4-kube-system
{
  "data_streams" : [
    {
      "name" : "logsedu4-kube-system",
      "timestamp_field" : {
        "name" : "@timestamp"
      },
      "indices" : [
        {
          "index_name" : ".ds-logsedu4-kube-system-000001",
          "index_uuid" : "-vOZYNmaR8yuitmGmGiryA"
        }
      ],
      "generation" : 1,
      "status" : "GREEN",
      "template" : "logsedu4-all_template"
    }
  ]
}

GET _data_stream/logsedu4-kube-infra
{
  "data_streams" : [
    {
      "name" : "logsedu4-kube-infra",
      "timestamp_field" : {
        "name" : "@timestamp"
      },
      "indices" : [
        {
          "index_name" : ".ds-logsedu4-kube-infra-000001",
          "index_uuid" : "OLfx1bJLQRmsO9YI5qY72Q"
        }
      ],
      "generation" : 1,
      "status" : "GREEN",
      "template" : "logsedu4-kube-infra_template"
    }
  ]
}

I did another test and removed the data_stream_template_name but created the two index templates in advance and the result is even better, there's no additional / unused index template created... which is bascially my goal :)
I'm a bit confused about that result because I thought I tested exactly this...
I'll repeat my tests with a productive like setup and get back to you.

Finally applied this setup on our new OS2 instance and it's working as expected with the DataStream setup!


add a way to rotate images

Currently, image sprites can be rotated, but not images.   add a way to rotate images.
Plan is to do this by adding a new image property called RotationAngle.

PR #648

PR #659 was closed


Automate seamless correlation with Grafana Frontend Observability

Feature Request
Grafana Frontend Observability can correlate individual page - loads and asynchronous backend calls automatically with Application Observability. The RUM and APM correlation need is pretty popular to diagnose slow loading sites and generally correlate across product areas.
However creating strong correlation, the server needs to send a response header of server-timing, containing the traceparent field of the root span. Implementing this in every service is very expensive. We should look for a solution that decreases the time to value for users and automatically inject the current traceparent for http responses.
Describe the solution you'd like:
Inject a server-timing header containing the current traceparent in its description so that the Faro Web SDK can capture it from the browser performance API.
<EMAIL_ADDRESS>Describe alternatives you've considered.
Which alternative solutions or features have you considered?
Additional Context
Sprungs OTel distribution does it here https://github.com/signalfx/splunk-otel-dotnet/blob/main/src/Splunk.OpenTelemetry.AutoInstrumentation/Traces.cs
Relevant change in Java OpenTelemetry https://github.com/grafana/grafana-opentelemetry-java/pull/661

Unfortunately the existing instrumentation only allows for registration of a single delegate when doing response enrichment. It's possible to combine delegates in .NET, but getting access to the the multiple delegates to combine them isn't straightforward.
The .NET auto-instrumentation makes this relatively straightforward due to it's plugin infrastructure. Similarly, the Java agent has an extension mechanism to customize behaviors.
The idiomatic way of configuring the instrumentation is using the built-in configuration API. In the following pseudo code, only the configuration registered in the application would run, as last one registered wins:
// inside the distro
services.Configure<AspNetCoreTraceInstrumentationOptions>(options =>
{
    options.EnrichWithHttpResponse = (activity, httpResponse) =>
    {
        // add header to httpResponse
    };
});

// inside application code
services.Configure<AspNetCoreTraceInstrumentationOptions>(options =>
{
    options.EnrichWithHttpResponse = (activity, httpResponse) =>
    {
        // this overrides previous EnrichWithHttpResponse delegate
    };
});

I've raised this issue upstream, and it's been brought up with the new developer experience SIG.


Different Developer closing note when syncing xliffs via PS vs VS Code

VS Code
Settings
"xliffSync.autoCheckMissingTranslations": true,
    "xliffSync.autoCheckNeedWorkTranslations": true,
    "xliffSync.needWorkTranslationRules": [
        "OptionMemberCount",
        "OptionLeadingSpaces",
        "Placeholders",
        "ConsecutiveSpacesConsistent",
        "ConsecutiveSpacesExist"
    ],
    "xliffSync.parseFromDeveloperNote": true,
    "xliffSync.parseFromDeveloperNoteOverwrite": true,
    "xliffSync.parseFromDeveloperNoteSeparator": "||",
    "xliffSync.findBySource": true,
    "xliffSync.findBySourceAndDeveloperNote": true,
    "xliffSync.parseFromDeveloperNoteTrimCharacters": "\"",
    "xliffSync.preserveTargetAttributesOrder": true,

When packaging an app in VS Code, I get following trans-unit id in the g.xlf file
<trans-unit id="Codeunit<PHONE_NUMBER> - NamedType<PHONE_NUMBER>" size-unit="char" translate="yes" xml:space="preserve">
          <source>Suggests to open the Drinkmaster 365 apps landing page</source>
          <note from="Developer" annotates="general" priority="2"></note>
          <note from="Xliff Generator" annotates="general" priority="3">Codeunit ESCG Drinkmaster Notification - NamedType NotificationDescriptionTxt</note>
        </trans-unit>

Running the 'Synchronize Translation Units' in VS Code results in following trans-unit id in the nl-BE.xlf file
<trans-unit id="Codeunit<PHONE_NUMBER> - NamedType<PHONE_NUMBER>" size-unit="char" translate="yes" xml:space="preserve">
          <source>Suggests to open the Drinkmaster 365 apps landing page</source>
          <target state="translated">Stelt voor om de Drinkmaster 365 apps landingspagina te openen</target>
          <note from="Developer" annotates="general" priority="2"/>
          <note from="Xliff Generator" annotates="general" priority="3">Codeunit ESCG Drinkmaster Notification - NamedType NotificationDescriptionTxt</note>
        </trans-unit>

PowerShell
Script
$AppFolders = @("App")
$SyncAdditionalParameters = @{
    "preserveTargetAttributesOrder"   = $true
    "findBySource"                    = $true
    "findBySourceAndDeveloperNote"    = $true
    "parseFromDeveloperNote"          = $true
    "parseFromDeveloperNoteOverwrite" = $true
    "parseFromDeveloperNoteSeparator" = "||"
    # parseFromDeveloperNoteTrimCharacters" = "\""
}

Test-BcAppXliffTranslations -printProblems -appFolders $AppFolders -translationRules @("OptionMemberCount", "OptionLeadingSpaces", "Placeholders", "ConsecutiveSpacesConsistent", "ConsecutiveSpacesExist") -restrictErrorsToLanguages @("nl-BE", "nl-NL") -buildProjectFolder $BuildProjectFolder -syncAdditionalParameters $SyncAdditionalParameters

This results in following trans-unit id in the nl-BE.xlf file

<trans-unit id="Codeunit<PHONE_NUMBER> - NamedType<PHONE_NUMBER>" size-unit="char" translate="yes" xml:space="preserve">
          <source>Suggests to open the Drinkmaster 365 apps landing page</source>
          <target state="translated">Stelt voor om de Drinkmaster 365 apps landingspagina te openen</target>
          <note from="Developer" annotates="general" priority="2"></note>
          <note from="Xliff Generator" annotates="general" priority="3">Codeunit ESCG Drinkmaster Notification - NamedType NotificationDescriptionTxt</note>
        </trans-unit>

Issue
These seems to be a difference in the sync results (I guess my settings in VS Code and PS should be the same) when ran in VS Code vs Powershell.
<note from="Developer" annotates="general" priority="2"/>
<note from="Developer" annotates="general" priority="2"></note>
In our pipelines, we perform a compile step, then run a Test-BcAppXliffTranslations step and conditionally re-compile the app with the updated xliffs. The re-compile is ran conditionally espc. to save build time when no changes to translation file changes had been detected (checked via Get-FileHash).
However, due to the differences in above results, the re-compile is always ran. Any advice / inputs or possible fix?
PS: Another nice option would be if Test-BcAppXliffTranslations could return whether any of the xliff files has actually changed by the command.

Would this change "https://github.com/rvanbekkum/vsc-xliff-sync/pull/110" that will be available with the next release of vsc-xliff-sync already help? With this change you can specify what you would like to do with closing tags.

The suggested change will probably do!
Not sure if this setting will also be available in the PS version of Xliff Sync (to keep the list of supported settings in sync between both Xliff Sync extensions). As long as I've a method to ensure the output from the VS Code and PS sync is similar, that would be great.

The option is available in version <IP_ADDRESS> of vsc-xliff-sync. I will see if I can also make a similar setting available in the PowerShell module.

A new parameter -useSelfClosingTags has been added to Sync-XliffTranslations in version 1.9.0.

A new parameter -useSelfClosingTags has been added to Sync-XliffTranslations in version 1.9.0.

Great work! Unfortunately I am still getting whitespace difference.
g.xlf:
<note from="Developer" annotates="general" priority="2"></note>
.xlf - VsCode:
<note from="Developer" annotates="general" priority="2"></note>
.xlf - Powershell:
<note from="Developer" annotates="general" priority="2"></note>
.xlf - VsCode - useSelfClosingTags :
<note from="Developer" annotates="general" priority="2"/>
.xlf - Powershell - useSelfClosingTags :
<note from="Developer" annotates="general" priority="2" />

Correct, I noticed this as well, it is the .NET/XmlDocument's default behaviour for empty tags, so I decided to leave it like this for now.
Do you have any suggestions on what might be good to align it? I could do a "text replace" of  /> with /> if -useSelfClosingTags is enabled, or something like that, but it would be a bit of an ugly solution.

Having that extra space seems like a decent default behaviour, so I understand keeping it.  I would change the result from VsCode to match the Powershell output, but that risks breaking everyone elses workflows I guess.
My main concern is that, like fvet, I don't want to trigger git changes for the closing tags everytime I send my VsCode synced files through our build pipeline.
I'll just update our VsCode setting to not use the self closing tags. That will give us a lot of changed lines once, but that's not an issue.


Radius search?

Hello! Thank you for this library. So nice not to have to use commercial external APIs. :)
Is it possible to use this for a radius search (e.g. find within a radius of a lat/long point or zip code)?
If not would you consider adding it, or could you provide some guidance how to implement?
Thanks again.

I created a pull request to add radius searching as an option, in case you would like to include it in your project. https://github.com/simplisticated/zip-monster/pull/3
Best wishes.


feat(JSON-RPC): get_block_transaction_count supports pending

This change is

crates/papyrus_rpc/src/v0_4_0/block.rs line 82 at r1 (raw file):
Previously, yair-starkware (Yair) wrote…
Why panic?

Because we handle the pending logic separately
Maybe if pending wasn't a temporary feature it'd be better to do a match as you suggested below and instead of calling this function, calling specific functions for hash and latest. But since we'll eventually erase it I want the pending to be separated


Documentation

Is there any guide or documentation for how to integrate with HidLibrary. I am not able to find.

It's not clear what you need. The sample projects inside the repo itself are intended as a kind of documentation by way of example. Are you able to build the sample projects?

Yes. Currently I am using the examples. They are very helpful but I need a
shortcut.What I was asking was something like a reference guide.
I created some documents with doxygen and sandcastles for my self. As there
is no comments and summaries I have to figure out what is doing what by
using the examples.
I believe if I had a document this will speed up the time I spend for
trying to decipher the whole library.
Considering that I am not primarily a C# programmer, I am not that
confortable as most of you it will be very very practical for people like
me.
On Tue, May 23, 2017 at 12:28 AM, Austin Mullins<EMAIL_ADDRESS>wrote:

It's not clear what you need. The sample projects inside the repo itself
are intended as a kind of documentation by way of example. Are you able to
build the sample projects?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mikeobrien/HidLibrary/issues/85#issuecomment-303225102,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJyIK3BKXXB36Gtg4lnug5mz_T6dRegdks5r8f4JgaJpZM4Ni34H
.

I concur. There are no comments or XML documentation within the source code, which should be a requirement for any project designed to be used by others.


Rounding mode should be towards zero.

In response to changes upstream, fraction digits that exceed the maximum fraction digits length may round away from zero. This rarely matters, but sometimes the behavior may be unexpected. Assume

diffable text field is idle
value == 999.999
bounds == max
integer precision == 3
fraction precision == 2

so that when the user interacts with the view (editing changed counts as a change upstream) the following happens

bounds clamping rule applies: value == 999.999
the style formats the value (and implicitly rounds it up): number == "1,000"
precision rule applies: number is trimmed to "000" then converted: value == 0.

Proposed solution rounds towards zero in NumericTextStyle/interpret(_:): 764c2f27a6a423dc411dd6a4f3c11f6ec652588a.

The rounding rule has been moved to all methods in: 8e96fe287b8026a2dd6e358526fc91cc2f2cc0b1.


SCP-2355-2359, SCP-2373, SCP-3066: Replace Alex and Happy with Megaparsec.

Sorry for the gigantic PR. I’m removing Alex and Happy and switching everything that depends on them to Megaparsec. Overall the parsers are way tidier and less hacky.

Updated all PIR, PLC, UPLC parsers.
Removed Parsable.hs, PlutusCore/Lexer/Type.hs, Parser/Internal.hs, Lexer.x, Parser.y.
All annotations are switched to Megaparsec’s SourcePos. AlexPosn is no longer used.
Parsing of the DefaultUni types lists, pairs, data, app were not implemented and still aren’t. Made some progress on lists and pairs in the thealmarty/scp-3066-pir-parser branch but the scope ended up being too large to be in this PR. It will be in a follow up PR when it becomes a priority. JIRA ticket added.
Parsing was implemented only for the default universe and functions and still is.
PIR should now be able to parse more, but no new tests are added yet. A JIRA ticket is created for that.
Deleted a test that showed lexer errors. We no longer have lexer errors. We may want to improve error reporting in a follow up PR.
we may want to either remove or update notes/plutus-core/Bytestrings.md. It's currently out of date and a bit out of place. JIRA ticket created.

Pre-submit checklist:

Branch

[ ] Tests are provided (if possible)
[ ] Commit sequence broadly makes sense
[ ] Key commits have useful messages
[ ] Relevant tickets are mentioned in commit messages
[ ] Formatting, materialized Nix files, PNG optimization, etc. are updated

PR

[ ] (For external contributions) Corresponding issue exists and is linked in the description
[ ] Self-reviewed the diff
[ ] Useful pull request description
[ ] Reviewer requested

I see that Parsable.hs has gone.  The intention there was that individual built-in types should provide their own parsers for constant values, so that when the main parser saw (con thing ...) it could look up the parser for thing and use it to parse the contents of ....  I think the main reason for this was that there was an idea that eventually we might want to have multiple sets of built-in types for different applications and this would make parsing more modular: the types would do their own parsing and the main parser wouldn't need to know anything about constants, so you wouldn't have to modify the parser when you add a new type.  A similar thing happened with the built-in functions, where you consulted DefaultFun to find out what functions were available and what their names were (although to get the names you had to go via the prettyprinter, which seemed a bit of a round-about way to do it).
Anyway, at the moment we only have one lot of built-in types and one of built-in functions, so it's probably safe to go back to having stuff coded into the main parsers.  We can always revisit this if we get to a point where we have multiple sets of builtins.
On the other hand, I'm wondering about lists and pairs now.  I don't think we can parse them at the moment, but I wonder if each type having its own parser would make it easier to parse a list?  If we can see that we're trying to parse something of type list(t), maybe we could have a generic function parseList that takes a parser for t to deal with the elements, and similarly for   pairs.  If types had parsers associated to them then that would make it easier to retrieve the relevant parser.  Anyway, I haven't thought this through: perhaps we could look at it in a later PR.  We should merge this one to get it out of the way before thinking about anything else.

Since the CI is passing I'll merge this and address the outstanding comments in a follow up PR. Outstanding comments to be addressed:
https://github.com/input-output-hk/plutus/pull/4349#discussion_r793540574
https://github.com/input-output-hk/plutus/pull/4349#discussion_r793543613
https://github.com/input-output-hk/plutus/pull/4349#discussion_r793578829
https://github.com/input-output-hk/plutus/pull/4349#discussion_r793581519
https://github.com/input-output-hk/plutus/pull/4349#discussion_r793558091
https://github.com/input-output-hk/plutus/pull/4349#discussion_r793558609
https://github.com/input-output-hk/plutus/pull/4349#discussion_r793583550


Liaison attachments are served from an unsustainable place

Currently, at https://datatracker.ietf.org/liaison/23/ there is a link to https://www.ietf.org/lib/dt/documents/LIAISON/file41.pdf.
That URL will have to change with IT infrastructure move.
At times past, this attachment was served from https://datatracker.ietf.org/documents/LIAISON/file41.pdf
See https://www.rfc-editor.org/errata/eid7609
We should put in a temporary redirect so that end-users can get to the intended content from the RFC's link, and then revisit how these attachments get served.
See also #3154

The redirect is (was?) already in place?, but we still need to address this naming issue in the long run.


Add UCTC: UCT Cash

[x] I understand that token listing is not required to use the Polygon Wallet with a token.

Please provide the following information for your token.
Token Name: UCT Cash
Token Symbol: UCTC
Decimals: 18
Polygon Address: 0xD4b42287F1EE04aF246aD792153C39D62733f826
Ethereum Address: 0x2707ab358B5383D087FE4736Da36c1C70179e3BD
Logo URI: https://www.uct-token.org/wp-content/uploads/2021/06/UCT-token-transp-500-500.png
Project Name: UCT Cash
Project Summary: 1. The currency exists in a government-free jurisdiction.
2. As such, it is tax-exempt.
3. Which means it can't be regulated within UCT jurisdiction.
4. It is also backed by tangible commercial paper, in the form of notes.
5. Which means the token is not dependent upon sales to establish market value.
6. We already have a thriving community, which will soon enter exponential growth when we launch the tokens and the next tranche of £8.4 billion worth of notes are exchanged on the launch date.
7. Pre-launch, we have already established locked-in liquidity of $7.5B in two Crowdpools on Dodoex, via Polygon Mainnet, following the exchange of the first note.
Project Contact<EMAIL_ADDRESS>Project Website: https://www.uct-token.org
Mainnet/Testnet: Matic
Additonal Notes:

Included in AllTokens v1.2.0.


Question about client.Runtime

Hello.

If the result of client.Runtime.evaluate is a promise. How to wait when it is resolved?
Is there something like client.Runtime.evaluate().setAwaitPromise()?
Thanks a lot)

found solution: ```client.Runtime.evaluate({ expression: "some exp", awaitPromise: true }).


handle metadata plumbing

Big delta but this is just a lot of plumbing (mostly updating test fixtures) – it just makes sure we populate the handle metadata on a bunch of server calls properly, and the client now expects those fields to be set (rather than before when they were optional).

this is 95% plumbing so it should be safe to merge

@prbot approve


How to use with redux-toolkit

Description
Greetings. I am switching my project to use redux-toolkit which is now supposed to be "the standard way to write redux logic". However, I am having a lot of trouble finding useful examples on how to actually set it up.
I have already managed to fire an action which was caught by a saga to perform a request for a list of "Events" from my backend. Where I am stuck now is on how to return that data back to the reducer to be read by a selector. (success action)
sagas.js
import {
    requestEvents,
    requestEventsSuccess,
  } from './eventsListSlice';

export function* loadEventList() {
  try {
      console.log('loadingEvent list!!')
      const response = yield call(apis.getEventList);
      const eventList = response.data;
      // yield put({type: requestEventsSuccess.toString(), eventList }); ???
      // yield put(requestEventsSuccess(eventList)); ???
}

export default function*() {
  yield takeLatest([requestEvents], loadEventList);
}

eventsListSlice.js
import { createSlice } from '@reduxjs/toolkit';
export const eventsListSlice = createSlice({
  name: 'eventsList',
  initialState: {
    loading: false,
  },
  reducers: {
    requestEvents: state => {
      state.loading = true;
    },
    requestEventsSuccess: state => {
      console.log('SLICE HERE!!!')
      state.loading = false;
      // state.eventsList = ?
    },
  },
});

export const { requestEvents, requestEventsSuccess } = eventsListSlice.actions;

export default eventsListSlice.reducer;

I see the API being called, the response being received, but whatever I try with the redux-saga's put (the commands before "???"), it is not triggering the reducer, and I am not seeing "SLICE HERE!!!' being outputted to the console.  Any guidance  on how are we supposed to do this? Thanks ahead!

Sorry, I realised I was not importing the reducer correctly to configureStore


supermodel: model name should be required

If you don't provide a model name, you get this:

Closed in 1.0 by https://github.com/donejs/generator-donejs/pull/184.


Creating backend on Amplify Console fails v3.9.0

This issue is related with #2362
I try to deploy my project on Amplify Console, but an error still happened.
(I have already tried amplify-cli v3.9.0 at #2362)
My log is here.
2019-09-20T10:32:35.452Z [INFO]: # Ensuring NPM package '@aws-amplify/cli' is version: 'latest'
2019-09-20T10:32:42.573Z [INFO]: # Patching NPM package '@aws-amplify/cli' from 1.12.0 to 3.9.0...

                                 # Starting phase: build
                                 # Executing command: amplifyPush --simple
2019-09-20T10:33:46.817Z [INFO]: # Getting Amplify CLI Cloud-Formation stack info from environment cache
2019-09-20T10:33:46.824Z [INFO]: # Start initializing Amplify environment: env
2019-09-20T10:33:46.828Z [INFO]: STACKINFO=context.print.fancy is not a function
                                 TypeError: context.print.fancy is not a function
                                 at /root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/lib/commands/env/get.js:53:35
                                 at step (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/lib/commands/env/get.js:33:23)
                                 at Object.next (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/lib/commands/env/get.js:14:53)
                                 at /root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/lib/commands/env/get.js:8:71
                                 at new Promise (<anonymous>)
                                 at __awaiter (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/lib/commands/env/get.js:4:12)
                                 at Object.run (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/lib/commands/env/get.js:41:38)
                                 at /root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/lib/commands/env.js:64:56
                                 at step (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/lib/commands/env.js:33:23)
                                 at Object.next (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/lib/commands/env.js:14:53)
                                 # Importing Amplify environment: env (amplify env import)
2019-09-20T10:33:47.776Z [INFO]: Scanning for plugins...
2019-09-20T10:33:54.791Z [INFO]: Plugin scan successful
2019-09-20T10:33:54.873Z [INFO]: You must pass in the configs of the environment in an object format using the --config flag
2019-09-20T10:33:54.924Z [ERROR]: !!! Build failed
2019-09-20T10:33:54.924Z [ERROR]: !!! Non-Zero Exit Code detected
2019-09-20T10:33:54.924Z [INFO]: # Starting environment caching...
2019-09-20T10:33:54.924Z [INFO]: # Uploading environment cache artifact...
2019-09-20T10:33:55.021Z [INFO]: # Environment caching completed
Terminating logging...

This is same error message at v3.8.0 and v3.9.0.
And this error message is little different from #2351 at line 14
at /root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/lib/commands/env.js:64:56

I'm waiting for your great support. Thank you.

@hi120ki it is the same error, please don't open multiple issues about the same problem. The line number can differ between releases.
Perhaps that fix did not make into 3.9.0, so it will be in the next one.
A workaround would be for you If you would not use the json argument, which references the fancy function.


feat:  Update providers to have configurable strategy and minor fixes

feat(Beaker): use timeout instead of number of retries
using number of retries is being replaced by timeout
to help users to redefine easily using provisioning config
timeout variable should be more user friendly

feat: add possibility to change strategy per provider in provisioning config
change default openstack behavior to abort

refactor(Beaker): Use hub url in messages

refactor(Beaker): fix the typo in message

refactor(static): remove method which is inherited

/azp run

This MR also needs to contain documentation update as it is basically "hiding" some features of Mrack by disabling the retry strategy by default. There must be a way for people to learn what are all the possible strategies, what they do and what providers supports what. Resp. which strategy is supported by what providers.

This MR also needs to contain documentation update as it is basically "hiding" some features of Mrack by disabling the retry strategy by default. There must be a way for people to learn what are all the possible strategies, what they do and what providers supports what. Resp. which strategy is supported by what providers.

Noted i will update this asap


Error compiling with strictNullChecks

I've been writing an application in TypeScript using apollo-client with strictNullChecks enabled. When compiling, this error appears
ERROR in [default] /Users/jackmoore/Projects/Web/apollo-react-typescript-example/node_modules/apollo-client/data/store.d.ts:9:4
Property '__typename' of type 'string | undefined' is not assignable to string index type 'StoreValue'.

I came across two solutions to this problem.

Disabling strictNullChecks in my project caused the error to disappear. A quick and dirty fix, but not ideal as I enjoy using that feature in my application code.
Editing line 61 of src/data/store.ts from

export type StoreValue = number | string | string[] | IdValue | JsonValue

to
export type StoreValue = number | string | string[] | IdValue | JsonValue | undefined

essentially only adding undefined to the domain of StoreValue.
This change seems to have no impact on existing code. As a heavy TypeScript user, I was thrilled to see apollo-client written in TypeScript, but it's challenging when I cannot use the compiler features I wish to use. What would you think of incorporating this? If okay, I can create a PR.

Yes please send a PR!

Going to assume this is fixed!


User Management: Update Authorization endpoint

Change POST to GET method
Update and improve role checks and permission checks for developer and customer users

This enhancement has been implemented. The role checks improvement will be handled when the database is connected


Unbound won't build with aaaa-filter-iterator.patch

Applying the aaaa-filter-iterator.patch will break compiling unbound. It can be fixed with patchin the patch:
--- aaaa-filter-iterator.patch	2023-02-08 11:19:38.869425000 +0100
+++ aaaa-filter-iterator.patch.orig	2023-01-12 09:18:31.000000000 +0100
@@ -108,8 +108,6 @@
  	iter_env->supports_ipv6 = cfg->do_ip6;
  	iter_env->supports_ipv4 = cfg->do_ip4;
  	iter_env->outbound_msg_retry = cfg->outbound_msg_retry;
- 	iter_env->max_sent_count = cfg->max_sent_count;
- 	iter_env->max_query_restarts = cfg->max_query_restarts;
 +	iter_env->aaaa_filter = cfg->aaaa_filter;
  	return 1;
  }

See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269337

Yes that patch works, if it is applied in reverse. I also adjusted it so that the context lines are three lines instead of five. With that change the patch applies and unbound compiles.


Make sure custom user agents conform to BIP-14

In #791, we discovered that our default Zcash protocol user agent did not conform to BIP-14:
https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki
We fixed the issue by changing the default, but the user agent is configurable in zebrad.toml. And that's a useful feature for custom implementations, builds, packaging, or deployments. (BIP-14 user agents exist in a stack, from core to ui.)
TODO:

[ ] implement a BIP-14 check in zebra-network
[ ] check the default string is BIP-14 in the zebrad tests
[ ] ~check the configured string is BIP-14 in the zebrad config load~ (redundant)
[ ] check the supplied string is BIP-14 in zebra-network

Optionally:

[ ] reference the BIP format in zebrad generate above the relevant config option, and encourage packagers to:

append a version string if they re-use a Zebra team build
replace the version string if they do their own build

I think it would be fine to check the user-agent data in zebra-network but I don't think that we should check anything while loading the config, because this requires duplicating checks in different places in the codebase.
Even better than checking a supplied string would be changing the config representation to store the parts of a BIP14 user-agent and assembling the final string. Since BIP14 user-agents exist in a stack, perhaps we should put the Zebra user-agent at the root of the stack, and instead have the config specify an (optional) further stack entry.  Do we know what (if any) software in the Zcash ecosystem actually parses BIP14 u-a's?

Even better than checking a supplied string would be changing the config representation to store the parts of a BIP14 user-agent and assembling the final string.

Sounds good.

Since BIP14 user-agents exist in a stack, perhaps we should put the Zebra user-agent at the root of the stack, and instead have the config specify an (optional) further stack entry.

This would be a departure from the ECC zcashd build process, which replaces the user agent:
https://github.com/ZcashFoundation/zebra/issues/791#issue-667945031
But it would be similar to btcwire and the zfnd seeders. And it seems like a better design for debugging and analysis.

Do we know what (if any) software in the Zcash ecosystem actually parses BIP14 u-a's?

zcashd puts them in its logs and RPC fields.
https://blockchair.com/zcash/nodes displays them as node versions, and could use substrings to categorise nodes (but doesn't seem to do so for Zcash).

How can the user agent be changed by config ? I only see it defined as a constant in https://github.com/ZcashFoundation/zebra/blob/main/zebra-network/src/constants.rs#L47 but i was not able to find any place where this value is overwritten by something coming from zebrad.toml.

Yep, we removed it from the config options in order to prevent this problem. In the future we can add config fields that push data to the BIP14 stack, but I don't think we should try doing that until we have some other users for zebra-network. So I'm going to update the labels on the issue to reflect de-prioritization.

We don't support custom user agents right now


House keeping

Runs cargo fmt
Addresses all existing cargo clippy lints
Adds CI to verify cargo fmt and cargo clippy

There were a lot of lints in tests - to make my life easier I removed a lot of boilerplate.
Better late than never :smile:

How about adding the following clippy linting configuration to Cargo.toml:
[lints.clippy]
pedantic = { level = "warn", priority = -1 }
perf = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }

I also like to use these code quality compiler lints in my own projects:
[lints.rust]
elided_lifetimes_in_paths = "warn"
future_incompatible = { level = "warn", priority = -1 }
let_underscore = { level = "warn", priority = -1 }
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
missing_docs = "warn"
# must_not_suspend = "warn" # Unstable - tracked at https://github.com/rust-lang/rust/issues/83310
non_ascii_idents = "warn"
nonstandard_style = { level = "warn", priority = -1 }
noop_method_call = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage)'] }
unnameable_types = "warn"
unreachable_pub = "warn"
unused = { level = "warn", priority = -1 }
unused_crate_dependencies = "warn"
unused_lifetimes = "warn"

# lossy_provenance_casts = "deny" # Unstable - tracked at https://github.com/rust-lang/rust/issues/95228
# fuzzy_provenance_casts = "deny" # Unstable - tracked at https://github.com/rust-lang/rust/issues/95228
unsafe_code = "deny" # Exceptions must be discussed and deemed indispensable and use `#![deny(invalid_reference_casting, unsafe_op_in_unsafe_fn)]`.

Hi everyone, I looked into it and it doesn't seem like there's much more in this PR that is worth merging. A new PR is probably better, as for now I think I should close this PR and leave it an open project for someone else. Thanks!


feat: Add passthrough Header to options

Description
This PR adds header options to the http client to use for authorization.
Fixes #470
Checklist

[x] The PR title has the correct prefix
[x] PR is linked to the corresponding issue
[x] All commits are signed-off (git commit -s ...) to provide the DCO

@Cliftonz thanks for contributing! I'll get this into a release later today.

I just published @cerbos/http v0.10.0 including this feature - thanks again!


Add link to code review guidelines

Hi, Ivan            This is the meeting minutes for this week. I forgot how to upload on the github. Is this okay?
thanks,Xuefeng
On Thursday, January 28, 2016 4:31 PM, Ivan Montiel<EMAIL_ADDRESS>wrote:

You can view, comment on, or merge this pull request online at:
  https://github.com/gios-asu/sustainability-game/pull/66
Commit Summary

Add link to code review guidelines
Merge branch 'ivan-develop' of github.com:gios-asu/sustainability-game into ivan-meteor

File Changes

M README.md (5)

Patch Links:

https://github.com/gios-asu/sustainability-game/pull/66.patch
https://github.com/gios-asu/sustainability-game/pull/66.diff
—
Reply to this email directly or view it on GitHub.


Meet with Debasmita

Schedule meeting with Debasmita to:

understand her workflow, encourage data exploration
brainstorm how to integrate latest gcc and weather forecasts
final step of how to submit (on daily basis)
can ML methods handle NAs?

Debasmita putting code on github
Turn shift script into a function
Ask David and Arun about prediction interval for the submission
Ask us for help on git/Github


Relationship details

From @georgiana-b on October 16, 2017 6:15
From @georgiana-b on May 26, 2017 13:9
Currently we provide procuring_entities_details and suppliers_details routes where people can receive aggregated data and analysis on different suppliers or procurers.
We also need relationship details as described in tenders-exposed/elvis-ember#201.
In our current backend this would be quite difficult to make because the relationship between 2 entities is not represented as a separate entity and is not stored in the database. This will change when we switch to a graph database and edges will finally be stored.
Our current REST interface also makes it hard to represent relationship details because people can query by suppliers or procurers only in bulk:
{
  "query": {
      "countries": ["BE"],
      "cpvs": ["24000000"],
      "years": [ 2008],
      "procuring_entities": [34541],
      "suppliers": [1165518, 1177785],
    }
}

So, we have to take this into consideration in the new REST interface and provide a way to query by a relationship.
Copied from original issue: tenders-exposed/elvis-backend#54
Copied from original issue: tenders-exposed/elvis-backend-py#13

From @zufanka on October 11, 2017 14:11
@georgiana-b is this taken into account in the new backend?


skel updates of the manjaro-settings package override .zshrc and .profile

Hey! I hope this is the right place for support questions, I've tried searching skel and zshrc on closed issues to no avail.
Whenever there's a new version of the manjaro-sway-settings package, it asks to apply the update by invoking skel. I understand why this invocation is necessary, but it has the unpleasant side effect of overriding .zshrc and .profile every single time.
This affects stuff like environment variables (I want to set my own EDITOR and use fcitx5 which requires certain env variables to be set in .profile) as well as custom aliases and the list of oh-my-zsh plugins. Is there a recommended / official way how to configure my shell and profile without having to re-type everything every single time a settings package update is released?

Nevermind, just found the wiki. Sorry :sweat:

I don't think we have a section on zsh configuration, would you like to write a line or two so other perhaps will have a headstart?

Turns out I don't know how :sweat_smile: I tried to create some config files based on what's already in the Support file, but I don't know where to put them so zsh will pick them up.
Is there a recommended way or a convention for this?

Perhaps. Will take a look. Just realized the way I use it isn't working either :-)

let me know if this does the trick for you. for me it did.

Cool, thanks! This does work for zsh indeed :smile:
However, there's another use-case where I have to write values to .profile to use fcitx5 for Japanese (aka mozc) input. These still get overwritten on each skel update. Is there another .config subdirectory that I'm missing?

Not yet, but we could make that a feature.

Wdyt we source ~/.config/profile.d/* in .profile?

@all-contributors please add @gregorbg for having an idea

I somehow managed to overlook the initial reply to this PR. Now I got reminded because of the @ mentions.
Thank you so much for implementing this, it works like a charm now :smiley:


how to hide/show a "Restore" button/link in the action column on condition?

As I wrote in the title is possible to do it in the controller or how can I do it?
I've searched in the docs but without success, i've missed something?
PS: maybe adding a parameter to the view and overwriting the action block? But dumping the result with ladybug_dump I don't find the identifier of the action on which to set the condition.
Thanks for the help.

I've read better the docs and I found the solution using the Manipulate row action rendering


how to extract a file from vmdk with go?

how to extract a file from vmdk with go?
thankyou

What does it mean?
Is there a partition layer such as MasterBootRecord in the VMDK, a Filesystem in it, and you want to extract the files in the Filesystem?

@stream1990
What does it mean?
Is there a partition layer such as MasterBootRecord in the VMDK, a Filesystem in it, and you want to extract the files in the Filesystem?


Lock down access to admin endpoints

Should need some kind of authorization to use the admin endpoints.

All admin now happens through Google Sheets (well, except poking, but that's safe), so no auth necessary.


when resolving MSBuild properties, don't throw if it can't be resolved

This should allow other potential updates to flow instead of erroring out the whole process.

@brettfo now I have another error. Rather than keep going back and forth can you please fork dotnet/aspire and interpret the errors? If we can get it to work on that repo, we'll have made progress. 😄
I opened https://github.com/dependabot/dependabot-core/issues/9297 for this.


Installation error; Message; auth error

fix installation error (fix #121)
message improvement (fix #41)
fix some auth error (fix #125)

Yes I also wanted to add some tests but I was waiting to see if it suited you before implementing the tests.  I just have a little problem in the demo version for students there is no message 😭

Yeah... I was afraid of that. I'd like to try and host my own instance, last time I looked it didn't seem impossible. Not sure if I need license keys. Probably yes...

Yes I think that's a good idea.  But I seem to remember that Pronote is a paid software.

To many commits I hate that😂😭. But I think now it's good😅

Yeah immediately after I made that suggestion I thought black might fail. Unlucky lmao

Btw what is your opinion on the new mypy check in PRs? I like that it shows the error directly in the code but on the other hand it looks like it doesn't fail even with errors...

I don't really know. I try to adjust everything as much as possible before committing with my IDE. But it's true that it happens that mypy checks don't fail on the PR while they fail on my repo. Maybe we can put both checking like on commit and like on PR on the PRs so that if the PRs fail, we can see the code it matches and otherwise the checking like on the commits will fail.


Index.js issue

Hi , while configuring the AEM brightcove connector.I’m  getting an error on index.js  404 error. Do anyone have got the same error? Any ideas how this can be resolved? First it support AEM 6.5

Hi @shobiraj - are you seeing incorrect/broken functionality or just a 404 message in the console? If you are experiencing the former, please submit a support ticket. Also, please make sure your user is in the administrators group.

Hi @shobiraj - are you seeing incorrect/broken functionality or just a 404 message in the console? If you are experiencing the former, please submit a support ticket. Also, please make sure your user is in the administrators group.

It worked after creating the user group! But still we have index js file showing up on console.


The Go SDK implements the new versioned HTTP API

Done https://github.com/tablelandnetwork/go-tableland/pull/412


Network analysis

tuna/thuthesis 是模板仓库，请不要把自己的论文作为Pull Request传上来。

不好意思我pull request的时候没注意搞错仓库了
On Sat, Nov 16, 2024 at 1:52 AM panda2134 @.***> wrote:

tuna/thuthesis 是模板仓库，请不要把自己的论文作为Pull Request传上来。
—
Reply to this email directly, view it on GitHub
https://github.com/tuna/thuthesis/pull/981#issuecomment-2479601703, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/A2462OYDX6XTSN53J663QVL2AYYF3AVCNFSM6AAAAABR3HRVG6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZZGYYDCNZQGM
.
You are receiving this because you authored the thread.Message ID:
@.***>


[SPARK-18167] [SQL] Add debug code for SQLQuerySuite flakiness when metastore partition pruning is enabled

What changes were proposed in this pull request?
org.apache.spark.sql.hive.execution.SQLQuerySuite is flaking when hive partition pruning is enabled.
Based on the stack traces, it seems to be an old issue where Hive fails to cast a numeric partition column ("Invalid character string format for type DECIMAL"). There are two possibilities here: either we are somehow corrupting the partition table to have non-decimal values in that column, or there is a transient issue with Derby.
This PR logs the result of the retry when this exception is encountered, so we can confirm what is going on.
How was this patch tested?
n/a
cc @yhuai

Test build #67727 has started for PR 15676 at commit 0d62dbd.

Test build #67728 has started for PR 15676 at commit 98a35c6.

Test build #67727 has finished for PR 15676 at commit 0d62dbd.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/67727/
Test PASSed.

Test build #67728 has finished for PR 15676 at commit 98a35c6.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/67728/
Test PASSed.

Merging in first so we can get more signal.


Godot 3.1 alpha 4 regression: UV coordinates incorrect in GLES2 fragment shader

Godot version:
3.1 alpha 4 win64 (Classical)
OS/device including version:
Windows 10 Pro, Intel i7-4790K, integrated GPU only (Intel HD Graphics 4600), driver igdkmd64.sys version <IP_ADDRESS>58
Issue description:
In an extremely simple 3.1 alpha 4/GLES2 fragment shader, UV coordinates do not behave as expected, instead seemingly being equal to vec2(0.0) everywhere, but this problem does not occur in alpha 4/GLES3 or alpha 2/GLES2.  The shader editor Output window shows the message: drivers/gles2/shader_gles2.cpp:681 - Condition '!custom_code_map.has(p_code_id) ' is true.  (I did not test on alpha 3, since the win64 .zip at the download link in the alpha 3 news post seems to actually contain the x11 version: https://downloads.tuxfamily.org/godotengine/3.1/alpha3/Godot_v3.1-alpha3_win64.exe.zip.)
Steps to reproduce:
Start a new project.  Create a Node2D with a ColorRect child node with a ShaderMaterial with the following shader:
shader_type canvas_item;

void fragment() {
	COLOR=vec4(UV, 1.0, 1.0);
}

Instead of the expected color gradient, this is painting the canvas a constant blue (R=G=0.0) everywhere.
Under GLES3 or alpha2/GLES 2, however, the shader behaves as expected.
Minimal reproduction project:
Godot Bug Report 2.zip

UVs used to be zero when no texture is involved in the node being drawn, maybe that happened again?

That really strange problem(it seems like fixed in nighty/custom Godot builds) but still presents in alpha 4
Need to check in beta


Add support for scrollable tables

The style has support for dc-list--is-scrollable.
It is logical to expect dc-table--is-scrollable

@fogfish I would suggest to have a generic scrollable container, so you can use it with everything

    ...
    ...

    ...

Do you need any input from me regarding the issue?

@fogfish I would try to have a proof-of-concept PR to see it the idea for you is working.... I would like to have the table header fixed and just the body scrollable... stay tuned!

Yeah! :waiting:

@fogfish Bad news... 😢 after trying out and searching for acceptable solutions, I found out that with pure css, what we want to achieve (fixed header and scrollable table body) it's basically impossible or really unflexible (in the best scenario you need to know the number of the columns and use a fixed width for them).
I'm forced to close this issue, a simpler alternative can be the one proposed by @LeoAref that can be achieved with custom css in your code base. Something along this lines...
.my-scrollable-container {
   max-height: 500px;   /* change this to fit your needs */
   overflow-y: auto;
}

Sorry for the delay but, trust me, we really do the best that we can. Cheers.


Possible to start later than 0

Hi there,
Great library!
Is it possible offset start to a later point in the video once it's loaded? E.g. 5 minutes in?
Sort of this:  seekToTime(seconds)
Hope it makes sense, best regards, Casper

ChewieController already has this ability.
`class ChewieController extends ChangeNotifier {
  ChewieController({

....
this.startAt,

...
  /// Start video at a certain position
  final Duration startAt;
`

Thanks @Crispy !

Thanks @Crispy !! :)


No output on “Process completed with exit code 1”

Associated community ticket: https://github.community/t/no-output-on-process-completed-with-exit-code-1/123821
In this ticket, the customer has a run step to execute some command lines in the container job (image: centos:7).
One of the command lines is calling a .sh script file (see here). But this command line failed and returned the error message like as below:
##[error]Process completed with exit code 1.

The customer enabled the debug logging to try get more information about this error, but the debug logs seem were not helpful. It still only returned the same one error message.
According to my troubleshooting, the error seems was returned by a certain command line in the called .sh script.
The customer also run the same type workflow on Ubuntu 18.04, 20.04, and on macOS, but without any failures there.
And he just tried running the exact same commands in the same CentOS docker container that the failing workflow is using, and I cannot reproduce the error.

Issue:
https://github.community/t/no-output-on-process-completed-with-exit-code-1/123821/9
##[error]Process completed with exit code 1.
Fix:
. scl_source enable llvm-toolset-6.0 || true
or
. $INSTALL_DIR/bin/thisbdm.sh replace to $INSTALL_DIR/bin/thisbdm.sh
Explanation:

https://github.community/t/no-output-on-process-completed-with-exit-code-1/123821/7?u=al-cheb

 - name: System tests BioDynaMo
       shell: bash
       working-directory: build
       run: |
         set -x

Line:
2020-07-23T11:30:35.2865130Z +++ /usr/bin/scl_enabled llvm-toolset-6.0
2020-07-23T11:30:35.3275453Z ##[error]Process completed with exit code 1.

I found out which part of code is executing this line:

https://github.com/BioDynaMo/biodynamo/blob/5092924f4caf7a90ed815031c2b00b259a7ca571/cmake/env/thisbdm.sh#L374
executing line  . scl_source enable llvm-toolset-6.0
failed line at the scl_source code

# Now check if the collection isn't already enabled
/usr/bin/scl_enabled $arg > /dev/null 2> /dev/null      <- failed line
    if [ $? -ne 0 ]; then
for     _scls+=($arg)
    _scl_prefixes+=($_scl_prefix)
    fi;
done

Fix:
run: |
        . scl_source enable devtoolset-7 || true
        . scl_source enable llvm-toolset-6.0 || true
        . /etc/profile.d/modules.sh || true
        module load mpi
        . $INSTALL_DIR/bin/thisbdm.sh
        git config --system user.name "Test User"
        git config --system user.email<EMAIL_ADDRESS>        xvfb-run -d -s "-screen 0 2560x1440x24" make run-demos

https://aws1.discourse-cdn.com/github/original/2X/8/858218f11041858bb6fd9b256f57e789424f901b.png

https://github.community/t/no-output-on-process-completed-with-exit-code-1/123821/9?u=al-cheb

@senui,
Case with source:
The  /usr/bin/scl_enabled llvm-toolset-6.0  encounters a  exit 1  which is different from zero. It will terminate the  scl_source code  instantaneously due to the  exit  statement and that's why:
. $INSTALL_DIR/bin/thisbdm.sh - failed and $INSTALL_DIR/bin/thisbdm.sh - works
Looks like it by design:

return [n]
Causes a function to exit with the return value specified by n. If used outside a function, but during execution of a script by the . (source) command, it causes the shell to stop executing that script and return either n or the exit status of the last command executed within the script as the exit status of the script. If used outside a function and not during execution of a script by ., the return status is false.

source filename [arguments]
    Read and execute commands from filename in the current shell environment and
    return **the exit status of the last command executed from filename**.

https://askubuntu.com/questions/182012/is-there-a-difference-between-and-source-in-bash-after-all?lq=1
Reproduce behavior:
Without source( ./test.sh):
steps:
      - name: Test

        run: |
          cat <<EOF > $HOME/subscript.sh
          #!/bin/sh
          exit 1
          EOF
          chmod +x $HOME/subscript.sh

          cat <<EOF > test.sh
          #!/bin/bash
          $HOME/subscript.sh
          if [ $? -ne 0 ]; then
              echo PASS
          fi;
          EOF

          chmod +x ./test.sh
          echo START
          ./test.sh
          echo END

https://aws1.discourse-cdn.com/github/original/2X/f/f757609a5a3be6cb253af9d71a02faacfb7fd1c4.png
With source(source ./test.sh):
steps:
      - name: Test

        run: |
          cat <<EOF > $HOME/subscript.sh
          #!/bin/sh
          exit 1
          EOF
          chmod +x $HOME/subscript.sh

          cat <<EOF > test.sh
          #!/bin/bash
          $HOME/subscript.sh
          if [ $? -ne 0 ]; then
              echo PASS
          fi;
          EOF

          chmod +x ./test.sh
          echo START
          source ./test.sh
          echo END

https://aws1.discourse-cdn.com/github/original/2X/9/9e8907c66839e442330dc9f28f4c3cb0c9c28cb1.png
With source || true (source ./test.sh || true):
    steps:
      - name: Test

        run: |
          cat <<EOF > $HOME/subscript.sh
          #!/bin/sh
          exit 1
          EOF
          chmod +x $HOME/subscript.sh

          cat <<EOF > test.sh
          #!/bin/bash
          $HOME/subscript.sh
          if [ $? -ne 0 ]; then
              echo PASS
          fi;
          EOF

          chmod +x ./test.sh
          echo START
          source ./test.sh || true
          echo END

https://aws1.discourse-cdn.com/github/original/2X/d/d8e99b8709fdd384764189db8345dfdf94e5f8fa.png

Hi @al-cheb
We are observing the same phenomenon here: https://github.com/pangenome/pggb/pull/87/checks?check_run_id=2438456474.
Checking out the PR locally, building the container locally and running both tests runs without an exit code of 1.
Any ideas?

Hi @al-cheb
We are observing the same phenomenon here: https://github.com/pangenome/pggb/pull/87/checks?check_run_id=2438456474.
Checking out the PR pangenome/pggb#87 locally, building the container locally and running both tests runs without an exit code of 1.
Any ideas?

Hi, @subwaystation
Could you please provide minimal steps to reproduce the issue from my side? Or I can use the master branch?

Thanks for the quick reply!
Luckily, we were able to fix this. pigz was failing silently. So running it locally, it looked like it all went smoothly.
Sorry for the false alarm!
Best


ci(deps): update terraform-ibm-modules/common-pipeline-assets action to v1.4.3

This PR contains the following updates:

Package
Type
Update
Change

terraform-ibm-modules/common-pipeline-assets
action
patch
v1.4.1 -> v1.4.3

Release Notes

terraform-ibm-modules/common-pipeline-assets
v1.4.3
Compare Source
Bug Fixes

deps: update icr.io/goldeneye_images/goldeneye-ci-image docker digest to 88a939e (#91) (20f5862)

v1.4.2
Compare Source
Bug Fixes

deps: update icr.io/goldeneye_images/goldeneye-ci-image docker digest to 91c90a2 (#71) (84b78c1)

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Renovate Bot.

:tada: This PR is included in version 1.0.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


N-ary operations in DaphneDSL (and DaphneLib)

In GitLab by @pdamme on Mar 8, 2022, 17:28
Many binary built-in functions in DaphneDSL could naturally be extended to n-ary functions. For instance, cbind concatenates two data object vertically. Instead of cbind(cbind(x, y), z), it would be more intuitive to write cbind(x, y, z). Other examples include: elementwise min/max, rbind, intersect/merge/except, and cartesian.
DaphneDSL (and optionally also DaphneLib, the Python API) should support that. It could be achieved in several ways, e.g.

by creating a tree of binary operations in the DaphneDSL parser, or
by allowing n-ary operations in DaphneIR, which are lowered to a tree of binary operations in a new compiler pass, or
by allowing n-ary operations in DaphneIR and providing n-ary kernels for the runtime

Note that operator symbols like + can already be used in an intuitive way (e.g., a + b + c). The DaphneDSL parser creates a tree of binary operations out of them. If approach 3. from above is chose, those binary trees could even be rewritten to n-ary operations.

Search for (see #207) in the entire code base for some points where this would be helpful.


🐛 Bug Report: information disclosure in error response at the Bazaar plugin

📜 Description
If a request fails at the server side, e.g., due to a project ID used which does not exist.
👍 Expected behavior
No database structure is disclosed.
👎 Actual Behavior with Screenshots
The database structure of this plugin is disclosed
{
    "error": {
        "name": "error",
        "message": "insert into \"members\" (\"item_id\", \"picture\", \"user_id\", \"user_ref\") values ($1, $2, $3, $4) - insert or update on table \"members\" violates foreign key constraint \"members_item_id_foreign\"",
        "length": 259,
        "severity": "ERROR",
        "code": "23503",
        "detail": "Key (item_id)=(7) is not present in table \"metadata\".",
        "schema": "public",
        "table": "members",
        "constraint": "members_item_id_foreign",
        "file": "ri_triggers.c",
        "line": "2539",
        "routine": "ri_ReportViolation"
    },
    "request": {
        "method": "PUT",
        "url": "/projects/7/member/Guest"
    },
    "response": {
        "statusCode": 500
    }
}

👟 Reproduction steps
const invalidProjectId = 1234;
const newMember = 'anything';
fetch("`${backstageBaseUrl}/api/bazaar/projects/${invalidProjectId}/member/${newMember}`, {
  "method": "PUT",
  "body": "{}"
});

📃 Provide the context for the Bug.
No response
🖥 Your Environment
Backstage 1.18.4
"@backstage/plugin-bazaar-backend": "^0.3.2

👀 Have you spent some time to check if this bug has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

Are you willing to submit PR?
None

In general, the plugin does not use UUID as an ID type/format and members can be anything, is not a ref to a user entity.

👍 , noting that I think we could also apply the more general solution of filtering out any knex errors in our error handling middleware and instead logs it in some useful way instead.


Backtick Character (`) Prevents Rendering

Using a backtick (`) in the TODO.md file prevents the extension from rendering the Kanban board.

Here's a sample TODO.md (the one used in that screen recording):
TODO.md

This is a great tool.  I'm also hitting this bug and it's a bummer as there's only a few good ways to include extra info.  Bold, Italics and code blocks with backtick's are some of the easiest to use.

Reporting the same issue as of 2024. Last commit to this repo was 3 years ago, I guess this project isn't maintained anymore


Debug adapter process has terminated unexpectedly

I cant figure out how to fix this, worked fine yesterday then i had a forced restart and I am now unable to debug

VSCode Version:  1.14.2
OS Version: 10.11.6

Steps to Reproduce:

installed react-native-debugger
sweet mac kernel panic restart

Reproduces without extensions: Yes/No

I was able to fix by reinstalling the react native tools extension.  I will post this issue to that extensions github repository


Tribler Unstable ModuleNotFoundError: No module named 'PyQt5.sip'

Describe the bug
The latest version of Tribler in the Unstable branch fails to start.
$ tribler
INFO:__main__:Run Tribler: Namespace(torrent='', core=False, gui_test_mode=False, allow_code_injection=False, trace_exception=False, trace_debug=False, testnet=False, chant_testnet=False, trustchain_testnet=False, tunnel_testnet=False)
INFO:__main__:Root state dir: /home/craft/.Tribler
Traceback (most recent call last):
  File "/nix/store/naj9h3xwri8l8w6qvcbsww71lgz4iwxm-tribler-7.14.0/src/run_tribler.py", line 125, in <module>
    main()
  File "/nix/store/naj9h3xwri8l8w6qvcbsww71lgz4iwxm-tribler-7.14.0/src/run_tribler.py", line 117, in main
    from tribler.gui.start_gui import run_gui
  File "/nix/store/naj9h3xwri8l8w6qvcbsww71lgz4iwxm-tribler-7.14.0/src/tribler/gui/start_gui.py", line 7, in <module>
    from PyQt5.QtCore import QSettings
ModuleNotFoundError: No module named 'PyQt5.sip'

Steps To Reproduce
Steps to reproduce the behavior:

Install tribler on unstable branch
launch tribler in terminal

Expected behavior
Expect Tribler to launch.
Notify maintainers

Metadata
 - system: `"x86_64-linux"`
 - host os: `Linux 6.9.7, NixOS, 24.11 (Vicuna), 24.11pre647193.9f4128e00b0a`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.4`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: [reaction] to [issues you find important].

Currently failing to build. #325297 unrelated?
$ sudo nixos-rebuild switch --upgrade-all
unpacking channels...
unpacking channels...
building Nix...
building the system configuration...
error:
… while calling the 'head' builtin
     at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:1575:11:

     1574|         || pred here (elemAt values 1) (head values) then
     1575|           head values
         |           ^
     1576|         else

   … while evaluating the attribute 'value'

     at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:821:9:

      820|     in warnDeprecation opt //
      821|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
         |         ^
      822|         inherit (res.defsFinal') highestPrio;

   (stack trace truncated; use '--show-trace' to show the full trace)

   error: pony-0.7.17 not supported for interpreter python3.12

error: pony-0.7.17 not supported for interpreter python3.12

The right way to test is to clone master repo. And do:

nix build .#tribler

Which is certainly building:

Your system configuration isn't using master, eventually it reaches unstable, etc.


Display Kafka topic configs

Kafka topic configs such as compact/ delete in the context of whole pipelines can help to find errors/improvements.

For retrieving the topic configs we can use the AdminClient from confluent-kafka:
https://docs.confluent.io/platform/current/clients/confluent-kafka-python/html/index.html#confluent_kafka.admin.AdminClient.describe_configs


build-pulumi-cli-docs GHA job currently failing due to pipenv lockfile

See https://github.com/pulumi/docs/actions/runs/3329923605/jobs/5509760775

@lukehoban who needs to triage this issue?


[Enhancement] Maintainability Ideas

[ ] Enums for MessageType, Add Enum Extension Methods

We can use Extension Methods to get a [Description] tag off of an Enum. This adds a little overhead, since we have to get the string at runtime as opposed to just reading the string.
Example:
using System.ComponentModel;

namespace VTS
{
    public static class EnumExtensions
    {
        public static string GetDescription<T>(this T value)
        {
            var fi = value.GetType().GetField(value.ToString());
            var attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false);

            return attributes.Length > 0 ? attributes[0].Description : null;
        }
    }
}

Pros:
Less typos, easier to develop/maintain.
Cons:
Less performant. Not sure if that is an issue, since it is all (usually) running on a local network.

[ ] Remove Serializable, adding Newtonsoft
Newtonsoft makes it so we don't need to mark every class in VTSData as [Serializable]. This is marking a class being Binary Serializable in C# and is generally frowned upon for various reasons, especially since we just need to serialize it for JSON data.

Pros:
Not using [Serializable].
Cons:
Adding a library (Newtonsoft) to the project.

[ ] Rework Data, remove Data from subclasses, merge onto VTSMessageData
I was thinking we could just use Inheritance and Generics here to not create a new Data on every class. Here is an example of how VTSMessageData and ErrorData could look

public class DTO {}
    public class VTSMessageData<T> where T : DTO
    {
        public string APIName = "VTubeStudioPublicAPI";
        public long Timestamp;
        public string APIVersion = "1.0";
        public string RequestID = Guid.NewGuid().ToString();
        public string MessageType;
        public T Data;

        public VTSMessageData(MessageTypeEnum e)
        {
            MessageType = e.GetDescription();
        }

        public VTSMessageData(MessageTypeEnum e, T d)
        {
            MessageType = e.GetDescription();
            Data = d;
        }
    }

    public class VTSErrorData : VTSMessageData<ErrorData>
    {
        public VTSErrorData() : base(MessageTypeEnum.APIError) { }
        public VTSErrorData(string e) : base(MessageTypeEnum.APIError, new ErrorData(e)) { }

        public class ErrorData : DTO
        {
            public ErrorData() { }
            public ErrorData(string message) { Message = message; }

            public ErrorID ErrorID;
            public string Message;
        }
    }

Pros:
Code is a bit easier to work with and expand upon.
Cons:
Maybe a little less understandable at a glance?
Currently need to use Static Usings, IE: using static VTS.VTSArtMeshListRequestData; to access the 'Data' types, which will clutter usings in some files.
I'll try to think of a better way to handle this though.

[ ] Remove 'This', general code/linting cleanup
There are lots of small linting things that bug me a bit, like unnecessary this., variable name casing, null coalescing, null propagation, and other VERY MINOR things. This isn't so much a problem, but thought I'd bring it up and see what your thoughts on it were. I could make these changes in a pull request, but wanted to see if this was overstepping my bounds a little.

Example:
This:
			if(this._ws != null){
				this._ws.Update(timeDelta);
			}

Becomes:
_ws?.Update(timeDelta);
Pros:
My Brain will process this better?
Cons:
Your/Other People's Brains may not?

[ ] Use Reflection in ProcessResponses
We can make use of Reflection in C# to remove the switch statements in ProcessResponses, allowing for not having to manually update this whenever we add a new type. This example also uses (dynamic), which I would like to refactor out, since this also adds some extra overhead along with the use of Reflection. I just haven't thought of a better way of doing this yet.

Example:
        private void ProcessResponses()
        {
            while (_ws?.GetNextResponse() is string data)
            {
                var response = JsonConvert.DeserializeObject<VTSMessageData<DTO>>(data);
                Type responseType = Type.GetType("VTS" + response.MessageType + "Data");
                var responseData = JsonConvert.DeserializeObject(data, responseType);

                try
                {
                    if (_events.ContainsKey(response.MessageType))
                    {
                        _events[response.MessageType].OnEvent((dynamic)responseData);
                    }
                    else if (_callbacks.ContainsKey(response.RequestID))
                    {
                        if (response.MessageType == "APIError")
                        {
                            _callbacks[response.RequestID].OnError((dynamic)responseData);
                        }
                        else
                        {
                            _callbacks[response.RequestID].OnSuccess((dynamic)responseData);
                        }

                        _callbacks.Remove(response.RequestID);
                    }
                }
                catch (Exception e)
                {
                    VTSErrorData error = new VTSErrorData(e.Message)
                    {
                        RequestID = response.RequestID
                    };

                    _events[response.MessageType].OnError(error);
                }
            }
        }

Pros:
Easier to maintain.
Cons:
Uses more computation.
Please let me know if any of these possible enhancements interest you! I'll make some pull requests with these features separately. I already have some of this work done in one, gross, big, commit I was working on as a test over at https://github.com/Millyarde/VTS-Sharp/commit/e3851fba2f6426e7744c592c5433ade62a725dfd. I'll probably wait until version 2 is in main to make these changes, if that isn't too far off!

I do not understand what enum we are looking to add a "description" to. The ErrorType enum is provided by Denchi, I just copy the latest in every update.
Newtonsoft appears to use the MIT license for redistribution so it's technically feasible, though it seems like a lot of bloat for something that's already being accomplished natively. I would also worry that this introduces the opportunity for version conflicts, if users are already using Newtonsoft in their project.
I do not understand how this is functionally different from what I'm currently doing. There is no overlap or common field among the child Data classes, so there doesn't appear to be any benefit in having them inherit from a common ancestor.
You've got me here: my use of this is a holdover from my day job as a JavaScript monkey. Because of the IDE color palette I use, prepending things with this makes them pop on a way that's easy for me to read. Additionally, Unity does not support the null-coalesce operator well on things that can be serialized in the Inspector, for reasons that have been lost to the sands of time. I also generally think that the null-coalesce operator is a lot easier to miss than an if-block when skimming over code.
I do not have high confidence that reflection will not cause a performance hit while dispatching requests at 60FPS, based on my experience with reflection in other languages (Java).

Hope that helps address things!

I was thinking of adding an enum for MessageType with a [Description] tag of the API, so that we have a 'strongly typed' reference to the message types, as opposed to the current scattered 'magic strings' of the message type, in case they change one or something in the future. Does add some degree of overhead since you have to use Reflection to grab the string off the enum instead of just... using a string, but it's pretty minor overhead for the safety and usability it provides imo.
Yeah, definitely valid points. I reflexively try to remove any serializable tags due to past traumas caused by binary serialization in C#. It seems like you need that in Unity for seeing those fields in the Inspector, but you won't need it for any non-unity touching code, as that [Serializable] tag is only for Binary Serialization and has nothing to do with JSON Serialization. Totally understand wanting to avoid version conflicts as well, Streamer.bot (which I'm trying to use your library to make a clean extension for it), has it's own version of WebsocketServer and Newtonsoft, dealing with versioning with C# is headaches for days 😭
It isn't functionally different, just a little more maintainable pattern imo. Looks cleaner to me anyway, but I'm not sure how often you have to add new classes like this due to API updates, so may not even be worth doing 🤷♀
It's not broke and it works, so it's fine🤣. That's why they call it linting, since it isn't important. Just figured I'd mention some of the general stuff I saw. Totally didn't know about that Unity thing, that's really dumb since that's a basic C# 6 thing, and we are on like C# 11 now 🤯. Kinda glad I decided to start working on a different project in Unreal instead of Unity now 😅
Yeah, I was concerned about this as well, since people run VTS on a variety of hardware and this is part of lifecycle events. Was curious on your take on the idea. The Dynamic keyword in C# basically is an expensive cheat on skipping compile-time type checking. It's like using any in Typescript, except with performance drawbacks greater than reflection even 🤮, definitely a no-no here, but it has it's uses in some places.

So it seems like "No"'s  on everything?

This makes sense to do. I don't like the magic string approach, as it's prone to typos (as you have personally seen and corrected)
I still don't understand what's wrong with the Serializable attribute.
I'll think about it.
This totally comes down to personal preference. I should install an actual linter for home use. Right now I just have a formatter.
I think we can compromise somewhere in the middle, making an enum list of message types but still having a precompiled switch statement for each case, to eliminate the need for reflection.

We could just do const strings instead of an enum as well for the message types, that's a little less overhead than the enum description tag approach. Would lose a little bit of code flexibility, but it is a little more performant.

Yeah, the other thing is that outgoing messages all need to be SomethingRequest and the incoming messages are all SomethingResponse. Unless we wanted two unlinked enum values each, we could probably get away with making the enum value just Something and having the Send method append the word Request to it. Similarly, the receiving switch could attempt to trim Response from the string value to find the matching enum.
I wish C# allowed for complex enum objects like Java does. That's the one word of praise I'll give the language.

This is functionally done. I'm kicking the enum-ification down the road a bit, but you can use the code from the branch: https://github.com/FomTarro/VTS-Sharp/tree/unity-decouple safely now. I do not anticipate further changes. I am presently writing the migration steps in the README, which you presumably do not need for your purposes.
Sorry for the month of delay.

Sounds good! I'll take a look at the changes and hopefully work on some stuff with this next week.
Saw the to/from JSON abstraction, Newtonsoft addition, and removing the meta files though, looks great and will make things easier for my little fork!
No worries on taking a while, figured this would be a longer work in progress and some stuff I could help add/code review if it was stuff you wanted 😅
I got busy myself so I hadn't really had a chance to work on stuff anyway. We can close this out if you don't like seeing the "1 issue" and I can just send in PR's for stuff like the enums if/when I get to it. Whatever works best for you, thanks for the hard work 😊