A few small ideas for the Legacy DB Upgrade

Affected Version
4.3.3
Description
See:
https://github.com/silverstripe/silverstripe-framework/blob/4/src/ORM/DatabaseAdmin.php#L416-L457
There are a few things that I was thinking about:
A: messages hard to understand

if the ClassName is equal to a zero length string) then for some reason the count is the length of the table.  Maybe that is a wider bug in the ORM?  We had a table with ClassName = '' and it went through every class in our legacy upgrading (100s) and showed:

Correcting 2279 obsolete ClassName values for Sunnysideup\Projects\Services\RecaptchaService

where Sunnysideup\Projects\Services\RecaptchaService was ALL legacy ClassNames being searched in the entire project e.g.

Correcting 2279 obsolete ClassName values for Sunnysideup\Projects\Services\ClassA
Correcting 2279 obsolete ClassName values for Sunnysideup\Projects\Services\ClassB
Correcting 2279 obsolete ClassName values for Sunnysideup\Projects\Services\ClassC
Correcting 2279 obsolete ClassName values for Sunnysideup\Projects\Services\ClassD
etc....

B: what about this:
https://github.com/silverstripe/silverstripe-framework/blob/4/src/ORM/DatabaseAdmin.php#L416-L457
The number of times I have written something like this must be in the 100,000s.  What if we added a generic function for this - copy this query on all applicable tables (_Live,  _Versions)  for any DataObject.  That would be so awesome!
C: should this code be in dev/build or should it be somewhere separate?
You are running this for every DataObject for every ClassName type field for every Legacy A to B/C/D move? It might be better to give the dev the option to run it so that they can make adjustments first and avoid running it if they are in a rush.
D: why not use the .upgrade.yml to find every Legacy A to B/C/D move?

Might be worthwhile splitting all of those into separate issue as I don't think those points are interdependent.
A: messages hard to understand
I'm not sure how you can end up with an empty ClassName field on any version of SilverStripe. This looks more like data corruption to me.
B: what about this
I presumed what you mean by "this" is a mechanism to execute the same query against the stage table, versions tables and Live table.
I don't think having a method like that in the ORM would make sense ... the entire point of those migration queries is to bypass the ORM. I guess we could add a convenience method somewhere in Versioned.
C: should this code be in dev/build or should it be somewhere separate?
It would be cool if this could be isolated from the regular build logic ... however I think there's a chicken and egg problem here.
You can't run your data migration task until you've done a dev/build ... and you can't really can't really rebuild your database without migrating the data.
I guess in a perfect world, we would have a task that can build all your manifests and get you to a point where you route requests and another one that migrate/build your database.
D: why not use the .upgrade.yml to find every Legacy A to B/C/D move?
I agree that it's weird to have an old-classname-to-new-classname map in .upgrade.yml and require people to add the same info to DatabaseAdmin::classname_value_remapping.
However, I think there's some value in keeping these two things separate. .upgrade.yml is meant to be an "inert" file after you're done with the upgrade process. I think it could be problematic to have it start altering SilverStripe behaviour during normal runtime.
Also, it would mean reading it's content the same way we read yml files in _config.


Folder into /maps, create README, and correct markdown formatting

Proposed changes include:

foldering two maps notebooks into /maps directory
adding a README to /maps directory, with instructions and description of content
minor editorial corrections to markdown formatting

Thanks, @reliztrent !


Power supply to RPi

Hello.
I recently started field testing my OWL unit but have noticed it seems to "freeze" after about 90 seconds an then appears to
restart itself and go for another 90 seconds or so (I hear the beep beep start up sound with out switching the unit off and on) .  I suspect I have a power supply issue to the Raspberry Pi as the red power light seems to intermitantly turn off and on although the OWL still works even when the red power light is off.  I'm powering the RPi from a 12v battery and a 12v to 5v converter.
So I'm wondering if anyone else has experienced a similar problem and may have a fix?
Thanks,
Stephen

Thanks Guy,
Yes I'll try powering the pi via the GPIO pins from the voltage regulator.  See photo of the setup below.  When I was building the system I had trouble powering the pi, the red light would not stay illuminated so I tried several regulators but changing the USB converter seemed to help the most.
I've included the photo of the pump set up just in case anyone might be interested in the plumbing as well.  Notice I had to put black tape over some of the green frame of the robot?  I had built the robot frame and painted it green before the OWL project came along.  When I first tested the OWL it was detecting the green paint of the robot, just as it should have!
I'll keep you updated.
PS Ever considered a PCB for the project?
Thanks,
KInd Regards,
Stephen

Just a quick update.  After bit more investigating I discovered the output pins on the voltage regulator I was using where loose and not soldered to the regulator's PCB properly.  After re-soldering it ran for a least 10 minutes so I think my problem is sorted.  Although the red power light on the RPi wasn't on.  Anyway I'll some more testing and see how it goes.
Thanks and Kind Regards,
Stephen

Thanks for the update Stephen - looks like you've found the issue. I've also had the painful problem of a broken wire inside the insulation before, which took about  a week to discover! They're some great pics of the rover, so feel free to share them on the Community Builds page too.
I'll close this issue for now but feel free to reopen if you need.


use with yolo

good job! can i share with YOLOv4?

Thanks @Bakutto :)
What do you mean by "can i share with YOLOv4"?
Are you referring to a specific YOLOv4 implementation ?
Generally speaking any code will work, you just need to add:
from trains import Task
task = Task.init('examples', 'YOLOv4 training')

If the code uses TensorBoard or Matplotlib all the metrics/graphs will be logged automatically.
If the code uses Keras/TF/PyTorch/Joblib the models will be logged as well.

Thanks a lot!


Handling incorrect UnleashClient configuration

Hello Unleash client .NET team,
I have a question about how to handle incorrect UnleashClient configuration. Specifically, I would like to know how to detect if the API token is incorrect or if the Unleash client is incorrectly configured when creating a client instance using UnleashClientFactory.CreateClient/CreateClientAsync.
Currently, we observe that an incorrect token results in an empty feature toggles collection without any exception being thrown. Do you have any suggestions on how to handle this, such as having an exception thrown, or is there a property from the UnleashClient instance that we can check to determine if the connection has been successfully established?
Thank you for your help!

Hello @xiaoyangwang-geotab!
Have you found a solution to your question yet?
There should be an error thrown if the http request to fetch toggles fails. Incorrect token - is that a token-code that does not exist/or a typo? Or do you mean an existing token, but wrong type of token/token that doesn't have access to the configured project?
David

Hi @daveleek
Thank you for your response. Unfortunately, I have not been able to find a solution to the issue at this time.
I have attempted to use a non-existent token, as well as an admin token in the client, but neither of them resulted in the expected exception being thrown. Here is the section of code where I initialize my Unleash instance:
       var settings = new UnleashSettings()         {             AppName = appName,             UnleashApi = new Uri(apiUri),             CustomHttpHeaders = new Dictionary<string, string>(StringComparer.InvariantCulture)             {                 { "Authorization", apiToken } // The apiToken should only be the client token specified for production or development. Neither admin tokens nor personal access tokens will work.             },         };         var unleashFactory = new UnleashClientFactory();         var unleash = unleashFactory.CreateClient(settings, synchronousInitialization: true);
By the way, I am currently running the code on a local server. Not sure if there're differences between the behavior of the code on a production server and a local server regarding this issue.
Thanks!

Thank you @xiaoyangwang-geotab, prod vs local shouldn't behave differently in that regard!
Thanks for the code snippet, I'll have a look!

Hey @xiaoyangwang-geotab. So it turns out if you set log level to Verbose then error messages should appear in the log. We're looking into it for a future improvement, but the knowledge should at least enable you to see error messages from API calls.

Thanks @daveleek So how to set the log level to Verbose? Additionally, if an error is logged, I can review the log within the code to identify any failures. Is that what you meant?

Hi @xiaoyangwang-geotab

So how to set the log level to Verbose?

that depends on your logging framework of choice. in my repro I used Serilog and the console sink:
    using var log = new LoggerConfiguration()
    .MinimumLevel.Verbose() // Setting to Verbose here
    .WriteTo.Console()
    .CreateLogger();

Additionally, if an error is logged, I can review the log within the code to identify any failures. Is that what you meant?

Setting log level to Verbose should make the error messages appear in the log output of your application. It will not raise exceptions that stops execution though, it runs in a background timer/thread

Hey @xiaoyangwang-geotab, I realise I'm super late to this thread, apologies.
Just want to unpack this one a little, so the philosophy of the Unleash SDKs is that they should be tolerant to failure and not impact their hosting application in the case of errors. To this end, the behaviour here is that the SDKs shouldn't need to be able to sync to Unleash to work correctly, it should have a backup file saved from the last time they synced to Unleash and they should sync as soon as it's able to reach Unleash. This is important here because if an API key is revoked in the Unleash UI, the SDK should be able to continue to work against its backup file.
I realise this isn't your problem, I'm just trying to provide some context on why the SDK works the way it does. That being said, I'm not sure I correctly understand the problem here, is there a reason why you can't set the token correctly here? What are you actually trying to solve?
We're more than open to trying to resolve the issue but I'm not 100% confident yet that bubbling the underlying exception is the correct behaviour here.

Hi @sighphyre, thank you for explaining the concept of tolerance to failure. I do understand the design, and It worked well while I was testing it.
However, I have a concern regarding the initialization of the unleash instance. In the event that someone enters the wrong API token in the config (which could happen in reality), how can we determine if the unleash configuration is incorrect? Even if everything is configured correctly and the unleash instance is created successfully, how can we know if the unleash server is down? We may not necessarily encounter an exception, but we would like to have a property or some indicator that indicates when something is going wrong.
Generally, I think our concern is that we want to be notified of any failures directly from the unleash instance instead of having to rely on logs.
Thanks!

Incorrect configuration ... Is it possible to correct the configuration and apply the changes without restarting our application?

Once the settings have been added to the Unleash SDK instance they're handed over to the internal services needing them, and are hard to replace on the instance itself.
Unleash is typically (and we really recommend this) configured as a singleton, so you'd have to dispose the whole instance of it first and then start up a new one, and if you're using Dependency Injection you'd need to find a way to replace the singleton in the container.

Unleash server is down during initialization: In this situation, an exception would be thrown. Is there a retry policy implemented for such cases?

If Unleash is initialized with synchronousInitialization: true, then no. It will crash and there's no retries.
If Unleash is initialized with synchronousInitialization: false then yes, Unleash will log exceptions but will retry on interval as configured (FetchTogglesInterval) and will recover once Unleash instance comes online.

Thanks @daveleek
I have a couple more questions that extend from the second question I asked earlier:

If Unleash is initialized with synchronousInitialization: false, would we also be able to determine if the server is down from the error callback?
In the event of a server outage during initialization, would the Unleash instance still read feature toggles from backup files generated during the last successful initialization or fetching?
We attempted to save the backup files outside of the container and use them when the Unleash instance is initialized with empty toggles (which would have the error callback indicates an issue in your future implementation). However, the problem we encountered is that each initialization creates a new backup file, making it difficult to manage. This is likely why the default backup file location is the temporary folder. Is there a more effective approach to handle this situation?

Thank you very much for your help.

Hi @xiaoyangwang-geotab!

If Unleash is initialized with synchronousInitialization: false, would we also be able to determine if the server is down from the error callback?

Yes. We are adding information to the event in the callback that should enable you to determine if the server is down, up, or returning odd statuses.

In the event of a server outage during initialization, would the Unleash instance still read feature toggles from backup files generated during the last successful initialization or fetching? ... Is there a more effective approach to handle this situation?

Yeah I had a look at this to understand why it would be doing this - the backup file should always be restorable. Have you set the InstanceTag property on the UnleashSettings when you're initializing Unleash? If not then this property is set to a random value, this value is also added to the backup file name. If you set the InstanceTag then the file name will be consistent across restarts and should work with backup files being mounted back in.
Another option is to look at bootstrapping unleash

We have now released the 2.4.4 update which brings the option of registering a callback to be notified of errors occurring in the Unleash SDK. It has been added to the event handling registration callback

Hi @daveleek, thank you for your InstanceTag suggestion and the 2.5.0 release from your team. We have implemented both of them, and they are working flawlessly now.
We appreciate your support and the efficiency with which your team addressed our needs.
Take care,
Xiaoyang

Thanks for the feedback @xiaoyangwang-geotab!

Good to hear, thank you @xiaoyangwang-geotab!


How to parse JSON response?

Hi,
any idea how to parse json response instead html response?
Thanks

Here is an example that uses a JSON response with twitters typeahead library:
http://intercoolerjs.org/examples/typeahead.html
Intercooler handles the AJAX and passes the data back to the library.

:+1:
Thanks a lot

btw i ended with something like this ..

Thanks

Looks good!
If you have some time, please tweet, fb post or put up a reddit post on intercooler to get the word out.


GetAuditLog response is not fully enriched

Many expected fields are omitted from the AuditEntry result of the GetAuditLog request.
For example here are 4 logs for different actions
  actor: ""
  action: "git.clone"
  timestamp:
  org: ""
  transport_protocol_name: ""
  repo: ""

  actor: ""
  action: "git.fetch"
  timestamp:
  org: ""
  transport_protocol_name: ""
  repo: ""

  document_id: ""
  actor: ""
  action: "org.sso_response"
  timestamp:
  org: ""

  document_id: ""
  actor: ""
  action: "pull_request_review_comment.update"
  timestamp:
  org: ""

These are very barebones and the AuditEntry has many fields we think are essential that are just not present. Does the request need an additional parameter to ensure we have more verbose logs?

I'm looking through the official GitHub v3 API documentation: https://docs.github.com/en/rest
and am no longer finding any endpoints relating to getting the audit logs for an organization.
@AbbanMustafa - could you please contact GitHub Tech Support and ask them where the documentation is now located for these endpoint(s)?

@gmlewis The docs are confusing, they need to be specified under Enterprise Cloud
https://docs.github.com/en/enterprise-cloud@latest/rest/orgs/orgs#get-the-audit-log-for-an-organization

Thank you, @AbbanMustafa !
Have you tried adding Include: github.String("all") in your request?

Yes that just includes all log types but doesnt make the logs themselves include more

Yes that just includes all log types but doesnt make the logs themselves include more

Thanks, @AbbanMustafa.  Can you please try and see if you can get more data from using a direct curl to the API?
If you are unable, then it is time to contact GitHub Tech Support afterall.
Would you mind asking them how to get all the data back (and show them the experiments you tried using curl)?

hello @gmlewis I was trying to upgrade to release v66 and notice some fields disapperar from the response or the helper functions were removed, like GetRepo(), GetRepositoryPublic() and others
looking at a sample response using CURL via the GH API i can see
as example
  {
    "@timestamp":<PHONE_NUMBER>565,
    "_document_id": "P89ccccixZZoHPg",
    "action": "workflows.completed_workflow_run",
    "actor": "xxxxx",
    "actor_id": 36xx92,
    "actor_is_bot": false,
    "business": "xxxxx",
    "business_id": 1xxxxx,
    "completed_at": "2024-10-28T08:09:40.000Z",
    "conclusion": "skipped",
    "created_at":<PHONE_NUMBER>565,
    "event": "schedule",
    "external_identity_nameid"<EMAIL_ADDRESS>    "head_branch": "main",
    "head_sha": "1ce6c919b1e340077983338d14dcdbb77142",
    "name": test 123",
    "operation_type": "modify",
    "org": "xxx-xx",
    "org_id": 874333,
    "public_repo": false,
    "repo": "xxx/xx-xx",
    "repo_id": 708222643,
    "run_attempt": 1,
    "run_number": 6033,
    "started_at": "2024-10-28T08:09:37.000Z",
    "topic": "cp1-iad.ingest.github.actions.v0.WorkflowUpdate",
    "trigger_id": null,
    "workflow_id": 80587864,
    "workflow_run_id":<PHONE_NUMBER>7
  },

but i cannot access repo, public_repo and other fields are they are not available in the struct https://github.com/google/go-github/blob/v66.0.0/github/orgs_audit_log.go#L32-L57
i can add those if that is really a missing fields

i can add those if that is really a missing fields

That would be great, @cpanato - thank you!

oh, i see now, the missing fields are embedded in the AdditionalFields

so i guess we are good here

Ah, yes, that is correct.  I believe it is safe to close this issue.


Option to avoid removing repeated replacement

Usage:
const filenamofy = require('filenamify');

const safeFilename = filenamify('/path/to/file---name.ext', { replacement: '-' });

Now:
/path/to/file---name.ext -> path-to-file-name.ext
Feature request (maybe keepRepeat: true or better name):
/path/to/file---name.ext -> path-to-file---name.ext

What's the use-case? I don't really see any good reason to preserve duplicate replacement characters like that.

@sindresorhus create css classes based on filesystem path, useful for css-loader, we already have same logic inside

Alright. PR welcome.
Some name ideas:

condenseReplacements
preserveRepeatedReplacements
removeRepeatedReplacements

@sindresorhus the replacement is done at filenamify.js#L30 using the tream-repeat library. We should implement the change in that library first I believe. I will open an issue and link it with this one.

It seems that I missunderstood the question. I though we wanted to replace all the occurances of repeated characters, except a specific one. I'm closing the issue on tream-repeat repo.

Is there any particular reason why #18 has been refused? I have a similar fix for this issue and was wondering if it would be welcomed.

This was fixed in 7d4846f.


Export to SQL from Application Insights | diagnostic settings using Stream Analytics

Looking for another "Walkthrough: Export to SQL from Application Insights using Stream Analytics" post using diagnostic settings for exporting telemetry.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 9c0ab8bf-8b57-4bc7-ca33-3ed602aca5c8
Version Independent ID: d1c79cae-05e7-6b40-2023-c82acd7667c6
Content: Export to SQL from Azure Application Insights
Content Source: articles/stream-analytics/app-insights-export-sql-stream-analytics.md
Service: stream-analytics
GitHub Login: @JasonWHowell
Microsoft Alias: jasonh

Thanks for the feedback and bringing this to our notice . At this time we are reviewing the feedback and will update the document as appropriate .

The team is aware of the request for using diagnostic settings to export telemetry. It's in the backlog.
CC: @sidramadoss

#please-close


getItemValue

Hello I probably encountered an issue with your getItemValue  function:
`getItemValue (item) {
if (!item) return null
if (this.itemValue) return item[this.itemValue]
if (isObject(item)) {
const keys = Object.keys(item)
if (keys.length === 1) {
return item[keys[0]]
}
return item
}
return item
},
the first line is prone to errors in case the "0" (zero) is passed. suggest to change this to lodash isNil check

Yes, it seems there is such a problem, but it can be circumvented if you use zero as a string.
I would not want to depend on any dependency, so I can write my own version. More than lodash's isNil, in fact, It’s the same as item == null. Since the specification clearly states that null is equal to itself and undefined and vice versa.
In the next version, I will fix this error. I hope it is not urgent that I fix it for you?


file permissions

why do I need to type my password when saving files in sublime text?
on macOs

Hello! I'm not sure how your question is relevant to this repository. This is not the repository for Sublime Text. If you need support from them, please visit https://www.sublimetext.com/support.


Error running cargo test due to num-rational crate

I am getting a number of errors when running cargo test that seem related to the num-rational crate. The error message are along the lines of
the trait `traits::One` is not implemented for `T`

and
the trait `traits::Zero` is not implemented for `T`

Steps to reproduce:

cd into the root cookbook dir
Run cargo test

It happens on master; however, when I made a clean, separate clone of master everything ran fine. It appears in my copy of master the num-rational crate is 0.1.something and in the newly cloned master it is 0.2.something.
I ran cargo clean and now everything works as expected.

I spoke too soon.... I actually had to run cargo update && cargo clean and now things appear to be working.


unfolded element editors do not highlight if clicked on header

clicking on the header part of en element editor should highlight it and highlight the editors view inside the preview frame.
This only works on folded elements, not on unfolded ones.

aha! only if it was folded or unfolded before.


Output dots

📚 Description
Issue: https://github.com/TypedDevs/bashunit/issues/59: Display dots instead of tests names
Currently, the only output from bashunit is the test names in a prettify way.
We want to allow rendering dots (a dot per test).
🔖 Changes

Render dots (per test) by default
Render the scripts and test names using the new flag --verbose

I like the output with the dots.
Why don't print the dots as default and show the current output with a verbose option? Maybe it has more sense to show the dots as a short info by default and if someone want more information then set the --verbose option. What do you think?

Why don't print the dots as default and show the current output with a verbose option?

Great idea, @cmayo ! Done ✔  CC: @khru @Tito-Kati

We could think about doing in a follow up PR that if the test fail it will render an f instead of a . This will be a bit more complex than simply adding this:
# similar as we just did in this PR with `Console::printSuccessfulTest()`
function Console::printFailedTest() {
  ((_RENDERED_TEST_COUNT++))

  if [[ "$_VERBOSE" == false ]]; then
    if (( _RENDERED_TEST_COUNT % 50 != 0 )); then
      printf "f"
    else
      echo "f"
    fi
  else
    printf "..."
  fi
}

Because we should display at the end the actual test(s) that failed, and at this moment the only place where we display the error is inside Console::printFailedTest()

I like the output with the dots.
Why don't print the dots as default and show the current output with a verbose option? Maybe it has more sense to show the dots as a short info by default and if someone want more information then set the --verbose option. What do you think?

After some rethinking with @khru, we prefer keeping the "pretty" output by default and using the "dots" as optional. The reason is based on the value that you have on both options; when writing tests, the nicer version gives you already more value than the dots. I will create another PR to change this behaviour.


Timer on Events (Timeline page) doesn't take local time into account

In the timeline view, there is a checkbox to see events and banners with our local time.
There is also a timer on each event that represents the time left before the event goes away.
This timer is not accurate when thicking the "Show as local time" checkbox.
I made a video to explain the issue (it may be better than my explanation above, sorry) :
https://user-images.githubusercontent.com/28402592/114926857-22d67c00-9e31-11eb-96f8-80267733fc4b.mp4

Um I think it's already right because the time move too? (unless I miss something)

I don't know if it's bit more precise but I was talking about the little timer next to the event (on the video it was for the oceanid event) but now it's gone.
The "Show as local time" checkbox was already thicked so it was on the correct time but if I unthick the checkbox, the time left remains the same and is different when you click on the event itself...
Here is some screenshots with elements highlighted in red :


[Feature request] Add getForumTopic or getForumTopicsByID or getForumTopics to Bot API

Currently it is impossible to get topic name without getting forum_topic_created or forum_topic_edited event. I suggest adding something like getForumTopic or getForumTopicsByID or getForumTopics to Bot API.

I was creating an issue regarding this issue without having searched beforehand.
Having found this issue before posting mine I'm just pasting the original text I had written already:
There is currently no way to retrieve topic IDs for a group, they must be retrieved and stored externally without a proper way to get the topic IDs from the bot code itself.
Current workarounds involve:
a) Creating a topic/listening for Topic edit events with the bot and storing its ID externally
b) Retrieving IDs externally (via message link for example) and providing those to the bot.
I'm not sure if it's just a limitation on the API or a not implemented case (I assume the latter as I see the enhancement tag was added to this issue). I think ideally we should be able to explicitly retrieve the topic IDs for a group instead of creating/modifying a topic or having to get them from a client in order to use them in bots.


Rename Quick Surf extension

Description

Rename Quick Surf extension to Open Link in Specific Browser
Add new layout options: List or Grid.

Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Hi @pernielsentikaer.
This PR changes the name of the Quick Surf extension, the quick-surf folder of the previous Quick Surf extension is completely deleted, and a new open-link-in-specific-browser folder is created.
When you're doing a review release, be careful to avoid generating two extensions.


minigzip compatibility with gzip

Can some options of gzip be supported?
gzip supports specifying options in -cd besides `-c -d:
-f overwrites ouput instead of "compress with Z_FILTERED"
-q surpresses warnings
-- for ending option processing
...
  -c, --stdout      write on standard output, keep original files unchanged
  -d, --decompress  decompress
  -f, --force       force overwrite of output file and compress links
  -h, --help        give this help
  -l, --list        list compressed file contents
  -L, --license     display software license
  -n, --no-name     do not save or restore the original name and time stamp
  -N, --name        save or restore the original name and time stamp
  -q, --quiet       suppress all warnings
  -r, --recursive   operate recursively on directories
  -S, --suffix=SUF  use suffix SUF on compressed files
  -t, --test        test compressed file integrity
  -v, --verbose     verbose mode
  -V, --version     display version number
  -1, --fast        compress faster
  -9, --best        compress better
    --rsyncable   Make rsync-friendly archive

Addition of zcat and gunzip like wrappers would be nice too.

minigzip doesn't try to be replacement for gzip... There was talks few days ago about making full replacement that has all the features of gzip but internally uses zlib-ng, but whether we will do it or not, depends on how many people would actually use it.

At least good to know that it might be supported in the future.
Supporting -- as option to stop processing arguments would still be nice though.

I'm not saying yet when we will add new features to minigzip as our main concern now is to have a stable release with as little bugs as possible... After all the bugs have been found and fixed, we will start adding new features.

I found a workaround in the meantime.
As pigz is linked to zlib, I was able to use it with zlib-ng instead. pigz should support all gzip options. When using pigz with multiple threads and zlib-ng instead of zlib, compression it is still 4 times faster :-).
# gzip.
$ time gzip -c -6 test.txt > test.txt.gz
real	7m12.472s
user	7m8.307s
sys	0m1.821s

# minigzip
$ time minigzip -c -6 test.txt > test.txt.gz
real	1m46.187s
user	1m43.936s
sys	0m1.301s

# pigz with 8 threads and zlib.
$ time pigz -p 8 -6 -c test.txt > test.txt.gz
real	0m59.679s
user	7m57.845s
sys	0m3.842s

# With zlib-ng

# pigz with 2 threads and zlib-ng
time pigz -p 2 -6 -c test.txt > test.txt.gz
real	1m4.082s
user	2m11.145s
sys	0m4.082s

# pigz with 4 threads and zlib-ng.
$ time pigz -p 4 -6 -c test.txt > test.txt.gz
real	0m32.674s
user	2m12.010s
sys	0m2.810s

# pigz with 6 threads and zlib-ng.
$ time pigz -p 6 -6 -c test.txt > test.txt.gz
real	0m22.818s
user	2m15.296s
sys	0m2.442s

# pigz with 8 threads and zlib-ng.
$ time pigz -p 8 -c test.txt > test.txt.gz
real	0m16.715s
user	2m14.397s
sys	0m2.336s

https://github.com/madler/pigz

We also have https://github.com/zlib-ng/pigzbench repository that can be used to build and benchmark pigz against different zlib forks.

minigzip doesn't try to be replacement for gzip... There was talks few days ago about making full replacement that has all the features of gzip but internally uses zlib-ng, but whether we will do it or not, depends on how many people would actually use it.

It may be useful to note that NetBSD's gzip is actually a frontend to zlib (and FreeBSD's gzip is a fork of NetBSD's as well). It doesn't have all the options that GNU gzip has (e.g. --rsyncable), but it has most, and I'd expect at least the bulk of automated uses in Makefiles and build systems etc. to use options that exist in the BSDs. The code itself will probably have some BSD-specific quirks, but I'm sure it can be made portable (with or without the use of libbsd). So perhaps porting a widely deployed/battle-tested permissively licensed gzip implementation to zlib-ng's native API makes more sense than reimplementing gzip from scratch, or even with minigzip as the starting point.
Side-note: back in 2007, I forked NetBSD's code and heavily modified it, to create "zgz", part of Debian's pristine-tar package. Given how long ago this was, I don't remember what the porting effort entailed; it was also a fork of NetBSD's 20060927 revision, so it's dubious whether any lessons learned from back then would be relevant today anyway. Several others (Joey Hess, Josh Triplett etc.) have also modified the code since. The code is probably unrecognizable compared to the original NetBSD version, and it also is quite domain-specific, as its purpose is to have all kinds of "expert" flags, to be used to simulate various archivers, and recreate archives found in the wild. I'm not sure if that's of any use here, but I'm mentioning it for posterity and in case it gives you a bit of an insight of the variety of gzip archives that exist out there.

I think one challenge with existing gzip source code is that it is not zlib licensed. In this repository we only allow zlib licensed source code.

I think one challenge with existing gzip source code is that it is not zlib licensed. In this repository we only allow zlib licensed source code.

GNU gzip is under GPLv3, and including code using a strong copyleft license would be indeed a pretty big departure from the permissiveness of the zlib license that this project is uses - I concur.
The NetBSD/FreeBSD gzip code that I mentioned above on the other hand, is under the 2-clause BSD license. It's not the same as the zlib license, but it's not very far either.

It would be best if the *BSD version would be dual-licensed or "official" zlib-ng adaptation would be released... Might be worth discussing with the maintainers...

It would be best if the *BSD version would be dual-licensed or "official" zlib-ng adaptation would be released... Might be worth discussing with the maintainers...

(A year and a half later, reviving this)
I don't have any objections per se to this (especially given I'm not the one to be doing the work ;), but I am also curious what problem would it solve. The 2-clause BSD license is a fine license, about as permissive as the zlib license is, OSI-approved, FSF-approved, and popular enough to have been vetted already by corporate legal departments. Is there a perceived scenario where one would be OK with the zlib license but not the 2-clause BSD for their project?
Don't get me wrong, I appreciate homogeneity and consistency! But this would come at a significant expense of relicensing, dragging into the conversation potentially dozens of contributors, so I believe it's worthwhile to be asking about the benefits...

For what it's worth, I tried compiling FreeBSD main's (https://github.com/freebsd/freebsd-src/commit/0f8b2ba6c629237e4ddd7a72f7c22f687208060d) gzip (usr.bin/gzip) under a Debian unstable, with zlib-ng.
I had to:

Add this at the top (all BSD-isms):

#define nitems(x) (sizeof((x)) / sizeof((x)[0]))
#define __unused __attribute__((__unused__))
#define SIGINFO SIGUSR1
#define EFTYPE EINVAL
#define __COPYRIGHT(_s) static const char copyright[] __unused = _s

Comment-out a single-line that checks sb.st_flags and calls fchflags.

Build with:
gcc -Wall -isystem /usr/include/bsd -DLIBBSD_OVERLAY -DNO_BZIP2_SUPPORT -DNO_XZ_SUPPORT -DNO_LZ_SUPPORT -DNO_ZSTD_SUPPORT -o gzip gzip.c -lz -lbsd

After that, the resulting binary, linked against zlib-ng, just works in my (limited) testing.
To productionize this, one could:
a) Use unifdef to strip the source code from bzip2/xz/LZMA/zstd.
b) Add the necessary configure options and/or ifdefs so that the two modifications above are conditional to Linux/glibc/etc.
c) Integrate into the build system.
The libbsd dependency can be further reduced if one where to inline a handful of functions (getprogname, le32dec, strlcpy etc.), but I would not recommend it.


Remove pkg.grpc.exec from vmtests

pkg.grpc.exec relies on sleep() calls in order to wait for the
eventcache to run. Running them on heavily loaded VM cause flakes.
As they are not kernel-dependant, let's run them only as part of
gotests.
Signed-off-by: Anastasios Papagiannis<EMAIL_ADDRESS>

@tpapagian Thanks! Could you please rebase so that we can merge this?

@tpapagian Thanks! Could you please rebase so that we can merge this?

@kkourt done!


Scan XSS CVE

bump +1 for magento and prestashop

@pdelteil
Oh, I missed the comment. sorry..  Yes, match what I thought. But I haven't thought about it in detail yet, so I'm not sure if it'll be possible to implement it well 🤔

@hahwul
maybe you should create or import nuclei templates https://github.com/projectdiscovery/nuclei-templates
just an idea :-)

@lucmichalski
Thank you! I'll keep that in mind.


Read uninitialized memory via Array.cpointer and String.cpointer

cpointer can be called with an offset. This isn't checked to see if it is beyond the valid range for the array. I believe we should be checking and then return an error if the offset is outside the range.
Making cpointer partial is going to be a painful breaking change but I believe needs to be done.
A slightly less painful option would be to make cpointer not take an offset and leave it as non-partial and introduce a new partial method for getting cpointer's that does take an offset, checks to make sure it is valid and is partial.
I think the latter is preferable as making cpointer partial is going to wreck havoc everywhere.
There's no place in the standard library that uses cpointer with an offset other than 0, so I think splitting that functionality off is the best idea.

@SeanTAllen - I don't understand - maybe I'm missing something.
To elucidate, are you able to produce a code sample that reads from uninitialized memory without using FFI?

Since .cpointer() is only for use in the FFI, what would be the benefit of making the method partial? Even if it produced problems or exceptions in a C library, would that exception even be caught by the Pony runtime in a try .. end block?

Right, that matches my understanding. And if that's true, then this is not a safety issue, in my opinion.
Though if Sean has something else to add for consideration, that's why I asked for a code sample that demonstrates unsafety.

I think this is problematic as I could disallow FFI to a 3rd party module and it could still use cpointer with an offset to get access to arbitrary memory to attempt to use in an attack.
Footguns like this aren't just footguns, they are vectors for staging novel attacks that we might not be able to imagine.

I could disallow FFI to a 3rd party module and it could still use cpointer with an offset to get access to arbitrary memory to attempt to use in an attack.

How could it "get access to" (which I'm interpreting as "read from and or write to") arbitrary memory if FFI is disabled?

I don't know but we've allowed a pointer to arbitrary memory from pony code so the first step is done. The point is, allowing access to arbitrary memory from pony is a first step in possible unknown exploits.
So, 1, we remove a foot gun. Two, we remove a point of incorrectness that open up avenues to try to exploit.

I don't know but we've allowed a pointer to arbitrary memory from pony code so the first step is done.

But no access to arbitrary memory is produced from Pony. The computed pointer is just a USize number that a user might pass into the FFI. They could also take an actual Pony USize and declare an FFI signature with a USize even though the C function expects a pointer. This kind of "possible unknown exploit" has nothing to do with Pony.
I think @jemc asked a reasonable question and a change to the builtin needs to address a demonstrable risk or produce a demonstrable benefit.

@stefandd I've stated my case. You are asking me to make a different case. I'm not going to make a different case.

I mentioned this to Sean in a DM conversation just now, but for the record here:
I'd be okay with removing all forms of pure-Pony pointer offset math, as long as we provide builtin/intrinsic FFI functions that an FFI-enabled package can use to do zero-overhead pointer math for legitimate FFI purposes.
I think that would solve the security goal (even if it currently is a bit too hypothetical to have me convinced yet at this time), while still retaining performance for legitimate (i.e. FFI-oriented) use cases of this feature.

At any rate, I do want to change the title of this ticket a bit to make it more accurate - so far I think we don't know of any way to "read from" uninitialized memory using this technique - only "point to".

@stefandd I've stated my case. You are asking me to make a different case. I'm not going to make a different case.

@SeanTAllen In any case, thanks for reading my concerns. ..maybe a missed opportunity for me to learn something about Pony from any answers you might have given.

Just FYI, this also applies to Pointer.offset, which is also a public function.

I'm in two minds about this one. For the specific cases of Array and String, we do know where the end of the allocation happens, and so we're in the right position to prevent handling a pointer to unitialized memory.
Leaving aside the question of what an attacker can do with a Pointer tag without FFI, the problem, in my view, is that we can't guarantee that a pointer will ever point to initalized memory, even if we place restrictions on the cpointer functions.
For example, an attacker can get hold of a pointer through the use of cpointer, then use the reserve or undefined functions to trigger a reallocation, which invalidates the previous memory allocation (right now Pony doesn't return any memory to the OS, so this pointer will for sure be reused in the future for another allocation)
actor Main
  new create(env: Env) =>
    let arr = Array[U8].create(8)
    env.out.print(arr.cpointer().usize().string()) //<PHONE_NUMBER>24640
    arr.reserve(arr.space() + 1)
    env.out.print(arr.cpointer().usize().string()) //<PHONE_NUMBER>24736

Thinking about it more, I might be wrong in my previous comment: if my understating of the GC is correct, holding the previous pointer will prevent the previous allocation from being freed, so it won't be reused for future allocations until we drop our reference to it.

Your GC understanding is correct

We had a conversation about this after sync today (unfortunately it wasn't recorded). I agree with @jemc 's view of delegating this to an FFI call, if we make cpointer partial.
To answer @stefandd, my view on the difference between Pointer and a bare USize is an aesthetic one: excluding FFI, we can consider that, right now, a Pointer is either null, or a pointer to Pony-allocated memory. The current issue with cpointer messes with this view. With an USize, you don't have that limitation (and also you start to get into other issues where you assume that a pointer is the same as an integer, or that it has the same size as an USize, but that's a different concern).

I think this is ready for someone to try implementing the idea
https://github.com/ponylang/ponyc/issues/4175#issuecomment-1212210469
in the standard library and see if it works and if anything weird arises. If anything feels wrong, we should discuss as soon as something starts to feel wrong.


ref type broken for HTMLElement

Version
3.0.0-alpha.12
Reproduction link
https://codesandbox.io/s/infallible-https-w248t?file=/src/index.ts
Steps to reproduce
Note the error on line 4 of index.ts.
What is expected?
ref<HTMLElement | null>(null) is assignable to a variable of type Ref<HTMLElement | null>.
What is actually happening?
Type 'Ref<{ accessKey: string; readonly accessKeyLabel: string; autocapitalize: string; dir: string; draggable: boolean; hidden: boolean; innerText: string; lang: string; readonly offsetHeight: number; ... 232 more ...; focus: (options?: FocusOptions) => void; }>' is not assignable to type 'Ref<HTMLElement>'.

Perhaps some issue with symbols in the UnwrapRef declaration? The full error includes the line Property '[Symbol.iterator]' is missing in type.

see also
interface Foo1 { [Symbol.iterator]: any }
interface Foo2 { }
const foo1: Ref<Foo1|null> = ref<Foo1|null>(null);
const foo2: Ref<Foo2|null> = ref<Foo2|null>(null);
console.log(foo1, foo2);

(Sorry for the close, mouse finger messed up ^^)
We can easily fix the problem with HTMLElement and similar Types (Window, Document) by adding them to the BailTypes. That's correct as the properties of these types shouldn't be recursively walked by Unwrap anyways. I'll have a PR up for that in a second.
For the more general case about Symbol.Iterator that @jacekkarczmarczyk added, we should look at this PR from @pikaxas well as this comment from discord:

So I was bored and did some more digging. The issue is caused by this https://github.com/microsoft/TypeScript/issues/24622. It's possible to work around it for general types by doing something like this:

type UnwrapTest<T> = {
  [P in keyof T]: T[P]
} & (T extends { [Symbol.iterator]: infer V } ? { [Symbol.iterator]: V } : {})

should be adaptable for our UnwrapRef implementation and seems to go in a similar direction as @pikax's PR.

This broken again at @vue/runtime-core 3.2.22


setVolume is not working.

HI,
I'm using react-native-sound module in my app. while updating the volume by sing code setVolume, the p[layer volume is not adjusting. my code is like this.
var musicPlayer = new Sound(mPath, error => {
if (error) {
console.log('failed to load the sound', error);
return;
}
});
//For updating the volume.
musicPlayer.setVolume(mVolume);
// volume range is 0 to 1.0
While adjusting the volume the range of volume is not adjusting for the player.
The device volume is high.
Please give suggestions to overcome this issue.
Thank you

Did u find any solution?

Hi. I faced this issue as well. What version of the module are you using? Is it on android?


Add Children’s Social Care option to all referral questions

We only added it to referral page in the past but we have 4 versions of referral questions, so this option needs to be added for all of them.

@natdeanlewissoftwire will get it PO reviewed


Docker build CI needs an update post kubernetes-sigs migration

Now that we're migrated from https://github.com/kong/blixt to https://github.com/kubernetes-sigs/blixt, some updates need to be made to our container image builds so that we can build and push our images in CI.

GHCR is currently not advised for use since we don't have clarity how repositories exposure. SIG k8s Infra always recommend to use GCP GCR/AR repos for all the subprojects. We have 2 options:

setup a dedicated GCR repo
use an existing one owned by SIG Network: https://github.com/kubernetes/k8s.io/blob/main/k8s.gcr.io/images/k8s-staging-networking/images.yaml

Personally I think using an existing one for now is fine, especially if that's easier / more straightforward.

Personally I think using an existing one for now is fine, especially if that's easier / more straightforward.

With k8s-infra hat on, the first option is preferable with isolation of resource at the project and minimize any security issue. I'll try to setup it if we go with this approach.

I'm in favor. @aryan9600, @astoycos, @mlavacca ?

sounds good to me!


[Business Approvals Kit - BUG] Cannot search for or find approver on Create Node when creating a stage.

Describe the issue
When creating a node within the process designer, trying to add an approver.  The approver dropdown/combobox doesn't have search enabled and if scrolling through the available users, it does not show all users.
Expected Behavior
Able to search for users vs being able to choose from only the top:n from AAD
What solution version are you using?
1.0.20231117.1_unmanaged
What app or flow are you having the issue with?
BAManagement
Steps To Reproduce
No response
Anything else?
No response
AB#1761

@russrimm while this bug is being looked at one alternative option to consider would be to create a variable for the approval workflow and use that value as the approver

@russrimm - Thanks for helping us with Approvals Kit. This issue is addressed in Dec2023 Year-end release version -BusinessApprovalKit_1.0.20231222.1.


 Reporting this issue on behalf of ajs74.

Fixed

Fixed


Fix: Use TransactionalTestCase instead of removed RequiresDatabaseReset

This PR

[x] uses TransactionalTestCase instead of RequiresDatabaseReset

Follows #959.
Follows #1001.
Follows #1004.
Blocks #996.
Blocks #1002.
Blocks #1003.
💁♂ This should fix the broken build.

Thank you, @mdwheele!


Adding a Planner inside private channel

Why can't we add a Planner within a private channel?

@djlordee thank you for submitting feedback.
I think the best way forward is if you open a service ticket in your tenant so this can get resolved ASAP. Based on the outcome let me know if it is something that can be called out in the docs.
Please follow this link to contact support for business products:https://docs.microsoft.com/office365/admin/contact-support-for-business-products
Please keep us posted here on the resolution so we can feed whatever information you discover into the content.


Please check if this makes snese

avoid error when no device open except the default NULL device.
turn on rmote when start_rmote() is called.

[Current coverage][cc-pull] is 59.13%

Merging [#5][cc-pull] into [master][cc-base-branch] will increase coverage by 40.40%

@@             master         #5   diff @@
==========================================
  Files             6          6
  Lines           299        301     +2
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits             56        178   +122
+ Misses          243        123   -120
  Partials          0          0

Powered by Codecov. Last updated by [439fa1b...214fabe][cc-compare]
[cc-base-branch]: https://codecov.io/gh/cloudyr/rmote/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/cloudyr/rmote/compare/439fa1bc5e17f7e7d41ea90ecec3a5060b5c7217...214fabe98ea53a4535d142b70282f29dd2ec3d75
[cc-pull]: https://codecov.io/gh/cloudyr/rmote/pull/5?src=pr

Do you have any chance to check the PR? I have already incorporated rmote into our package  (see #https://github.com/RBigData/remoter/pull/16) and would like to see if the PR is possible.
Do you have any plan to send this package to CRAN?
Thanks.

Sorry!  Been traveling.  This looks good.
I plan to release on CRAN but not until I replace the approach with something more friendly to base R (handling plot outputs with hooks rather than overriding plot print methods).  I've started on this but don't think I'll have a chance to finish it up for a month or so.

Great! Thanks for the merging.
You may try to overwrite options(devices = ..) that may be easier than hijacking the before.plot.new hook since sometimes more than one devices can open and switch. It should work for both base graphics and ggplot alike approach. FYI. #https://github.com/snoweye/remoter/blob/master/R/server.r#L77


CI: dedup and trim

This revives the code we used for the travis config, which enabled us
to deduplicate the uncomfortably large amount of CI config. :)
It starts out by converting the config to nix, then refactoring until the gist of the jobs was readable again.
Then it removes some of the build steps, to bring down evaluation time.
Also updates the rust cache action.
cc @cole-h

My opinion here is partially a principled one. As people who know how to solve the problems with the current technological choices, we should try to lead by example :)
Even if it comes at a slight compatibility cost.
lorri is a special case even in that space:

The project is about experimenting with and improving the developer's
experience with Nix.

So part of the R&D contributed by this project is to serve as inspiration of how things could look like if the ideas of nix are applied to (dev)ops.

A bit late, but this is pretty cool!
A question: why does the "with" key need quotes? Seems a bit out of place, considering none of the other keys do this.

A question: why does the "with" key need quotes? Seems a bit out of
place, considering none of the other keys do this.

with is a keyword in nix (e.g. with import <nixpkgs> {}), so it has to
be quoted. It does throw a syntax error if you forget, so it’s not a big
problem in practice.
On Wed, Aug 5, 2020 at 7:16 PM Cole Helbling<EMAIL_ADDRESS>wrote:

A bit late, but this is pretty cool!
A question: why does the "with" key need quotes? Seems a bit out of
place, considering none of the other keys do this.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/target/lorri/pull/459#issuecomment-669319969, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAYB5ZQHESDNEYVQKCS3CVLR7GHYFANCNFSM4PU2OEMA
.

Oh. Duh. As you can tell, it's been a little bit since I was in the Nix mindset :D


nixos 24.11 hardware.nvidia.prime.amdgpuBusId's type only allows pci bus id's that would be decimal not hexadecimal

Describe the bug
So trying to enable nvidia prime offloading so I can let the window manager and system ram take up most of the slack fails.
Abbreviated snippet
  hardware = {
    #TODO get this hybrid gpu setup to work
    nvidia = {
      prime = {
        amdgpuBusId = "PCI:6b:0:0";
        nvidiaBusId = "PCI:1:0:0";
        offload = {
          enable = true;
          enableOffloadCmd = true;
        };
      };

But that regex is missing hexadecimal characters presumably as there really isn't another way to point to this radeon on board gpu:
$ lspci -nn | grep -i vga                                                                                masterNM ~/src/pub/github.com/mitchty/nix rtx
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD102 [GeForce RTX 4090] [10de:2684] (rev a1)
6b:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Granite Ridge [Radeon Graphics] [1002:13c0] (rev c1)
$ sudo lspci -nnv -s 6b:00.0                                                                                masterNM ~/src/pub/github.com/mitchty/nix rtx
6b:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Granite Ridge [Radeon Graphics] [1002:13c0] (rev c1) (prog-if 00 [VGA controller])
        Subsystem: ASUSTeK Computer Inc. Device [1043:8877]
        Flags: bus master, fast devsel, latency 0, IRQ 47, IOMMU group 19
        Memory at f870000000 (64-bit, prefetchable) [size=256M]
        Memory at df200000 (64-bit, prefetchable) [size=2M]
        I/O ports at e000 [size=256]
        Memory at df700000 (32-bit, non-prefetchable) [size=512K]
        Capabilities: [48] Vendor Specific Information: Len=08 <?>
        Capabilities: [50] Power Management version 3
        Capabilities: [64] Express Legacy Endpoint, IntMsgNum 0
        Capabilities: [a0] MSI: Enable- Count=1/4 Maskable- 64bit+
        Capabilities: [c0] MSI-X: Enable+ Count=4 Masked-
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
        Capabilities: [270] Secondary PCI Express
        Capabilities: [2a0] Access Control Services
        Capabilities: [2b0] Address Translation Service (ATS)
        Capabilities: [2c0] Page Request Interface (PRI)
        Capabilities: [2d0] Process Address Space ID (PASID)
        Capabilities: [410] Physical Layer 16.0 GT/s <?>
        Capabilities: [450] Lane Margining at the Receiver
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu

Steps To Reproduce
Steps to reproduce the behavior:

Buy a system with an onboard amd gpu and an nvidia gpu with the gpu on an pcie5x16 slot
Try to use nvidia prime offloading to offload to the amd gpu when its at a bus location that isn't purely a number
Open a github issue.

Expected behavior
I can pr a fix for the regex presumably this is an oversight or other hardware places on board gpu at a much lower location than this radeon 9950x board.
Screenshots

Additional context
Before anyone suggests it, no converting 6b:00.0 to a decimal number does not work, nvidia prime is looking for a pci bus id and that just gets to a graphical setup that doesn't work at all.
Metadata

Notify maintainers

Note for maintainers: Please tag this issue in your PR.

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

Try 107 instead of 6b

Before putting them into your configuration, however, they must first be reformatted — take the last three numbers, convert them from hexadecimal to decimal, remove the leading zeroes, concatenate them with colons, and then add a PCI: prefix. Then, they can be set under intelBusId, nvidiaBusId, or amdgpuBusId in hardware.nvidia.prime, depending on the manufacturer of the GPU:

https://wiki.nixos.org/wiki/NVIDIA


Deprecate retries parameter on web endpoints and generators

Describe your changes

Resolves MOD-2202

 Backward/forward compatibility checks

[x] Client forward compatibility: this change ensures client can accept data intended for later versions of itself

Changelog
This commit deprecates the use of the retries parameter on webhooks and generators.

J/w but is the idea that these currently silently don't work, and we want to turn it into an error? Or are we also going to change some behavior?

J/w but is the idea that these currently silently don't work, and we want to turn it into an error? Or are we also going to change some behavior?

The goal is to turn it into an error eventually, but first we should disable them silently perhaps

The goal is to turn it into an error eventually, but first we should disable them silently perhaps

I think my question is — do we want to communicate "this never worked" or "this currently worked, but won't in the future"?

@mwaskom My understanding is that right now, web endpoints will error server-side if you try to enable retries, but generators will not. I don't know what the right messaging looks like, though. Perhaps we should hard fail web endpoints and warn on generators, saying they will be deprecated soon.

Got it — if we currently raise a server-side error, I think jumping straight to an InvalidError client-side makes sense. Otherwise, smooth deprecation is good, though I think it's usually helpful to add a little extra explanation about the context, at least in the changelog.

@mwaskom thanks for the tip. Added to the changelog.


Extending Selenium Library - Adding Keyword

Do you have and example of how to extend SeleniumLibrary and add another keyword pattern that represents the classes that contain my new keywords?  Sorry if this is obvious, I'm a RobotFramework newbie.

Simplest option would be just to put those new keywords to package com.github.markusbernhardt.seleniumlibrary.keywords, and use SeleniumLibrary as a dependency.
Or if wanting to use some own package for the keywords, basically 2 "initiator" classes needs to be copied (or rewritten); https://github.com/Hi-Fi/robotframework-seleniumlibrary-java/blob/master/src/main/java/SeleniumLibrary.java and https://github.com/Hi-Fi/robotframework-seleniumlibrary-java/blob/master/src/main/java/com/github/markusbernhardt/seleniumlibrary/SeleniumLibrary.java.
This is more Java than RF thing. The solutions described are also quite quick-and-dirty kind, as with first one library name stays as original one, and with second one updates might require manual update (quite unlikely, as those initiators are not probably going to be changed).

Thank @Hi-Fi  - that's what I figured but wanted to make sure I wasn't missing anything.  I created some keyword classes in the com.github.markusbernhardt.seleniumlibrary.keywords for now.


"cannot infer type" from Deserialize derive macro with simple variants and untagged variants

This produces an error:
    #[derive(Deserialize)]
    #[serde(tag = "t")]
    enum Data {
        A,
        #[serde(untagged)]
        Var(u32),
    }

error[[E0282]](https://doc.rust-lang.org/stable/error_codes/E0282.html): type annotations needed
 --> src/lib.rs:3:10
  |
3 | #[derive(Deserialize)]
  |          ^^^^^^^^^^^ cannot infer type
  |
  = note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0282`.
error: could not compile `playground` (lib) due to previous error

My proposed fix is intended to minimize changes to code unrelated to the changes from #2403.

Thanks for taking a look @dtolnay

That's probably a bad sign if the first if let can only ever be Ok or early return. I don't think just adding a type fixes that bug.

That doesn't seem intrinsically problematic to me (i.e. someone new to this code). It seems like #2403 intended to reuse as much existing logic as possible--which seems like a reasonable goal.

Could you or @dewert99 look into making this deserialize Ok(Var(1))?

Oof. Nice catch. This is more problematic than I had realized. I think I've found a relatively simple fix, but there are some weird semantics here. First, here's the gist of the fix I've been testing out (wrapping first_attempt in a closure):
    // Ignore any error associated with non-untagged deserialization so that we
    // can fall through to the untagged variants. This may be infallible so we
    // need to provide the error type.
    let first_attempt = first_attempt.map(|expr| {
        quote! {
            if let _serde::__private::Result::<_, __D::Error>::Ok(__ok) = (|| {
                #expr
            })() {
                return _serde::__private::Ok(__ok);
            }
        }
    });

That is: ignore any early returns (in addition to terminal returns) from first_attempt so that we fall back to trying the untagged variants even if, say, the tag is missing.
There is (at least) one more problem: what to do if all variants fail to deserialize? With the change I proposed we get:
"data did not match any variant of untagged enum Data"

That's clearly not right since the enum isn't untagged... at least not in whole. Note that's also the error for an externally tagged enum with untagged variants, which seems like a different, but related, bug.
Without the untagged variants we get:
"missing field `tag`"

That clearly made sense before #2403 but I'm not sure it's sufficient now; also consider an (annoying) enum like this:
#[derive(Serialize)]
#[serde(tag = "potato")]
enum X {
    #[serde(untagged)]
    A { x: u32 },
    #[serde(untagged)]
    B { y: y32},
}

It's internally tagged... sort of? Or is it untagged since all the variants are untagged? How should we talk about it in error messages?
Perhaps the error message for an internal or adjacently tagged enum that contains untagged variants should instead be a little more explicit:
"missing field `tag` and data did not match any untagged variants"

For an externally tagged enum perhaps:
if the data is either a string or an object with a single:
unknown variant `XXX`, expected one of `YYY` ... and data did not match any untagged variants

otherwise:
expected value or data matching an untagged variant

I'm happy to pursue this, but would appreciate guidance regarding the proposed fix, error messages, and any tests you'd suggest I crib to improve the robustness of testing here.
I think the genie is already out of the bottle, but I do want to ask if untagged variants is a feature you want to commit to. I personally love it, but I can see that it may have add unanticipated complexity.

@dtolnay could you take another look? I think I've got the other enum tagging types covered; I would appreciate input about error messages in particular.

Howdy! Any advice for moving this PR forward?


Local docker start-up failed due to ModuleNotFoundError: No module named 'holidays'

A clear and concise description of what the bug is.
Expected results
what you expected to happen.
with latest master:
* 49ec13c68 (HEAD -> master, upstream/master) feat: Support multiple queries per request (#11880) 62 minutes ago

docker compose up

will start a minimum working env locally
Actual results
what actually happens.
superset_app             |  * Debugger is active!
superset_app             |  * Debugger PIN: 269-512-780
superset_worker          | Error:
superset_worker          | Unable to load celery application.
superset_worker          | The module holidays was not found.
superset_worker          |
superset_worker exited with code 1
superset_node            | /usr/local/bin/webpack-cli -> /usr/local/lib/node_modules/webpack-cli/bin/cli.js
superset_node            | /usr/local/bin/webpack -> /usr/local/lib/node_modules/webpack/bin/webpack.js
superset_node            | +<EMAIL_ADDRESS>superset_node            | +<EMAIL_ADDRESS>superset_node            | added 144 packages from 155 contributors in 9.829s
superset_node            | npm WARN using --force I sure hope you know what you are doing.
superset_worker          | Error:
superset_worker          | Unable to load celery application.
superset_worker          | The module holidays was not found.
superset_worker          |
superset_worker exited with code 1
superset_worker          | Error:
superset_worker          | Unable to load celery application.
superset_worker          | The module holidays was not found.
superset_worker          |
superset_worker exited with code 1
superset_worker          | Error:
superset_worker          | Unable to load celery application.
superset_worker          | The module holidays was not found.
superset_worker          |
superset_worker exited with code 1
superset_worker          | Error:
superset_worker          | Unable to load celery application.
superset_worker          | The module holidays was not found.
superset_worker          |
superset_worker exited with code 1
superset_worker          | Error:
superset_worker          | Unable to load celery application.
superset_worker          | The module holidays was not found.
superset_worker          |
superset_worker exited with code 1
  from holidays import CountryHolidaysuperset_worker          | Error:
superset_worker          | Unable to load celery application.
superset_worker          | The module holidays was not found.
superset_worker          |
superset_worker exited with code 1
superset_worker          | Error:
superset_worker          | Unable to load celery application.
superset_worker          | The module holidays was not found.
superset_worker          |

Screenshots
If applicable, add screenshots to help explain your problem.
localhost:8088

How to reproduce the bug

Go to '...'
Click on '....'
Scroll down to '....'
See error

Environment
(please complete the following information):

superset version: superset version
python version: python --version
node.js version: node -v

Checklist
Make sure to follow these steps before submitting your issue - thank you!

[ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
[ ] I have reproduced the issue with at least the latest released version of superset.
[ ] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context
Add any other context about the problem here.

if you run docker-compose pull it should fix this for you.

Confirm the issue is gone. Thanks @nytai for your quick reply

I also faced the ModuleNotFoundError for different modules, when i docker-compose pull it solves. how it solves the issue.


Allow manually setting done dates through task modal [when the 'add done date' setting is disabled]

⚠ Please check that this feature request hasn't been suggested before.

[X] I searched previous Ideas in Discussions didn't find any similar feature requests.
[X] I searched previous Issues didn't find any similar feature requests.
[X] I am only requesting a single feature. Multiple changes should be split into individual requests, with links between them.
[X] I believe my requested feature will be generally applicable to other users, not just me: it is not uniquely tied to my personal workflow.

🔖 Feature description
Currently, if the option "Set done date on every completed task" is disabled, manually setting a done date in the task modal is not saved to the task.
Not all tasks need a completion date. But some do.
The feature requested is to allow the modal to save values to the Task regardless of the setting to automatically add these or not.
✔ Solution
With option to "Set done date on every completed task" disable, the following should be allowed:
Taking the following steps:

Open task modal
Set status to "done"
Set a done date

Should set the status to "done" and writ the done date to the task.
❓ Alternatives
No response
📝 Additional Context
No response

This arose out of #2859.

Currently, if the option "Set done date on every completed task" is disabled, manually setting a done date in the task modal is not saved to the task.

This is actually not 100% true.
It turns out that when "Set done date on every completed task" is disabled:

If the Task is DONE when it is opened in the modal, then a manually added Done date is saved.
It is only when the Task is changed to DONE whilst the modal is open that a manually added Done date is not saved.

This is why I was asking for more complete reproduction steps in https://github.com/obsidian-tasks-group/obsidian-tasks/issues/2859.
So the above information provides a workaround for the time being.


MS-SQL Error in ACE Docker

HI,
i am facing this error when i am installing ACE Docker.
in short i am getting error related to MS-SQL.
SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
Error: The evaluation period has expired.
This program has encountered a fatal error and cannot continue running.
The following diagnostic information is available:
   Reason: 0x00000001
   Signal: SIGSEGV - Segmentation fault (11)

Stacktrace: 000056441d52fce7 00007fd80764b390 000056441d53ef52
000056441d5286db 000056441d527e59
Process: 6 - sqlservr
Thread: 18 (application thread 0x1028)
Instance Id: e623d85c-8194-4f4a-8c4e-fba2871e25e4
Crash Id:
Build stamp: a37664e45e4156e76a53fa282fd694cb49f70c2037515f5684e3ce6dfa7549bc
/usr/src/ace/import-data.sh: line 4:     6 Aborted                 (core dumped) /opt/mssql/bin/sqlservr > /dev/null
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
},
"ConnectionStrings": {
Error: The evaluation period has expired.
This program has encountered a fatal error and cannot continue running.
The following diagnostic information is available:
   Reason: 0x00000001
   Signal: SIGSEGV - Segmentation fault (11)

Stacktrace: 000056441d52fce7 00007fd80764b390 000056441d53ef52
000056441d5286db 000056441d527e59
Process: 6 - sqlservr
Thread: 18 (application thread 0x1028)
Instance Id: e623d85c-8194-4f4a-8c4e-fba2871e25e4
Crash Id:
Build stamp: a37664e45e4156e76a53fa282fd694cb49f70c2037515f5684e3ce6dfa7549bc
/usr/src/ace/import-data.sh: line 4:     6 Aborted                 (core dumped) /opt/mssql/bin/sqlservr > /dev/null
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
}
}
==========================================================
===============================================================
|        Thank you for provisioning ACE with Docker!!         |
|  Please use the following information to interact with ACE  |
$settings = @{
Uri        = 'https://<IP_ADDRESS>'
Error: The evaluation period has expired.
This program has encountered a fatal error and cannot continue running.
The following diagnostic information is available:
   Reason: 0x00000001
   Signal: SIGSEGV - Segmentation fault (11)

Stacktrace: 000056441d52fce7 00007fd80764b390 000056441d53ef52
000056441d5286db 000056441d527e59
Process: 6 - sqlservr
Thread: 18 (application thread 0x1028)
Instance Id: e623d85c-8194-4f4a-8c4e-fba2871e25e4
Crash Id:
Build stamp: a37664e45e4156e76a53fa282fd694cb49f70c2037515f5684e3ce6dfa7549bc
/usr/src/ace/import-data.sh: line 4:     6 Aborted                 (core dumped) /opt/mssql/bin/sqlservr > /dev/null
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible
PS: if i do netstat -antp for active connections and open ports i can see port number 1433 is open but when i do telnet or nc to check the connectivity it shows Connection Refused.

This issue should be fixed with some of the commits I made tonight both here and on Docker Hub. Before today I was leaving the MSSQL_PID Environment Variable with its default value of “Development” which caused the container to only be valid for 90 days. You can now specify the MSSQL_PID value in the ace.env file. For more information on what this environment variable does, check out this site https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-configure-environment-variables.


Vacation

I'm on vacation for the next two weeks from tomorrow (July 29, 2017 - August 13, 2017).
Please don't expect any support from me during this time...
I wish GitHub provided a better way for announcing stuff like this. I'll close this issue when I'm back

I'm back now - will try to work through the open items one-by-one now... Please give me some time to catch up.


Compiling master file for the One True Catalogue

The problem: .csv metadata files are scattered across many different folders and files, and there's no master copy.
The solution: Since it's been run until mid Apr 2021, with only about a month or so of data to add on, it's a good opportunity to compile a master:

Raw detections (every single detection)
Merged detections (with SNR)
Detections after customfilter
Detections that are linked to an event (with custom filter)

The final catalogue should be using REAL with relaxed conditions (i.e. don't feed in the custom filter) but do your own filtering
It probably won't be space efficient and I'll probably have to drop some columns.
This allows me the possibility of re-running association / re-cut the SAC files again so it's all in one nice folder and I will no longer have to search around for stuff.

Have produced compiled RAW, MERGED, and CUSTOMFILTER files for:

[ ] Feb - Mar 21
[ ] Oct 20 - Jan 21
[ ] Jul 20 - Aug 20
[ ] Jan 20 to Jul 20

Merged all into master file: ❌

Have compiled event archive:

[ ] Oct 20 - Jan 21
[ ] Feb 21 - Mar 21

Magnitude Calculations:

[ ] Oct 20 - Jan 21 (Running now)
[ ] Feb 21 - Mar 21 (pending fixing the missing A54 files)

Should want to fix #7 when I get the full catalogue since I might do it manually (patch sac file names, sac headers, csv data)
Which is actually a bad idea since the association is unlikely to be finalised or complete. This means that I'll have to continually patch the names
Also downloaded the event archives onto local device.
What would help would be to fix it at the source i.e. the source EQT files for which the detections were made, which would have downstream effects for at least future association runs

[ ] Compile b-value plot
[ ] Merge REAL locations together, run hypoDD and plot with magnitudes

Closed until more months of data come in, or until I fix the station renaming


#8 Menu Navigation Bar

Value Proposition
As a User
I want to have a menu access point bar
So that I can access the navigation and navigate to different pages inside the App
Description

Acceptance Criteria

[ ] A Menu access bar is Displayed on the Top of every Page
[ ] At the Right side is a small rounded Default Picture/Logo
[ ] At the left side is a "hamburger" icon

Tasks

[ ] Create a new feature Branch
[ ] Create Nav Bar
[ ] Add Default Image on the Right
[ ] Add a Hamburger Menu Icon on the left
[ ] Create a Layout and add the Nav Bar to it, so it will displayed on each page

Complexity
S

Hey Petros,
I think it would be best to split this in two separate user stories. 1. the hamburger menu with already working links inside (it would be nice to see the open menu in an additional scribble) and 2. the profile picture with a profile page.
If you add the hamburger menu icon and the profile image and they do not have any function, this will add no value to the user.

CLOSED ISSUE AND MERGED ON ANOTHER


fix: use pause and resume api to ensure orderly init listener->consumer

#181

@lipeining Thank you for your contribution. The change looks good to me.
But why is the destination branch branch-1.3 instead of master? Do you want v1.3.x with this patch to be released?

@lipeining Thank you for your contribution. The change looks good to me.
But why is the destination branch branch-1.3 instead of master? Do you want v1.3.x with this patch to be released?

Hi, @massakam
We are currently experiencing this issue in version v1.3.x by chance and would like to know more details about the cause, if you know the details could you please help us analyze it ?

@rickyes Details are explained in #181. Merging this PR should fix the issue.

@massakam It is rather strange that we do not reproduce it locally, but only in specific network environments.

@rickyes This phenomenon does not always occur. It happens when data->consumer is accessed in the following part before it is initialized.
https://github.com/apache/pulsar-client-node/blob/50c090678ecedaa06e2c68ce1db3046655a9a075/src/Consumer.cc#L62-L65
Adding sleep to the following part will almost certainly reproduce this issue.
--- a/src/Consumer.cc
+++ b/src/Consumer.cc
@@ -23,6 +23,7 @@
 #include "MessageId.h"
 #include <pulsar/c/result.h>
 #include <atomic>
+#include <chrono>
 #include <thread>

 Napi::FunctionReference Consumer::constructor;
@@ -163,6 +164,7 @@ class ConsumerNewInstanceWorker : public Napi::AsyncWorker {
     Consumer *consumer = Consumer::Unwrap(obj);

     consumer->SetCConsumer(this->consumerWrapper);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
     consumer->SetListenerCallback(this->listener);
     this->deferred.Resolve(obj);
   }

@massakam Is it possible that the MessageListener was triggered before we triggered the callback subscribeCallback?

@rickyes I think this bug becomes apparent if the MessageListener is triggered before the subscribeCallback is completed.

@massakam Sorry, I meant before the subscribeCallback was triggered and not before the subscribeCallback was completed.

Because if it is possible to trigger the MessageListener before the subscribeCallback is triggered, this PR doesn't do much good.

@rickyes Sorry, this comment is incorrect. It seems that MessageListener is not triggered until the execution of subscribeCallback is completed.
subscribeCallback is executed on the following line in the C++ client library. And the C++ client will not start receiving messages until this method completes.
https://github.com/apache/pulsar/blob/a54c6c003c626cb16d90200ad81dd3ec37be2133/pulsar-client-cpp/lib/ClientConnection.cc#L877

@massakam LGTM, thank you for your patient answer~


[DON'T MERGE] Add AsyncPublisherService

In order to send messages in a non-blocking manner.

[ ] Review & Merge
[ ] Use SNAPSHOT version in Registration service in Test
[ ] Do mvn release:prepare and mvn release:perform.
[ ] Let all teams know (both the ones that are working around this with CompletableFuture.runAsync and the ones that think they are async (using Async SNS client), but are not (e.g. Invoice team).

I thought about providing callbacks and CompletableFutures and what not, but realized that most of us wouldn't need that. Keeping it simple for now and letting people who actually needs more add that later (when they have a real use case).

Something like this should do the trick, wouldn't it @qinjin-izettle ?

Hmm... I wonder if it's worth making an AbstractMessagingPublisher and then extend it with MessagingPublisher and AsyncMessagingPublisher.

Pinging @karlgrund since I know he has battled this at least once (working around it using CompletableFuture.runAsync with custom thread pool).

Wait a bit please. 😄

@xiaodong-izettle No problem, I set it to [DON'T MERGE] :-)

@xiaodong-izettle anything in particular? :-)

@minisu, actually a lot. :)

This post message operation, if we want an async version, we definitely need to keep the sync version. Because, we do have cases that sync operation is a necessity, as someone already mentioned in a Slack channel. Or if you want examples, check AmazonSNSAsyncClient, or Cassandra native driver. We cannot ask the API client to create two publisher instances, one for sync operations, the other for async ones.

We definitely need to consider failure cases when doing async operations, pure logging the failure is not enough sometimes. Not all scenario fits fire-and-forget.

This publish message operation is not slow (relatively of course) by itself, it's just a Http call to the SNS endpoint.

This is a public repo, we should not push a not mature solution to the public.

But great initiative, @minisu, 👍. I'll definitely look into this. 😄

We cannot ask the API client to create two publisher instances, one for sync operations, the other for async ones.

It's not obvious to me why we cannot ask API clients to do so. But I'm not against it either. Feel free to modify this PR.

We definitely need to consider failure cases when doing async operations, pure logging the failure is not enough sometimes. Not all scenario fits fire-and-forget.

This PR is not trying to solve all scenarios, and I don't think it has to. The most common scenario, in both my current and last team, has been to send analytics messages only intended for our Growth department. These events are far from critical and a LOG.warn should be enough.
Luckily, the added method ( public <M> void post(M message, String eventName)) is future-compatible, in the sense that you can either modify it to return a CompletableFuture or add an overloaded method that also takes a callback as parameter.

This publish message operation is not slow [...]

That depends on your definition of slow. I'm not saying that it's a big problem,
but worth fixing considering that the fix is essentially for free. This is how I'm thinking:
The send latency (how fast the HTTP call to the SQS API completes) is typically 60-70 ms.
The user resource (UserResource.getUserInfoByUuid) in the Sun has a mean response time of 6 ms.
If we would add an SQS message publishing to this, the response time would become 71 ms.
It would also mean that the resource would go from being able to handle 167 requests per second per thread, to 14 requests per second per thread.
We also have endpoints that will result in multiple messages being published.

Thanks.

This PR is not trying to solve all scenarios, and I don't think it has to. The most common scenario, in both my current and last team, has been to send analytics messages only intended for our Growth department. These events are far from critical and a LOG.warn should be enough.

I would suggest you use whatever async solution you prefer in your service for now. You've found several quite good solutions in our repos actually. I think this library should provide a generic enough solution. :)

The send latency (how fast the HTTP call to the SQS API completes) is typically 60-70 ms.

Are we talking about SQS or SNS? They are not the same. Possibly worse of course. :-)

It would also mean that the resource would go from being able to handle 167 requests per second per thread, to 14 requests per second per thread.

Do you actually need to handle that many requests (167) per second per thread right now? If not, possibly no need to go for async way right now.

I'm not attached to this code at all and I'm not in a rush, so feel free to create another PR. My goal is just to move this forward so that we can easily do async SQS requests

Sure, and I think we most probably are talking about SNS. :)
Thanks for the great initiative. 👍 😄
And we do agree upon that this library needs some renovation. 😄

Sorry for the confusion. I'm only talking about SNS. 😊

Do you actually need to handle that many requests (167) per second per thread right now? If not, possibly no need to go for async way right now.

My main point was increased latency though. Amazon noticed that every 100 ms in increased response time costed them 1 % in sales (which means an even higher cost in revenue, considering fixed costs). So why would we not save 65-130 ms (in the cases where we do 1 or 2 SNS requests) if we can do it for free (in the very common case of analytics events)?
And like you have observed, most of our services already publishes to SNS async. Did they all do the wrong analysis? :-)

I would suggest you use whatever async solution you prefer in your service for now.

Yes, that's what we'll probably end up doing.

What's the status on this? I think it's a good idea and a nice approach! 👍

How about something like this? https://github.com/iZettle/izettle-toolbox/pull/258
@minisu, @karlgrund and @qinjin-izettle?


getter isnot defined

I cloned this repository and run  pub get.
But some problem still show in the terminal.
Maybe something with the code.

The getter 'Columns' isn't defined for the class 'Song'.
Try importing the library that defines 'Columns', correcting the name to the name of an existing getter, or defining a getter or field named 'Columns'.

class Song {
  int id;
  String artist;
  String title;
  String album;
  int albumId;
  int duration;
  String uri;
  String albumArt;

  Song(this.id, this.artist, this.title, this.album, this.albumId,
      this.duration, this.uri, this.albumArt);
  Song.fromMap(Map m) {
    id = m["id"];
    artist = m["artist"];
    title = m["title"];
    album = m["album"];
    albumId = m["albumId"];
    duration = m["duration"];
    uri = m["uri"];
    albumArt = m["albumArt"];
  }
}

#1


arrowExpression vs ArrowFunctionExpression

From @rreverser in https://code.google.com/p/esprima/issues/detail?id=567

What steps will reproduce the problem?

Parse 'x => 1' with esprima.parse to ast variable.
Check out type of ast.body[0].expression.

What is the expected output?
'ArrowExpression' (as stated on https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API page)
What do you see instead?
'ArrowFunctionExpression'
I suppose this is by design, but would be great to fix either MDN wiki page or Esprima's output type so all the AST tools developers could follow the same specification and expect same results.

A fix for that is already in the harmony branch: 0e4014d2e0d4c024c3481acdad7e7a813195527b

Related SpiderMonkey issue : https://bugzilla.mozilla.org/show_bug.cgi?id=913617.

With https://github.com/estree/estree/issues/2 resolves to Mozilla/SM changing to ArrowFunctionExpression, we don't need to change Esprima's to ArrowFunction.


Include exec for entryfile on image

ACK 3a302a18e78d0a5516a5d15b39163e7346ba25df
Do you want to do the images or shall I? It's a shame I can't do the AMD64 ones, and you the ARM64 ones, then we merge into a multiarch image on docker hub...

ACK 3a302a1
Do you want to do the images or shall I? It's a shame I can't do the AMD64 ones, and you the ARM64 ones, then we merge into a multiarch image on docker hub...

Seems like we might be able to do this with docker manifest command... maybe not worth it though

I wondered if new images were being made anyway whether to just wait and let them get replaced in time. It's not a mission critical failure?


Segmented genomes

Add option to parse header fields for segment qualifiers with custom formats to include and select best segments from alignments. At the moment hard-coded to include all reference sequences that have the segment=N/A field in the header (as in Virosaurus) and are ignored during grouped single selection, outputting all segments into the selected genome sequence files.
Also add option to select the best segment if multiple segments (same identifier) are grouped.

Make GENE reference identifier recognition optional


Environment variable not detected with import déclaration

Migrating from version 2.3.1 to 2.3.2, my application didn't startup now, with the deprecation of iKey.
I use dotenv to load my environment variable.

 APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://westeurope-4.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/

When I start my application (with an express server for exemple)
import express from 'express';
import { config } from 'dotenv';
import { setup, start } from 'applicationinsights';

config();
console.log(JSON.stringify(process.env));
setup();
start();
const app = express();
app.get('/', (_req, res) => {
  res.send('Hello Typescript world!');
});

const PORT = process.env.PORT || 5000;
app.listen(PORT, () => {
  console.log(`Listening on port ${PORT}`);
});

I get this error
ApplicationInsights:An invalid instrumentation key was provided. There may be resulting telemetry loss [ undefined ]
Error: Instrumentation key not found, please provide a connection string before starting the server

@sylvain-bodin following code works fine to me, is possible something is wrong with the value you set in the actual environment variable, please double check and let us know.
process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] = "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://westeurope-4.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/"; let appInsights = require('applicationinsights'); appInsights.setup().start();

@hectorhdzg I already test that kind of code, and yes it works. But I'm coding in Typescript. And when you use import instead of require to load library it doesn't work.
It seems that the new code get value from the env variable when initializing the library (in JsonConfig) when the previous code was loading values at the startup start().

@sylvain-bodin please load your environment variables before importing applicationinsights module to solve the issue.
import express from 'express';
import { config } from 'dotenv';
config();
import { setup, start } from 'applicationinsights';
console.log(JSON.stringify(process.env));
setup();
start();
const app = express();
app.get('/', (_req, res) => {
  res.send('Hello Typescript world!');
});

const PORT = process.env.PORT || 5000;
app.listen(PORT, () => {
  console.log(`Listening on port ${PORT}`);
});

Thanks @hectorhdzg for this.
But yet, it's not that simple :)
In my project, I use linter and formatter, and so, all imports are then put at the top of the file.
Maybe I'm the only one using it like this and having trouble with these changes of the library.

We will need to investigate this one a little further to ensure environment variables are not read when the SDK is imported.


node-red data persistence fails with permissions error

Details
Helm chart name and version:
node-red:10.0.0

Container name and tag:
nodered/node-red:2.1.4

What steps did you take and what happened:
I'm trying to deploy node-red to AWS EKS with Fargate and persistent volume claim to an EFS access point. When the pod starts up it crashes with the following error in the logs:
><EMAIL_ADDRESS>start /usr/src/node-red
> node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"

internal/fs/utils.js:332
    throw err;
    ^

Error: EACCES: permission denied, copyfile '/usr/src/node-red/node_modules/node-red/settings.js' -> '/data/settings.js'
    at Object.copyFileSync (fs.js:2061:3)
    at copyFile (/usr/src/node-red/node_modules/fs-extra/lib/copy-sync/copy-sync.js:70:6)
    at onFile (/usr/src/node-red/node_modules/fs-extra/lib/copy-sync/copy-sync.js:56:25)
    at getStats (/usr/src/node-red/node_modules/fs-extra/lib/copy-sync/copy-sync.js:48:44)
    at handleFilterAndCopy (/usr/src/node-red/node_modules/fs-extra/lib/copy-sync/copy-sync.js:33:10)
    at Object.copySync (/usr/src/node-red/node_modules/fs-extra/lib/copy-sync/copy-sync.js:26:10)
    at Object.<anonymous> (/usr/src/node-red/node_modules/node-red/red.js:125:20)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32) {
  errno: -13,
  syscall: 'copyfile',
  code: 'EACCES',
  path: '/usr/src/node-red/node_modules/node-red/settings.js',
  dest: '/data/settings.js'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>start: `node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Relevant Helm values:
I'm installing via command line as below. I added the security context settings after reading #537 which appears to be the same issue.
helm install node-red \
  --set env.NODE_RED_ENABLE_PROJECTS="true" \
  --set persistence.data.enabled="true" \
  --set persistence.data.existingClaim="pvc-nodered" \
  --set podSecurityContext.runAsUser=1000 \
  --set podSecurityContext.runAsGroup=1000 \
  --set podSecurityContext.fsGroup=1000 \
  --set securityContext.runAsUser=1000 \
  --set securityContext.runAsGroup=1000 \
    k8s-at-home/node-red

What did you expect to happen:
The install would use the persistent volume claim for data persistence and would have sufficient rights on the volume to create the necessary files.
Anything else you would like to add:
I have also configured my AWS EFS access point as shown below:

Additional Information:

This issue has been reported here and on node-red docker forums. Some have apparently solved the issue by running chown 1000:1000 on the volume attached to the docker container, however this is not practical or feasible on kubernetes.

Very intriguing, this is the first time I've seen someone try to deploy this in the cloud using EKS. Have you tried using EBS instead of EFS?

Hi @onedr0p, I'm using EKS Fargate (serverless pods, no EC2) which doesn't support EBS yet. I opened a ticket on the node-red community forum, but after seeing #537 I thought someone here might be able to help. The same node-red issue has been reported multiple times across various forums, mostly relating to docker deployments. I haven't had any problems with other containers and EFS, so it must be something to do with the way they've configured the user in the image which is not kubernetes-friendly.

You've got guts running stateful workloads in a stateless environment like fargate. Not all workloads will be happy using a shared file store (EFS/NFS) for their persistent data too. You can add ec2 nodes (bottlerocket, SSH-less, immutable) to your existing EKS cluster that are able to consume EBS while having fargate as well. You can use both to their best ability.

Yes I must admit it's all a bit experimental! Anyway, I managed to get it working with help from the node-red community here. It was either my PV/PVC config, or changing the EFS root directory from default "/" to a named folder. Either way if anyone else has the same issue hopefully they won't lose a day like I did... Re: Fargate, aside from not paying for excessive headroom on EC2 and EBS (I always seemed to over-cater my node groups and volumes), I like the multi-zone availability you get with Fargate + EFS, after a slightly painful setup (e.g. creating mount points for each EFS in each subnet). I'm sure I'll hit something that must use EC2 (e.g. anything with a daemonset) but so far so good. Thanks for your help!


Incorrect xaml for red heart example

Hi,
The XAML for the red heart with the black border under the "Layering and Mirroring" section is incorrect. The sample on the page will display the heart with a red border, followed by the black heart on top of it.
The "Glyph" properties need swapping around so the heart fill symbol in red is drawn first, and then the heart with black border on top. The correct XAML would be:
<Grid>
    <FontIcon FontFamily="Segoe Fluent Icons" Glyph="" Foreground="#C72335" />
    <FontIcon FontFamily="Segoe Fluent Icons" Glyph="" />
</Grid>

Thanks.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 15e1f4b4-3d25-c08c-e3b0-12011d3bba0f
Version Independent ID: 3b140070-493f-0b2c-f7c4-3fb89192d2d0
Content: Segoe Fluent Icons font - Windows apps
Content Source: hub/apps/design/style/segoe-fluent-icons-font.md
Product: reunion
Technology: design
GitHub Login: @hickeys
Microsoft Alias: hickeys

Please put the suggested XAML in a code block. It's invisible now.

Apologies for missing the notification. I've updated the code as requested.

Thanks. Code example was updated.