Add policy to handle all exceptions except specified one

For example usage of cancellation token needs throwing OperationCancelledException, but currently it's not possible to express that I don't want to retry such exceptions

SlyNet,
You could do this
Policy.Handle<Exception>(ex => !(exception is OperationCancelledException))

Yes, thanks. But fluent interface like Handle().Except would be readable?

SlyNet,
Thanks for you input, I will consider adding this. In the meantime, If you wanted to, your could add this as an extension method in your code.

Hi, Michael
Something like .Except looks like a good feature to me as well.
Common case I have came across is not retrying on Timeout.
Reasonings for that are:

Timeout quite probably means that requested resource is in trouble (working on top of its capacity) and adding retries makes things even worse (puts more stress on the resource already in stress, opens more long-hanging connections etc.)
You probably already don't need the result after (retryCount + 1)x timeouts has passed

Could you probably suggest better solution to handling this type of situation?
Thank you.

Hi @kbabiy  (Michael Wolfenden has stepped back from Polly by the way; the AppvNext team have now taken stewardship.)
I'll reflect further on an .Except(...) feature: I can see a syntax like this would suit some situations.
Aspects to think through would be how it played alongside the existing syntax.  For instance, what would be meant by the following?
Policy
  .Handle<X>()
  .Or<Y>()
  .Except<A>()
  .Or<B>()

Should B be taken to be excluded or included by that? (And would the decision be clear to all users, whichever we chose?). It would probably be clearer to say that 'whitelisting' and 'blacklisting' exceptions could not be mixed, and 'all except' was an entirely alternative fluent stream.  eg
Policy
  .HandleAllExcept<X>()
  .Or<Y>(); // Clearer here that Y is not handled

We'd also then need a way to combine that with the fact that Polly can also now handle return results.  We wouldn't want to mix blacklisting and whitelisting in the same syntax, so result-handling would have to follow the 'all except' pattern too.
Policy
  .HandleAllExcept<X>()
  .Or<Y>()
  .AndAllResultsExcept<TResult>(...)
  .OrResult<TResult>(...) // etc

Beginning to become quite complex to follow ...
We always have to consider whether extra API surface/complication adds sufficient benefit ... jury slightly still out for me on this one, given that there is already a workround (and taking into account the complex play with handling results).  Very happy for further community feedback on this.

@kbabiy Regarding other ways to handle the scenario:

Timeout quite probably means that requested resource is in trouble (working on top of its capacity)
and adding retries makes things even worse

... you have described the classic case for using a CircuitBreaker wrapping (or wrapped by) the Retry policy.  See the very similar description about retries being counter-productive, in the introductions to Retry and CircuitBreaker in the wiki.
Try wrapping a CircuitBreaker (perhaps breaking specifically on TimeoutException) in with your Retry.

Hi, @reisenberger
Thank you for suggestion about CircuitBreaker. I know of this concept reviewed it again after your suggestion, but i think it doesn't exactly fit (seems to be too radical) in my case, though generally makes a lot of sense in the similar scenarios.
As far as i understand problem with the Except originally proposed probably comes from the existing Or API being the only option to extend the Handle clause - therefore adding any And-like condition (like Except, AndNot, And etc.) leads to the unnecessary complex binary expressions being possible
Therefore adding the blacklisting approach (like HandleAllExcept) looks like a cleaner solution, even though needing symmetrical changes in the results handling (which probably also makes sense to extend with blacklisting).
Hopefully the benefit of such changes will overweight the needed API complications


Testing 1st component for oligo genes

Hi Kirstie,
I am keen to test if my first component from the PLS is enriched for the oligo gene list you used in your paper.
I have tried to use PLS_candidate_genes.m, I input my 1st component gene weights but I wanted to check about the oligo gene file, is the second column taken from the 1st component gene weights file (2nd column)?
What does the output file represent and how do i interpret it to find if my first component is enriched for the oligo genes (i.e. p-value)?
And just to check - for PLS1 gene weights file is the 2 column the rank and 3rd column the weight results from the PLS analysis?
Sorry for all the questions and thank you so so much for all the help you've given me!
bw
Peter

Hi Kirstie,
Apologies for the multiple emails.
I think I have managed to figure out the PLS_candidate_genes.m script.
Could I ask under what circumstances should true and false be used (i.e taking the absolute values), as the options give quite different answers ?
Thanks
Peter

Hi @docni - So sorry I've been abandoning you! I'm traveling a whole bunch!
I'm glad you figured out the PLS_candidate_genes.m code.
I can't answer whether you should use True or False for the absolute values option - it entirely depends on whether you think the sign on the zscore matters.
You can see that in our paper we chose false for the direction of the oligodendrocyte gene expression meaning we did care about the sign, but true for the direction of the schizophrenia genes meaning we didn't care about the sign.
We interpreted the oligodendrocyte gene expression as being important only if it were higher in certain areas, but schizophrenia gene expression if it were either higher or lower in certain regions.

Hi Kirstie,
That makes sense, thanks again for all your help.
bw
Peter


pre with language problem in MarkdownV2

There is a problem with decoding in MarkdownV2 format when the sent message contains language.
Sent message:
"""
def hey():
    print('hey')

"""
it decodes it to:
    print('hey')

While it decodes the message in HTML format as:

def hey():
    print('hey')

Fixed with release v1.3.1


URL Submissions from Front End

Implemented using a URL to submit from front end.

@jonrkarr this is ready for review, but I want to make some cleanups before merging.
I have not implementing parsing the URL parameter yet, that will be a seperate PR after this is merged


NuGet Package targets

Hi,
This PR proposes a way to compile the NuGet package under both .NET 6 and .NET 5 targets. It also removes "hard" dependencies and only requires EPiServer.CMS.AspNetCore.Templating (which inherits from all dependencies that were included manually).
Thank you,
David

Thanks! That is an awesome update. I will create a new version of the nuget as soon as I can.


Migrate Items added through old Timeline plugin

The older Timeline plugin let users create an Omeka Item with the Timeline item type, and then associate a tag to that timeline, to pull in items with that tag.
We should add some kind of migration, to covert any items of the type Timeline into NeatlineTime Timeline records. This would involve moving the following data:

DC:Title (NeatlineTimeTimeline->title)
DC:Description (NeatlineTimeTimeline->description)
ItemTypeMetadata:Tag (NeatlineTimeTimeline->query as serialized array)
Creator ID (NeatlineTimeTimeline->creator_id)
Date added
Public
Featured

'date_modified' would be set to whenever the migration took place, perhaps.
Should also possibly provide an option to delete any Items from the Timeline plugin after the migration.

Closing as wontfix, opting instead to provide a separate script for users of the old Timeline plugin who wish to migrate their data to NeatlineTime.


Update VehicleModCollection.cs

There is some offending code here but im not sure thats it.
The current code works for original vehicles but not for add on Vehicles.
My Livery system works although i do have to adjust for ....
vehicle.Mods.LiveryCount - reports correctly for both original and add on.
where as
this[VehicleModType.Livery].ModCount only works on original.
vehicle.GetLiveryName  works for both original and add on.
vehicle.Mods.GetLocalizedLiveryName only seems to works on original.
So i Loop vehicle.Mods.LiveryCount
and try vehicle.Mods.GetLocalizedLiveryName
else vehicle.GetLiveryName


Builds fails for 0.2.0 , <IP_ADDRESS>

vvdec <IP_ADDRESS> builds just fine.
Both latest tags failed with both cmake and regular make.
0.2.0.txt
0.1.2.txt
What could be an issue?

/home/zen/Vault/Downloads/vvdec-<IP_ADDRESS>/source/Lib/CommonLib/UnitTools.cpp: In function ‘bool PU::getInterMergeSubPuMvpCand(const PredictionUnit&, MergeCtx&, bool&, int)’:
/home/zen/Vault/Downloads/vvdec-<IP_ADDRESS>/source/Lib/CommonLib/UnitTools.cpp:3088:43: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘class Mv’; use assignment or value-initialization instead [-Werror=class-memaccess]
 3088 |         memset( mi.mv, 0, sizeof( mi.mv ) );
      |                                           ^
In file included from /home/zen/Vault/Downloads/vvdec-<IP_ADDRESS>/source/Lib/CommonLib/Unit.h:56,
                 from /home/zen/Vault/Downloads/vvdec-<IP_ADDRESS>/source/Lib/CommonLib/UnitTools.h:54,
                 from /home/zen/Vault/Downloads/vvdec-<IP_ADDRESS>/source/Lib/CommonLib/UnitTools.cpp:51:
/home/zen/Vault/Downloads/vvdec-<IP_ADDRESS>/source/Lib/CommonLib/Mv.h:78:7: note: ‘class Mv’ declared here
   78 | class Mv
      |       ^~

seems they used memset when it would probably have been better to use a contructor

Are you using gcc-10?
I will quick-fix it in the coming days. Probably just need to annotate the memset.

@adamjw24
> gcc --version
gcc (GCC) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@adamjw24 can you provide  binaries, for now?


README.md: rewrite intro sentence

See https://github.com/dogecoin/dogecoin/issues/2471.

I close it, and keep #2471 to discuss it.


Fails to parse counterbalance

The tool says it can't load this deck because of counterbalance:
https://deckstats.net/decks/161156/1769395-memnarch

So it seems that it specifically does not parse the amonkhet masterpiece version

@Aznlilly86 Thanks for the bug report!
It seems that the fix done in #5 was not enough to handle all the set names that differ between deckstats.net and Scryfall.
I made a fix in b23cb39607608553ef51e524a269eb4056d6f881, which will be included in the next release.
In the meantime you can test it here if you're using Windows or here if you're using macOS.

@Aznlilly86 A fix has been published, so I'm closing this issue. Feel free to re-open it if it wasn't solved for you.


[Account Control] Count and Limit the amount of events from the script

I am currently talking with Facebook Creator Team (my account is legacy verified) and I am discussing the reason my account was restricted from "liking posts". The reason is obvious, this script was overused by me, so I am wondering if we can add a way to control this — here are some suggestions:

Make the script count all actions, so far IG seems to treat the restrictions differently based on the action for example:

View Profile (~800-1000 a day for my account, other might differ)
Like Post (~400-600)
Like Comments (~600-800)
View Story (no idea)
Like Story (no idea)

Stop the script as soon as the Block alert is shown by Instagram:

@shine-jayakumar just adding another screenshot of a different softban message, this appears after opening too many profiles (specially using -ff):

Try Again LaterWe restrict certain activity to protect our community.

<button class="_a9-- _a9_0" tabindex="0">Report a problem</button><button class="_a9-- _a9_1" tabindex="0">OK</button>

Rework the --delay option , for example by default it selects a random number of seconds but if you add -d 15 then it waits exact 15 seconds to perform next action. The most "human-like" solution I believe should be to change delay like this:

-d 15 = Wait 15 seconds (like it is now)
-d 0-15 = Wait randomly seconds between 0 and 15
-d 10-40 = Wait randomly between 10 to 40 seconds
This way the script will act less exact and more human-like

Make the script share the total actions performed as it works, like a "status" so we can see if we are going over the limit and stop it.

@ap0l0 Sad it happened but I guess the restriction will be lifted soon.

point # 3: currently, if delay is not specified, it selects a random number (0-10 seconds). Accepting a range would be a nice addition
point # 4: in the lastest version, I've added the status to the end of the script (number of likes, posts viewed, stories likes etc.). I can make it show the status while it's running.
point #1: script is currently counting the actions but since we don't know the exact limit for each action for an account, we're going to have to assume a number. I'll have to check the IG guidelines if there's anything specified there.
point # 2: should a nice addition.

point # 1: script is currently counting the actions but since we don't know the exact limit for each action for an account, we're going to have to assume a number. I'll have to check the IG guidelines if there's anything specified there.

This number changes and is dynamic for each account based on age, activity, etc. We will have to leave each user to control the actions per day according to their account.


Is it convenient to export the code in the helper directory

I have a need to let axios make requests through a network proxy, so I want to call the code in the helper directory for configuration. thank you.

You can already do that by passing an axios instance to the client constructor.
import { NotificationsApiClient } from '@scaleleap/selling-partner-api-sdk'
import axios from 'axios'

new NotificationsApiClient({
  basePath,
  axios: axios.create({
    // ... create axios however you want
  }),
})

Thank you very much for your reply. I know that the instance of axios can be passed to the API in this way, but there is a troublesome place in this way, that is, I cannot re-code the logic of ApiClientHelpers. In other words, in order to set up the network proxy, I have to completely re-customize an axios instance, and I have to reconfigure the interceptors.
Is it possible to add network proxy configuration to the interface, for example as follows:
thanks.
`
export const ApiClientHelpers = {
getAxiosInstance(parameters: APIConfigurationParameters): AxiosInstance {
let axiosInstance: AxiosInstance;
const { axios } = parameters;
if (axios) {
  axiosInstance = axios;
} else {
  const { accessToken, credentials, region, roleArn } =
    ApiClientHelpers.validateRegion(parameters);

  const config: AxiosRequestConfig = {
    headers: {
      "user-agent": USER_AGENT,
      "x-amz-access-token": accessToken ?? "",
    },
  };

  if (parameters.proxy) {
    // add proxy here
    let httpsAgent = new SocksProxyAgent(parameters.proxy);
    let httpAgent = httpsAgent;
    config.httpAgent = httpAgent;
    config.httpsAgent = httpsAgent;
  }

  axiosInstance = globalAxios.create(config);

  axiosInstance.interceptors.request.use(
    aws4Interceptor(
      {
        region,
        service: "execute-api",
        assumeRoleArn: roleArn,
      },
      credentials
    )
  );
}

axiosInstance.interceptors.response.use(
  (response: AxiosResponse) => response,
  (error: AxiosError) => {
    throw apiErrorFactory(error);
  }
);

return axiosInstance;

},
`

Also, the solution we use, is simply to set the basePath to an endpoint, which then proxies to the SP API endpoint.
Effectively, it is the same thing.
You can use something like this: https://github.com/http-party/node-http-proxy
Our proxy also does the AWS4 signing.


Could not initialize Python interpreter when using vscode-lldb

Describe the bug
Could not initialize Python interpreter error appears in DEBUG CONSOLE in VSCodium when using vscode-lldb.
Steps To Reproduce
NOTE: although I use Rust in my error reproduction steps, this error seems to happen with any language that CodeLLDB supports. Rust is simply the one I am most familiar with -- so feel free to use something else in testing.
Steps to reproduce the behavior:

add environment.systemPackages to system nix expression:

environment.systemPackages = with pkgs; [
  (vscode-with-extensions.override {
      vscode = vscodium;
      vscodeExtensions = with vscode-extensions; [
        vadimcn.vscode-lldb
      ];
  })
];

Navigate to, or create a Rust project: cargo new myproject; cd myproject
Open in VSCodium: codium ., and attempt to compile (F5)

Notice DEBUG CONSOLE output: Could not initialize Python interpreter - some features will be unavailable (e.g. debug visualizers).
Expected behavior
Debug console should not show this error.
Screenshots

Additional context
Add any other context about the problem here.
Notify maintainers
@nigelgbanks
Metadata
 - system: `"x86_64-linux"`
 - host os: `Linux 6.3.12, NixOS, 23.05 (Stoat), 23.05.20230709.8df7a67`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Looks like this was already resolved in the master branch. I'll switch my package for this to master for now.


Allocating / Deallocating Array seems to become major bottleneck

While training an RNN, I notice that it gets slower and slower, taking a look at the sampler, it shows that it spends most of its time now on allocating and deallocating arrays:

@saudet maybe you know what is going on there. It uses between 10GB and 20GB of RAM.

Is this on Windows? That's a known issue: https://github.com/deeplearning4j/nd4j/issues/768#issuecomment-205133554

Oh, I didn't see that issue. So this can be closed.


Constants

Fixes #86

Puts all constants in different files
Changes about modal getting to big separates into teams

Yeah, I mostly took them away because of the permission I did not get. I will be reaching out to the author of them because some forks do use those. But yeah if we have to we can just revert the change.


feat: add backoff in transport

What problem does this PR solve?

Issue Number: close #xxx
Problem Summary
When the communication of the store node fails, backoff is required to avoid performance degradation caused by repeated retries.
What is changed and how does it work?
Add backoff timer mechanism and  modify retry logic.
Check List

Tests

[x] Unit test
[ ] Integration test
[ ] Manual test (add detailed scripts or steps below)
[ ] No code

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

this is a test

test message


Errors in the Sentiment/language functions

Hi :),
I spotted some errors in the code of the Sentiment and language functions. I corrected them. I also have screenshots of their related results. I can provide you with them if needed :).

@hasnae-rahimi : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@hasnae-rahimi thank you for this docs update!
We'll get this merged soon!
#sign-off


Remove leading # of color labels

This PR

[x] Remove leading # of color labels

Reverts #210.
https://developer.github.com/v3/issues/labels/#create-a-label clearly states that it doesn't supports it.

Thank you, @Lctrs!


Improve Promise constructor return type

I tried looking for this, but didn't find anything related to it.
Search Terms
new promise constructor return type generic inferred
Suggestion
Currently:
const promised4 = new Promise(resolve => resolve(4));
// typeof promised4 === 'Promise<unknown>'
// it should be `Promise<4>'

You can already use the generic for this, but this can be automated.
const promised4 = new Promise<4>(resolve => resolve(4));
// typeof promised4 === 'Promise<4>'

Checklist
My suggestion meets these guidelines:

[ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code

Note: it would be a good break because Promises become typed.

[x] This wouldn't change the runtime behavior of existing JavaScript code
[x] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
[x] This feature would agree with the rest of TypeScript's Design Goals.

It looks like the type should to that already, but I'm testing on 3.6.0-dev.20190704 and Promise needs the <4> assignment.
https://github.com/microsoft/TypeScript/blob/e8bf9584aa74aabfecb51a02edb13e3657508274/lib/lib.es2015.promise.d.ts#L33
You can also replicate the issue on the repl: https://www.typescriptlang.org/play/#code/MYewdgzgLgBAtgUwhAhgcwTAvDMCDuMACgE4hwCWECAFCUiADYBumWAfDPRE6zQCwBKQUA
But strangely the definition is different

This is a known limitation of the type inference machinery - it can't infer the promise's T from the call to resolve() (i.e. the contents of a callback don't contribute to type inference).  For new Promise you unfortunately do have to provide the type of the promise explicitly.

That's weird, I'm almost pretty sure I did that once: https://github.com/bfred-it/webext-options-sync/blob/cbf837e6b2bd93e0e39fe0d43a8b47cdde9e53fd/source/index.ts#L60-L78
(The types for that function ultimately failed because I couldn't type args correcly.)

I think that works just because Promise<unknown> is assignable to Promise<TVal> via covariance - and you don’t do anything else with the promise before returning it so you didn’t notice the too-wide inference.

I faced another problem with generic promises:
const message = new Promise<4>(resolve => resolve()) // Promise<4> ! but in fact it is Promsie<void>!


Could you provide the pretrained weights?

I have uploaded the checkpoint and rendering results for the Patio, Spot, and Corner scenes to this link: https://drive.google.com/file/d/1T8i05-jzauHIkg-iLYEwJIIngHSAu74t/view?usp=sharing.  I don't have the other three scenes for quantitative evaluation for now.

Get it! It is helpful for me, because my computer have enough gpu memory to train the model.

@rwn17 Could you provide the other checkpoint and rendering results in your free time?  I try to run the code but it seems to be  difficult for my computer. Thank you!

Thanks for your interest @mappro6 . I will try after CVPR submission. I don't have free GPU before that, sorry.

@rwn17 Thank you and looking forward to it! Good luck for the CVPR submission!


Update plotting.py

Numpy 1.10 fails to perform np.round(pd.Series, decimals) on python 2.7.11 with error:
round() takes at most 2 arguments (3 given)

Works fine with np.round(pd.Series.values, decimals).

Thanks @wikiped. I think a better fix would be to use var_sigma.round(3) or does that not work here?

Sure, this works as well, but it still should be var_sigma.round(3).values since expected return is an array not pd.Series.

There still seem to be places where that's happening (looking at travis):
======================================================================
ERROR: test_create_full_tear_sheet_breakdown_0 (pyfolio.tests.test_tears.PositionsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/testenv/lib/python2.7/site-packages/nose_parameterized/parameterized.py", line 365, in standalone_func
    return func(*(a + p.args), **p.kwargs)
  File "/home/travis/miniconda/envs/testenv/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 118, in wrapped_function
    func(*args, **kwargs)
  File "/home/travis/build/quantopian/pyfolio/pyfolio/tests/test_tears.py", line 70, in test_create_full_tear_sheet_breakdown
    **kwargs
  File "/home/travis/build/quantopian/pyfolio/pyfolio/tears.py", line 164, in create_full_tear_sheet
    set_context=set_context)
  File "/home/travis/build/quantopian/pyfolio/pyfolio/plotting.py", line 47, in call_w_context
    return func(*args, **kwargs)
  File "/home/travis/build/quantopian/pyfolio/pyfolio/tears.py", line 253, in create_returns_tear_sheet
    live_start_date=live_start_date)
  File "/home/travis/build/quantopian/pyfolio/pyfolio/plotting.py", line 555, in show_perf_stats
    factor_returns=factor_returns), 2)
  File "/home/travis/miniconda/envs/testenv/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2786, in round_
    return round(decimals, out)
TypeError: round() takes at most 2 arguments (3 given

Thanks!


Sending Server Messages longer than 256 bytes

Describe the bug
Hi,
I use ESP32 to addreses translator between DTSU666 and DTSU666H Power Meter. I use in parallel ModbusServerRTU.cpp and  RTUutils.cpp	from  eMODBUS librrary . Everything going well when i read les than 28 float registers. Unfortunetly the SUN2000 Huawei inwertor asking in one request for 80 float registers, this causes the program to crash and watchdogs to restart the system. The problem is probably due to the serial port buffer length limitation of 256 bytes . The MODBUS standard says , maximum message length is 256 bytes but as you can see not everyone follows the standard...
I made changes to the ModbusServerRTU.cpp and  RTUutils.cpp files and now my translator works properly.
ModbusServerRTU.cpp changed from "delay(1)" to "delay(60)"  	row 192
RTUutils.cpp	added "delay(70)"     row 223
Please find attached a screenshot of the monitor before and after this changes.
eMODBU_Error 256 bytes.txt
Expected behavior
Doesn't my solution break something in the other components of the library? My solution works well for 9600 but for other serial port speeds you probably need to set this delay more intelligently.
To Reproduce
I have posted the source code and my project description on github
https://github.com/salakrzy/DTSU666_CHINT_to_HUAWEI_translator
Example code
Put code here to reproduce the bug, if possible

Additional context
Best Regards,

Hi,
This strictly speaking is no bug, as you already have seen the Modbus specs do not allow messages longer than 256 bytes.
The timing of Modbus RTU is critical and even more so if increasing the bus speed. So the overflow of the serial FIFO and need to recover or compensate (as you did with the longer delays) will definitely break the bus timing as Modbus RTU requires it.
The better way was to completely write a low level bus handler from scratch that does not rely on the serial implementation of the arduino-esp32 core, but we so far were content with the solution we had.
If your modification does work for you - fine, but for the reasons given we are not going to implement it in the library.

One addendum: there must be something else happening in your case.
I checked again the Test sketch, since I remembered having implemented oversized messages for user defined function codes. In the test sketch a 400+ byte message is sent and received by function code 0x44 over RTU and is passing the RTU loop test without problems.
So there is something different stalling your receive in your setup.


pasting stil VERY SLOW

it is repoted before
CTRL+V SEEM VERY SLOW #117973
more than 2 years ago. The report is closed and no action is documented. The problem persists in Feb. 2024.

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version: Version: 1.86.0
Commit: 05047486b6df5eb8d44b2ecd70ea3bdf775fd937
Date: 2024-01-31T10:27:46.147Z
Electron: 27.2.3
ElectronBuildId: 26495564
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: <IP_ADDRESS>-electron.0
OS: Linux x64 6.1.0-18-amd64

Steps to Reproduce:

paste in the editor (e.g. a web page address from curren firefox
nothing happens for a long time, if I wait, eventually the text is pasted; if I do not wait, nothing is pasted.

This is a really anoying bug, which does not appear all the time, It is for me unpredictable when it will occur, but stops the flow of ideas for 10 sec.

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.86.2. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!

Does this reproduce in the latest VS Code insiders build with all extensions disabled?
Also what type of file are you pasting into?

Indeed, the problem is related to one of the extensions. If all extensions are switched off, I do not observe the slow pasting. - I was not able to identify the extension (or extensions) which cause the issue.


Debug .NET in Windows

This issue is being used to track Docker related documentation.

Status
Platform
Site
Staged Content
Live Content

Planned
Windows
MSDN
NA
NA

I'd love to see this documentation created. I see we can debug easily .NET Core in Linux containers but I'd like to see a guide on the Windows side if possible. (I guess that also needs the Docker Tools for VS to be updated too).


Support for CronJob objects

Under Workloads, only Jobs are currently shown.
There should be a section for CronJobs.
Also, should a Job that is controlled by a CronJob be excluded from the Jobs list?
Or nested under that CronJob?

Being able to expand a cronjob to see the jobs it controls sounds like a nice feature. I suggest we do that, but leave such jobs still in the job list - would that suit?

Erg... I can't see a way to get a list of the jobs owned by a particular cronjob.  The job references its cronjob in metadata.ownerReferences.name, but I can't find a --field-selector to pass to kubectl to filter on that.  And metadata.labels.controller-uid does not match the cronjob's uid.  @bgagnon do you know a way?

They considered automatically injecting a label (which would have allowed us to filter using -l), but rejected it because they thought the user could do it in the cronjob's job template, apparently not considering the possibility that someone might want to programmatically identify created jobs in a way that worked across all cronjobs.  https://github.com/kubernetes/kubernetes/pull/59473  We are meant to use ownerRef... but that doesn't seem filterable in kubectl.


"20 microCOVIDs (or 0.00002%)" -- percent is 100x too small

On the home page under "What is a microcovid," I'm pretty sure the percent for 20 ucovids is 100x too small (should be 0.002% instead of 0.00002%, because the percent sign accounts for 2 zeroes). Thanks for all of your great work :).

Oh that's a really good call. I think you're right. Maybe @beshaya or @jy2wong has a moment to fix this?

Whoops! Thanks for pointing it out!

@gyp Perhaps you can manually update this in all the active translations? So we don't have to wait for the translators to do it?

@gyp Perhaps you can manually update this in all the active translations? So we don't have to wait for the translators to do it?

Done. Most translations are lagging so much behind that they didn't even have this.


Test flake: TestLegacy package dagger/test/internal/dagger is not in std

Started hitting a lot of flakes in the new TestLegacy suite, errors look like:
input: module.withSource.initialize resolve: failed to initialize module: failed to call module "test" to get functions: call constructor: process "go build -o /runtime ." did not complete successfully: exit code: 1

Stderr:
main.go:3:8: package dagger/test/internal/dagger is not in std (/usr/local/go/src/dagger/test/internal/dagger)

Could be unrelated, but it smells awfully similar to https://github.com/dagger/dagger/issues/7662 in that both could be explain by dirs missing files or otherwise having unexpected contents.

Thankfully can repro locally, so made some progress in debugging:
On one occurrence of the error in TestLegacyNoExec, the contents are showing that the go.mod of the module starts with:
module dagger/bare

go 1.22.4

This is extremely wrong.... That go.mod is the one that should be used for TestLegacyExportAbsolutePath.... This test should have module dagger/test (which explains the error)
The other files in there like main.go and dagger.gen.go all look like the right ones for TestLegacyNoExec. At least in this case it's just go.mod which is wrong.
Haven't root caused it yet, but could run from Go SDK problems all the way down to buildkit solver problems.

All I can say is that the test case itself looks totally fine so far (and I can't imagine how this would ever be a test case problem anyways)

FTR, so far I've been debugging by running with this diff:
diff --git a/core/schema/sdk.go b/core/schema/sdk.go
index 8bbaed3e4..c031b15e1 100644
--- a/core/schema/sdk.go
+++ b/core/schema/sdk.go
@@ -364,9 +364,13 @@ func (sdk *goSDK) Runtime(
                                {
                                        Name: "args",
                                        Value: dagql.ArrayInput[dagql.String]{
+                                               "sh", "-c",
+                                               `go build -o /runtime . || (echo WTF && sleep 100000 && false)`,
+                                               /* TODO:
                                                "go", "build",
                                                "-o", goSDKRuntimePath,
                                                ".",
+                                               */
                                        },
                                },
                        },

Then running dagger -m dev call --source=.:default test custom --timeout=100h --run=TestLegacy --pkg=./core/integration --parallel=8 --count=100.
Wait for it to happen, find the sleep process pid with ps and do sudo nsenter -m -u -i -n -p -t <pid> sh to get inside the container.

Still working on root cause, just a few more significant things in meantime:
I looked at the overlay layers for the /src mount where the problematic go.mod file is, I can see that at the bottom layer it's the same situation: incorrect go.mod from the other test but correct main.go.
By itself, this is significant because it the bottom layer is the one created by the local import. So either:

the original dir output by dagger init before this call was wrong to begin with
the local import of the dir during dagger call got messed up and crossed wires with another one from the other test (which in turn could be due to a filesync bug or occurring during the copy-op we do for each local import)

However even more interestingly, at least a few times I have seen the error getting hit on dagger call statements that have run after other dagger calls already ran successfully in the test. e.g. we've seen the error on this line specifically: https://github.com/sipsma/dagger/blob/05b530dbbbcc06519101ca2d471a5e05997f97f3/core/integration/legacy_test.go#L295-L295
Since a previous dagger call chained off the same previous dagger init succeeded, either:

The earlier dagger init is re-running incorrectly and also somehow outputting incorrect files

possible, but requires multiple bugs chained together

The local import (which is gonna happen on each dagger call) is indeed the place where this is getting messed up

just by gut, this feels more likely at this point

Also, some breadcrumbs on the place where that problematic value in go.mod gets set:

directly set here: https://github.com/sipsma/dagger/blob/05b530dbbbcc06519101ca2d471a5e05997f97f3/cmd/codegen/generator/go/generator.go#L195-L195
from arg to codegen bin here https://github.com/sipsma/dagger/blob/05b530dbbbcc06519101ca2d471a5e05997f97f3/cmd/codegen/main.go#L69-L69
which in turn is set from the module source config here https://github.com/sipsma/dagger/blob/05b530dbbbcc06519101ca2d471a5e05997f97f3/core/schema/sdk.go#L431-L431

The significant thing here is that the ModuleName value used in go.mod is also used all over the place in codegen, so it's extremely difficult to imagine how this could be a codegen bug and probably lies somewhere else.

Separately from all the above, at some point without changing anything I just suddenly stopped being able to repro 😢... Previously took a few attempts to hit, now I haven't in like an hour.

The only thing I can imagine that is mutating without having changed any code is the cache? But no clue what to make of this really.

Picking back up today, thankfully was able to eventually repro again (though it took a long time).
Added this to the milestone because whatever is happening here seems deeply wrong, beyond just an annoying flake, and is worth getting to the bottom of ASAP.

Noticed that the behavior seems to generally be that once this get hit once, it's easy to hit again for a while. But it will go through long periods (literally hundreds of executions for me) of not getting hit.

I suspect this is related to caching; once it gets into a bad state it's reused repeatedly until pruned or invalidated

I'm currently chasing down one hypothesis based on reading buildkit filesync code that:

The local dir sync cache ref may be re-used between different nested clients in completely separate tests due to the fact that the nested client in the tests all use the same module source path (/work) and have the same hostname (just the default one when no explicit hostname was set). This is due to the fact that those are our inputs to the "shared key hint" that buildkit filesync uses.
In theory that should be fine provided that

The "differ" that buildkit filesync uses always notices the difference in go.mod between the different clients
There's no race conditions in the time between the filesync is performed and the copy-op we do on top to get an immutable snapshot of it where the local sync cache ref is partially rewritten

But if any of those points aren't aligning with reality, that could explain this

Working on testing this now. If this is on the right track, the good news is that it's most likely an incredibly obscure condition for real-world users since it requires so many specific conditions and timing to align (different clients are using the same paths and have the same hostname, running the exact same ops at the same time, etc.).

That being said, it probably is time to bite the bullet on generating a "unique machine id" for each dagger client that's stored in the home dir. buildx does something similar. I was hoping we could avoid it since the less state the better, but feels more worth it at this point if this is indeed the cause.

Just confirmed that when the error happens, the TestExecWithEntrypoint client that hit the error does indeed end up re-using a local sync cache ref from a client that originally ran in TestLegacyExportAbsolutePath.

Needed to add more fields to various logs to track this down, which I'll send a PR for no matter what at the end of this since it was clearly very useful here.

Like I said in previous comment, this isn't wrong in and of itself, so now need to track down if this is a differ problem or some race condition in the use of cache dir.

Differ seems more likely at this point since the cache ref in question is only used twice by these two clients and spaced relatively long apart

Somewhat hilariously, this bug appears to also be reliant on the fact that the two test cases have modules with names who are the same length (Bare and Test) 🫠
This matters because the differ used by buildkit filesync only compares metadata. It appears that the two go.mods in these test cases are ending up with exactly equal file metadata (even though their contents aren't the same). That's why the length of the module name matters; if they weren't both 4 characters the go.mods would have different file sizes and thus be considered different.
The remaining mystery now is that ModTime is also considered by the differ and based on the logs I added to it, all of the go.mod files have exactly equal mod times down to the nanosecond. There's no way they are actually coinciding down to the nanosecond due to parallelism, so something else is going on still. Continuing to dig.

Okay, I think I've convinced myself that the mod times of these files are actually coincidentally ending up as the exact same nanosecond values. I wanted to be as sure as possible about this since I don't want to accidentally miss some other bug incorrectly setting the mtime of these files to be the same during filesync, etc.
There's a few crucial things that increase the likelihood of this happening:

The separate modules are independently running (not being deduped unexpectedly or anything like that), but they do share cache mounts for the go mod pkg cache and go build cache.

The go.mod is not stored in these cache mounts, but we run go mod tidy to fix it up, which involves downloading dependencies and updating other shared state. I can see from strace that tidy does all sorts of flocking on top of the cache mounts to synchronize this between concurrent processes.
So the end result is that the independent go mod tidy calls actually do end up synchronizing closely with each other and thus get to the point of "update go.mod file" at very close to the same time

Based on some kernel spelunking, the nanosecond precision on mtime is not actually that precise, even when the filesystem supports that granularity

IIUC the value is set around here, with the time coming from this current_time function
That current_time function is calling ktime_get_coarse_real_ts64, which I found docs for that suggest it's a cached value (so plausible for different calls to get the same value) and possibly from up to 10ms in the past.
So different calls spaced up to at least 10ms apart could plausibly end up getting the same nanosecond mtime values

This is all inherently very heisenberg-y so it's not feasible to get 100% confirmation, but between some wrapping with strace and more dumb annotating various logs with the value of Go's time.Now().UnixNano() that when the bug happens, go mod tidy is being called within 100s of microseconds of each other. Based on what I found above that's close enough to result in the mtimes of the files to get the same nanosecond values.

So the end result is that:

different go.mods from different test cases end up with precisely equal metadata (same size because module names are the same length, same mtime due to the above, etc.)
different nested clients end up re-using the same mutable filesync cache ref because they all have the same hostname, are operating on the exact same paths in their containers (/work), etc.
the buildkit differ only considers metadata when choosing whether to retransfer a file, and since go.mod matches that metadata, it doesn't get re-transferred and the wrong one is used

In terms of the fix, I will probably just go with the approach where we generate a stable+unique identifier for each host that's stored in the user's XDG cache dir or something like that. We can then use that to ensure different clients don't accidentally re-use the filesync cache ref in situations like this.

To be clear, it's deeply difficult to imagine this actually impacting one of our real-world users. It seems extremely specific to what we are doing in our tests. But this approach would solve the problem for our tests and should alleviate any remote chance of it impacting users.
The one possible downside is this impact the performance of our tests since the deduplication being done was plausibly a minor performance benefit (just hit this one problematic corner case). It's also possible this isn't noticeable and even if it is, there might be some clever things we can do to give each of our nested clients a stable host identifier (based on the line number + file name where the call is being made).

fixed by https://github.com/dagger/dagger/pull/7943


Dont show compenent in nested path

Ejemplo

Ruter code

Controller code

First, please describe your problem in detail. I am not particularly clear about your problem.
By guessing, I think you should add a router-view.
You can learn from demo

the problem is that when I enter the path "/mi-empresa/prooveedores/listado" nothing appears, although in the router has specified the driver for that route

please give online demo

vueblock.robledomarketing.com

vueblock.robledomarketing.com

I mean to provide source code that can reproduce the problem...

you were right, router-view was missing


go get command downloads older version

I'm trying to install the package. but it keeps installing the v1.1.1 version.
i tried @upgrade @latest but can't install the v2.1.0 version
how do i install v2.1.0 version

Should have closed this with the merged PR. Closing.


app crashes during training

app crashes with app server connection error. Terminal seems to indicate training has failed.
I had a similar app connection issue when extracting frames, for which the solution was to reduce the number of videos from 24 to 12. However, I assume the issue with training is related to GPU utilisation instead, similarly described here?).

I am using the local installation through windows subsystem linux.

my GPU setup:

NVIDIA GeForce RTX 4080
CUDA V11.6.55
Nvidia studio driver 552.22

closing and re-launching the app after completing labelling and before starting training seems to improve the progress but still results in the same crash eventually.

potential temporary resolution: run training directly within my terminal to see if the issue is related to just the app?
e.g. run:
python scripts/train_hydra.py --config-path=/mnt/c/Users/X48823DG/lightning-pose/Pose-app/data/lp_mk1/ --config-name=model_config_lp_mk1.yaml

found solution: close and re-launch the app after completing labelling and before starting training.

Are all of those attempts from training within the app?
Did training from the command line help, or did you get crashes there as well?

Yes trying from the command line is a good next step, if it crashes there then we know it's not the app, and it focuses the following steps a bit more.

In the meantime, if you look at your CollectedData.csv file, does it include any rows that are all empty? (i.e. are there any frames with no labels?)

looks like the error is because data/lp_mk1 is repeated twice in the path. the app does some manipulation of paths in the background. I would make sure the data path in the config file is an absolute rather than relative path for running from the command line, but you'll have to make sure and switch it back to the relative path when you want to train from the app again (sorry for the complication there)

looks like training ran successfully when run in the terminal

ok cool, good to hear. maybe try running from the app again? It's very strange that it progressed further and further each time. There is not really a difference between the training script you ran directly from the command line and the training function called by the app (but clearly something is going on).
Re: epochs vs iterations, see the config docs here, specifically the min/max epochs parameter - let me know if that answers your question!

Re: fiftyone error: if you go to the FIFTYONE tab does it render the page? (Even if it say "No dataset selected" that's fine, I'm curious if you just get a blank page or a page that looks like it's trying to load something but never does)
Re: model training: I'm wondering if this has something to do with WSL...I haven't had this problem with native Linux before.
The output directory you shared is just for the supervised model. The predictions_pca_singleview_error.csv file is computed for every model, as long as you have indicated in your config which keypoints should be included in the pca loss. This is helpful, for example, when trying to identify outliers (the pca metric complements likelihood as a measure how how good the prediction is).
If the semi-supervised model ran it would be in a completely separate YYYY-MM-DD/HH-MM-SS/ directory, so it seems it didn't run.
Regarding the video predictions, these are additional flags you need to set in the config file; see the relevant parameters in the eval section of the config file, highlighted at the bottom of this docs section.
The flags will automatically run inference on a set of videos after the model completes training. If, as in your case, a model has already been trained and you'd like to run inference on a set of videos, see the inference documenation.

Also, I'm not sure what version of the app you're currently using, but if you run (from inside the Pose-app directory) git pull --recurse-submodules you might get some updates. We have another batch of updates coming out by next week at the latest that refactors some of the way model training is launched, maybe that could help?

Re: fiftyone error: if you go to the FIFTYONE tab does it render the page? (Even if it say "No dataset selected" that's fine, I'm curious if you just get a blank page or a page that looks like it's trying to load something but never does)

I get a page that is trying to load something but never does.

If the semi-supervised model ran it would be in a completely separate YYYY-MM-DD/HH-MM-SS/ directory, so it seems it didn't run.

Can each model be ran separately in the terminal? if so How can I manually run the semi-supervised and context models?

git pull --recurse-submodules

It is already up to date. Perhaps next week's updates will make a difference as you suggest.

Ok for fiftyone I'm guessing there's an issue with WSL, but I'll look into the error a bit more.
Yes you can run each model separately in the terminal. Check out the docs for the config file and let me know if you have any questions that aren't answered there.
You might also try training models one at a time from the app - if it worked for the supervised model, you could try just selecting the context model and see if it trains to completion.
Please keep me updated.

within the app,
all the models will train when selected individually, one by one. After each training session, I shutdown and relaunch the app before training a different model.

Ok not ideal but at least it's (partially) working!

@DavidGill159 just wanted to check in on this - are you still only able to train one model at a time, or are you able to train multiple now?

Hi @themattinthehatt the app didnt end up being reliable enough to train any networks beyond supervised. For not I am just training my models directly through the terminal. on another note, I am currently training a semisupervised ctx model on 600 labelled frames (the quality of my previous network, with 240 labelled frames was poor) and based on the time spent producing 1 epoch, it seems like it will take 3 days to run through all 300 epochs. Is this normal? my GPU is being utilised.

ugh I'm really sorry to hear about the app not working. We haven't had that issue before with the linux installations, so maybe it is a windows/WSL issue? We'll try to look into that.
3 days for training is definitely not normal (although the semisupervised context models are the most computationally demanding).

What kind of GPU are you running on?
NVIDIA GeForce RTX 4080 with Cuda 11.6

GPU utilisation

how long does it take to train a basic supervised model?
about 10-15 minutes on 250 labelled frames.

config
config attached
lp_mk2_config.txt

another note... My computer shut down during training on my latest network (supervised + ctx). I tried resuming training from the checkpoint according to these instructions. However, this didn't work as the total number of epochs (first training session up until checkpoint + epochs since resuming) sums to more than my set epoch limit (750). The absolute path of the ckpt file is correct.

@DavidGill159 sorry for the slow reply, I've been traveling for the past couple weeks.
Regarding the slow training, I don't see any obvious reason why this should be happening given your config file. I am a bit surprised that you're not getting out of memory errors with the semi-supervised context model with resize dims of 384x384 and batch sizes of 16 for both the labeled and unlabeled frames. You could try reducing dali.context.train.batch_size to 8 instead of 16 and see how that speeds things up?
Regarding resuming training: apologies for the lack of clarity in the documentation - the model.checkpoint should not state "to continue training from an existing checkpoint" but rather "to initialize weights from an existing checkpoint". In principle it should be possible with pytorch lightning to actually resume training rather than starting over, but we haven't built that in yet. If that's a feature you think would be useful please open a new issue!


Move docker config from configmap to secret

Description:

To push the image to the docker registry, docker config is attached to the Kaniko pod.
As of now, we are attaching it as a config map. Since this contains confidential information, we should move it to secret.
Suggested Labels:

Suggested Assignees:

Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:

This is fixed.


Tidy up homepage

👷 Deploy Preview for vocal-sprinkles-4c3d98 processing.

Name
Link

🔨 Latest commit
8bab79d199876ae0903233edc64fd6802b264c5d

🔍 Latest deploy log
https://app.netlify.com/sites/vocal-sprinkles-4c3d98/deploys/634913facca45b0008d7746b


Issues with Docker Push command to ECS

Hi Guys,
Docker push takes too much time to complete, either it has been initiated from Visual Studio 2017-2019 or WSL-2 Shell doesn't matter. But if i just cancel and rerun it again it just works fine.
Tools Used:
Microsoft Visual Studio Community 2019
Version 16.7.1
VisualStudio.16.Release/16.7.1+30406.217
Microsoft .NET Framework
Version 4.8.04084
Docker CE Version: 19.03.12
WSL-2
AWS CLI V2 Configured inside WSL.
WSL Config:
[wsl2]
memory=8GB # Limits VM memory in WSL 2 to 8 GB
processors=3 # Makes the WSL 3 VM use two virtual processors
Note:
Please help.

After repairing VS-2019, I was able to get rid of this issue.


Problem with sdk image and build arguments

I am not able to pass arguments to docker files using sdk:4.8 (I haven't tried other sdk versions). Using this Dockerfile:
# FROM hello-world:latest
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8
ARG foo=bar
RUN echo Expected-substitution: $foo
RUN echo This-works-for-some-windows-images: %foo%

Running docker build --no-cache with or without --build-arg gives me the following output, with no sign of argument substitution, plus some unexpected new lines. Am I doing something wrong?
Sending build context to Docker daemon  65.57MB
Step 1/4 : FROM mcr.microsoft.com/dotnet/framework/sdk:4.8
 ---> a7ec2e715ec5
Step 2/4 : ARG foo=bar
 ---> Running in 6227ab9c21c8
Removing intermediate container 6227ab9c21c8
 ---> 0d44f837af9d
Step 3/4 : RUN echo Expected-substitution: $foo
 ---> Running in 48636a3f7ecb
Expected-substitution:
Removing intermediate container 48636a3f7ecb
 ---> 6009cb267f18
Step 4/4 : RUN echo This-works-for-some-windows-images: %foo%
 ---> Running in 3f84af87769d
This-works-for-some-windows-images:
%foo%
Removing intermediate container 3f84af87769d
 ---> c492ff56eaae
Successfully built c492ff56eaae

This is because the SDK images set PowerShell to be the default shell.  Example:
https://github.com/microsoft/dotnet-framework-docker/blob/430dfdaca4a3ce29c978528ab89dc9383fd9f94f/4.8/sdk/windowsservercore-1909/Dockerfile#L93
So you need to use PowerShell syntax to reference the foo environment variable:
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8
ARG foo=bar
RUN echo Expected-substitution: ${Env:foo}

Alternatively, you could change the default shell to CMD instead of PowerShell and things would work:
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8
ARG foo=bar
SHELL ["cmd", "/S", "/C"]
RUN echo Expected-substitution: %foo%

Closing.  Feel free to respond if this doesn't resolve your issue.


Hard code Admin ID's into bot by hand

I'm currently having a issue with my VPS in which I'm not able to add arrays-type variables (like the admins array) to the environmental variables.
Is there any way to add the ID's by hand to the part of the bot which requests the variable from the environment variables?
If so, which file would I then need to look into and add a array with the ID's?
Thanks in advance

I don't really understand what you mean, but you will need to edit the ecosystem.json file.
Follow these steps:

Connect to your VPS.
Change directory to your bot folder, by default it's "tf2autobot", so run cd tf2autobot
Edit the ecosystem.json file by running nano ecosystem.json
Navigate to "ADMINS", and update its value to the new format:

{
// From
"ADMINS":  ["SteamID"],
// To
"ADMINS": [{ "steamid": "SteamID" }],
}

Close the file with Ctrl + X, Hit "Y" for Yes, and then hit Enter.
Restart with pm2 restart ecosystem.json --update-env && pm2 save && pm2 logs (you can exit the logs later with Ctrl + C)


docs: update local go run for devs

Signed-off-by: João Vanzuita<EMAIL_ADDRESS>

Why do we need this flag? I can run kubefirst local from the latest code in main using go run . local.

Why do we need this flag? I can run kubefirst local from the latest code in main using go run . local.

I just tried it yesterday, it failed to download the metaphor-frontend template. I'll try it again today

Oh no, my bad, I tried last week, and it was working, but something changed, and I got the "panic: Error cloning repo with fallback: error cloning template, No templates found on branch or tag" error.

Oh no, my bad, I tried last week, and it was working, but something changed, and I got the "panic: Error cloning repo with fallback: error cloning template, No templates found on branch or tag" error.

awesome! I'll wait the outcome of the ldflag discussion -> update the code -> test to make sure it's working without flags -> update the docs again.


chore: eject from projen aws-cdk library project type

So...this started out with investigating why our upgrade dependencies workflow is failing with a super cryptic error:
warning "construct-hub-webapp > @chakra-ui/icons ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>error An unexpected error occurred: "expected hoisted manifest for \"cdk-watchful#@aws-cdk/aws-cloudwatch#@aws-cdk/core\"".
info If you think this is a bug, please open a bug report with the information provided in "/__w/construct-hub/construct-hub/yarn-error.log".
🤖 Task "upgrade-dependencies" failed when executing "yarn install --check-files" (cwd: /__w/construct-hub/construct-hub)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

I didn't get to the bottom of it yet, but all signs point to the fact that currently CDK versions are being managed in the AwsCdkConstructLibrary project type, by specifying an explicit cdkVersion. This doesn't play nicely with the upgrade workflow.
I figured a good stop gap would be to eject from that project type for now so that our auto-merge -> deploy pipeline starts working.
This PR also contains a bunch of dependency upgrades which I executed as a validation that the ejection fixes the problem.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@eladb I'm also working on a long term fix, but still not sure how that would look like.


Prevent inttypes.h from being wrapped in namespace

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area plugin-sdk

/area tests

What this PR does / why we need it:
By wrapping C includes in a namespace declaration, we make it so that any libc headers will also belong to the resulting C namespace.  In the case of inttypes.h, this creates problems in the user's code when depending on declarations like imaxdiv_t to be in the global namespace and not falcosecurity::_internal. This problem is also compounded when combining the SDK with libraries with their own header files.
This PR simply adds a line to deps.h to ensure that inttypes.h is included before a namespace is opened.
Which issue(s) this PR fixes:

Special notes for your reviewer:
Does this PR introduce a user-facing change?:

NONE

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: brodeuralexis
Once this PR has been reviewed and has the lgtm label, please assign ldegio for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Welcome @brodeuralexis! It looks like this is your first PR to falcosecurity/plugin-sdk-cpp 🎉

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: brodeuralexis, FedeDP
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [FedeDP]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sorry for the long time no see :)
LGTM! Thank you very much!


Add Advertising Section

Privacy preserving advertising is becoming a hot topic in the adtech community and should be addressed in this privacy preserving list of services.

I'd love to see this get merged. We think advertising is a huge area where privacy-first products need to get more traction. ❤


Issue Generating Readme based on repository

I am getting following error, after scanning thru the codebase, it is excellent, but unable to finish documenting, Can you suggest how to overcome the challenge.
Regards,
PA

I am getting following error, after scanning thru the codebase, it is excellent, but unable to finish documenting, Can you suggest how to overcome the challenge.
Regards,
PA

Thanks for the kind words! It looks like this is a big codebase so it's exceeding the input token limit for the LLM you're using.
Which LLM is this? If you're using an OpenAI model, try using the Anthropic Claude 3.5 Sonnet model instead as it has a larger context window.


Desactivate auto-build Appveyor and Travis for l10n_master

Is your feature request related to a problem? Please describe.
When Crowdin get an update there is A LOT of build for these two. And Each round take one day it seem.
Describe the solution you'd like
Does an option exist to block auto-build from this branch?

I added the l10n_master branch to the ignore list, everything should be fixed now.

@kytwb Is there a way you can remove all the queued builds on Travis and AppVeyor from the queue? We don't need them.

I added the l10n_master branch to the ignore list, everything should be fixed now.

Thank you.

@vantezzen I invited you on AppVeyor, you should be able to have access to https://ci.appveyor.com/project/kytwb/ferdi/ (used your hello@ email). For Travis, you should already have access to https://travis-ci.org/getferdi/ferdi/builds as you're part of the getferdi organization on GitHub.


bug: Unexpected behaviour.

Plugin version:

"@capawesome-team/capacitor-android-foreground-service": "^0.1.0",
Platform(s):

Android
Current behavior:

ForegroundService.startForegroundService does not trigger the notification.
2 . The the app still goes unresponsive after a few minutes as if its not running in foreground.

Expected behavior:

Expecting a notification once the ForegroundService.startForegroundService function is run matching information provided title/body. I also expect Foreground Services to not become unresponsive.
I expect the app in foreground to run until its told to stop.

Steps to reproduce:

I have a blank capacitor project with minimal plugins,  running the startForegroundService function shows the android "App is running" message in the notification pull down, but no notification matching the title/body of the options supplied.

example of the message i see when forground running, it doesnt match the information provided.
The Foreground Service app eventualy becomes lost to doze, app cant do anything in the service until the app is refocused.
My app needs to control a bluetooth device while in forground for extended period of time. after ~5 minutes of app running in foreground (app minimized) pushNotificationReceived and bluetooth communication events stop running.
Related code:

import { ForegroundService } from '@capawesome-team/capacitor-android-foreground-service';

window.startForegroundService = async () => {
  await ForegroundService.startForegroundService({
    body: 'Where is this?',
    id: 12398473,
    title: 'Missing',
    smallIcon: 'ic_launcher_round',
  });
};

window.stopForegroundService = async () => {
  await ForegroundService.stopForegroundService();
};

Other information:

Test Devices tested
Samsung S10+ android 12
LG g7 android 10
Capacitor doctor:

💊   Capacitor Doctor  💊

Latest Dependencies:

  @capacitor/cli: 4.7.0
  @capacitor/core: 4.7.0
  @capacitor/android: 4.7.0
  @capacitor/ios: 4.7.0

Installed Dependencies:

  @capacitor/ios: not installed
  @capacitor/android: 4.7.0
  @capacitor/core: 4.7.0
  @capacitor/cli: 4.7.0

[success] Android looking great! 👌

Side note, i have since added your BatteryOptimization plugin, to see if requestIgnoreBatteryOptimization would prevent forground services from going unresponsive still not working at expected.

So after more exploration on this issue, i feel like this might be prematurely closed.  @robingenz

Unfortunately, this is completely dependent on the manufacturer. On my Google Pixel, for example, the notification is displayed with title and message. Samsung seems to do this differently with Foreground Notifications.

Trying on a Pixel XL i get the wrong notifcation when using latest capacitor platforms. But your demo app works fine on all my devices so i rolled back my capacitor versions
  @capacitor/cli: 4.3.0
  @capacitor/core: 4.3.0
  @capacitor/android: 4.3.0
  @capacitor/ios: 4.3.0

And notifications work as expected on all my devices. So the notification issue is code related not platform dependant
As for the app going idle, i think that might be platform dependant... still looking into why pushNotificationReceived messages go ignored, that one seems to only be on my Samsung devices.
Hoping this issue can get reopened as i think its clearly not normal behaviour, especially seeing that it seems to be related to cap version or cap platform version . Thanks @robingenz for taking the initial look.

@cokeeffekt In that case, I will definitely look at the issue again.
Please provide a Minimal, Reproducible Example (see How to create a Minimal, Reproducible Example) in a public GitHub repository so I can debug the issue.

I close this issue because no reproduction was provided.


Return the contributor admin ID when serializing other locations

Overview
Profile page URLs are constructed using the ID of the admin user for the contributor. We update the serialization of the "Other locations" section of the facility detail page to be consistent with other places in the app where we create profile page links.
Connects #949
Testing Instructions
Setup

Checkout the develop branch
Run ./scripts/resetdb and ./scripts/server
Browse http://localhost:8081/admin/api/contributor/ and delete the contributor with the (2) suffix on the name (which should be at the bottom of the list.
Browse http://localhost:8081/admin/api/contributor/15/change/ and change "Admin" to<EMAIL_ADDRESS>Note the name of the contributor.
Browse http://localhost:6543/?q=regina and select the facility in Shenzhen.
Click the contributor link under "Other locations" and verify that it incorrectly links to /profile/15 and displays an empty page.
Checkout this branch, browse http://localhost:6543/?q=regina, and select the Shenzhen facility again.
Click the contributor link under "Other locations" and verify that it correctly links to /profile/2

Checklist

[x] fixup! commits have been squashed
[x] CI passes after rebase
[x] CHANGELOG.md updated with summary of features or fixes, following Keep a Changelog guidelines

Thanks for the review.


⚠ Bofrost.fr has degraded performance

In b3b0714, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1330 ms

Resolved: Bofrost.fr performance has improved in a8813d5 after 8 minutes.


Documentation request: What is a sequential write?

Hi,
There are various references to sequential writes in the documentation, as well as in commentary here: https://sacrilege.io/benchmarking-bolt/. Unfortunately, and I may be the only one, it is not clear to me what precisely is meant by "sequential" write.
Is it just repeated writes to the same bucket?
Must the writes follow some sequence by key, such as alphabetical, or numerically incrementing?
Is there some other form of writing that would be considered "sequential"?
Thank you!
Brian

Hi Brian,
I wrote the benchmark you're referencing.  You're certainly not the only one, since I made a mistake as well.  What I describe as sequential is not actually sequential.  I've taken down the post until I correct things.
To quote the docs:

Bolt stores its keys in byte-sorted order within a bucket.

To my understanding, this means that to achieve sequential writes you'll want to look at the byte output of the keys you're inserting.

To add more color:
At first glance, you'd expect a slice of keys like this to result in sequential writes:
s := []string{"9", "10", "11", "1000", "1001"}

Turns out, the byte representation of this is:
[57]
[49 48]
[49 49]
[49 48 48 48]
[49 48 48 49]

Not sequential.  These are byte-encoding strings, when we're looking for byte-encoded integers.
Using integers instead:
i := []uint32{9, 10, 11, 1000, 1001}

Results in this byte output:
[9 0 0 0]
[10 0 0 0]
[11 0 0 0]
[232 3 0 0]
[233 3 0 0]

And the sequential behavior we want.
Playground link.

Thank you for your notes, this is very helpful! In other discussions of Bolt, I had observed that the authors claim that sequential inserts see a large performance increase. Are you now seeing that behavior with our updated understanding of 'sequential'?

No problem, atonement is called for :+1: .    I haven't had a chance to check yet, but I'd expect to see an increase.

@bmhatfield That's a great idea for a section in the Bolt docs. I'll add one to make it more clear. It's really helpful to get documentation feedback so thanks for posting an issue.
Alex is correct that sequential reads are based on byte sorting. One small correction is that you'll want to use binary.BigEndian to encode instead of little endian so that this array:
i := []uint32{9, 10, 11, 1000, 1001}

gets converted to:
[0 0 0 9]
[0 0 0 10]
[0 0 0 11]
[0 0 3 232]
[0 0 3 233]

Updated playground link
Bolt uses bytes.Compare() so it compares the first byte, then second, third, etc. I typically use convenience functions with working with int keys like this:
// u64tob converts a uint64 into an 8-byte slice.
func u64tob(v uint64) []byte {
	b := make([]byte, 8)
	binary.BigEndian.PutUint64(b, v)
	return b
}

// btou64 converts an 8-byte slice into an uint64.
func btou64(b []byte) uint64 { return binary.BigEndian.Uint64(b) }

There's also a primitive synthetic benchmark program built into the bolt command. You can do sequential or random writes with different batch sizes. Here are some example runs from my mid 2012 Macbook Pro:
Sequential Writes (1M inserts, 1000 per batch)
$ bolt bench --write-mode seq --count 1000000 --batch-size 1000
# Write	2.651541563s	(2.651µs/op)	(377216 op/sec)
# Read	1.020261125s	(39ns/op)	(25641025 op/sec)

Random Writes (1M inserts, 1000 per batch)
$ bolt bench --write-mode rnd --count 1000000 --batch-size 1000
# Write	55.486853265s	(55.486µs/op)	(18022 op/sec)
# Read	1.015875239s	(36ns/op)	(27777777 op/sec)

Random Writes (100K inserts, 1 per batch)
$ bolt bench --write-mode rnd --count 100000 --batch-size 1
# Write	49.664273612s	(496.642µs/op)	(2013 op/sec)
# Read	1.001432863s	(37ns/op)	(27027027 op/sec)

The write performance depends heavily on how you write and batch. You can go from 377K w/sec to 2K w/sec depending on how you're using Bolt.
Range scan read performance doesn't fluctuate very much (although it depends on the OS page cache and your Bucket's fill percent). You can typically see around 20M+ reads/sec when iterating over a cursor. Individual seeks are more expensive though.

@benbjohnson I have a related question about batching. I can put a WAL in front of blot to mitigate the append only B-tree write issue by reordering and batching.
But it seems that the current DB.batch() is not designed for this use case, which still blocks the writer. Also is it possible or suggested to read out the result before I actually commit the batched txn to bolt?

@xiang90 DB.Batch() is only meant to batch. It can't do reordering since the order of operations in a batch may still matter to the application.
I'm not sure I understand your question about reading out the result before committing. What are you trying to do?

It can't do reordering since the order of operations in a batch may still matter to the application.

It is also designed for multiple writer case. For the WAL thing, probably I will only have one writer.

What are you trying to do?

For example, I have one WAL writer and multiple readers. My application writes A=1 to WAL and WAL writer writes A=1 into a bolt tnx and the tnx will not be committed due to batch. But I want a reader to be able to read A=1 out of the tnx immediately, although it is not committed yet.
I roughly looked at the code, and think it is possible. But do you suggest to do this?

Sure, you can throw a WAL in front of Bolt but the biggest issue is that you'll add a lot of complexity. Retrieving values isn't too hard -- just check the WAL-committed value before checking the Bolt-committed value. You'll need to add tombstones for deletions though. Doing range scans becomes more complex since you'll need to iterate over the WAL-committed values and the Bolt-committed values together and merge them into a single logical cursor for the application.
Transactions are also tough to implement -- especially if you want a non-blocking point-in-time representation of your data. If your application doesn't need to rollback transactions then that makes it all a little easier.
One thing I haven't tried but seems like it should work well is doing a WAL in a Bolt bucket and batching writes to that. Since the bucket is append only then it should be really fast. Then you can periodically apply the WAL to the rest of your Bolt DB in a single Tx and truncate the WAL.


"Error Installing Script" on Android

When using the Obsidian plugin on Android, I'm unable to install some scripts from the built-in store--I get a "Error installing script: SCRIPT NAME.md" message at top right. I'm not sure what the ones that succeed have in common with each other. The following seemed to work (gave an "Installed XXXX" message), but then I didn't see any evidence that the interface changed after their "install", and they failed on subsequent attempts to install.

Add Connector Point
Add Link to Existing File and Open (install seemed to work with v1.9.19, but then it wasn't present when I came back
Add Next Step in Process
Auto Draw for Pen
Box Selected Elements

And these were a few that failed immediately:

Auto Layout
Box Each Selected Groups
Concatenate lines
Connect elements

That was with the Excalidraw Obsidian plugin v1.9.19. After updating to 2.0.1, I seem to be getting the "Error installing" message with every script. The Obsidian Android app is at v1.4.16 (114) API v1.4.16.

Looks this is related to Obsidian, can you open this issue in https://github.com/zsviczian/obsidian-excalidraw-plugin
cc @zsviczian

I cannot reproduce the issue on an S23 with plugin version 2.0.4
Android is case sensitive. Make sure the script folder configured in plugin settings is correct including the letter case.

Well, now, neither can I. I see a bunch of plugins listed as installed.
Probably they installed despite the messages. I guess go ahead and close it.
On Tue, Nov 28, 2023, 2:11 AM zsviczian @.***> wrote:

I cannot reproduce the issue on an S23 with plugin version 2.0.4
Android is case sensitive. Make sure the script folder configured in
plugin settings is correct including the letter case.
—
Reply to this email directly, view it on GitHub
https://github.com/excalidraw/excalidraw/issues/7310#issuecomment-1829234698,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACKXWONNSKZECOFVUISN7LYGWFBVAVCNFSM6AAAAAA7QFNLRKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRZGIZTINRZHA
.
You are receiving this because you authored the thread.Message ID:
@.***>


Added webhooks

Users can register webhooks in the config file, for example:
webhooks:
  default:
    listener: "https://webhook.site/fa064cea-f884-4fed-984c-17610b7d853b"
    events:
    - PlayerJoin
    - PlayerQuit

When these events are triggered by the server, a POST request with the event details is sent to the listener url.

This is a super interesting concept. I hadn't really thought of ServerTap as a thing that would reach out and do anything like this, moreso as just a simple REST API wrapper around Bukkit's API. Let me test this out

This is an awesome feature, I can see all kinds of applications being built with this. Did some testing and can't find anything wrong. I think this is ready for merging.


Use the latest astroquery from pip

This should fix the caching issue
cc @tomdonaldson @stargaser

OK, sounds good. Then the instructors need to keep in mind the caching issue from #118 (though as the participants have a new install, I suspect they won't run into it)

Getting still astroquery 0.4.6 is weird though, I'll have a closer look in a bit.

@alaity47 - you've tested the environment creation and update, could you check whether this PR works for you to get a newer (dev versioned) astroquery?

I converted this to a draft as apparently it's not yet working (CI failure looks unrelated though)

I converted this to a draft as apparently it's not yet working (CI failure looks unrelated though)

The CI failure is related to #128. I fixed it in #129.

Thanks for the CI fix. I yet to come back to this and dive into the rabbit hole to see why the older release is being picked up.

OK, so it's after all not a big mystery, just needed a careful look.

the jobs that use the environment.yml properly pick up the dev version
fixed tox and the env check that they don't actually install an older version
however, it's not really possible to do the pre-release install with the pip requirements file as --pre is a global option, so if we specify it, it will install a pre-release of all the dependencies (given there is an actual pre-release for them).

I don't understand why it didn't work for me the first time around.

I had a typo there for your first time around.


Update to Dotty 0.19.0-RC1

Please, update to Dotty 0.19.0-RC1 and publish the artifact

this isn't just a matter of bumping the version number and publishing: it needs code changes, as Dotty has changed
is there a volunteer who would like to tackle it...?

@SethTisue I'll give it a try!

Note that https://github.com/lampepfl/dotty/issues/7189 is not fixed yet, so it might only work on my machine only.

PR: #37

this auto-closed; but I assume the actual publishing isn't done yet?

Hello! Are there any blockers that prevent publishing this? :)

I don't think so. I just need to remember to do it today.

Thanks! :bowing_woman:

For the record, here's what I've done to back publish current HEAD as 0.2.0 for Dotty 0.19:
clean
set ThisBuild / version := "0.2.0"
++0.19.0-RC1!
verifyJVM/publishSigned

Maven sync should happen shortly.

@eed3si9n publish for 0.20?

I am getting bunch of errors with 0.20, so I have to look into it.


Architecture column shows 'Mixed' when cluster is provisioning

Setup

Rancher version: v2.9-head

Describe the bug

When a new cluster is provisioning, the nodes list is not available and the architecture sub-column shows 'Mixed'
To Reproduce

Create a new RKE2 cluster
Go to Cluster Management

Result
The Version/Architecture column contains 'Mixed'
Expected Result

It should be empty
Screenshots

Additional context

the Architecture column shows 'Unknown' when provisioning a RKE1 cluster. Reopening this ticket for investigation

@yonasberhe23 I think the NODE_ARCHITECTURE label (kubernetes.io/arch) could be missing in RKE1 cluster's nodes
https://github.com/rancher/dashboard/blob/17677f34993a5000524be01dba387053fc95f787/shell/models/provisioning.cattle.io.cluster.js#L411
I will take a look, thanks.

e2e and unit tests are sufficient. moving to done


Upgrade to latest available Struts GA version 2.5.26

Upgrade to latest available Struts GA version 2.5.26
Use latest available dependency in Struts2 archetype

By submitting this pull request

[X] I confirm that my contribution is made under the terms of the Apache 2.0 license.
[X] I confirm that I've made a best effort attempt to update all relevant documentation.

Thank you (Danke ;-) ) for your contribution @jogep, sorry that it took so long to merge it.


Add Development Environment

Resolves #2

ping @ldko

It would be good to have a Development section added to the README.


ensheaths, feeze

This pull request was generated by the 'mq' tool
[test]
flake rate: 0.4
logical conflict every: 100
sleep for: 300s
[pullrequest]
requests per hour: 30
deps=[e,f]

/trunk merge


Embed six.py file for more compatibility

Currently, debian squeeze has a too old version of six in its repositories
(1.1, latest is 1.9).  For example there's no add_metaclass.  By embedding
six in the luigi package itself, we can ensure everyone uses the same version
of the library.
Previously I got this error which is now fixed. Nice that the six author put it
all in one file!
$ nosetests test/date_hour_test.py
E
======================================================================
ERROR: Failure: AttributeError ('module' object has no attribute 'add_metaclass')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python2.6/dist-packages/nose/importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python2.6/dist-packages/nose/importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/spotify/home/arash/spotify/repos/luigis/github_luigi/test/date_hour_test.py", line 21, in <module>
    import luigi
  File "/spotify/home/arash/spotify/repos/luigis/github_luigi/luigi/__init__.py", line 21, in <module>
    from luigi import task
  File "/spotify/home/arash/spotify/repos/luigis/github_luigi/luigi/task.py", line 205, in <module>
    @six.add_metaclass(Register)
AttributeError: 'module' object has no attribute 'add_metaclass'

----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (errors=1)

pep8 passes Now.
I merge because

It unbreaks spotify's internal needs
It unbreaks travis build failure (worker.py thing).


add test utils

Codecov Report

Merging #11 (4e200d8) into master (002e9a0) will increase coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #11      +/-   ##
==========================================
+ Coverage   96.78%   96.89%   +0.10%
==========================================
  Files          22       24       +2
  Lines         467      483      +16
  Branches      104      110       +6
==========================================
+ Hits          452      468      +16
  Misses          5        5
  Partials       10       10

Impacted Files
Coverage Δ

src/createMacroManager.ts
100.00% <ø> (ø)

src/defineMacroPlugin.ts
100.00% <ø> (ø)

src/defineMacroProvider.ts
87.50% <ø> (ø)

src/wrappers/helper/server.ts
100.00% <ø> (ø)

src/wrappers/macroProvider.ts
100.00% <ø> (ø)

src/tester/transformer.ts
100.00% <100.00%> (ø)

src/tester/typeRenderer.ts
100.00% <100.00%> (ø)

src/wrappers/macroManager.ts
100.00% <100.00%> (ø)

src/wrappers/macroPlugin.ts
95.65% <100.00%> (ø)

... and 1 more

Continue to review full report at Codecov.

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


Dynamic select options

I tried creating a jsGrid with 4 columns. Two are of type "select" and the others are number and text.
I wanted the second select dropdown to change options based on the first select's value.
This was tricky due to how the grid was refreshed. I tried binding the change event to one of the select options, but it would only trigger once because when I tried using the "fieldOption" method, the grid would refresh and the onChange event would not be bound anymore.
I got what I wanted by using the "onRefreshing" and "onRefreshed" callbacks from jsGrid.
After properly getting the options to switch based on the first select, I realized this was all pointless because the values of inserted rows were being changed!!!
Instead of saving the value of the dropdown in the grid, it seems the inserted rows are actually referring to what's in the dropdown. For example, take this inserted row with
Category: Animal,  Type: Dog
If I change the type's available options, it will affect ALL INSERTED ROWS in the grid.
$("#jsGrid").jsGrid("fieldOption", "Type", "items", ["SUV", "Sedan", "Coupe"]);
Running that line will change my inserted rows to
Category: Animal, Type: SUV
here is my code for the dynamic select options:
var categoryCache;

$(document).ready(function() {
    // js Grid initialization
    $("#jsGrid").jsGrid({
        width: "100%",
        height: "350px",
        noDataContent: "",

        inserting: true,
        editing: true,

        fields: [
            { name: "Category", type: "select", items: [{Name:"Animal"}, {Name:"Car"}, {Name:"Fruit"}], valueField: "Name", textField: "Name", width: 150, validate: "required" },
            { name: "Type", type: "select", items: ["Cat", "Dog"], width: 250, validate: "required" },
            { name: "Amount", type: "number", width: 150, validate: "required" },
            { name: "Notes", type: "text", width: 300 },
            { type: "control" }
        ],

        /**
         * All this is to achieve dynamic "Type" based on "Category".
         * The jsGrid seems to be recreated everytime $().jsGrid("fieldOption"....) is run
         * I was binding the change event outside before and it would catch the event only once
         * binding the event in the "onRefreshing" correctly updated the "Type" options, BUT it kept resetting the "Category" value.
         * So, after refresh is complete, inside "onRefreshed", I updated the "Category" value by holding onto the value in the variable categoryCache.
         */
        onRefreshing: function(args) {
            // when Category changes, update the Type options
            var category = $('#jsGrid .jsgrid-insert-row td:first-child select');
            category.on("change", function() {
                var categoryValue = category.val();
                categoryCache = $('#jsGrid .jsgrid-insert-row td:first-child select').val();

                switch(categoryValue) {
                    case 'Animal':
                        $("#jsGrid").jsGrid("fieldOption", "Type", "items", ["Cat", "Dog"]);
                        break;
                    case 'Car':
                        $("#jsGrid").jsGrid("fieldOption", "Type", "items", ["SUV", "Sedan", "Coupe"]);
                        break;
                    case 'Fruit':
                        $("#jsGrid").jsGrid("fieldOption", "Type", "items", ["Apple", "Orange"]);
                        break;
                    default:
                        console.log('eh.');
                }
            });
        },
        onRefreshed: function(args) {
            if(categoryCache != null) {
                $('#jsGrid .jsgrid-insert-row td:first-child select').val(categoryCache);
            }
        }
    });
});

Please checkout this issue https://github.com/tabalinas/jsgrid/issues/46 (and all referenced there at the bottom could be also useful).


Remove all cookies from the lab so that the cookie disclaimer could be removed too

Is your feature request related to a problem? Please describe.

I'm always frustrated when I open the Lab, create a program and want to start compiling the program e.g. for Calliope, because I think I have to remove the cookie disclaimer to have a full view. Also I do not want to accept cookies in general.

Describe the solution you'd like

Remove all cookies and the cookie disclaimer from the website. To remember the choice of the robot type we should offer a simple creation of a corresponding bookmark.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
We discussed this often, but because of some legal stuff this seems to be the best option. Also we recently got aware of that there is no need to use cookies for Matomo in general.

Outlook

With this feature we should start thinking about collecting statistical data (not personal data) and provide them to everyone via the UI, somehow similar to what Matomo is doing now for us.

Steps to do:

[x] Remove cookies
[x] Delete previous cookies
[ ] Show popup to create a bookmark
[ ] Fitting message depending on the browser/device
[ ] Adapt loadSystem call to standard query structure
[ ] (Later on) remove jquery-cookie library

I decided to use a generic message instead of generating one depending on the device/browser.

reviewed but not closed, because of open items to do later, therefore removed from the current project (to be added to the following one)


In the SOM train function the verbose mode cannot be set to final

According to the displayed error below, verbose can only be debug, info or None.
:param verbose: verbosity, could be 'debug', 'info' or None
"""
logging.root.setLevel(getattr(logging, verbose.upper()) if verbose else logging.ERROR)
logging.info(" Training...")
AttributeError: 'module' object has no attribute 'FINAL'`
I'm guessing i've installed the wrong version, since i've seen its usage in one of your provided examples. Link: http://nbviewer.jupyter.org/gist/sevamoo/e93699fdb481de1a932b
I've installed SOMPY using: pip install git+https://github.com/sevamoo/SOMPY.git
Please let me know how i can fix this. Thanks.

Hi
The provided example is based on the old version of the library. In the current version, you only have choices of 'debug', 'info' or None.
Best


Binding to an AMD view model

Using your plugin. First off, awesome, love this, since it's the perfect step for me transitioning my Durandal app to Aurelia in stages.
When using this plugin to bind to a view model that is a class, all is well. However, if I try and bind it to a view model that is AMD (the old Durandal style), what is bound is an empty object. Does this plugin require the use of a class to bind, or can it support an AMD module?

I assume that you mean the following when speaking from classes:
    var TestModel = function () {
        this.testText = "John Doe";
    };

    TestModel.prototype.doIt = function () {
        alert("done");
    };

    return TestModel;

and from AMD style?
    var vm = {
        testText: "John Doe"
    };

    vm.doIt = function () {
        alert("done");
    };

Classes that bind correctly are in this syntax:
export class ViewModel{
   constructor(){
      this.foo = 'bar';
   }
}

AMD modules that don't bind correctly (and just have an empty object):
define(function(){
   var foo = 'bar';
   return {
      foo: foo
   }
})

Of course, I do believe Babel transpiles classes to that syntax you provided first, yes.

I can reproduce this bug and try to find a fix.

The problem seems to be that the return value of your AMD module is an object and not a function. If you use "prototype" based syntax you return the constructor function instead of the plain object.
I tried this scenario both with SystemJS and RequireJS as module loaders. Both loaders have problems to load the module accordingly. However, RequireJS and the AMD spec generally support return values with other types than functions.
The easiest way to fix this will be to wrap all your module return values in anonymous functions:
define(function(){
   var foo = 'bar';
   return function() {
     return {
       foo: foo
     }
   }
})

Strange that RequireJS would have failed, since that's the syntax that we used with RequireJS in Durandal (and I think is documented). It's the syntax that I've seen pretty frequently used when using AMD modules.
Is there any way to get this to work with the module returning an object (essentially a singleton)?

I found the issue in my composition logic now. I fixed it temporarily in 0.2.2-beta.1 which is not pushed to npm. I will finally fix it today evening.

Looking at the changes you committed, and it seems that that only addresses the compose binding? In my scenario, I'm actually routing from an ES6/Aurelia page to a AMD module with knockout page via the <router-view>

Yes, my fix only addresses the compose binding. Other compositions which are based on html tags (<router-view>, <my-awesome-subview>, ...) are not handled by this plugin because this is done by aurelia itself as core functionality.
I think that aurelia cannot handle es5 modules which are not returning functions...

Finally fixed in 0.2.2

Gotcha, thanks for that explanation, and the code fix. By any long shot, you don't know where in the aurelia code that creates the view instruction (and needs a function instead of object) is located?

And as a side note (sorry, again not related to this issue exactly), have you tested using the aurelia router to route to an AMD module? I'm trying to get that to work, and it looks like the binding engine doesn't quite account for that, but I wanted to see if you had that setup working.

To your first question:
I think this is placed anywhere in the aurelia-templating module. I guess in one of the view-*.js files. Try to debug your model constructor and backtrack the call stack.
To your second question:
I tested this secario and had a strange behavior. My es5 model looks like this:
define([], function () {
    var vm = {
        thirdModel: "John Doe"
    };
    vm.foo = function () {
        alert("done");
    };
    return vm;
});

The HTML code was bound to the foo function instead of the resulting vm object. I traced back the callstack from aurelia-router but I can't locate the place where the mistake happens...

Thanks for checking too. Yah, it seems that when the view model is empty, the aurelia-templating library (getViewStrategy function) gets the "origin" of the object, which in my case goes back to a core-js object and then ultimately tries to get a corresponding iobject.html file (insert explosion of code here). In either case, it seems related to the aurelia code, not yours. Thank you for your help!

No problem! Yes, I've seen your issue in aurelia-router repository. Sounds really strange.
If you have any things during migration which should be simplified please let me know. Maybe I can improve something. There's also a partial migration guide available as pull request. #440

Perfect, I appreciate it, and will let you know if I find a simplified way of doing things.


Select first item

Hey,
User Story:

User focuses on the text field.
Dropdown opens
If only 1 item is in the list
a) on pressing enter, the first item should be selected. (without using the down key)

Is there a way to provide support for this User Story?
Would really appreciate some help.

Hey,
you can use openOnFocus and autoHighlight


More than 5 characters in archer init filter text starts generating newlines

I'm starting to make a new project by running archer init and I have an existing project. The CLI prompts me to filter existing projects by typing, but when I input more than 5 characters I start to see lots of newlines generated.

I believe this is the same issue as https://github.com/aws/amazon-ecs-cli-v2/issues/125, resolving this one to track it there.


Gather feedback on the new Geometry=>Bodies tab

Because of #111, I need to change the input of symmetries in the GUI.
Right now, the GUI has changed and is plugged in the old solver.
It's not super pretty right now, but I struggle to imagine how it could be better (more user friendly, prettier, etc ...)
Any ideas ?
link to the GUI : https://gabrielfougeron.github.io/choreo/
Image of the new thing:

My issues with it:

Size of table input scales with number of bodies.
There is no easy mental shortcut when designing several subsystems at once. Is it even possible ?
Is the tiny doc in the middle really helpful ?


add to_key method

class ActiveRecord::Base
  def to_key
    backing_record.object_id
  end
end

See https://github.com/ruby-hyperloop/hyper-react/issues/244 for details

you would actually add the method to InstanceMethods module

Can be closed?


Improve babelrc recipe

Better language, and more thorough linking to Babel's config documentation
I think this comes pretty close to fixing #447

Feedback incorporated.

LGTM

:shipit:
Regarding the link syntax, I suspect it might be easier for translators if the links are defined once, in a single place. It'd be easier to change the links to point at translated content instead.

@novemberborn It's not very common to link to the exact same thing multiple times though.

🦄