Using UUIDs for IDs

We should be using UUIDs for author_ids and have appropriate tests for how they're being used. Team may need to discuss further if necessary.
Instead of:
_id = models.CharField(max_length=LONG_CHAR_LENGTH, unique=True)

should use something like:
import uuid
from django.db import models

_id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)

https://docs.djangoproject.com/en/3.1/ref/models/fields/#uuidfield

From my understanding, if we make this into a UUID field then we no longer have a way to easily make API requests to a server at the given ID (nor provide this functionality for other servers).

From my understanding, if we make this into a UUID field then we no longer have a way to easily make API requests to a server at the given ID (nor provide this functionality for other servers).

Can you elaborate more on what you mean? What would be the alternative?


Adding Test Step in AfterStep feature file.

Working on Add step to AfterStep #450
Do you think the argument list should be consistent with how formatters work or will it potentially cause problems moving the current argument out of its position as first argument?

Isn't not having scenario as first argument to the AfterStep hooks, such a breaking change that only can be introduced in a major version upgrade?
If the intention is to add both step and result as arguments to AfterStep hooks, I see it as two separate changes, from:
Before do | scenario |
After do | scenario |
AfterStep do | scenario |

to:
Before do | scenario |
After do | scenario |
AfterStep do | scenario, step |

And another change to.
Before do | scenario |
After do | scenario, scenario_result |
AfterStep do | scenario, step, step_result |

I could be wrong, but it seems to me that since upgrading to Cucumber 2 the only argument I an receiving from the AfterStep hook is a Cucumber::Core::Test::Result of whatever status the step invocation was.

Hm, based on #450 I thought that the AfterStep hooks in Cucumber v2 received a Cucumber::RunningTestCase, as the Before and After hooks do.

It was definitely a scenario object in Cucumber 1.x when the issue was first reported (and it was pretty simple to get the step through that scenario at the time).
In Cucumber 2.x, I am only finding a result in the AfterStep block (Before and After still receive the scenario as normal).
I know I can add the test_step when the hook action is created in the after_step_hooks method of Cucumber::Runtime::StepHooks in lib/cucumber/runtime/step_hooks.rb and my test will pass... I'm just not sure if that is the right/best place to do it.

I went ahead and implemented my change to fix the AfterStep hook functionality. If there are any changes that should be made, please let me know.
I had to flatten an array in lib/cucumber/rb_support/rb_hook.rb because the argument passed into the AfterStep hook was being wrapped in an Array for some reason.

Thanks sharing your fix @t-morgan.

Could you rename the feature (and reword the description) to just be a general feature for AfterStep hooks? It should live here: https://github.com/cucumber/cucumber-ruby/tree/master/features/docs/writing_support_code

Hey @mattwynne, I cleaned up the feature file and moved it as you requested. I think it might be a good idea to also include another scenario showing AfterSteps do run for background steps (apparently this was not always the case).

@t-morgan What would be a "background step"? Some command running in the background?

@maxmeyer, no it is just a step defined under 'Background:' for the feature.

Ah. Ok. :-)

Are you planning to merge this to master? We're planning to measure the time it takes a step to complete, and this modification would be extremely useful.

Please merge it, AfterStep is quite useless in its current form.

Is there a nicer way to get the index of the step other than this?
step.source[-2].children.index(step.source.last)

Thanks @t-morgan!

As part of our new policy I've invited you to become a committer to this repo @t-morgan. I liked how you found your way around the code and tested your change. I hope we'll get more contributions from you in future!

@mattwynne @t-morgan
with cucumber-ruby gem 2.3.3,  I got nil class for the test_step... is this expected? according to the after_step_hooks.feature, it should be the step, right?  not sure if I missed something... thanks
AfterStep do |result, test_step|
  print result.class
  print "\n-------\n"
  print test_step.class
end

I got this
Cucumber::Core::Test::Result::Passed
-------
NilClass


New package: WASMTools v0.1.0

Registering package: WASMTools
Repository: https://github.com/arhik/WASMTools.jl
Created by: @arhik
Version: v0.1.0
Commit: 2e64ed56a51d62b5a942937747d65a82df62e13b
Reviewed by: @arhik
Reference: https://github.com/arhik/WASMTools.jl/commit/2e64ed56a51d62b5a942937747d65a82df62e13b#commitcomment-92252817
Description: Similar to StaticTools for WebAssembly

Close this request. Name convention doesn't meet requirements. Had to create another repo.


Modal template

Hi,
Is it possible to override the modal template without having to copy the entire /tmpls directory in my project (and then changing option tmpl_path)?
Thanks.

Take a look at my options param at app.js :
var options = {
events_source: 'http://my/path/returning/json',
view: 'month',
tmpl_path: '/packages/jq/bs-calendar/bootstrap-calendar-master/tmpls/',
tmpl_cache: false,
language: 'pt-BR',
modal: '#events-modal',
modal_type: "ajax",
modal_title: function (e) {
return e.title;
},
day: '2015-01-21',
onAfterEventsLoad: function (events) {
if (!events) {
return;
}
var list = $('#eventlist');
list.html('');
        $.each(events, function (key, val) {
            $(document.createElement('li'))
                    .html('' + val.title + '')
                    .appendTo(list);
        });
    },
    onAfterViewLoad: function (view) {
        $('.page-header h3').text(this.getTitle());
        $('.btn-group button').removeClass('active');
        $('button[data-calendar-view="' + view + '"]').addClass('active');
    },
    classes: {
        months: {
            general: 'label'
        }
    }
};

Only changing the tmpl/modal.html
But, from where are you getting that and not has the directory on your project? :/

I'm sorry I did not understand what you're suggesting.
As I understand the tmpl_path option, every template is searched inside this directory, but I want to override only one (modal.html), without copying the whole default directory in my project.

But... the tmpl directory should be on your project...

First, i don't recommend to get templates from other site...
But, if you need that, you can change one function:
https://github.com/Serhioromano/bootstrap-calendar/blob/master/js/calendar.js#L910
Calendar.prototype._templatePath = function(name) {
		if(typeof this.options.tmpl_path == 'function') {
			return this.options.tmpl_path(name)
		}
		else {
			return this.options.tmpl_path + name + '.html';
		}
	};

To:
Calendar.prototype._templatePath = function(name) {
		if(typeof this.options.tmpl_path == 'function') {
			return this.options.tmpl_path(name)
		}
		else {
			if(name == "modal") return 'my_custom_tmpl_path/'+name+'.html';
                        else return this.options.tmpl_path + name + '.html';
		}
	};

bootstrap-calendar is indeed part of my project, but if I overwrite some files, I won't be able to update it... That's why I wanted to have another location for templates.
Why don't you recommend other templates?
Thank you for you code suggestion, I guess I'll be able to use it in my templates (instead of modifying calendar.js).

Ok, i understand now!
Bootstrap-calendar doesn't allow you to override a template.
So, you have two options. Change the tmpl_path to another, and you can update bootstrap-calendar without need to change tmpls, but maybe you have two tmpls dir (the bootstrap one's, and yours).
And another option, change calendar.js code, you don't need two dirs, but you can't update...
Maybe, an option for override path, its possible...
PD: At first, i believe that you has a calendar on "mywebsite.com" and getting templates from "anotherwabsyte.com/tmpls" U.U
Sorry for my english!

OK all clear now!
Thus, I guess the best solution for me is to change the tmpl_path option and copy the whole tmpls directory, even if I just want to override modal.html.
So next question is: couldn't that be a cool feature? Something like:

If you want to do a PR... ;)
even, maybe i will do. I like it!
@Serhioromano ?

In fact I'm not sure a new option is necessary. We could probably set a custom tmpl_path and fallback to the default one if the template has not been found.

So, that's two GET for every template that are not override...
In your case, yes, modal will be one get, but all others will be two gets (one for the override tmpl_path, and one for the correct tmpl_path).
I prefer the tmpl_files array. More quick check an array, than do a get request


[1.16.4] Vertical Redstone Repeater/Comparator Dupe

Placing a Redstone Repeater or Redstone Comparator vertically doesn't use up the block, so you can very easily dupe them.
Video: https://user-images.githubusercontent.com/5300396/104733696-0ebfa780-577a-11eb-9a0a-fad70c2129ac.mp4

oh; yeah, was supposed to fix that before I released it but totally forgot.

oh; yeah, was supposed to fix that before I released it but totally forgot.

Extra question does it fix the conflict of use the item into the block such as spawner with Apothesis mod (right click redstone comparator to enhance spawner capability) and Ars Noveau's Glyph Press (right click use it as crafting recipe.)

Extra question does it fix the conflict of use the item into the block such as spawner with Apothesis mod (right click redstone comparator to enhance spawner capability) and Ars Noveau's Glyph Press (right click use it as crafting recipe.)

Both issues resolved in 20210118a.
Current work-around: https://github.com/NillerMedDild/Enigmatica6/issues/943#issuecomment-762181666

Both issues resolved in 20210118a.
Current work-around: https://github.com/NillerMedDild/Enigmatica6/issues/943#issuecomment-762181666


Firebase, connection refused, ArduinoIDE

The last Serial.println(firebase.error()); says connection refused but first doesnt, any one knows why?
#include <WiFi.h>
#include <IOXhop_FirebaseESP32.h>
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>

#define SERVICE_UUID        "4fa34201-1fb5-459e-8fcc-c5c9c331914b"
#define CHARACTERISTIC_UUID1 "beb1283e-36e1-4688-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID2 "beb54889-36e1-4688-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID3 "be26383e-36e1-4688-b7f5-ea07361b26a8"

// Set these to run example.
   `#define` FIREBASE_HOST "a-green-home.firebaseio.com"
   #define FIREBASE_AUTH "my token"

    BLECharacteristic *cPassword = NULL;
    BLECharacteristic *cSsid = NULL;
    BLECharacteristic *cResponse = NULL;

    void setup() {
    Serial.begin(115200);

    CONFIG_INT_WDT_CHECK_CPU1;

    Serial.println("Starting BLE work!");

    BLEDevice::init("GreenHome");
    BLEServer *pServer = BLEDevice::createServer();
    BLEService *pService = pServer->createService(SERVICE_UUID);

    //-----------adding caracteristics--------

    cPassword = pService->createCharacteristic(
                  CHARACTERISTIC_UUID1,
                  BLECharacteristic::PROPERTY_READ |
                  BLECharacteristic::PROPERTY_WRITE
                );

    cPassword->setValue("nothing");
    cSsid = pService->createCharacteristic(
              CHARACTERISTIC_UUID2,
              BLECharacteristic::PROPERTY_READ |
              BLECharacteristic::PROPERTY_WRITE
            );

    cSsid->setValue("your ssid");
    cResponse = pService->createCharacteristic(
                  CHARACTERISTIC_UUID3,
                  BLECharacteristic::PROPERTY_READ |
                  BLECharacteristic::PROPERTY_WRITE
                );

    cResponse->setValue("this will say done when wifi connnection attablished");

    pService->start();
    // BLEAdvertising *pAdvertising = pServer->getAdvertising();  // this still is working for backward compatibility
    BLEAdvertising *pAdvertising = BLEDevice::getAdvertising();
    pAdvertising->addServiceUUID(SERVICE_UUID);
    pAdvertising->setScanResponse(true);
    pAdvertising->setMinPreferred(0x06);  // functions that help with iPhone connections issue
    pAdvertising->setMinPreferred(0x12);
    BLEDevice::startAdvertising();

      Serial.println("whatting for password");

    while(cPassword->getValue() == "nothing"){

       Serial.print(".");
       delay(500);
       Serial.print("!");
       delay(500);

      }

    btStop();

    delay(2000);

    Serial.println("bleStopped");
   delay(2000);

  // connect to wifi.
  WiFi.begin("WanscherCLan","mvfgnEEzXE");
  delay(500);
  Serial.println("connecting");
  delay(500);
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(500);
  }
  Serial.println();
  Serial.print("connected: ");
  Serial.println(WiFi.localIP());

  delay(2000);

  Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
   if (Firebase.failed()) {
    Serial.print("Connection failed");
    Serial.println(Firebase.error());

  }else{Serial.println("Connected to firebase");}
  delay(2000);

}

void loop() {

  Firebase.setString("lul","lul");
  Serial.print(Firebase.error());

}

Update fingerprints

@bilalkh4an
Dont think thats the problem, i can run the demo with out problem, and if i remove all the ble stuff it works again

do i have to update fingerprint evry month or so?

Had similar issue. Resolved by updating fingerprints.

But why does the firebase demo work then?

Now I'm asking again, but do I need to update fingerprints every month

But why does the firebase demo work then?

In my case even demo was not working.

Hmm I guess the fingerprint ain't the problem then

Anyone have an answer?

Anyone have an answer?

https://github.com/FirebaseExtended/firebase-arduino/issues/411#issuecomment-470395002

Non the same, I can easily send data in demo

Hi
Go to :- C:\Users\user-name\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient.h
Update last three lines:-

static const char kFirebaseFingerprint[] =
"E2 34 53 7A 1E D9 7D B8 C5 02 36 0D B2 77 9E 5E 0F 32 71 17";
#endif  // FIREBASE_HTTP_CLIENT_H

Thanks

Nope that ain't the problem cause demo is working


uninitialized constant Poise::Backports::VERIFY_PATH

...
Chef Client, version 12.6.0
poise-languages (1.3.2)
poise-service (1.1.0)
poise-monit (1.0.2)
...

           Error executing action `enable` on resource 'monit[monit]'
           ================================================================================

           NameError
           ---------
           uninitialized constant Poise::Backports::VERIFY_PATH

           Cookbook Trace:
           ---------------
           /tmp/kitchen/cache/cookbooks/poise-monit/files/halite_gem/poise_monit/monit_providers/base.rb:144:in `block in write_config'
           /tmp/kitchen/cache/cookbooks/poise-monit/files/halite_gem/poise_monit/monit_providers/base.rb:138:in `write_config'
           /tmp/kitchen/cache/cookbooks/poise-monit/files/halite_gem/poise_monit/monit_providers/base.rb:48:in `block in action_enable'
           /tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/subcontext_block.rb:54:in `instance_eval'
           /tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/subcontext_block.rb:54:in `subcontext_block'
           /tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/notifying_block.rb:67:in `notifying_block'
           /tmp/kitchen/cache/cookbooks/poise-monit/files/halite_gem/poise_monit/monit_providers/base.rb:41:in `action_enable'

           Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cache/cookbooks/whatever/recipes/_monit.rb

            14: monit 'monit' do
            15:   daemon_interval  node['graphite']['monit']['daemon_interval']
            16:   # event_slots 0
            17:   httpd_password node['graphite']['monit']['http_password']
            18:   httpd_port  node['graphite']['monit']['http_port']
            19:   httpd_username  node['graphite']['monit']['http_username']
            20:   provider :system
            21: end
            22:

           Compiled Resource:
           ------------------
           # Declared in /tmp/kitchen/cache/cookbooks/whatever/recipes/_monit.rb:14:in `from_file'

           monit("monit") do
             provider PoiseMonit::MonitProviders::System
             action [:enable]
             retries 0
             retry_delay 2
             default_guard_interpreter :default
             subresources [monit_config[mailconfig]]
             declared_type :monit
             cookbook_name "whatever"
             recipe_name "_monit"
             daemon_interval 60
             httpd_password "bar"
             httpd_port 2812
             httpd_username "foo"
             service_name "monit"
             path "/etc/monit"
             var_path "/var/lib/monit"
             config_content "# Generated by Chef for monit[monit]\n\n\nSET PIDFILE /var/run/monit_real.pid\n\nSET LOGFILE /var/log/monit.log\n\nSET IDFILE /var/lib/monit/id\nSET STATEFILE /var/lib/monit/state\nSET EVENTQUEUE BASEDIR /var/lib/monit/events SLOTS 100\n\nSET HTTPD PORT 2812\n  ALLOW foo:bar\n\nINCLUDE /etc/monit/conf.d/*\n"
             config_cookbook "poise-monit"
             pidfile "/var/run/monit_real.pid"
             logfile "/var/log/monit.log"
             event_slots 100
           end

Are you trying to run a pre-release version? This isn't in the latest release. To run the current pre-release you'll need master or Poise too but I'm in the middle of gutting my multi-project testing system so stuff is a little broken right now.


Building THORChain Swap transactions for ATOM/LTC/AVAX/BCH/DOGE

Is your feature request related to a problem? Please describe.
Current implementation allows to build transaction for BTC, ETH, BNB, THOR. Need to extend it.
Describe the solution you'd like
Add support for ATOM/LTC/AVAX/BCH/DOGE
Describe alternatives you've considered
None
Checklist

[x] Support ATOM
[x] Support LTC
[x] Support AVAX
[x] Support BCH
[x] Support DOGE

Resources

Resources link
Additional context
Add any other context or screenshots about the feature request here.

Completed


Karate hangs after finishing the test (with large number of inputs)

Hello,
I am here to report 2 Karate issues (the first one is the original error, and the second one was found when I was trying to replicate the error).
First Issue
I am having an issue with Karate as it hangs after all the test is completed (before the test result gets generated) when there are a lot of inputs (lots of API requests). I tried to mimic the erroneous behavior by only keeping the structure and replace the API calls with the dummy API ('https://www.google.com') and replaced the data with the dummy variable that only works as a counter.
Background information:
The way it works is requestGoogle feature has a Scenario Outline that runs N times (number elements in the JSON array input - totalData.json) and each case would run sendGoogle feature M times (number of elements in the JSON array input - replyToFormData.json). In our case, M is fixed and N is the number of the case I can increase/decrease (for the test case, I set M to be 9). So, the total requests that are being tested is M * N requests.
Issue
Since M is fixed, I can play around with N to see what's causing the issue. Here is what happens:

When N=80 with 4GB RAM -> No hanging, works fine (EC2 t2.medium)
When N=120 with 4GB RAM -> Hangs (EC2 t2.medium)
When N=120 with 8GB RAM -> No hanging, works fine (MacBook Pro 2018 15 inch with 16GB RAM)
When N = 180 with 8GB RAM -> Hangs (MacBook Pro 2018 15 inch with 16GB RAM)
When N = 180 with 16GB RAM -> No hanging, works fine (MacBook Pro 2018 15 inch with 16GB RAM)
When N = 200+ with 16 GB RAM -> Hangs (MacBook Pro 2018 15 inch with 16GB RAM)

On the local machine (MacBook Pro 2018 15 inch with 16GB RAM), I manually assigned the RAM (8/16GB).
I also have changed the Logging from DEBUG to INFO and tried using the parallel execution (with 4). The current project uses parallel execution with 4 threads. Results results = Runner.path("classpath:examples/users/requestGoogle.feature").parallel(4);
Current repo is set to be N = 400, M = 9.
You can use the command mvn clean test to run the project.
Here is the repository for the first issue.
automatedTest.zip
Second Issue
Background information:
While I was duplicating the issue, I wanted to simplify the project as much as possible. So I decided to create a Karate project that has only 1 thing (GET request) and tried to run it as much as I needed in my project. (Around 4,000 + requests). Then this is what happens.
Issue

Up to 2700 inputs, it runs and passes.
Then I increase to around 3000, it becomes really slow, and a simple GET request to Google fails. (screenshot).

Then when I increase the input number to like 4000+, the karate won't even start (I think the reading input file with lots of JSON elements is getting stuck while being processed)

When I say the input number, I changed the number of elements in JSON array (totalData.json)
You can use the command mvn clean test to run the project. I used my local machine (MacBook Pro 2018 15 inch with 16GB RAM)
Here is the repository for the second issue.
automatedTest2.zip

@hellomryoo really appreciate the simple example. but I would like you to make one critical change.
please use a karate mock on localhost to be the sample service, not google / external for this case. so we will still simulate the http connections (which may be the bottleneck). if needed you can simulate a response delay. look at the gatling example for reference: https://github.com/intuit/karate/tree/develop/examples/gatling
and it would be nice if you use 0.9.6.RC4 because I don't want to waste time on things that may have been fixed with ongoing code improvements
is it fair to assume that your scenario is non-typical and that you are basically reaching the limits of your machine (CPU + RAM). if this is a blocker, one way you can contribute to the community is to help us make the distributed-testing approach more mature: https://github.com/intuit/karate/wiki/Distributed-Testing
else I am inclined to treat this as very low priority, I have put a help wanted tag on it, and it would require someone to do an interesting profiling exercise. hacktoberfest is coming up and I will add this to the project board.
the Scenario Outline has a lot of interesting code behind the scenes that snapshots state for each row etc. I'm not at all surprised :) you are welcome to submit a PR - and I would say that is the most useful thing you can do in this situation.
it would also be great if you re-write your test to use a loop, e.g. karate.repeat() and a karate.call(). and in the "called" feature, use a Java class to "generate" the next row of data needed, similar to an Iterator. that would avoid getting the thousands of rows into memory.
let me know your thoughts

moving to project board: https://github.com/intuit/karate/projects/3#card-43330542

hello @hellomryoo are you there. would you be so kind as to take a look at https://github.com/intuit/karate/issues/1394#issuecomment-751252092 and confirm that it looks good. thanks


oral epithelium

Add:
abnormal oral epithelium morphology (a child of abnormal oral mucosa morphology; see issue #2364)
DEF: any structural anomaly of the stratified squamous epithelium that forms part of the oral mucosa and lines the inner aspect of the oral cavity; depending on the mouth region, the epithelium may be non-keratinized or keratinized: non-keratinized squamous epithelium covers the soft palate, inner lips, inner cheeks, and the floor of the mouth, and ventral surface of the tongue; keratinized squamous epithelium is present in the attached gingiva and hard palate as well as areas of the dorsal surface of the tongue
SYN: abnormal epithelium of the oral mucosa
SYN: abnormal epithelium of the mouth mucosa
SOURCE: https://en.wikipedia.org/wiki/Oral_mucosa
J:102931
Review placement of abnormal gum epithelium morphology
Anna

abnormal oral epithelium morphology MP:0030179


Page control dragging fails

Describe the bug
The page control dragging fails, but it is possible to use it in the browser
https://user-images.githubusercontent.com/48701152/168418910-f5e15772-9412-42b4-a438-e1aabf549014.mp4
Reproduction
No response
Expected behavior
No response
Platform and versions
Environment
  › OS: Windows 10.0.19043 X64
  › Webview2: 101.0.1210.39
  › MSVC:
      - Visual Studio ���ɹ��� 2019
  › Node.js: 16.13.2
  › npm: 8.1.2
  › pnpm: 6.32.4
  › yarn: 1.22.18
  › rustup: 1.24.3
  › rustc: 1.60.0
  › cargo: 1.60.0
  › Rust toolchain: stable-x86_64-pc-windows-msvc

Packages
  › @tauri-apps/cli [NPM]: 1.0.0-rc.10
  › @tauri-apps/api [NPM]: 1.0.0-rc.5
  › tauri [RUST]: 1.0.0-rc.10,
  › tauri-build [RUST]: 1.0.0-rc.8,
  › tao [RUST]: 0.8.4,
  › wry [RUST]: 0.16.2,

App
  › build-type: bundle
  › CSP: unset
  › distDir: ../dist
  › devPath: http://localhost:8001/
  › framework: Vue.js

App directory structure
  ├─ .git
  ├─ .idea
  ├─ build
  ├─ mock
  ├─ node_modules
  ├─ public
  ├─ src
  ├─ src-tauri
  └─ types

Stack trace
No response
Additional context
No response

https://user-images.githubusercontent.com/48701152/168467288-4ad5132f-ef7e-46f0-8885-44fd1892a5b0.mp4

Has no one encountered it?I'm using naive-ui (Vue) and the controls all work fine in the browser, but in
The drag property of the control in tauri is invalid

NaiveUi and element-plus have tested the drag property in the component is not working

I think the problem here is that we don't really understand what you're talking about and the videos don't work either (for me).
But since you're talking about some kind of dragging. HTML5 Drag&Drop doesn't work if you have tauri's file drop enabled. So try disabling it via "fileDropEnabled": false in your window config in tauri.conf.json https://tauri.studio/v1/api/config/#tauri.windows.fileDropEnabled

Yes, the video doesn't work, so I uploaded it twice, but it doesn't work either, you can download the video and you can play it。
I added FileDropenabled properties. The page control can already be dragged for thanks, but my control is not the File control is a tree -shaped control. If you are interested, you can take the video down. You happy


Investigation of server lag

Hi, I've been investigating some probable causes of server lag using a JVM Sampler, and I found out that about 16% of my server's CPU usage is from CCTweaks.
This is a rather alarming discovery, considering how much computers are used on the server.
Check out this for some more details on what it is doing.
http://i.imgur.com/LsSf7c7.png
Here you can see an Aikar Timings Report that backs up the report from WarmRoast
https://timings.aikar.co/v2/?id=43320e34dd6842fc9ada150bc8d5d80d&section=lag
For comparison, our OC networks use no noticable amount of CPU time, and this amount of CPU time is the equivalent of like 20K buildcraft pipes.
Is this behavior expected and normal?
Do you think that it could be reduced?

Ouch. Networks should be using as little CPU as possible. By the looks of it the slowest bit is the controller validator: it would probably be sensible for me to allow disabling it.
It it possible for you to give me the data behind the above image so I can see what else is slow? I'm seeing wiredmodems are taking 20% of tick time which is awful but confusing as they don't do much. I'll see if there is a way prevent cables from ticking too.

I am currently in the process of destroying a MASSIVE network (see #117)
This network is over 4000 blocks big...I can't even believe my players would create a network this big but don't realize that it doesn't even really work since there's a limit on how far data can be sent...

https://timings.aikar.co/v2/?id=7395aa5c664548c6ac32f5ff0e79d210 The network was removed, and you can see a noticeable difference.

Well this shouldn't be too hard to reproduce 😄: just create a lot of nodes.

I think this is a little bit more than just "a lot" of nodes...hahaha.
If you're interested in finding out what else may be causing lag, check out WarmRoast at https://github.com/sk89q/WarmRoast, it is the profiler I used to figure out what the source of the lag was.
Sponge also has Aikar's timing system built in, so you could use that as well by simply running /sponge timings report, and it should automatically upload the timings report to his site.

So a quick /fill ~ ~ ~ ~50 ~ ~50 computercraft:CC-Cable 12 (create a lot of interconnected cabled) confirmed my suspicions: the network controller is slow. I've set it to be disabled by default.
However this hasn't solved the problem: my network of ~10000 nodes takes about 100 seconds when a node is destroyed. This is obviously not great.

The above commit says it all: I've done fair rewrite of the network controller which reduces a lot of unnecessary calls.

Sweet! Thanks!


Set compilation flags for different build types with Clang

Description

Clang compiler flags were not added
Because of this, no flags were set for RelWithDebInfo or
any other build types
Update tqperf test script for Jenkins CI

update tqperf GitHub URL
mod files are now into two directories, need to use mod + modx

How to test this?
module load unstable gcc llvm cmake python
cmake ..

-- Configured CoreNEURON 1.0
--
-- You can now build CoreNEURON using:
--   cmake --build . --parallel 8 [--target TARGET]
-- You might want to adjust the number of parallel build jobs for your system.
-- Some non-default targets you might want to build:
-- --------------------+--------------------------------------------------------
--  Target             |   Description
-- --------------------+--------------------------------------------------------
-- install             | Will install CoreNEURON to: /usr/local
-- docs                | Build full docs. Calls targets: doxygen, sphinx
-- --------------------+--------------------------------------------------------
--  Build option       | Status
-- --------------------+--------------------------------------------------------
-- CXX COMPILER        | /gpfs/bbp.cscs.ch/ssd/apps/bsd/2021-11/stage_externals/install_gcc-11.2.0-skylake/llvm-13.0.0-lvcrm6/bin/clang++
-- COMPILE FLAGS       |  -fopenmp=libomp   -g  -O2 -std=c++14

Previously -g  -O2  were not added.
Test System

System: BB5
Compiler: LLVM
Backend: CPU

The remaining Jenkins failure looks related to https://github.com/neuronsimulator/tqperf/commit/9dbb4e68bd4c31db904c3717dbe4bcba6a108b06#diff-afb9814ace89cfe422329aa50414e7a8b75b0a7d88df9a2efd6c283af46d5d59.


Setting opacity in custom.css

I am using a custom stylesheet to add more colors and adapt some other properties.
I would like to be able to set the opacity of the default theme colors, but can't find a solution. I think I tried all possible combinations of curly brackets around the background color entry and I can't get it to work. Do you know how to make it work?
custom.css looks like the following:
QPushButton {{
color: {QTMATERIAL_PRIMARYTEXTCOLOR};
background-color: {{{QTMATERIAL_PRIMARYCOLOR}|opacity(0.4)}};
}}
And I used it in PyQt5:
apply_stylesheet(app, theme='./resources/my_theme.xml')
stylesheet = app.styleSheet()
with open('./resources/custom.css') as file:
app.setStyleSheet(stylesheet + file.read().format(**os.environ))
I am using python 3.8.10
Thank you so much for the great package.

I found the answer to my problem. Maybe it is useful for someone else as well.
Python changed how **.osenviron works. From  "PEP 584 -- Add Union Operators To dict" in python 3.9 it becomes possible to use the syntax with the |-operator. Before two dictionaries are merged with "," a comma.
So the solution was: background-color: {{ {QTMATERIAL_PRIMARYCOLOR}, opacity(0.4)}};


GUACAMOLE-1239: Add case-sensitivity settings to permissions mappers and services

Next round of fixes for case-sensitivity stuff in the JDBC module.
Opening as a draft for the moment while I verify that the changes I've made will actually work consistently for username case-sensitivity.

@necouchman I found another issue related to the case sensitive with the quick connect extension.
It is still present on your branch:
Oct 14 08:28:46 guacamole.host server[3886265]: 08:28:46.647 [http-nio-8080-exec-4] DEBUG o.a.g.event.EventLoggingListener - User "corentin" (authenticated by "openid") successfully accessed/retrieved connection "0" within "quickconnect" (currently named "ssh://<IP_ADDRESS>/")
Oct 14 08:28:46 guacamole.host server[3886265]: 14-Oct-2024 08:28:46.852 SEVERE [http-nio-8080-exec-14] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
Oct 14 08:28:46 guacamole.host server[3886265]:         java.lang.NullPointerException
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.guacamole.auth.jdbc.HistoryTrackingConnection.connect(HistoryTrackingConnection.java:109)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.guacamole.net.auth.DelegatingConnection.connect(DelegatingConnection.java:160)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.guacamole.net.auth.DelegatingConnection.connect(DelegatingConnection.java:171)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.guacamole.net.auth.TokenInjectingConnection.connect(TokenInjectingConnection.java:115)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.guacamole.net.auth.DelegatingConnection.connect(DelegatingConnection.java:160)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.guacamole.net.auth.DelegatingConnection.connect(DelegatingConnection.java:171)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.guacamole.tunnel.TunnelRequestService.createConnectedTunnel(TunnelRequestService.java:216)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.guacamole.tunnel.TunnelRequestService.createTunnel(TunnelRequestService.java:352)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.guacamole.tunnel.websocket.RestrictedGuacamoleWebSocketTunnelEndpoint.createTunnel(RestrictedGuacamoleWebSocketTunnelEndpoint.java:113)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.guacamole.websocket.GuacamoleWebSocketTunnelEndpoint.onOpen(GuacamoleWebSocketTunnelEndpoint.java:200)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.init(WsHttpUpgradeHandler.java:131)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:970)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1786)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
Oct 14 08:28:46 guacamole.host server[3886265]:                 at java.base/java.lang.Thread.run(Thread.java:829)
Oct 14 08:28:46 guacamole.host server[3886265]: 08:28:46.989 [http-nio-8080-exec-10] WARN  o.a.g.a.mysql.conf.MySQLEnvironment - You have enabled case-sensitive usernames; however, MySQL's default collations do not support case-sensitive string comparisons. If you really want case-sensitive usernames you will need to configure your database appropriately.

HistoryTrackingConnection.java:109
        connectionRecordMapper.insert(connectionRecordModel,
                environment.getCaseSensitiveUsernames());

The extension works on an instance without auth-jdbc.
Can you take a look please?

@corentin-soriano It looks like maybe you're not using the latest git staging/1.6.0 version after the merge of the latest round of changes? Specifically, the warning about having enabled case-sensitive usernames was moved so that it only occurs during module loading, and not at each call, so you shouldn't have that warning right below the connection attempt, which indicates you may have an older version. I'll still test it out and see what happens with that extension in my environment.
Thank you for the continued testing and reporting these issues!!

@corentin-soriano Okay, I've corrected the latest issue you identified with non-JDBC connections inserting history records into the database in this pull request.
@mike-jumper You might take a look and make sure that what I did is sane - I couldn't pull the JDBCEnvironment injection into the HistoryTrackingConnection class, so I ended up using the isCaseSensitive() method from the currentUser. I think this is sane, but let me know if anything seems off about that...
I've also tested out things like creating users, creating connections, assigning permissions, etc., and I'm not seeing any issues, so I'm going to mark this as ready to review. I'll continue testing a few other scenarios - enabling/disabling case sensitivity, add some usernames with mixed case, etc., and see if I can break anything else.

@necouchman I no longer encounter the issue, thank you!

@mike-jumper You might take a look and make sure that what I did is sane - I couldn't pull the JDBCEnvironment injection into the HistoryTrackingConnection class, so I ended up using the isCaseSensitive() method from the currentUser. I think this is sane, but let me know if anything seems off about that...

It looks like this should work, but it's a little goofy to be reaching through the user to get access to the environment. Consider just injecting the environment into the UserContext, which you can do by using a factory when it's constructed.

Thanks @jmuehlner and @mike-jumper - a question comes to mind before I pursue a particular solution: In these situations, which environment should the case-(in)sensitivity be pulled from? Since the HistoryTrackingConnection is decorating another Connection via the HistoryTrackingUserContext (in the case of Corentin's example, the QuickConnect user context and connections), should the case sensitivity be pulled from the 1) the JDBC extension, 2) the QuickConnect extension, or 3) the global setting? My inclination is to say 2 - it should come from the decorated class(es)/extension, and not from the decorating extension, but curious what you think?

The current approach with the various *-case-sensitive-usernames properties is that the property dictates how the relevant extension handles username comparisons, regardless of how the authenticating extension may handle username comparisons. I think the only way to be consistent with that logic would be for HistoryTrackingConnection to honor only the value from the *-case-sensitive-usernames property of the extension that defines that instance of HistoryTrackingConnection.
I also think it would make sense to allow the authenticating extension to dictate how the identifiers it presents should be compared (isCaseSensitive()), but that would be different semantics from what we currently have here.
To switch over to that approach, the other cases where case sensitivity is handled would need to be updated to honor isCaseSensitive() instead of relying purely on the configuration property, and care would need to be taken to make sure a case-insensitive authentication provider can't be used to escalate privileges (for example: by creating an unprivileged GuAcAdMiN user in some case-insensitive auth system, logging in as that user, and inheriting the permissions of guacadmin).
The current approach is less automatic, but I think that's a Good Thing, since any change from the default, strict behavior must be explicitly requested by the admin.

The current approach with the various *-case-sensitive-usernames properties is that the property dictates how the relevant extension handles username comparisons, regardless of how the authenticating extension may handle username comparisons. I think the only way to be consistent with that logic would be for HistoryTrackingConnection to honor only the value from the *-case-sensitive-usernames property of the extension that defines that instance of HistoryTrackingConnection.

So, if I'm understanding what you're saying correctly, given the current way these properties are interpreted, HistoryTrackingConnection should pull the value from the JDBCEnvironment?

I also think it would make sense to allow the authenticating extension to dictate how the identifiers it presents should be compared (isCaseSensitive()), but that would be different semantics from what we currently have here.
To switch over to that approach, the other cases where case sensitivity is handled would need to be updated to honor isCaseSensitive() instead of relying purely on the configuration property, and care would need to be taken to make sure a case-insensitive authentication provider can't be used to escalate privileges (for example: by creating an unprivileged GuAcAdMiN user in some case-insensitive auth system, logging in as that user, and inheriting the permissions of guacadmin).
The current approach is less automatic, but I think that's a Good Thing, since any change from the default, strict behavior must be explicitly requested by the admin.

Yeah, seems like this might be a future enhancement with a lot more thought and effort putting into doing it safely and with as little surprise as possible.

The current approach with the various *-case-sensitive-usernames properties is that the property dictates how the relevant extension handles username comparisons, regardless of how the authenticating extension may handle username comparisons. I think the only way to be consistent with that logic would be for HistoryTrackingConnection to honor only the value from the *-case-sensitive-usernames property of the extension that defines that instance of HistoryTrackingConnection.

So, if I'm understanding what you're saying correctly, given the current way these properties are interpreted, HistoryTrackingConnection should pull the value from the JDBCEnvironment?

Actually, maybe I'm just confused, here. Given Corentin's example:

guacamole-auth-jdbc is the Authenticating extension.
guacamole-auth-quickconnect is defining the Connection that is ultimately wrapped inside the HistoryTrackingConnection

So, you're saying that the extension that defines the Connection - quickconnect in this case - would be the one that defines the case-sensitivity for that particular wrapped object, regardless of the jdbc extension's setting?

Hm ... maybe what I was thinking is actually backwards, and we should instead:

Use the *-case-sensitive-usernames properties to dictate only whether users authenticating via that extension have case-sensitive usernames.
Extensions that consume usernames from other extensions should honor the isCaseSensitive() value when comparing identities.
In the equality comparison for AbstractIdentifiable, we need some sane way to resolve what happens if you compare a case-sensitive identifier with a case-insensitive identifier.

Otherwise things stop making sense. The JSON auth has a json-case-sensitive-usernames property but does not consume external identifiers, so the intent of that property has to be declaring the intent of what other extensions should do with identifiers from JSON auth. For that to be useful, we would need to meaningfully consume isCaseSensitive(), but most of the logic around consuming external identifiers on the database side depends solely on the database's *-case-sensitive-usernames property.
I'm starting to thing these changes have part of the right idea, and we need to change the rest to match.

Hm ... maybe what I was thinking is actually backwards, and we should instead:

Use the *-case-sensitive-usernames properties to dictate only whether users authenticating via that extension have case-sensitive usernames.
Extensions that consume usernames from other extensions should honor the isCaseSensitive() value when comparing identities.

I'll go back through the previous changes and see what needs to be done to rework things using this logic.

In the equality comparison for AbstractIdentifiable, we need some sane way to resolve what happens if you compare a case-sensitive identifier with a case-insensitive identifier.

I've pushed a commit that I think tackles this particular issue without too much hassle - let me know if that looks okay to you.

Otherwise things stop making sense. The JSON auth has a json-case-sensitive-usernames property but does not consume external identifiers, so the intent of that property has to be declaring the intent of what other extensions should do with identifiers from JSON auth. For that to be useful, we would need to meaningfully consume isCaseSensitive(), but most of the logic around consuming external identifiers on the database side depends solely on the database's *-case-sensitive-usernames property.
I'm starting to thing these changes have part of the right idea, and we need to change the rest to match.

Yeah, this makes sense to me. I'll review and see what changes need to be made to implement this logic.

Otherwise things stop making sense. The JSON auth has a json-case-sensitive-usernames property but does not consume external identifiers, so the intent of that property has to be declaring the intent of what other extensions should do with identifiers from JSON auth. For that to be useful, we would need to meaningfully consume isCaseSensitive(), but most of the logic around consuming external identifiers on the database side depends solely on the database's *-case-sensitive-usernames property.
I'm starting to thing these changes have part of the right idea, and we need to change the rest to match.

Yeah, this makes sense to me. I'll review and see what changes need to be made to implement this logic.

So, if I'm thinking about this correctly, what this looks like a little more concretely is:

The only reference to the various Environment calls for things like postgresql-case-sensitive-usernames would be in the JDBC User classes, to determine if the User identifiers should be treated as case-sensitive.
In all of the various Service instances in the JDBC module (e.g. ModeledDirectoryObjectService), the call should not be to the Environment, but to the User object and whether it is case-(in)sensitive.

Does that sound right?

Yes and no. That would be an alternative and consistent approach. Taking a mammoth step back to the beginning, I think we have two mutually-exclusive possible approaches:

Identifier case sensitivity is defined by the extension consuming the identifier.

This is what you're describing above and what I was describing initially.
This is invitingly simple, particularly for cases where there's only one thing consuming identifiers.
This feels a little odd, since it's the producer and not the consumer that determines the intent of the identifier, but it does mean there is no ambiguity in handling identifier comparisons.
This might make sense only in light of a single, global property for case sensitivity ... which is admittedly also invitingly simple.

Identifier case sensitivity is defined by the extension producing the identifier.

This is what I was describing most recently.
This is more complex, but allows the intent of an identifier to be communicated.
This feels cleaner, but introduces ambiguity around how case-sensitive and case-insensitive identifiers could be compared. Then again, encountering that explicit ambiguity might be an opportunity to log a warning that makes identifier case sensitivity mismatches easier to notice and remedy.

Migrating to the former would mean getting rid of isCaseSensitive(), instead relying purely on configuration properties determining how usernames should be handled, and considering whether there should be any extension-specific case sensitivity properties (since having intentionally mixed case sensitivity would be bad practice).
Migrating to the latter would mean keeping isCaseSensitive(), clarifying the properties as controlling the case sensitivity of the usernames of users authenticated by and/or stored by that extension.
I find myself flipping back and forth between these without a clear answer as to which is truly best. I suspect that's probably also why the current approach is a sort of mix of these - they're both reasonable approaches.

Then again ... it's hard to argue against the sheer simplicity of losing isCaseSensitive() and just having case-sensitive-usernames ...

@mike-jumper @jmuehlner : I've taken a stab at an approach that should make the source for case-sensitivity more consistent across different login modules - essentially, what I've tried to do, is make sure that, whenever and wherever possible, particularly within the JDBC module, the source for the case sensitivity setting comes from the logged in user. The logged in user, in turn will pull from the environment for the current authentication module, which will either be that particular extension's configuration property or the global configuration property.
I just finished this up and have verified that it compiles - tomorrow I'll run it through some testing to make sure that the various use-cases that others identified that were broken are still functional.
If you spot any flaws in my logic, please give a shout. And, if we need to close it out and just go to a monolithic enable/disable option and scrap the whole per-extension setting, I can give that a run, too.
:weary:

I think we do need to switch over to the monolithic enable/disable option.
As I review, I'm running into things like handling of usernames within history records, and there doesn't seem to be any way we can handle differences in case sensitivity sanely unless there is a platform-wide option that states how all installed extensions are expected to behave.
For example, let's say there are two authentication systems installed:

LDAP (configured to be case-insensitive)
PostgreSQL (configured to be case-sensitive)

If a user SOMEONE logs in with LDAP and accesses a connection, and then a user someone logs into PostgreSQL and accesses another connection, are they the same user? If a group in PostgreSQL includes the PostgreSQL user someone, does that include the LDAP user SOMEONE?
With a platform-wide option, things are completely unambiguous and everything is in agreement. With extension-specific options, things make sense as long as everything is manually configured to be in agreement, but stop making sense once there is any disagreement between extensions.

I think we do need to switch over to the monolithic enable/disable option (and +1 on the 😩).
As I review, I'm running into things like handling of usernames within history records, and there doesn't seem to be any way we can handle differences in case sensitivity sanely unless there is only the platform-wide option that states how all usernames are to be interpreted.
For example, let's say there are two authentication systems installed:

LDAP (configured to be case-insensitive)
PostgreSQL (configured to be case-sensitive)

If a user SOMEONE logs in with LDAP and accesses a connection, and then a user someone logs into PostgreSQL and accesses another connection, are they the same user? If a group in PostgreSQL includes the PostgreSQL user someone, does that include the LDAP user SOMEONE?
With a platform-wide option, things are completely unambiguous and everything is in agreement. With extension-specific options, things make sense as long as everything is manually configured to be in agreement, but stop making sense once there is any disagreement between extensions.

Okay, I'll switch it up and go that route. It pains me a little bit to take away the flexibility of being able to choose on a per-extension basis, but the example you give above highlights the challenges with even making that available and the confusion that might arise were someone to try to debug that sort of situation.
The other thing that has continued to nag at the back of my mind is that I think we (ultimately) need to make the same option available for group names. This effort has focused almost exclusively on usernames, but I cannot help but think that the expectation of making usernames case-insensitive is going to easily make someone think that group names also ought to be case-insensitive. Thoughts on expanding the scope from just User objects to include UserGroup objects in this?

... Thoughts on expanding the scope from just User objects to include UserGroup objects in this?

I agree. I'm sure this will be necessary and it makes sense to include this as part of the general configurable case sensitivity effort.

... Thoughts on expanding the scope from just User objects to include UserGroup objects in this?

I agree. I'm sure this will be necessary and it makes sense to include this as part of the general configurable case sensitivity effort.

Okay - I think I've completed the re-work of the user code to only pull from the global configuration value, and removed all of the extension-based options. I have left the bits in place, mainly in the JDBC module, that pull from the user.isCaseSensitive() method, rather than pulling the environment directly - this tends to be a bit easier than injecting the environment everywhere it might be required, and also keeps the concern of whether or not a User identifier is case sensitive as part of the User object.
I'll see if I can knock the UserGroup portions out real quick - shouldn't be too terribly difficult.
And then...testing...

I'll see if I can knock the UserGroup portions out real quick - shouldn't be too terribly difficult.
And then...testing...

Working through the UserGroup stuff this weekend. It's a little more involved that I anticipated...

I'll see if I can knock the UserGroup portions out real quick - shouldn't be too terribly difficult.
And then...testing...

Working through the UserGroup stuff this weekend. It's a little more involved that I anticipated...

Almost there. Wrapping things up today. :crossed_fingers:

I'll see if I can knock the UserGroup portions out real quick - shouldn't be too terribly difficult.
And then...testing...

Working through the UserGroup stuff this weekend. It's a little more involved that I anticipated...

Almost there. Wrapping things up today. 🤞

Okay...here are the changes. I am :100: certain that I have made multiple mistakes. I have done :zero: testing after finishing these changes - my eyes are crossing from SO. MUCH. XML - while it compiles right now, I very much doubt that it will actually work out of the gate. There are also several style issues that need fixing. But, any overall concerns or comments about the approach, let me know.

my eyes are crossing from SO. MUCH. XML

Oof, I don't blame them, but thanks for doing this. I think we're on the right path.

my eyes are crossing from SO. MUCH. XML

Oof, I don't blame them, but thanks for doing this. I think we're on the right path.

Sounds good. I'm working through testing, now, and have already corrected a couple of issues, which I'll push, here, shortly.

I've removed this from draft state, as I've done several rounds of testing, fixed several items, and am cautiously optimistic that it is working as intended and that I've corrected the typos. If others are inclined to test, that would be welcome - so far I've only tested with PostgreSQL, as that is my DB of choice. I'll try to spin up MySQL and SQL Server at some point, here, soon, and test with those.


abusehelper.bots.archivebot: General code cleanup

General code cleanup for abusehelper.bots.archivebot. Most notable things:

Add documentation to _encode_room_jid docstrings.
Underscore private functions.
The commit message for a8f873707b34b1fd96dec16feaf929705124fafa is not complete, the commit also aims to simplify rotation logic.

Looks good.


Fixed a bug in embedding SDK dependencies.

Fixed issue of embedding SDK dependency was not working as expected.
Updated test cases to verify, embed SDK dependency use case.
Updated test cases to verify, do not link Package dependency use case.
Fixes:
https://github.com/yonaskolb/XcodeGen/issues/905

@yonaskolb Resolved :)


Still needs more work given container and interaction predictions weren't in but it should be easier to add now.

Hitscan moved into a prototype instead of a component
Predicted camera recoil and muzzle flash. Currently hitscan lasers aren't predicted because it needs seeded randomness and I out of scoped it
Removed RangedWeapon and moved the functionality elsewhere
Refactored the overall gun structure to be less messy. Shooting goes through the respective client / server-side systems. Inheritance is now SharedRangedWeapon > SharedWeaponType > Client / Server weapon type.
Audio variations to sounds and made them easier to adjust (const floats)
Support for firerates higher than tickrate
When a revolver is spun the CurrentSlot is now hidden until you shoot (russian roulette)
Removed AmmoBox component

Still TODO for guns:

Predicted interactions
Predicted containers
Predicted hitscan lasers
Predicted entity spawning (low prio)
inhand visualizers

Functionality should be identical, it was mostly a refactor. Because I moved some stuff around it might also not reflect exp, PJB and py01's work that's still in there (IItemStatus, Linspace, etc.)
I'm still kind of suss on the shooting code so if someone could double-check that especially that'd be great (it's under the client / server-side RangedWeaponSystems + SharedRangedWeapon).

I have containers theoretically predicted in a branch, but I haven't tested it yet.
https://github.com/PJB3005/space-station-14/tree/20-10-04-container-predict
https://github.com/PJB3005/space-station-14-content/tree/20-10-04-container-predict

I have containers theoretically predicted in a branch, but I haven't tested it yet.
https://github.com/PJB3005/space-station-14/tree/20-10-04-container-predict
https://github.com/PJB3005/space-station-14-content/tree/20-10-04-container-predict

I can give it a try though without interaction as well it doesn't allow the interactions to be fully predicted.

(Also build's failing because it needs RT update I think).

(God damnit I forgot the clumsy check still)

If someone wants to pick this up LMK as I won't get a chance to finish it for a few months. It needs interaction + container prediction added and likely further work on the ranged weapon systems.

Closing for the time being until I can come back to it (80% of the work is done overall as it needs interaction prediction + entity spawning prediction to work really well).

Closing for the time being until I can come back to it (80% of the work is done overall as it needs interaction prediction + entity spawning prediction to work really well).


The box of the 2nd select covers the list of the 1st select

dear Support
The box of the 2nd select covers the list of the 1st select
Regards,
Xavier

Hi David,
I sent you a second mail to show you the problem, it was a print screen showing that the second box hided the list box of the 1st box
Can you please help ?
Thanks and regards
Xavier
From: David Zeller<EMAIL_ADDRESS>Sent: Wednesday, December 03, 2014 3:44 PM
To: zellerda/Tokenize
Cc: Xavier FLAHAUT
Subject: Re: [Tokenize] The box of the 2nd select covers the list of the 1st select (#6)
Closed #6https://github.com/zellerda/Tokenize/issues/6.
—
Reply to this email directly or view it on GitHubhttps://github.com/zellerda/Tokenize/issues/6#event-201969519.


Trying to add the environment to the manifest for maintainability

@joel-stobart I assume this is good to merge? Before I do, it's definitely not an issue to include the access creds right? It's not protecting sensitive info, just there to stop people finding it via Google.


Change iBands function : deviation parameter int -> double

Hi, could you make a new version with iBands function using deviation parameter as a double in place of int as it is in MT4 ?

Hi, sure. I will update type of deviation parameter of the function.


Vtol weathervane cleaned up history

Fixes https://github.com/PX4/Firmware/issues/3679
@sanderux As discussed I cleaned up the history so that we only remain with three commits.
The diff to the old branch is zero so everything should be inside. Will give this a test in SITL and Ada can maybe test fly it today.
@AndreasAntener  FYI

Please delete the old branch (referenced above ) if there aren't any objections.

Done, looks good

@sanderux @AndreasAntener This is flight tested in SITL for both landing and loiter modes. Checked the log files, it seems to do the right thing.

Rain just stopped me right after flashing this branch... I hope the weather is good for you Sander tomorrow :)

There is some wind but that would be the point for this pr. Should stay dry

@sanderux @AndreasAntener Parameters to activate this are
VT_WV_LND_EN enable mode for landing waypoint
VT_WV_LTR_EN enable mode for loiter items
VT_WV_YAWR_SCL scale factor for desired yaw_rate setpoint

VT_WV_LTR_EN doesn't seem to be used anywhere

@AndreasAntener https://github.com/PX4/Firmware/blob/vtol_weather_vane/src/modules/navigator/mission_block.cpp#L75

In mission block

Funny, QGC didn't show me this on the field, anyway, it's there :)

Log from weathervane loiter test: http://logs.uaventure.com/view/t7a2AZB3WHgRZsDjGCEJpi

This looks good. Let's address my 2 comments. We should check it on landing as well even though I don't think it's problematic.

Addressed comment 1

This should address the feed forward

Merged!


Any plans to update the Docker Image?

Hi,
do you have any plans to update your Docker image to the latest Projeqtor version (V10.4.2)?
If it is only to update the Dockerfile I could try providing a small pull request.
Thanks and best regards,
Oliver

Hi, I've updated the version and fixed some bugs in the Dockerfile along the way.
There shouldn't be any regressions regarding the rest of the configuration (we're switching to PHP 8.2 starting from version 10.3.0).
I need to find a solution to automatically keep the Docker image version up to date.
But apart from that, for future versions, feel free to submit a pull request if I forget to do it!

Thanks a lot for the fast update!


Labels/tags are broken in the new Gitlab

OS version: Windows 10
Browser version: Chrome 86
Extension version: 1.66.10

Relevant integration (if any):

gitlab.com
🐛 Describe the bug

From a User:

In new gtitlab version x-s were added to gitlab labels and now toggl plugin can't read the labels properly.

It seems that the extension is reading the labels wrong and adding it as such to Toggl Track. Where the X has been added to remove it, Toggl Track imports it as "Remove label"
How the labels look in Gitlab:

How they get imported in Toggl Track:

Expected behaviour

Labels should be added as Tags the way they are displayed in Gitlab.
Steps to reproduce

Steps to reproduce the behaviour:

Go to Gitlab
Enable the integration in extension
Add labels in Gitlab
Start the timer and see how Toggl Track imported them

Other details or context

case reference

Submitted https://github.com/toggl/toggl-button/pull/1878

Hi @zdericnina, sorry for the question on the closed issue but how did you get the start button under Time tracking I only have it near the closing issue button ?


Sentence Hiding in a lesson without sound.

Problem occurs since just now.
The lesson is https://www.duolingo.com/skill/es/Healthcare/4

In the Addon settings -> Sentence hiding all checkboxes are checked.
Shortcut Ctrl+Alt+H doesnt work, so I cant turn off the blur.
Firefox version 86.0

Thanks for the report, I'll look into it.

I forgot to say, I THINK that I pushed the "enable/disable text hiding"-button in the question previous to this one.

@Origitalus Have you encountered this issue again since reporting it, or was it just that one time?
I cannot seem to be able to reproduce it. If you can get it to happen again, could you give instructions on how to reproduce the issue.
I will see if there is anything that looks like it could cause this in the code. The only thing that comes to mind is that when you change between questions, both the previous (now marked) question and the new question are in the page briefly for the transition. There is a chance that the wrong question is being selected when the text is being hidden, but there would have to be some strange timings going on.

It was just this one time. I will write here if I encounter it again.

It's back!

The lesson before had sound and hidden text. And I used the button to unhide the text and then hide it again. Then again unhide and hide again. Then again. So now with the text hidden, I wrote my text and pressed enter and it was correct. The rest is history.

Okay, thank you for the update and the details of the actions leading up to this. I'll try that and see if I can also get it happen

I got it happen! Though not with the method you outlined.
I revealed the text, typed the correct answer, marked it, then clicked the button again to hide the text before clicking the next question.
Normally when the sentence is marked right or wrong, a blurred sentence is revealed. As such the sentence hiding feature is turned off when the next sentence is shown. If the next question should not be hidden, nothing happens as it is current off. The issue was that by enabling the feature when the sentence was already marked, the feature is left enabled for the next question. So when we see that is shouldn't be hidden we shouldn't do nothing as before, but make sure the feature is disabled for this sentence.
This has been fixed in 60d9cc9, and will be released as part of v2.0.4 shortly.
Thanks again for the report and sorry it took so long to get round to fixing it.

I thought you fixed it a long time ago, because it didnt bug me for a long time. Thanks.


Calendar custom rows offsets months

Version
7.1.7
Issue
Using a custom ConfigurationParameters with numberOfRows = 5, the calendar gets more and more offset as I scroll through the months.
Eventually I get to a month with the "out dates" in the middle of the page.
Images
Correct (Start) state

Weird State

Expected Behavior
I would expect the date offsets to maintain the correct placement, with any in dates being at the start, and out dates being at the end, never in the middle.
Steps to reproduce

Create calendar by following tutorial
Use following ConfigurationParameters

return ConfigurationParameters(startDate: startDate, endDate: endDate, numberOfRows: 5, generateInDates: .forAllMonths, generateOutDates: .tillEndOfGrid)

i'll look at this in a bit.
But can you tell me what your scrolling mode is?
If you dont know what this is, or have never set one, then chances are that you are on the default which is .StopAtEachFrame
Can you instead set it to .stopAtEachSection ?
In your viewDidLoad, put this
calendarView.scrollingMode = .stopAtEachSection

If this resolves the issue, then let me know

That seems to have fixed it 👍 I'm not sure if that should go anywhere for people in the future to reference (besides this issue), but it worked.

@bryancaragay
ok if this fixed it then what happened was this:
You have a vertical calendar with the scroll mode set to .StopAtEachFrame.
This means it will stop a fixed 300 points (assuming your calendarView is 300 high) on each scroll.
Because you months have a varying number of sizes (not all month have the same size), scrolling with this fixed mode will offset your screen badly. So in a case like yoursm you just want to scroll to each section.  BTW, i am currently re-writing the scroll to section code to make the scrolling feel more "snappy".

closing this issue.


Add logging if safari test is started with no keyboard

In the case that the user does not have the keyboard toggled on, Safari will not be able to load. Add logging for this case.

change LGTM when you've determined it's effective!


Workload Query

Hi there!
I have a question about CoreWorkloads loacted in /ycsb/workloads. Is it possible to access to query(s) of each workload? Where are they defined?
Thanks

You can view the workload files to see which properties are defined.
Check this link to the documented description of the core workloads: https://github.com/brianfrankcooper/YCSB/wiki/Core-Workloads

Thanks for the answer. I've already read the documentation. So let me rephrase my question. In Apache JMeter database performance test case, user can define explicit query but is it possible in YCSB?

I haven't used JMeter, but if I understand your question correctly, the answer is no.  You cannot define the query that will be used.  You can use various properties to control the proportion of reads.  As well, you can change the request distribution from uniform, zipfian, latest, or hotspot.  All of these reads query on the "key" of the record.
If you want a different query, you would have to augment the code manually.  YCSB would give you a starting point for performing multi-threaded operations and reporting the performance results.


Be able to add a Watson Assistant instance via deployer

I'd like to automate WA instance creation.
Currently deployer can install the WA service, but user have to manually create new instance of the service.
Describe the solution you'd like
I'd like to have additional set of the parameters in the pipeline that would be used to create instance of WA after the service is installed.
Describe alternatives you've considered
As alternative user can manually create new instance after CP4D deployment. The problem is that it is manual task and if one would like to have complete, automated repeatable process to setup WA in CP4D, it is not possible and would require additional tooling.

Added creating instance for:

DMC
Watson Assistant
Watson Discovery


Limit total number of pods created by the controller

Summary
Kubernetes clusters often max out with a number of scheduled running pods.  For us, limiting this to 5k allow us to protect ourselves.
Use Cases
Prevent broken clusters. Protect other cluster users.

Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

@jessesuen @sarabala1979 thoughts?

This would be very welcome, but definitely should be configurable. With the latest scalability improvements in v2.12 we were finally able to hit over 12K concurrent pods on our EKS cluster yesterday, and that made us very happy.

Pods are created at the workflow level, not at the global controller level.
option 1:
Workflow can have podCreateStrategy which user configure for pod creation limit with delay. We need to consider 10s reconciliation
podCreateStrategy:
    maxCreation: 500
    intervel : 2s

option 2:
Refactor Pod creation to the common queue based worker with the rate limit.
option 3:
I am not sure we can configure the API rate limit on k8s API server

This can be achieved using resource quotas. While resource quotas are limited, not whole cluster, I hope that works for most use cases:
https://kubernetes.io/docs/concepts/policy/resource-quotas/
I think it would be like:
apiVersion: v1
kind: ResourceQuota
metadata:
  name: max-workflows
spec:
  hard:
    count/workflows.argoproj.io: "0"

Hi @alexec
Are you planning to implement this one?
We find this feature very important.
We had issues when the number of pods in the cluster reached above a certain number. Hence, a global parallelism value that dictates the total number of pods the controller can generate, will be very helpful.

There is already feature called parallelism that limits the number of workflows (not pods) reconciling you could use. You could use resource quotas to limit pods and workflows on a per namespace basis. We do not plan to implement a global limit, but you’re welcome to submit a PR.

@alexec  Hello, as this issue has been fully fixed?

@adeniyistephen no. Not implemeted. Would you like to help by submitting a PR?

@alexec Awesome, Yes! I would love to, I submitted it for my #7877 issue.

@adeniyistephen are you working on this issue?

Not yet, I haven't started yet... I have been quite busy, I would take on it soonish, but if someone wants to jump on it. Please feel free.

/assign @adeniyistephen

@terrytangyuan I'm still interested in this issue, I have been faced with work and I haven't had time to dive into it more. Can I be reassigned to it?

You can just work on it without being assigned

@alexec I have made changes to limit the number of workflows with ResourceQuota and have the following observations:

When the hard limit is set for count/workflows.argoproj.io, it takes completed workflows also into account. So let's say the limit is set to 5k, and the count of completed workflows is equal to 5k, then we cannot create a new workflow until we delete one of the completed workflows.
This is different in the case of system resources like pods where the resource quota description says The total number of Pods in a non-terminal state that can exist in the namespace. A pod is in a terminal state if .status.phase in (Failed, Succeeded) is true. So here the count is actually limiting the running pods.

Shall I go ahead with the above understanding? If yes, we might have to implement an auto workflow cleanup to make sure there is a quota left for new workflows.

@alexec Please take a look at the changes which addresses this issue in #9878

IMHO this issue is very critical, right now there is no way to prevent k8s API to be flooded by pods. If a developer forget to limit its workflows with parallelism or lock mechanisms, we as argo-workflow operators can't put a protection to prevent a pod flooding.


Invert selectors in input group

I am using Chrome 45.0.2454.10.
This issue persists in v3 and v4, when an input group contains only one <input type="text" class="form-control"/> element, it would lost the 100% width and renders all four corners without radius.
Another problem about the selector is when I add more than one addon at the same side, only :first-child and :last-child removes the border of the opposite side.
See this plunker for a demo.
This issue can be fixed by,

Adding width: 100% to .input-group.
Flipping :first-child selectors to :not(:last-child) in .form-control, .input-group-addon and .input-group-btn under .input-group
Flipping :last-child selectors to :not(:first-child) in .form-control, .input-group-addon and .input-group-btn under .input-group

Not sure if this introduces other issues, any ideas?

Hi @vicary!
You appear to have posted a live example (http://run.plnkr.co/plunks/Tud4LzDeDy8p3O6XetXk/), which is always a good first step. However, according to Bootlint, your example has some Bootstrap usage errors, which might potentially be causing your issue:

line 21, column 9: E015: Having multiple add-ons on a single side of an input group is not supported
W002: <head> is missing X-UA-Compatible <meta> tag that disables old IE compatibility modes
W003: <head> is missing viewport <meta> tag that enables responsiveness

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!
(Please note that this is a fully automated comment.)

when an input group contains only one <input type="text" class="form-control"/> element

There is no point in using an .input-group in that case. There's nothing to group together.

Another problem about the selector is when I add more than one addon at the same side

As noted by the bot, this is explicitly documented as not being supported:

We do not support multiple add-ons (.input-group-addon or .input-group-btn) on a single side.

My case is that multiple buttons and/or addons will be dynamically displayed based on the context of the textbox and other values of the same data model, one of the many possibilities is none of them are being shown.
Yes I am aware of the not supporting statement via the bot, but because these two features can be easily fixed, may I ask about the reason of the current approach?
If there are more generic concerns to prevent my patch, I am happy to close this and do it with my own custom CSS.

Overall, I'm in favor of this. I am sympathetic to how the lack of generality is annoying at the templating layer. Since Bootstrap v4 drops IE8 support, that means we can now utilize :not() (which requires IE9+) like you're suggesting.

Sounds good, should I make a PR?

CC: @mdo

If there's a better way, I'm in favor of it :D.

Should I include grunt generated files namely, dist/, docs/assets/, docs/dist/ in the PR?

@vicary Negatory. They just cause merge conflicts.

@cvrebert Affirmative.

Fixed by #18500.


Booleans always saved as default

Given the following setup:
jsonb_accessor :options,
                 categories: [:boolean, default: true],
                 questions: [:boolean, default: true],
                 locking_conditions: [:boolean, default: true],
                 visibility_conditions: [:boolean, default: true]

when submitting the following parameters (truncated to only relevant):
{ "categories"=>"1", "visibility_conditions"=>"0", "questions"=>"0", "locking_conditions"=>"0" }

the object gets saved with all true values. If I change the default to false they all get saved as false. If I remove the default no value gets saved.

Apologies, it turned out to be something unrelated.


fix: Fix a link in README

The link https://github.com/operator-framework/operator-sdk/blob/master/pkg/test/framework.go#L45 may be inaccurate because of the file changes.
Thus I think it is better to remove the line number in the link just like https://github.com/operator-framework/operator-sdk/pull/1617/files#diff-59ad6a5ff59239f33497d6206b778c43L329 does.
Please take a look, thanks for your time :smile:
Signed-off-by: Ce Gao<EMAIL_ADDRESS><!--

Before making a PR, please read our contributing guidelines https://github.com/operator-framework/operator-sdk/blob/master/CONTRIBUTING.MD

Note: Make sure your branch is rebase

/ok-to-test

@LiliC Thanks for your review.

/retest e2e-aws-ansible

/test e2e-aws-ansible

@gaocegege sorry about that, it should not fail, I reran it.  We should be able to merge after it passes.

@LiliC Thanks. I think there may be some flaky test cases.


Can I only evaluate English?

Thank you for sharing these good MOS evaluation codes.
Is English the only language available for MOS evaluation?

For the weight trained on chinese, please check out the README of the strong learner https://github.com/sarulab-speech/UTMOS22/blob/master/strong/README.md

Thank you for your answer.
I will try to use OOD strong model for Korean speech.
What GPU did you use during training? I would like to train and use it when it doesn't work well for korean speech.

We used single A100 GPU

Closing this as it seems to be completed
Feel free to reopen if necessary


I cant compile the source help me!

Describe your problem here.

Are you modding a build from source or with Lua?
Source
What is your build target?
Windows x64
Did you edit anything in this build? If so, mention or summarize your changes.
no. i didnt

yo download visual studio i will help ya, @NexIsDumb helped me

yo download visual studio i will help ya, @NexIsDumb helped me

hm tho i think this could mean smth else

@matepro260 are you trying to compile the main or experimental branch
what haxe version do you have?
and if you're trying to compile the experimental one did you run the .bat in the setup folder?


Upgrade flow

pharmer check cluster d1

checks for upgrades
addon upgrades
security fix, etc

-> User edits cluster Kubernetes version
-> pharmer apply cluster d1
Q:

SelfHosting ?

@sanjid133 , we should fold the check command into describe cluster. Like kube objects we can see events for that cluster.

[ ] only supports patch upgrade


Fixes #49 Only update shovels, policies, operator policies, and permissions…

… if the desired state and actual state are different

This is mostly a refactor so that each reconciler gets a addMissing/updateExisting/deleteUnknown function.


Add (optional) doc_auto_cfg attribute to generated library

In my crates, I currently use the following code snippet at the top of lib.rs:
#![cfg_attr(docs_rs, feature(doc_auto_cfg))]

For documentation builds built with the docs_rs configuration, this explicitly displays required features for modules/functions etc. without requiring additional attributes.
What do you think about adding this to the generated library?
In all my libraries using this, I use the following snippets in Cargo.toml to use this for the docs-rs build:
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docs_rs", "--generate-link-to-definition"]

Actually, I have issue building this locally without warnings with current nightly.
Adding the following snippet to Cargo.toml:
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(docs_rs)'] }

fixes the warning ,but the documentation still is not built properly.. In any case https://docs.rs/va108xx/0.3.0/va108xx/ shows the end result , with the documentation displaying where the rt feature is required.

After some more research:
It is sufficient to use
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

in the lib.rs. The docsrs configuration will be set by docs-rs automatically.
In the Cargo.toml
[package.metadata.docs.rs]
rustdoc-args = ["--generate-link-to-definition"]

is sufficient now.
The old way I used to build this locally does not work anymore. I tested this locally using
export RUSTDOCFLAGS="--cfg docsrs"
cargo +nightly doc --all-features  --open

the old way
cargo +nightly doc --all-features --config 'build.rustdocflags=["--cfg", "docsrs", "--generate-link-to-definition"]' --open

does not work anymore for some reason.


sendResponse from getMessage API

First and foremost, this project is amazing and a real lifesaver for my app.
I'm trying to await a response from the getMessage API but can't seem to find a way to do it. Using the messages API I can, but I'm unsure how to use typescript to guard the payload with it. How can I leverage the ability to send a response, while also leveraging the ability to type check payloads?
For example:
import { getMessage } from '@extend-chrome/messages';

interface Payload {
  arg: 1;
}

export const [sendReady, readyStream, waitForReady] = getMessage<Payload>('READY');

// background
sendReady.then((response) => console.log(response)); // { ping: true }

// content
readyStream.subscribe(([{ arg }, sender], sendResponse)) => {
  sendResponse({ ping: true });

  OR

  return { ping: true };
});

Thank you!

@YanivSilberman Great question! To use a message response, pass a second type and an options object.
import { getMessage } from "@extend-chrome/messages";

interface Payload { arg: 1 }
interface ResponsePayload { ping: boolean }

export const [
  sendReady,
  readyStream,
  waitForReady, // this guards 👇 the response
] = getMessage<Payload, ResponsePayload>(
  "READY",
  { async: true } // 👈 this tells it to listen for a response
);

// background
sendReady.then((response) => console.log(response)); // { ping: true }

// content
readyStream.subscribe(
  // The args array will have 👇 a sendResponse function now
  ([{ arg }, sender, sendResponse]) => {
    sendResponse({ ping: true }); // call sendResponse to respond
  }
);

I'm so excited to hear that you are using this project! I personally can't imagine using Chrome extension messages without it. 😉
Check out rollup-plugin-chrome-extension if you get a chance. It saves me a lot of time as well.

@YanivSilberman Great question! To use a message response, pass a second type and an options object.
import { getMessage } from "@extend-chrome/messages";

interface Payload { arg: 1 }
interface ResponsePayload { ping: boolean }

export const [
  sendReady,
  readyStream,
  waitForReady, // this guards 👇 the response
] = getMessage<Payload, ResponsePayload>(
  "READY",
  { async: true } // 👈 this tells it to listen for a response
);

// background
sendReady.then((response) => console.log(response)); // { ping: true }

// content
readyStream.subscribe(
  // The args array will have 👇 a sendResponse function now
  ([{ arg }, sender, sendResponse]) => {
    sendResponse({ ping: true }); // call sendResponse to respond
  }
);

I'm so excited to hear that you are using this project! I personally can't imagine using Chrome extension messages without it. 😉
Check out rollup-plugin-chrome-extension if you get a chance. It saves me a lot of time as well.

Wow thanks for the prompt and detailed response! that's exactly what I needed. Cheers

Wow thanks for the prompt and detailed response! that's exactly what I needed. Cheers

Is there a way to sendResponse in subscribe after an async request? I'm getting Error: chrome.runtime.lastError is undefined from
apiQueryStream.subscribe(async ([{ query, variables, options }, _, sendResponse]) => {
    const response = await api.query({
      query,
      variables,
      ...options
    });

    sendResponse(response);
 });

Is there a way to sendResponse in subscribe after an async request? I'm getting Error: chrome.runtime.lastError is undefined from
apiQueryStream.subscribe(async ([{ query, variables, options }, _, sendResponse]) => {
    const response = await api.query({
      query,
      variables,
      ...options
    });

    sendResponse(response);
 });

That looks ok to me... Are you getting the error from inside the subscribe callback, or on the other side as a rejection from the sendMessage call?
It's hard to know what is happening without a minimum reproduction. I would definitely add a catch to that api.query() call. Maybe it's throwing.
Check the error object. It should have coreResponse and coreMessage properties that might shed some light.

That looks ok to me... Are you getting the error from inside the subscribe callback, or on the other side as a rejection from the sendMessage call?
It's hard to know what is happening without a minimum reproduction. I would definitely add a catch to that api.query() call. Maybe it's throwing.
Check the error object. It should have coreResponse and coreMessage properties that might shed some light.

Oh right, I'm calling await sendApiQuery in my content script, the stream is in the background script. Stream works perfectly fine, the API call returns the right data. In fact, if I sendResponse without awaiting, it works well. The error is on the content script, only when I await an async call.
// content
const { data } = await sendApiQuery({
      query: fetchSomethingGql,
      variables: { ... }
});

Oh right, I'm calling await sendApiQuery in my content script, the stream is in the background script. Stream works perfectly fine, the API call returns the right data. In fact, if I sendResponse without awaiting, it works well. The error is on the content script, only when I await an async call.
// content
const { data } = await sendApiQuery({
      query: fetchSomethingGql,
      variables: { ... }
});

After re-reading that, I'm realizing how unclear I am. I apologize.
Error in content script
// background
apiQueryStream.subscribe(async ([{ query, variables, options }, _, sendResponse]) => {
    const response = await api.query({
      query,
      variables,
      ...options
    });

    sendResponse(response);
 });

// content
const { data } = await sendApiQuery({
      query: fetchSomethingGql,
      variables: { ... }
});

No problem
// background
apiQueryStream.subscribe(async ([{ query, variables, options }, _, sendResponse]) => {
    sendResponse({ data: true });
 });

// content
const { data } = await sendApiQuery({
      query: fetchSomethingGql,
      variables: { ... }
});

After re-reading that, I'm realizing how unclear I am. I apologize.
Error in content script
// background
apiQueryStream.subscribe(async ([{ query, variables, options }, _, sendResponse]) => {
    const response = await api.query({
      query,
      variables,
      ...options
    });

    sendResponse(response);
 });

// content
const { data } = await sendApiQuery({
      query: fetchSomethingGql,
      variables: { ... }
});

No problem
// background
apiQueryStream.subscribe(async ([{ query, variables, options }, _, sendResponse]) => {
    sendResponse({ data: true });
 });

// content
const { data } = await sendApiQuery({
      query: fetchSomethingGql,
      variables: { ... }
});


Fix build ux

The type declaration in html.d.ts is different with what emitted by rollup html plugin (default es export). Tweak the types / import to align to the rollup plugin. Also fix the example app to adapt this change
closes #228

Will this close also #162  ?

Yes, it will. Im working some fixes locally, will push soon

@EisenbergEffect @ben-girardet I think i've finished it, this PR fixes html build issues, and will also fixes CSS bundling issue (atm, it's not giving any hints to webpack to bundle css, oops)

@bigopon Will this all continue to work correctly is someone is using the CLI bundler instead of Webpack?

I think so, because cli bundler does not have issue with module reference like webpack. Im using 2nd parameter of @inlineView decorator to add resources to a view. I think this is understood by the cli bundler,  cc @3cp

If we can get @3cp to do a quick review as well just in case, that would make me feel more comfortable. Thanks for putting the work in @bigopon

@EisenbergEffect it's ready to go. All builds have been reverted to multi-modules with modules referenced by strings. Also adjusted example app to ensure we can still develop with source code aliasing instead of having to build. @ben-girardet
and huge thanks to @3cp for the links and reminder

thanks @bigopon looking forward to continue working on this lib.


Code Quality: Use LoadIconWithoutOverlayAsync for Drives Widget

Resolved / Related Issues
Related to #14499

@foxnoodles @Mantej-Singh if you have Visual Studio, can you see if this fixes #14499?

I do have Visual Studio, but i don't know how to run or test this fix

Good work.

Working as expected.

@Mantej-Singh thanks for checking! Can you check again with the latest commit and confirm if it's still good?

on it!!

@yaira2
Nope, it did not work

The underlying issue is that the requested icon size (256) is missing from the ico file. Requesting a smaller icon size would reduce the quality of the other icons so that's not really an option.

@Mantej-Singh is there any difference with the latest commit? If this doesn't help, we'll merge these changes as is and continue tracking the issue in #14499.


Fix kbs types

Remove Cargo.lock from .gitignore
Update dep kbs-types

Related to https://github.com/confidential-containers/kbs/issues/124

Seems some change duplicate with this PR: https://github.com/confidential-containers/guest-components/pull/177

Seems some change duplicate with this PR: #177

Oh yes. Let me close this PR. The functionality is covered by #177


removed lodash dependency for es6 implementation

@drcmda i normally prefer standard js :)
let me know if you'd prefer to create a utility file and import the functions for readability!

sure, i was being too lazy there, thanks! : )

Seems like a weird choice as it is actually increasing the bundle size and mental complexity.

I thought about it, i'll see if I can refactor and make things a bit better.
I am not sure about the cognitive weight as I didn't know the functions and had to go look at them.
But yeah I'll try something to lower the size.
(Even though it's a very small increase)


IntPtrUString liveness issues

IDisposable implementation is hidden to ustring API users, thus IntPtrUString will always end up being finalized, unless people explicitly Dispose the string.

IntPtrUString design assumes that the parent string outlives the child string, failing code would look like:

IntPtr mem = grab_native_string(out int count);
var parent = ustring.Make (mem, count, str => release_native_string (str));
var child = parent [0, 5]; // Let's assume these values are correct
// somewhere here GC happens, parent is reclaimed
child.ToString(); // accessing bad memory

Maybe a SafeHandle mechanism is better here than an opaque pointer? The wrappers can get reclaimed while the SafeHandle still lives, so that's 👍.
That would make the IntPtrUString slightly larger - Marshal.SizeOf(SafeHandle) + sizeof(int) for an offset.

And by the fact that the strings will end up being finalized means that all strings get promoted to gen1, thus taking much longer for them to be reclaimed. In a performance-tailored string processing environment this can be dreadful.

Give or take, the safehandle approach is the only decent one I can come up with that makes the GC aware of the memory release semantics. We could get rid of IDisposable completely, so we don't have to deal with user error - Dispose the string then get a subrange and crash.
So we only queue for finalization once per safehandle instead of once per string. Thus, a net win.

Mhm, I can optimize the case of ustring pointing to a memory block, that has no release func, at least those would not be promoted to gen1 like you point out.   But that would still leave those that require finalizers to take that hit.
The discoverability of IDisposable is not obvious, but I use it in the code/tests.  Perhaps I should just make ustring IDisposable, without the finalizer and only add the finalizer to the IntPtrUString.   At least that would make the IDisposable obvious.
I do not understand how SafeHandle prevents the scenario where the original containing string is released.

The reference is passed and shared between all instances. It's an object, so it won't get finalized. Moving the ownership to the safehandle fixes that issue.

https://github.com/migueldeicaza/NStack/pull/13 should address this.

Checked in a variation that does not require the SafeHandle.