tf-job yaml spec appears to be incorrect

I believe that this example:
https://github.com/kubeflow/website/blob/master/content/docs/components/tftraining.md#what-is-tfjob
is incorrect in 2 respects:

it needs a 'Master' or 'Chief' spec added
the status stuff at the end should be removed, as this is meant to be an example of the yaml file that is submitted to create the job.

More detail: As is (but removing the 'status' stuff), I get this error:
INFO:tensorflow:TF_CONFIG environment variable: {u'environment': u'cloud', u'cluster': {u'ps': [u'trainer-hbvxc-ps-0.kubeflow.svc:2222', u'trainer-hbvxc-ps-1.kubeflow.svc:2222'], u'worker': [u'trainer-hbvxc-worker-0.kubeflow.svc:2222']}, u'task': {u'index': 1, u'type': u'ps'}}
Traceback (most recent call last):
train files list: ['gs://aju-dev-demos-pipelines/newtfjob2/workflow-1-h659q/tft-train/train_transformed-00000-of-00001.gz']
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
eval files list: ['gs://aju-dev-demos-pipelines/newtfjob2/workflow-1-h659q/tft-eval/eval_transformed-00000-of-00001.gz']
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/ml/trainer/task.py", line 201, in <module>
    run_experiment(train_files, eval_files, hparams)
  File "/ml/trainer/task.py", line 105, in run_experiment
    estimator = train_and_maybe_evaluate(train_files, eval_files, hparams)
  File "/ml/trainer/task.py", line 79, in train_and_maybe_evaluate
    save_checkpoints_steps=999, keep_checkpoint_max=1)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/estimator/run_config.py", line 528, in __init__
    self._init_distributed_setting_from_environment_var(tf_config)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/estimator/run_config.py", line 589, in _init_distributed_setting_from_environment_var
    self._cluster_spec, task_env, TaskType.CHIEF)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/estimator/run_config.py", line 163, in _validate_task_type_and_task_id
    chief_task_type)
ValueError: If "cluster" is set in TF_CONFIG, it must have one "chief" node.

I fixed it by adding a 'Master' spec, like so:
https://github.com/amygdala/code-snippets/blob/master/ml/kubeflow-pipelines/components/kubeflow/launcher/train.template.yaml
(Note: we don't want to swap in this example as is, since it also includes mounting the user-gcp-sa secret, which is GKE specific. But it gives the gist.).
I'm confused as to how the existing example in the docs worked for the person who provided it, so I'm wondering if there's something I'm missing.

/assign @amygdala

Friendly ping @amygdala How are you doing with this update?

I'm sorry, I'm having trouble digging out of N*xt work.  I will try to come back to this on the weekend. One issue: as mentioned above, I'm confused as to how the existing example in the docs worked for the person who provided it, so I'm wondering if there's something I'm missing. It would be good to find the original author -- do you have any idea who that might be?

I don't know who the original author is. Perhaps @jlewi knows?

okay, I'm finally returning to this.  amazing, I know :).  Hope to tackle it tomorrow.

/close


Provide early boot systemd unit files within the associated dracut module

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

Comparison is base (48966fa) 72.39% compared to head (ce764d8) 72.42%.

:exclamation: Current head ce764d8 differs from pull request most recent head fe4bf4a. Consider uploading reports for the commit fe4bf4a to get more accurate results

Files
Patch %
Lines

pkg/features/features.go
0.00%
1 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1886      +/-   ##
==========================================
+ Coverage   72.39%   72.42%   +0.03%
==========================================
  Files          69       69
  Lines        7274     7268       -6
==========================================
- Hits         5266     5264       -2
+ Misses       1629     1625       -4
  Partials      379      379

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


Fix failure for aggregation as argument to format function

Fixes https://github.com/prestosql/presto/issues/3829

I created another PR to address this issue and also did a minor refactor in my branch, mind taking a look?
https://github.com/prestosql/presto/pull/3858

Closing in favor of https://github.com/prestosql/presto/pull/3859


home page links

on the dropdown menu

[x] - substitute the the'data privacy policy' with 'Data Transfer Process', linked to https://crr.gitbook.io/crdsr/data-transfer-process
[x] - move the link to crMDR to bottom place (and signal it is external?)

also:

[ ] Canserv under GA 101058620, BY-COVID under GA 101046203
EOSC-Life under GA 824087 ->
GA 824087 (EOSC-Life), GA 101046203 (BY-COVID), GA 101058620 (Canserv)

I didn't signal that the MDR link is external as technically all the other list items link to an external site (Gitbook)

true, but this will clarify things, so please add it (only mdr) when convenient. thanks!
not urgent.
also

[  ] change text from MetaData Repository crMDR -> MetaData Repository
[  ] replace the crMDR link in the banner with the Data Sharing Policy  one
and maybe
[  ] add also RED with text Regulatory and Ethics DB
[  ] we could use a separator for these 2 last items, possibly with a header like Other Services from ECRIN


fix: Fix typo in operator's arguments

Operator's arguments changed from --eanble-services to --enable-services
trustyai.opendatahub.io_lmevaljobs.yaml and zz_generated.deepcopy.go regenerated.

thanks for the fix and regen
/LGTM


Support more obfuscated cracks

After deobfuscating of this code, some parts are still obfuscated.
obfuscated.txt
Obfuscation 1: An object stores a lot of simple functions and literals.

Obfuscation 2: An object references some literals or functions in another object.

In general it supports deobfuscating these objects, but often fails when dead code injection is enabled additionally:

Code in the red boxes is removed later and f = m.QMyUp(g, m.AuWjE); never runs but makes it much harder to distinguish from normal user code that should be ignored.
E.g.:
var m = {
  users: 'abc'
};
if (....) {
  m = {
    users: 'xyz'
  }
}
console.log(m.users);

Here you can test a workaround but it's not guaranteed to be safe: https://deploy-preview-45--webcrack.netlify.app/

I tested that the deobfuscated code runs fine.
While inspecting the code I found that some of the useless obfuscated code was not removed.

Regarding the above question, in general, it is possible to assume that the objects generated by the obfuscator are not reassigned. You also can try deobfuscate the if statement first to confirm that the branching code will not run.

it is possible to assume that the objects generated by the obfuscator are not reassigned

Yes that's what was checked for previously
https://github.com/j4k0xb/webcrack/blob/3aeada5740a8a66f64ec8a8a5375218aa0bf8016/packages/webcrack/src/deobfuscate/control-flow-object.ts#L115-L121

You also can try deobfuscate the if statement first to confirm that the branching code will not run.

I tried..

its the messiest code ever and there are still so many edge cases left:

It might find a branch that calls fQUgr: function (p, q) { return f.zvlrc(p, q); but f hasn't been deobfuscated/inlined yet
f could also be initialized later:
https://github.com/j4k0xb/webcrack/blob/3aeada5740a8a66f64ec8a8a5375218aa0bf8016/packages/webcrack/src/deobfuscate/test/samples/obfuscator.io-control-flow-keys.js#L30-L34
The function in f could again reference another object instead of directly returning a === b, etc.

There's no way to do it "first" because of the order in which these objects are created

I mean don't do these checks, just inline them.

It might find a branch that calls fQUgr: function (p, q) { return f.zvlrc(p, q); but f hasn't been deobfuscated/inlined yet

what is "f hasn't been deobfuscated/inlined yet" ?
Will the objects generated by the obfuscator be obfuscated?


How to load train_dataset and batch in 'larger' datasets

❓ Questions & Help
Thanks for your awesome code!
I got some problems when starting to create my own 'larger' datasets. As PyG document, a “larger” datasets was constructed. It seems that every graph was saved into a file(data_*.pt). I know in InMemoryDataset we have slice to split test_dataset and train_dataset. But how to get  test_dataset and train_dataset(or load testbatch, train batch) in 'larger' datasets easily.
Can you give me a few guidance? Thanks!

Hi, good question! Either predefine test/train splits and load them from respective train and test folders or load them based on a predefined permutation, e.g.:
class MyDataset(Dataset):
    def __init__(self, train=True):
        ...
        perm = torch.randperm(num_examples) # for fixed splits, save/load this.
        if not train:
            self.perm = perm[:1000]
        else:
            self.perm = perm[1000:]

    def __len__(self):
         return self.perm.size(0)

    def get(self, idx):
         idx = perm[idx].item()
         return torch.load('data_{}.pt'.format(idx))

Thanks for your effective reply!
I load my test&train dataset successfully. In my demo dataset, len(train_dataset) =2 and len(test_dataset) =2
But I got another error about 'train_loader' in train function...
# load dataset
path = osp.join(osp.dirname(osp.realpath(__file__)), 'data', 'MyDataset')
train_dataset = MyDataset(path, True)
test_dataset = MyDataset(path, False)

# load batch data
test_loader = DataLoader(test_dataset)
train_loader = DataLoader(train_dataset)

Traceback (most recent call last):
  File "/home/wangfeiabn/WANGFEI/Dev/Python/bigCode/GNN.py", line 140, in <module>
    train_loss = train(epoch)
  File "/home/wangfeiabn/WANGFEI/Dev/Python/bigCode/GNN.py", line 116, in train
    for data in train_loader:
  File "/home/wangfeiabn/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 615, in __next__
    batch = self.collate_fn([self.dataset[i] for i in indices])
  File "/home/wangfeiabn/anaconda3/lib/python3.7/site-packages/torch_geometric/data/dataloader.py", line 24, in <lambda>
    collate_fn=lambda data_list: Batch.from_data_list(data_list),
  File "/home/wangfeiabn/anaconda3/lib/python3.7/site-packages/torch_geometric/data/batch.py", line 44, in from_data_list
    batch[key], dim=data_list[0].cat_dim(key, batch[key][0]))
TypeError: expected Tensor as element 0 in argument 0, but got int

Thanks!

Data objects need to hold tensors, not ints. You should therefore add labels as data.y = torch.tensor([class]). I'll change that as soon as I have time.

Label defined as torch.tensor is also understandable, but it should be clarified in documents.
Many thanks! This is a awesome library.

int and float are now allowed as data attributes in current master.


BadHttpRequestException Request timed out.

We keep having this error frequently and randomly on any request from our clients since we upgraded from .Net Core 1.1.1 to .Net Core 2.
BadHttpRequestException Request timed out.
at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.PipeCompletion.ThrowFailed()
at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.GetResult(ReadResult& result)
at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.IReadableBufferAwaiter.GetResult()
Any idea what's the cause of this exception and how to avoid it?

I believe it's related to this https://github.com/aspnet/KestrelHttpServer/issues/2151 but I'm not 100% sure. Do you have any other logs?

No it's all I've got

Given that this is a timeout, it might not be related to #2151. Do you know by chance if any of the requests are coming from a .NET linux HttpClient?

@halter73 No, I don't think so.
I manage to have a more complete log of my exception:
BadHttpRequestException: Request timed out.
Module "Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.PipeCompletion", line 0, col 0, in ThrowFailed
Void ThrowFailed()
Module "Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe", line 0, col 0, in GetResult
Void GetResult(Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.ReadResult ByRef)
Module "Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe", line 45, col 0, in Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.IReadableBufferAwaiter.GetResult
Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.ReadResult Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.IReadableBufferAwaiter.GetResult()
Module "Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody", line 130, col 0, in ReadAsync
Void MoveNext()
Module "System.Runtime.CompilerServices.TaskAwaiter", line 11, col 0, in ThrowForNonSuccess
Void ThrowForNonSuccess(System.Threading.Tasks.Task)
Module "System.Runtime.CompilerServices.TaskAwaiter", line 40, col 0, in HandleNonSuccessAndDebuggerNotification
Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
Module "Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.FrameRequestStream", line 135, col 0, in ReadAsyncInternal
Void MoveNext()
Module "System.Runtime.CompilerServices.TaskAwaiter", line 11, col 0, in ThrowForNonSuccess
Void ThrowForNonSuccess(System.Threading.Tasks.Task)
Module "System.Runtime.CompilerServices.TaskAwaiter", line 40, col 0, in HandleNonSuccessAndDebuggerNotification
Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
Module "System.IO.StreamReader", line 250, col 0, in ReadBufferAsync
Void MoveNext()
Module "System.Runtime.CompilerServices.TaskAwaiter", line 11, col 0, in ThrowForNonSuccess
Void ThrowForNonSuccess(System.Threading.Tasks.Task)
Module "System.Runtime.CompilerServices.TaskAwaiter", line 40, col 0, in HandleNonSuccessAndDebuggerNotification
Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
Module "System.IO.StreamReader", line 152, col 0, in ReadAsyncInternal
Void MoveNext()
Module "System.Runtime.CompilerServices.TaskAwaiter", line 11, col 0, in ThrowForNonSuccess
Void ThrowForNonSuccess(System.Threading.Tasks.Task)
Module "System.Runtime.CompilerServices.TaskAwaiter", line 40, col 0, in HandleNonSuccessAndDebuggerNotification
Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
Module "Microsoft.AspNetCore.WebUtilities.FormReader", line 155, col 0, in BufferAsync
Void MoveNext()
Module "System.Runtime.CompilerServices.TaskAwaiter", line 11, col 0, in ThrowForNonSuccess
Void ThrowForNonSuccess(System.Threading.Tasks.Task)
Module "System.Runtime.CompilerServices.TaskAwaiter", line 40, col 0, in HandleNonSuccessAndDebuggerNotification
Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
Module "Microsoft.AspNetCore.WebUtilities.FormReader", line 120, col 0, in ReadNextPairAsyncImpl
Void MoveNext()
Module "System.Runtime.CompilerServices.TaskAwaiter", line 11, col 0, in ThrowForNonSuccess
Void ThrowForNonSuccess(System.Threading.Tasks.Task)
Module "System.Runtime.CompilerServices.TaskAwaiter", line 40, col 0, in HandleNonSuccessAndDebuggerNotification
Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
Module "Microsoft.AspNetCore.WebUtilities.FormReader", line 118, col 0, in ReadFormAsync
Void MoveNext()
Module "System.Runtime.CompilerServices.TaskAwaiter", line 11, col 0, in ThrowForNonSuccess
Void ThrowForNonSuccess(System.Threading.Tasks.Task)
Module "System.Runtime.CompilerServices.TaskAwaiter", line 40, col 0, in HandleNonSuccessAndDebuggerNotification
Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
Module "System.Runtime.CompilerServices.TaskAwaiter", line 8, col 0, in ValidateEnd
Void ValidateEnd(System.Threading.Tasks.Task)
Module "Microsoft.AspNetCore.Http.Features.FormFeature", line 442, col 0, in InnerReadFormAsync
Void MoveNext()
Module "System.Runtime.CompilerServices.TaskAwaiter", line 11, col 0, in ThrowForNonSuccess
Void ThrowForNonSuccess(System.Threading.Tasks.Task)
Module "System.Runtime.CompilerServices.TaskAwaiter", line 40, col 0, in HandleNonSuccessAndDebuggerNotification
Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
Module "Microsoft.AspNetCore.Mvc.ModelBinding.FormValueProviderFactory", line 121, col 0, in AddValueProviderAsync
Void MoveNext()
Module "System.Runtime.CompilerServices.TaskAwaiter", line 11, col 0, in ThrowForNonSuccess
Void ThrowForNonSuccess(System.Threading.Tasks.Task)
Module "System.Runtime.CompilerServices.TaskAwaiter", line 40, col 0, in HandleNonSuccessAndDebuggerNotification
Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
Module "Microsoft.AspNetCore.Mvc.ModelBinding.CompositeValueProvider", line 145, col 0, in CreateAsync
Void MoveNext()
Module "System.Runtime.CompilerServices.TaskAwaiter", line 11, col 0, in ThrowForNonSuccess
Void ThrowForNonSuccess(System.Threading.Tasks.Task)
Module "System.Runtime.CompilerServices.TaskAwaiter", line 40, col 0, in HandleNonSuccessAndDebuggerNotification
Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
Module "Microsoft.AspNetCore.Mvc.ModelBinding.CompositeValueProvider", line 128, col 0, in CreateAsync
Void MoveNext()
Module "System.Runtime.CompilerServices.TaskAwaiter", line 11, col 0, in ThrowForNonSuccess
Void ThrowForNonSuccess(System.Threading.Tasks.Task)
Module "System.Runtime.CompilerServices.TaskAwaiter", line 40, col 0, in HandleNonSuccessAndDebuggerNotification
Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
Module "Microsoft.AspNetCore.Mvc.Internal.ControllerBinderDelegateProvider+<>c__DisplayClass0_0+<g__Bind0>d", line 121, col 0, in MoveNext
Void MoveNext()
Module "System.Runtime.CompilerServices.TaskAwaiter", line 11, col 0, in ThrowForNonSuccess
Void ThrowForNonSuccess(System.Threading.Tasks.Task)
Module "System.Runtime.CompilerServices.TaskAwaiter", line 40, col 0, in HandleNonSuccessAndDebuggerNotification
Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
Module "Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker", line 152, col 0, in InvokeInnerFilterAsync
Void MoveNext()
Module "System.Runtime.CompilerServices.TaskAwaiter", line 11, col 0, in ThrowForNonSuccess
Void ThrowForNonSuccess(System.Threading.Tasks.Task)
Module "System.Runtime.CompilerServices.TaskAwaiter", line 40, col 0, in HandleNonSuccessAndDebuggerNotification
Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
Module "Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker", line 159, col 0, in InvokeNextExceptionFilterAsync

I'm like 87% sure it's #2151, we'll try to get a patched build so you can try out the fix.

I had met that exception. I post StreamConent via HttpClient .
public static async Task GoAsync()
{
    var client = new HttpClient() { BaseAddress = new Uri("http://upload.domain.com") };
    using (var memory = new MemoryStream())
    {
        var file = File.OpenRead("img/download.jpeg");
        file.CopyTo(memory);
        file.Dispose();

        var tasks = new List<Task>();
        for (int i = 0; i < 10; i++)
        {
            var request = new HttpRequestMessage(HttpMethod.Post, "image");
            memory.Seek(0, 0);
            request.Content = new StreamContent(memory);
            tasks.Add(client.SendAsync(request));
        }
        await Task.WhenAll(tasks);
    }
}

The end of Server
[HttpPost("image")]
public IActionResult Post()
{
   using(var stream = new MemoryStream())
   {
       Request.Body.CopyTo(stream);
        //do noting....
    }
    return Ok();
}

The error is log.txt
2017-12-05 22:29:25.461 +08:00 [Error] An unhandled exception has occurred while executing the request
 /image
Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Request timed out.
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.PipeCompletion.ThrowFailed()
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.GetResult(ReadResult& result)
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.IReadableBufferAwaiter.GetResult()
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.ReadableBufferAwaitable.GetResult()
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody.<ReadAsync>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.FrameRequestStream.<ReadAsyncInternal>d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.FrameRequestStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.Stream.CopyTo(Stream destination, Int32 bufferSize)
   at XXX.UploadController.<Post>d__11.MoveNext() in C:\Users\I\Documents\src\Web\Controllers\UploadController.cs:line 21
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at lambda_method(Closure , Object )
   at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextResourceFilter>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeFilterPipelineAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.<Invoke>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.<Invoke>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

you are blocking on the server
Request.Body.CopyTo(stream);

Try
[HttpPost("image")]
public async Task<IActionResult> Post()
{
   using(var stream = new MemoryStream())
   {
       await Request.Body.CopyToAsync(stream);
        //do noting....
    }
    return Ok();
}```

@Drawaes I had tried your code, but the exception occurred again.

@kexxxfeng what image are you using?

You are sending the same memory concurrently to 10 connections? Reading position in MemoryStream will get mixed up?

You don't need to dispose MemoryStream but do need to dispose HttpClient as used in the sample you've given.
Try this to create a MemoryStream for each task:
public static async Task GoAsync()
{
    using (var client = new HttpClient() { BaseAddress = new Uri("http://upload.domain.com") })
    {
        var memory = new MemoryStream();
        using (var file = File.OpenRead("img/download.jpeg");)
        {
            await file.CopyToAsync(memory);
        }
        memory.Seek(0, 0); // Not sure needed
        var data = memory.ToArray();

        var tasks = new List<Task>();
        for (int i = 0; i < 10; i++)
        {
            var taskMemory = new MemoryStream(data);
            var request = new HttpRequestMessage(HttpMethod.Post, "image");
            request.Content = new StreamContent(taskMemory);
            tasks.Add(client.SendAsync(request));
        }
        await Task.WhenAll(tasks);
    }
}

You can even use the array directly. So instead of creating taskMemory, you can just do request.Content = new ByteArrayContent(data);.

@benaadams @halter73 That's great. Thx 👍

:( Today, I found a lot of exception like below in the log of server end.
2017-12-07 14:39:58.709 +08:00 [Error] An unhandled exception has occurred while executing the request
/Upload/Image
Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.ConnectionResetException: Error -4077 ECONNRESET connection reset by peer ---> Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvException: Error -4077 ECONNRESET connection reset by peer
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.PipeCompletion.ThrowFailed()
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.GetResult(ReadResult& result)
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.IReadableBufferAwaiter.GetResult()
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.ReadableBufferAwaitable.GetResult()
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvOutputConsumer.<WriteOutputAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

I've just sent 100 post request to the server. Every image is only 4MB.
public static async Task GoAsync()
{
    using (var client = new HttpClient() { BaseAddress = new Uri("http://upload.domain.com") })
    {
        var memory = new MemoryStream();
        using (var file = File.OpenRead("img/download.jpeg");)
        {
            await file.CopyToAsync(memory);
        }
        memory.Seek(0, 0); // Not sure needed
        var data = memory.ToArray();

        var tasks = new List<Task>();
        for (int i = 0; i < 100; i++)
        {
            var request = new HttpRequestMessage(HttpMethod.Post, "image");
            request.Content = new ByteArrayContent(data);
            tasks.Add(client.SendAsync(request));
        }
        await Task.WhenAll(tasks);
    }
}

Or, the exception means that the resource of the server is not enough to handle the 100 requests?

Error -4077 ECONNRESET connection reset by peer

This generally means the client aborted the connection mid-request.

@halter73 Yeah, I resolved it by setting httpClient.TimeOut = new TimeSpan(1,0,0);

wow， set the  httpClinet.TimeOut not enough grace.  any  other  soultion?

@Julian89757 Timeouts are generally caused by the client not hitting the default rate limit. Did you capture any logs?

We periodically close 'discussion' issues that have not been updated in a long period of time.
We apologize if this causes any inconvenience. We ask that if you are still encountering an issue, please log a new issue with updated information and we will investigate.


Add new validator when adding bd

Problem:
Because volume group management needs to consider many factors, we decided to offload this behavior to the user and block operations, like adding a new block device to the volume group.
Solution:
We need to check when trying to add a new blockdevice into volume group
Related Issue:
Test plan:

@mergifyio backport v0.7.x


Resource and notify

This branch has conflicts, could you resolve them?
Also, have you tested that everything works the same as before?

I can confirm that it works still works. Solving the conflicts now.


crossplatform #2/

Loading XML Z:\home\oo\Downloads\mameao192\0267_software.xml ...
!!! FATAL ERROR: There is an unclosed literal string. Line 845910, position 26.
i think, the wine things totally broke, i haven't been able to look at it locally,
but with the http error, i think these are cross platform...

so, i delete file it makes, it, but because of similar issue. gets further.
this seems to be a thing as well, maybe in the .doc to waste the _*.xml files, etc.

Hello @cewatkins
This normally happens when RAM gets low, MAME-AO spawns MAME to dump out the XML then MAME bombs out half way through outputting the XML. Then everything crashes.
Then next time MAME-AO starts it thinks the XML has already been dumped, then goes to parse it but the XML is incomplete..

Thanks for reminding me, this could do with fixing so the XML goes to temp file first and then gets moved if it works, rather than leaving a broken XML file.
Cheers
Sam

Fixed in 1.93
When dumping XML from MAME use a temp file and only move when it completes.
Had a few reports of this - it seems when RAM is low this step is most likely to fail.


ENS support

Added ENS name and avatar support if user-owned one. Closes #664

Changes 👷♀

Create a variable in accountData$ called ensName and
Used the JsonRpcProvider from context$

How to test 🧪
Connect account that has mapped with ENS domains

cc @adamskrodzki

@sasicodes there is already a PR waiting for review, they closed it because of holidays
https://github.com/OasisDEX/oasis-borrow/pull/677#issuecomment-998660915

@sasicodes well done! apologies for the delay in reviewing this PR. We would need just two things to be fixed to get this merged in

davatar also accepts the optional provider, make sure to pass that in
the conflicts with the target branch. they are mundane, so should be quick to fix

@rkrasiuk  Updated provider in Davatar

@sasicodes appreciate you addressing this so soon. i will test it once more shortly


Annotating day with planned event ?

Hi.
Is there any plan, in the future, to allow putting planned events in the rusti-cal calendar ?
Or is designed to be just a tool to display a calendar ?

looks interesting your idea, could you elaborate with more detail this feature?


 gestures are not working

I can't figure out how to get gesture support working, and after spending some time in the source code / docs I think it might be a bug.
I've produced a demo which pushes and pops views imperatively, but the gestures simply don't work. This demo was tested on iOS simulator, however I had similar results on Android builds as well.
Here is a link to the repo: https://github.com/ajsmth/native-stack-demo
And the meat and potatoes:
const App: () => React$Node = () => {
  const [activeIndex, setActiveIndex] = React.useState(0);

  return (
    <>
      <StatusBar barStyle="dark-content" />
      <SafeAreaView style={{ flex: 1 }}>
        <ScreenStack style={{flex: 1}}>
          {Array.from({length: activeIndex + 1}, (_, index) => (
            <Screen
              style={{
                ...StyleSheet.absoluteFillObject,
                justifyContent: 'center',
                alignItems: 'center',
              }}
              key={index}>
              <ScreenStackHeaderConfig
                title={`Screen: ${index + 1}`}
                gestureEnabled
              />
              <Button
                title="Push"
                onPress={() => setActiveIndex(activeIndex + 1)}
              />
              <Button
                title="Pop"
                onPress={() => setActiveIndex(activeIndex - 1)}
              />
            </Screen>
          ))}
        </ScreenStack>
      </SafeAreaView>
    </>
  );
};

Any help would be appreciated, thanks!

looks like this is the native default behaviour, didnt realize


vue3 support missing

See https://github.com/egoist/vue-feather-icons/issues/60 for a quick&dirty workaround.

Which error do you exactly encounter ?

I am getting

Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'ctx.props.size')

on vuejs3 if I use it like shown in the docs:
<AnnotationIcon size="1.5x" />

...

import { AnnotationIcon } from '@vue-hero-icons/outline'

Yeah, vue3 changed the render() function so this has to be entirely re-written to support vue3.

How would you want to import a vue3 component from this component library ?
I want this library compatible with Vue2 too.
Solutions:

I can create a new major version focused on Vue3 on '@vue-hero-icons/outline' and '@vue-hero-icons/solid'. But I don't like this idea because can upgrade this dependency by mistake on their Vue2 apps.

I can take this opportunity to use vue-heroicons package namespace:
import { AnnotationIcon } from "@vue-heroicons/outline". But il can be confusing with the previous namespace

I can create a new package named heroicons-vue and you can import components like this:
import { AnnotationIconSolid, AnnotationIconOutline } from "heroicons-vue"

Also, feel free to give me an example of icon library using Vue3. I want to grab the best practices.

I guess it would be a good idea to use some kind of @next-notation like vue@next.

This is a temporary idea, we need a permanent decision. Choose between the 3 solutions or equivalent.

In this case I'd prefer solution 2.

I'm glad to see that this has some sort of support.
I am currently trying to get Heroicons to work with Inertia project (basically Vue).
I've even asked for support from Tailwind themselves, and they've yet to provide a solution.
They've suggested downloading the repo as a zip, as well as npm install.
But neither of these work; NPM uses render, but Inertia asks for Default.
Then I found this, and come across the same issue with size as the OP.

solution 2 would be ok. waiting for update too

The tailwindlabs/heroicons repo supports vue 3: https://github.com/tailwindlabs/heroicons#vue
I found this project looking for vue 2 support 🎉

As a side note, thanks to the missing Vue 3 support this package is drop-in replacement for @heroicons/vue for those of us still using Vue 2 or Nuxt.


Make ViewPropTypes backwards compatible

This makes ViewPropTypes fail gracefully to View.propTypes for older versions of react-native

Bump

Please, bring your pull requests to my repo. I Will maintain this lib.
https://github.com/ebellumat/react-native-credit-card-input


In UI enable display of target metrics using Prometheus server as proxy

Proposal
In Prometheus UI enable display of target metrics using Prometheus server as proxy
Problem
The Prometheus UI presents a nice list of targets. The first column is always the metrics URL to be able to inspect them.
The issue is that the server network is usually very restricted or everything is working within a k8s or Swarm network and your browser is not part of it. So you normally are not able to access the metrics URL from the browser directly.
A possible solution
Provide an option (icon next to the URL?) that fetches the metrics using the Prometheus server as proxy.
It does not necessarily need a real UI, it could just open a new window and display metrics in plain text via a URL like http://prometheus:9090/api/v1/target_metrics?url=http://<IP_ADDRESS>:8082/metrics.

This would turn Prometheus into a reverse proxy, which does not seem desirable. I think we could add an button in the "labels" that would go to the graph page with the labels pre-selected but it would not really represent a scrape as extra metrics could be added by recording rules or metrics could be changed by metric_relabel_configs.
Therefore I do not think this issue is really actionnable for us.


Changes for 3.0.x

Upgrade clap dependency to the next major version 4.0.x (closed #14).
Remove single_flags_as_bool setting from cmd parser. That functionality should be achieved via clap::ArgAction.
The default value of use_arg_types settings was changed to true.

Itt looks like it doesn't work correctly now.
When I use clap::ArgAction::SetTrue it overrides not only values that are true, but also that are false even it set to true in other configs.

Sorry, I did not quite understand issue. I guess more context needed.
But in general, the merge functionality work based on parameter/key names and priority, not a value(s), so true will not always override false. It is work like following, if two configs have same parameter/key name the resulting value will be taken from the config parser of which was appended first. From  document for append_parser:
Append a parser to `Config`. First appended parser will have highest priority during (re)load merge, the last one will have lowest priority.

The rational behind that, for example, your application has TOML config, and could get parameters from command-line. You want to override one of parameters from TOML config file for this particular "run" of your application and you do not want to modify TOML config. In such case you will pass those parameter via command–line to override it with some particular value.
The command-line parameter usually has highest priority.
If that description is not for your case, please provide more context: code sample, etc.

I have such code:
let irxconfig = ConfigBuilder::default()
        .append_parser(cmd::ParserBuilder::new(app).build()?) // clap config
        .append_parser( // TOML config
            toml::ParserBuilder::default()
                .default_path("svd2rust.toml")
                .path_option("config")
                .ignore_missing_file(true)
                .build()?,
        )
        .load()?;

For example I have boolean flag:
        .arg(
            Arg::new("derive_more")
                .long("derive_more")
                .action(ArgAction::SetTrue)
                .help("Use derive_more procedural macros to implement Deref and From"),
        )

And this flag enabled in TOML config.
$ cat svd2rust.toml
derive_more = true

And I run program without this flag enabled. I'm expecting derive_more to be true (like in 2.3.1 with single_flags_as_bool). But it is false.
So I conclude that in clap's derive_more overrides TOML's one even if it is missing. It should override only if it is enabled.

Ok. I will investigate. Thanks for details.

Issue should be fixed: https://github.com/abakay/irx-config/pull/16#issue-1401814905


Use mongodb driver directly?

Hi @wzrdtales sorry if I'm asking something that has already been posted - but I didn't find anything in the documentation or in the existing issues.
I wanted to ask if it is possible to use the mongodb driver directly? Like this for example:
exports.up = function (db) {
  return db.driver.collectionName.find({id: 'ID'}).then((collection) => {
    collection.property = 'newValue';
    return collection.save();
  });
}

The idea: I want to only update one property in one entry in the DB.
The reason: We have "base data" defined in our app that get's initialized (and updated) with every release. This base data needs maintenance and it would be awesome if maintenance could be done with node-db-migrate.
Thanks for answering!

Friendly ping to @wzrdtales 🙂

Thanks for bugging me :)
The answer is: not yet really, but this was asked a few times already, i wouldn't be against such option, as this would be an equivalent to runSql. Do you want to give this a shot?

And merry christmas btw. :)

Merry Christmas to you too :)
Could you point me to the correct place where an export would need to be added? I tried to dig into the new code but the new structure is a bit confusing to me 😄

For sure!
Here you go edit the mongo driver:
https://github.com/db-migrate/mongodb/blob/master/index.js#L10
When you add a new method that needs to be added to one of the interfaces, here is an example on how to do that:
https://github.com/db-migrate/mysql/blob/master/index.js#L420

You could faced to migration terminating problem. Just close the dbDriver to avoid it.
return db._run('getDbInstance').then((dbDriver) => {
    return dbDriver.collection('collection_name')
      .findAll({
        prop: 'value'
      })
      .then(() => {
        return dbDriver.close();
      });
  });


Weird path issue on cache file

So, I installed https://github.com/thujohn/analytics-l4 on a site we are working on and got it working to the point of when it tries to cache a file. The path is tries to use is really odd.
ErrorException (E_UNKNOWN) file_exists(): open_basedir restriction in effect. File(/tmp/Google_Client/e4/e4376171b3c41df2c55e1a689f6386c9) is not within the allowed path(s): (/var/zpanel/hostdata/zadmin/public_html/:/var/zpanel/temp/)
I posted the issue on Stack Overflow http://stackoverflow.com/questions/28562220/path-issue-on-laravel-google-analytics-package and the author of that package replied, but to no avail. He redirected me to here.
Any idea why my shared linux box would be spitting out weird paths for this exception error?

This library has a file cache that is enabled by default. The base path is configurable, but it defaults to a directory called Google_Client in your systems temporary directory. The weird hash is just an md5 of the files contents. The e4 directory is just the first two characters in the filename hash so that you don't end up with too many files in one directory.

Thanks for the reply. I see the path it's trying to use is this:
/var/zpanel/hostdata/zadmin/public_html/:/var/zpanel/temp/
So, are you saying my system is generating this path as it's temp directory?

The file it's trying to open is /tmp/Google_Client/e4/e4376171b3c41df2c55e1a689f6386c9. Your system has open_basedir configured to /var/zpanel/hostdata/zadmin/public_html/:/var/zpanel/temp/ which means PHP is only allowed to open files in either the /var/zpanel/hostdata/zadmin/public_html directory or the /var/zpanel/temp directory. So if you want to use the file cache, you will need to make sure it's base dir is in one of those directories.

I'm with you until
"So if you want to use the file cache, you will need to make sure it's base dir is in one of those directories."
What do you mean? How would I set file cache's base dir as that? Thanks in advance for the speedy help

You should be able to configure your cache directory like this:
$client = new Google_Client();
$client->setClassConfig('Google_Cache_File', 'directory', '/var/zpanel/temp/Google_Client');

Sorry, I must not be getting it quite right. In a controller, I have
$client = new Google_Client();
$client->setClassConfig('Google_Cache_File', 'directory', '/var/zpanel/temp/Google_Client');
$site_id = Analytics::getSiteIdByUrl('http://example.com'); //I have my site in there
$stats = Analytics::query($site_id, '7daysAgo', 'yesterday', 'ga:visits,ga:pageviews');
dd($stats);
and that still errors out to
file_exists(): open_basedir restriction in effect. File(/tmp/Google_Client/e4/e4376171b3c41df2c55e1a689f6386c9) is not within the allowed path(s): (/var/zpanel/hostdata/zadmin/public_html/:/var/zpanel/temp/)
What else could it be?

It looks like there is a Google_Client created in https://github.com/thujohn/analytics-l4/blob/master/src/Thujohn/Analytics/AnalyticsServiceProvider.php - is that the one you are modifying to set the cache file location? Otherwise perhaps thats the one thats causing the error to throw?

I'm not really familiar with the analytics lib you are using, but I'm guessing you would need to provide it  $client or somehow configure the client it provides.

@ianbarber I'm not updating that file. I'm just in a controller. The file that's shown in the exception is
vendor/google/apiclient/src/Google/Cache/File.php
@whatthejeff As for configuration, the file at app/config/packages/thujohn/analytics/config.php (https://github.com/thujohn/analytics-l4/blob/master/src/config/config.php) just has these options:
client_id, service_email, certificate_path, use_objects.
I'll ask the developer about how to provide his package with the right $client information then, right? Is there anything else I can do?

I'll ask the developer about how to provide his package with the right $client information then, right?

That sounds like the best thing to do :)

AAAHHH!  Got it fixed :)

    // Get analytics
        $client = Analytics::getClient();
        $client->setClassConfig('Google_Cache_File', 'directory', storage_path('google_cache'));
    $site_id = Analytics::getSiteIdByUrl('http://www.example.com');
    $stats = Analytics::query($site_id, '7daysAgo', 'yesterday', 'ga:visits,ga:pageviews');
    dd($stats);

Setting the storage path correctly like shown above did the trick

So, I will close this issue eventually, but now that I have it working, I can't seem to get the data I want from it. How do you include dimensions in your query?
I'm trying for example to see the number of visits per source in the last week. But I can't specify ga:source as a dimension, or set any dimension for that matter. The exception is:
array_merge(): Argument #2 is not an array
How would I take my code shown above and pull in visits per source?

Got it.
['dimensions' => 'ga:source']


Discuss user stats

Examples:

Paath reading speed
Nitnem daily completion/track record

Any others?

Sehaj paath

Start date
Based on average Ang's user read -> estimate an end date


Support cloning Git LFS data

Clear and concise description of the problem
When using Git LFS in a repository, the LFS data is not cloned and I'm left with textual pointers describing the objects in their place.
As a point of comparison, Drone seems to handle LFS automatically.
Suggested solution
I'm not exactly sure which part is responsible for cloning the repository, but it could detect when LFS is in use and automatically pull the LFS content.
Alternative
No response
Additional context
As a work around,
  cloneLfs:
    image: alpine:3.14
    commands:
      - apk add git-lfs
      - git lfs pull

appears to work
Validations

[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

I tested using the below clone override and it works :partying_face: :)
clone:
  git:
    image: woodpeckerci/plugin-git:v1.2.0

git fetch woodpeckerci/plugin-git:latest on agent hosts should do it to now


Adds max.block.ms config and caching of Kafka producer creation.

max.block.ms  - If the Kafka is not reachable producer blocks for a minute. This is not ideal as it blocks the execution for a long time. I have added the config to enable users to specify the block time, by default the task blocks for 500ms.
caching of Kafka producer - Bulk of the task execution time is consumed by producer creation and connection establishment. This PR enables users to cache the producer once created and increase the throughput. By default 10 producers are cached.
@kishorebanala  @apanicker-nflx  Please consider the PR if you think this is a useful addition to the conductor.

@naveenchlsn Looks good to me. Please resolve the conflicts when you have a chance.

Pull Request Test Coverage Report for Build 2946

21 of 24 (87.5%)  changed or added relevant lines in 3 files are covered.
6 unchanged lines in 3 files lost coverage.
Overall coverage increased (+0.002%) to 69.775%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

contribs/src/main/java/com/netflix/conductor/contribs/kafka/KafkaProducerManager.java
16
19
84.21%

Files with Coverage Reduction
New Missed Lines
%

core/src/main/java/com/netflix/conductor/core/execution/mapper/KafkaPublishTaskMapper.java
1
97.14%

grpc-server/src/main/java/com/netflix/conductor/grpc/server/GRPCServer.java
2
85.71%

core/src/main/java/com/netflix/conductor/service/Lifecycle.java
3
30.0%

Totals

Change from base Build 2945:
0.002%

Covered Lines:
9786

Relevant Lines:
14025

💛  - Coveralls

@naveenchlsn Looks good to me. Please resolve the conflicts when you have a chance.

Thank you @kishorebanala. I have updated the PR. please take a look.


Whether it can be provided a method < getDurationForUrl>?

i think we need a method only for get duration for url?

Why though? You can get the duration as soon the resource is loaded?

Closing in favor of #1033


feat: Account detection by environment

Resolves #14

This feature will be address in upcoming V2/V3 major versions, as the whole account/environment handling will be redesigned.
See roadmap: https://github.com/alma-cdk/project/issues/36
Leaving this issue still open for reference.


[Python] RolePolicyAttachment disappeared after changing the list

What happened?
rolePolicyAttachment:RolePolicyAttachment has disappeared in AWS while its state did not change in Pulumi state file.
Steps to reproduce
I had a role assigned to 2 ECS tasks and it had 3 policy attachments as a string.

role = iam.Role("role")  # dummy role

for idx, arn in enumerate(
        [
            "arn:aws:iam::aws:policy/AmazonSESFullAccess",
            "arn:aws:iam::aws:policy/AmazonSageMakerFullAccess",
            "arn:aws:iam::aws:policy/AmazonS3FullAccess",
        ]
    ):
        aws.iam.RolePolicyAttachment(
            f"{self._config.name}-{idx}-app-role-extension",
            args=aws.iam.RolePolicyAttachmentArgs(policy_arn=arn, role=role.id),
            opts=self._opts,
        )
        aws.iam.RolePolicyAttachment(
            f"{self._config.name}-{idx}-scheduler-role-extension",
            args=aws.iam.RolePolicyAttachmentArgs(
                policy_arn=arn, role=role.id
            ),
            opts=self._opts,
        )

Later on, I decided to add 1 more Policy attachment and limit some Full access policies to necessary permissions.

role = iam.Role("role")  # dummy role
ses_policy = aws.iam.Policy("ses-pol")
s3_policy = aws.iam.Policy("s3-pol")
lambda_invoke_policy = aws.iam.Policy("lambda-pol")

for idx, arn in enumerate(
        [
            ses_policy.arn,
            lambda_invoke_policy.arn,
            "arn:aws:iam::aws:policy/AmazonSageMakerFullAccess",
            s3_policy.arn,
        ]
    ):
        aws.iam.RolePolicyAttachment(
            f"{self._config.name}-{idx}-app-role-extension",
            args=aws.iam.RolePolicyAttachmentArgs(policy_arn=arn, role=role.id),
            opts=self._opts,
        )
        aws.iam.RolePolicyAttachment(
            f"{self._config.name}-{idx}-scheduler-role-extension",
            args=aws.iam.RolePolicyAttachmentArgs(
                policy_arn=arn, role=role.id
            ),
            opts=self._opts,
        )

This has caused a weird state, that Pulumi state shows that the PolicyAttachment of  "arn:aws:iam::aws:policy/AmazonSageMakerFullAccess", exists but the final IAM role did not have the policy.
After changing the order to cause an update, IAM role gained the policy. And after deploying to another environment the problem was back.
Expected Behavior
All Policy Attachments work as expected
Actual Behavior
Policy attachment "arn:aws:iam::aws:policy/AmazonSageMakerFullAccess" disappeared from the role.
Versions used
pulumi 3.22.1
pulumi_aws 4.33.0
Additional context
pulumi up is running in a CI pipeline, do I need to run pulumi refresh there as well?
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@1oglop1 did you ever find a workaround for this? we are encountering the same issue causing some fairly painful debugging sessions

This is the same issue tracked in https://github.com/pulumi/pulumi-aws/issues/1980, which is itself most likely dependent on a feature like https://github.com/pulumi/pulumi/issues/918.  Closing this one out as a duplicate.


Support regex search

Hi, great project!
Currently, pdf.js seems to support exact matches only.  Can it be enhanced with regular expression search function?

IMHO is it too complex for end user and hardly adds any value to the demo viewer

You could update the find controller (https://github.com/mozilla/pdf.js/blob/master/web/pdf_find_controller.js) in a custom build to support this, which is most likely not too difficult because you have the query handling and match calculation logic there, but we don't plan on adding such functionality in the default viewer since most users won't use this.

That would be a great feature, not for end user, but as api, developers need. I also look foward this behavior.


Support multiple web_links

It still needs a better control than a single line edit.
This is implemented to include more compatibility with ComicRack see https://github.com/anansi-project/comicinfo/issues/56

The web link in the GUI remains red.
comictagger.py:115
"web_link": self.leWebLink,

web_link should be web_links

The web link button doesn't work correctly, send the whole line with both URLs to browser.
Could change the web link line edit to a combo box and then clicking the visit button goes to whatever's picked but it could be confusing. Users might think it's the URL they want to save.
A multiline edit with the URLs themselves as normal links, ideally it would expand vertically for each line. This is the best bad idea, I think.

This is what I see when I go to the Notes tab:

There is no highlighted line (it makes sense it's is the top line though), maybe helpful to highlight the top line.
Similar when adding a line:

Here CT could add https:// and set the line as editing after the add button is pressed.
With other themes all this may be more obvious?

Is it just me? I can no longer edit the fields and the text is "greyed out"? I don't seem to be able to interact with it at all, even the scroll bar doesn't work.

Are you editing comicrack metadata?

Are you editing comicrack metadata?

Ah, it was Comic Info XML which I thought would be the same as Comic Rack.
It does show that (stupid) people might need the buttons disabled too.

Yeah cix doesn't have the attribute name updated yet because it's in a different repo


Always show the same set of fields per record type

I think you mean when displaying a record in the frontend?

Yes! Both in the table view and the list view a fixed set of fields should be shown. This should probably be the fields as defined in the record ontology. Currently the table view shows all fields that are present in one or more records, and the detail view only shows the fields that are present in that particular record.
In the table view some fields may be hidden by default, but they should always be defined.
This is per Jeroen's request, because he wants to be able to annotate fields that are not filled in.

@tijmenbaarda in https://github.com/UUDigitalHumanitieslab/EDPOP/pull/233#pullrequestreview-2464458280:

What I meant with #229 (and maybe I had not formulated it clearly) was also to show only the fields that belong to the specific record type (like extent, which would only show on BibliographicalRecord). However, I think that the code in this PR prepares well for this with the functions in tabulator-utils.js.

Do you mean you also want to exclude the only-biographical fields from the hidden-but-available columns in the tabulator view of an only-bibliographical catalog (and vice versa)? Because in that case we need a way to distinguish between only-biographical, only-bibliographical and mixed catalogs. Likewise for collections.
Writing this out, I realize this probably isn't worth the effort. We can still do it for the record detail view, of course.


"Add Column" component fails when changing input parameters

Hi Everyone,
I was wondering if anyone has experienced any issue with Add Column component of GH.Inside.Revit ( also sometime Add Beam component)? Unfortunately, it fails to update the model while playing with input sliders. Have checked on other machines and same result happens. A not ideal solution is to cut and paste the component back again to get the result with new inputs, but this way we lose the current model elements and all related documents. @eirannejad would be appreciated if you could advise. Please see below as reference.

Hi @AminShahkaram,
Sorry for the late answer but there is a specific repo for Revit at https://github.com/mcneel/rhino.inside-revit, from now on please post it there.
Since this issue is from so many time ago, I have to ask if you had chance to test same workflow on a most recent version of RiR.


Added multi GET support

Seemed like a pretty straightforward addition, but please let me know if I somehow missed this already being in the library.

Brilliant! It was indeed missing and on my list for this weekend :)
I generally update the documentation section under:
https://github.com/Mpdreamz/NEST/wiki
after adding complete support for a new feature.
I'll probably refactor this a tad so that it returns a BaseResponse subclass so that all elasticsearch operations can be validated in a similar fashion see: https://github.com/Mpdreamz/NEST/wiki/Handling-responses
Thanks Kevin. I love waking up to pull requests :)


fixing format

Description
while running the script npm run format:check it was found that there are several format related issues in the  codebase
This PR will fix them

Type of change
Please delete options that are not relevant.

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

Test Required (Yes / No)
NO
Checklist:

[] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

@FrancescoXX this PR is focused on removing formatting warnings from the codebase.

it took 3-4 minutes but it's acceptable


npm run install-all fails, then just plain old npm install fails

sudo npm run install-all gives:
npm ERR! Linux 3.13.0-74-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "install-all"
npm ERR! node v6.1.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>install-all: `npm install && cd packages/frontend && npm install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install-all script 'npm install && cd packages/frontend && npm install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the @jimpick/lambda-comments package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm install && cd packages/frontend && npm install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs @jimpick/lambda-comments
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls @jimpick/lambda-comments
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ubuntu/lambda-comments/npm-debug.log

sudo npm install on its own gives:
npm ERR! Linux 3.13.0-74-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.1.0
npm ERR! npm  v3.8.6                                                                      npm ERR! code E404

npm ERR! 404 Not found : @jimpick/akismet-api
npm ERR! 404                                                                              npm ERR! 404  '@jimpick/akismet-api' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of '@jimpick/lambda-comments'               npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ubuntu/lambda-comments/npm-debug.log

Something tells me that this may have to do with the recent security upgrade to 6.x and the apparent phasing-out of 5.x.

Also, your README specifies some stuff with Lambda and 4.3 - due to current needs, I can't downgrade to 4.x.

Looks like it's failing on the scoped package I published: @jimpick/akismet-api
Funny, I tried an 'npm install' here, and I didn't get that error.
It had a workaround for some webpack issues I encountered. If I fix issue #3, I won't need the scoped package.

Node 4.3 is the version that it runs on inside Amazon's cloud. I've been developing with a newer version with no problem.

Huh. That's interesting; Lemme try grabbing nvm and seeing if I can (for some inexplicable reason) install from 4.x.

Nope, still fails. Should I try reinstalling when #3 is fixed?

I've upgraded akismet-api so there's no need for the scoped package anymore. Can you try again to see if that makes your problem go away?

Seems to go fine now! However, I get warned with the following:
npm WARN deprecated<EMAIL_ADDRESS>Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated<EMAIL_ADDRESS>graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to<EMAIL_ADDRESS>as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

@tcby45 mocha uses those two dependencies. They won't upgrade them yet, as it breaks Node 0.8 support. See here and here if you want to add your voice. The next release of Mocha will have those fixed.
In the meantime though, those warnings won't cause any problems. You can use npm install --production which won't produce those warnings.

Alright. On another note, sudo npm run flip-lambdas-to-4.3 fails, producing the following output:
><EMAIL_ADDRESS>flip-lambdas-to-4.3 /home/ubuntu/lambda-comment              s
> babel-node bin/flip-lambdas-to-4.3.js

Updating function QueueCommentLambdaFunction to Node 4.3
TypeError: Cannot read property 'PhysicalResourceId' of undefined
    at _callee$ (flip-lambdas-to-4.3.js:30:24)
    at tryCatch (/home/ubuntu/lambda-comments/node_modules/babel-regenerator-run              time/runtime.js:61:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/home/ubuntu/lambda-comme              nts/node_modules/babel-regenerator-runtime/runtime.js:329:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/hom              e/ubuntu/lambda-comments/node_modules/babel-regenerator-runtime/runtime.js:94:21              )
    at step (flip-lambdas-to-4.3.js:2:1)
    at flip-lambdas-to-4.3.js:2:1
    at new Promise (/home/ubuntu/lambda-comments/node_modules/core-js/modules/es              6.promise.js:193:7)
    at flip-lambdas-to-4.3.js:2:1
    at run (/home/ubuntu/lambda-comments/bin/flip-lambdas-to-4.3.js:93:16)
    at Object.<anonymous> (flip-lambdas-to-4.3.js:41:1)
TypeError: Cannot read property 'PhysicalResourceId' of undefined
    at _callee$ (flip-lambdas-to-4.3.js:30:24)
    at tryCatch (/home/ubuntu/lambda-comments/node_modules/babel-regenerator-run              time/runtime.js:61:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/home/ubuntu/lambda-comme             nts/node_modules/babel-regenerator-runtime/runtime.js:329:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/hom              e/ubuntu/lambda-comments/node_modules/babel-regenerator-runtime/runtime.js:94:21)
    at step (flip-lambdas-to-4.3.js:2:1)
    at flip-lambdas-to-4.3.js:2:1
    at new Promise (/home/ubuntu/lambda-comments/node_modules/core-js/modules/es               6.promise.js:193:7)
    at flip-lambdas-to-4.3.js:2:1
    at run (/home/ubuntu/lambda-comments/bin/flip-lambdas-to-4.3.js:93:16)
    at Object.<anonymous> (flip-lambdas-to-4.3.js:41:1)

npm ERR! Linux 3.13.0-74-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "flip-lambdas-to-4.3"
npm ERR! node v6.1.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>flip-lambdas-to-4.3: `babel-node bin/flip-lambdas-to-4.3.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>flip-lambdas-to-4.3 script               'babel-node bin/flip-lambdas-to-4.3.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the @jimpick/lambda-comments package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     babel-node bin/flip-lambdas-to-4.3.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs @jimpick/lambda-comments
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls @jimpick/lambda-comments
npm ERR! There is likely additional logging output above.

Apologies for the output being garbled from copy-and-paste; for some reason, I can't fix it.

Just a guess, but I think you might have skipped the step where you run npm run save-cloudformation.

Nope, it's definitely there. cating it shows what I'm guessing it should (a bunch of JSON).

Hmm, I wonder if you had an issue when CloudFormation ran?
In my deploy/state/cloudFormation.json, I have an entry for the QueueCommentLambdaFunction resource that looks like this:
    {
      "StackName": "lambdaComments",
      "StackId": "arn:aws:cloudformation:us-west-2:013540632128:stack/lambdaComments/f5382f40-1281-11e6-91cb-50a68a0e3256",
      "LogicalResourceId": "QueueCommentLambdaFunction",
      "PhysicalResourceId": "lambdaComments-QueueCommentLambdaFunction-6CFMIA2HEIZ4",
      "ResourceType": "AWS::Lambda::Function",
      "Timestamp": "2016-05-05T05:28:04.038Z",
      "ResourceStatus": "CREATE_COMPLETE"
    },

Huh, that's not there at all.

Maybe check to see if something went wrong in the CloudFormation console, eg.
https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks?filter=active
(You might need to change the region to match where you were installing it)

Checked that, and with the new stack there apparently is a QueueCommentLambdaFunction created,  with a Physical ID, but it doesn't show up in deploy/state/cloudFormation.json.

Hmm. That's strange. Maybe try running npm run save-cloudformation again?
I think maybe what happened was that the resources hadn't finished deploying the first time you ran it.

That made QueueCommentLambdaFunction appear; however, lambda-flipping results in another error:
><EMAIL_ADDRESS>flip-lambdas-to-4.3 /home/ubuntu/lambda-comments
> babel-node bin/flip-lambdas-to-4.3.js

Updating function QueueCommentLambdaFunction to Node 4.3
{ ConfigError: Missing region in config
    at Request.VALIDATE_REGION (/home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/event_listeners.js:81:45)
    at Request.callListeners (/home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
    at callNextListener (/home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/sequential_executor.js:95:12)
    at /home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/event_listeners.js:75:9
    at finish (/home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/config.js:299:7)
    at /home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/config.js:315:9
    at SharedIniFileCredentials.get (/home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/credentials.js:126:7)
    at getAsyncCredentials (/home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/config.js:309:24)
    at Config.getCredentials (/home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/config.js:329:9)
    at Request.VALIDATE_CREDENTIALS (/home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/event_listeners.js:70:26)
  message: 'Missing region in config',
  code: 'ConfigError',
  time: 2016-05-11T01:33:31.893Z }
ConfigError: Missing region in config
    at Request.VALIDATE_REGION (/home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/event_listeners.js:81:45)
    at Request.callListeners (/home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
    at callNextListener (/home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/sequential_executor.js:95:12)
    at /home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/event_listeners.js:75:9
    at finish (/home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/config.js:299:7)
    at /home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/config.js:315:9
    at SharedIniFileCredentials.get (/home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/credentials.js:126:7)
    at getAsyncCredentials (/home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/config.js:309:24)
    at Config.getCredentials (/home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/config.js:329:9)
    at Request.VALIDATE_CREDENTIALS (/home/ubuntu/lambda-comments/node_modules/aws-sdk/lib/event_listeners.js:70:26)

The rest is the same npm ERR! stuff as the last time I had a similar error.

Oh, I just discovered that I had the following environment variable set:
export AWS_REGION=us-west-2
If I unset that, I get the same error. I'll have to fix the code. In the meantime, you can try setting that environment variable. Sorry about that!

I just pushed a little fix in 8c7b9ec2ddb4956c9fc1344b4a88934e0e1233a4

Saw that, and it looks like it should work. To apply it to existing config, should I do some form of git pull (maybe rebase) or just sudo npm run delete-cloudformation, redownload the repo, and start again? (Sorry, not too knowledgeable w/ Git, just enough to do what I need to). Also, setting that env variable doesn't work for some reason, but that commit should fix it.
I'll have to do whatever you say next in the morning, as I have to go hit the hay now.

git pull should work. I'm going to re-test an install from a pristine Linux environment to confirm that it all works.

That fix works for lambda-flipping, but now sudo npm run deploy-lambda fails, giving the following:
><EMAIL_ADDRESS>deploy-lambda /home/ubuntu/lambda-comments
> cd build/apex && apex deploy

   ⨯ Error: function QueueCommentLambdaFunction-VOQWQ93REAME: MissingRegion: could not find region configuration

It looks like you need to do your process.env.REGION magic on this somehow.

I built a Docker instance on Ubuntu, and I was able to duplicate the situation.
I checked in a fix in commit eb71670c69024299ca5bc3b5ff8b0cce80e777ce
It would fail if ~/.aws/config didn't exist, and AWS_REGION wasn't set (see the
"AWS credentials" section on http://apex.run/ ). Now I set
the AWS_REGION from the value in the .env file.
It seems to work in my VM now, so I'm hoping it will work for you too.

That works! Almost all of the steps after that worked, save for sudo npm run test, which gives:
><EMAIL_ADDRESS>test /home/ubuntu/lambda-comments
> mocha --compilers js:babel-core/register

  local
    Worker
      ✓ should process the action
    Post new comment to the queue
      ✓ should return an id
      ✓ should fail if there is no data
      1) should catch spam
      ✓ should fail with a bad signature
      ✓ should allow posting hangul characters

  remote
    Post new comment to the queue
      ✓ should return an actionRef (343ms)
      ✓ should fail if there is no data (65ms)
      ✓ should allow posting hangul characters (325ms)

  8 passing (6s)
  1 failing

  1) local Post new comment to the queue should catch spam:
     Error: timeout of 5000ms exceeded. Ensure the done() callback is being called in this test.

I'm assuming it has something to do with not having an Akismet key set, which I'm working on now.


Zygote compatibility

It seems that I can only update Zygote to 0.4.20 to use current Turing. However, there are some issues with creating custom adjoints if I use Zygote 0.4.20 and ChainRules 0.7.2 so it's not working for me. If I manually reinstall the latest version of Zygote which is 0.5.2, Turing will force a downgrade to 0.7.0.

It's difficult to know what's exactly happening there. Turing does not depend on Zygote, so Turing itself should be unaffected by any update of Zygote. That being said, it seems the new Zygote version introduced some version bounds that are not compatible with Turing or one of its dependencies but were compatible with Turing 0.7 and its dependencies.
What else is upgraded or downgraded when you install Zygote 0.5.2? Can you post the output of ] add<EMAIL_ADDRESS>

In a project of mine, I have to create custom adjoints and Zygote+Chainrules is the only realistic option...
Sure, here attached the log file is:
(@v1.4) pkg> st Turing
Status `C:\Users\wupei\.julia\environments\v1.4\Project.toml`
  [fce5fe82] Turing v0.13.0 #master (https://github.com/TuringLang/Turing.jl.git)

(@v1.4) pkg> add<EMAIL_ADDRESS>   Updating registry at `C:\Users\wupei\.julia\registries\General`
  Resolving package versions...
ERROR: Unsatisfiable requirements detected for package NNlib [872c559c]:
 NNlib [872c559c] log:
 ├─possible versions are: [0.3.2, 0.4.0-0.4.3, 0.5.0, 0.6.0-0.6.6, 0.7.0-0.7.1] or uninstalled
 ├─restricted by compatibility requirements with Bijectors [76274a88] to versions: 0.6.0-0.6.6
 │ └─Bijectors [76274a88] log:
 │   ├─possible versions are: [0.1.0, 0.2.0, 0.2.5-0.2.9, 0.3.0-0.3.2, 0.4.0, 0.5.0-0.5.2, 0.6.0-0.6.7, 0.7.0-0.7.2, 0.8.0] or uninstalled
 │   └─restricted to versions 0.8 by Turing [fce5fe82], leaving only versions 0.8.0
 │     └─Turing [fce5fe82] log:
 │       ├─possible versions are: 0.13.0 or uninstalled
 │       └─Turing [fce5fe82] is fixed to version 0.13.0
 └─restricted by compatibility requirements with Zygote [e88e6eb3] to versions: 0.7.0-0.7.1 — no versions left
   └─Zygote [e88e6eb3] log:
     ├─possible versions are: [0.1.0, 0.2.0, 0.3.0-0.3.4, 0.4.0-0.4.22, 0.5.0-0.5.2] or uninstalled
     └─restricted to versions 0.5.2 by an explicit requirement, leaving only versions 0.5.2

OK, here I replicate what I mentioned in the first comment:
(@v1.4) pkg> st Turing
Status `C:\Users\wupei\.julia\environments\v1.4\Project.toml`
  [fce5fe82] Turing v0.13.0

(@v1.4) pkg> add<EMAIL_ADDRESS>  Resolving package versions...
  Installed Zygote ─ v0.5.2
   Updating `C:\Users\wupei\.julia\environments\v1.4\Project.toml`
  [5078a376] ↑ LazyArrays v0.16.10 ⇒ v0.16.13
  [fce5fe82] ↓ Turing v0.13.0 ⇒ v0.7.0
  [e88e6eb3] + Zygote v0.5.2
   Updating `C:\Users\wupei\.julia\environments\v1.4\Manifest.toml`
  [80f14c24] - AbstractMCMC v1.0.1
  [5b7e9947] - AdvancedMH v0.5.1
  [4c555306] ↑ ArrayLayouts v0.2.6 ⇒ v0.3.5
  [76274a88] ↓ Bijectors v0.7.2 ⇒ v0.4.0
  [ced4e74d] ↑ DistributionsAD v0.5.3 ⇒ v0.6.2
  [366bfd00] - DynamicPPL v0.8.2
  [cad2338a] - EllipticalSliceSampling v0.2.2
  [7869d1d1] + IRTools v0.4.0
  [5078a376] ↑ LazyArrays v0.16.10 ⇒ v0.16.13
  [6fdf6af0] - LogDensityProblems v0.10.3
  [c7f686f2] ↓ MCMCChains v3.0.12 ⇒ v0.3.14
  [a3b82374] ↑ MatrixFactorizations v0.4.0 ⇒ v0.4.1
  [a6bfbf70] + NNPACK_jll v2018.6.22+0
  [872c559c] ↑ NNlib v0.6.6 ⇒ v0.7.1
  [86f7a689] - NamedArrays v0.9.4
  [84d833dd] - TransformVariables v0.3.8
  [fce5fe82] ↓ Turing v0.13.0 ⇒ v0.7.0
  [e88e6eb3] + Zygote v0.5.2

I see, thanks for the logs above! So it seems the problem is Bijectors, the latest release is not compatible with NNlib 0.7 (but master is). I made a new release, as soon as https://github.com/JuliaRegistries/General/pull/17382 is merged you should be able to update Bijectors. Hopefully this resolves your issue.

Great, thanks a lot for your timely help! Fingers crossed.

You should be able to update Bijectors now.

Yes, the MWE now is working for me. Thanks a lot!


Document directives

I'm trying to use directives to implement this rate limiting middleware https://github.com/ravangen/graphql-rate-limit but I'm not sure how to do this, the types are telling me that the first argument for builder.toSchema({}) accepts an array of directives but how would I then attach these directives to specific fields?

This is probably something I should have added explicitly in the docs.  The inclusion of directives in the builder.toSchema method was probably an oversight on my part that resulted from just copying options from the GraphQL.js options.
Unfortunately, directives are not actually supported properly in GiraphQL.   The reason it isn't supported is because of how directives are supported in graphql js.  directives don't have any runtime behavior as part of the graphql spec, and the graphql js library only represents them in the ast nodes of a parsed schema file.  I don't think directives were ever intended to be used as a way to add functionality to a code first API.
All that being said, there are lots of tools and libraries out there that have evolved around directives, and is probably something that should be supported.  I need to look a bit more into how exactly directives work, and work out the details of the API, but taking an initial look just now, it should be possible to generate fake ast nodes for the schema as it's being built, and injecting the directives that way.
The API would probably consist of a few different pieces:
const builder = new SchemaBuilder<{
  ObjectDirectives: {
     rateLimit: { limit: number, duration: number }
  };
  FieldDirectives: {
     rateLimit: { limit: number, duration: number }
  };
}>({});

builder.addDirective('rateLimit', createRateLimitDirective(rateLimitOptions), {
  // TODO, not sure exactly what all we need to know here to generate directives correctly
});

builder.objectType('Example',  {
  // TODO making this an array is awkward, but directives are ordered, and repeatable, so an object doesn't really work.
  directives: [{
    name: 'rateLimit',
    args: { limit: 123, duration: 456 },
  }],
  // What I would prefer (maybe we can allow both).
  directives: {
    rateLimit: { limit: 123, duration: 456 },
  },
  fields: (t) => ({
    foo: t.string({
      directives: [{
        name: 'rateLimit',
        args: { limit: 123, duration: 456 },
      }],
      resolve: () => 'bar
    })
  })
});

This is probably something I should have added explicitly in the docs.  The inclusion of directives in the builder.toSchema method was probably an oversight on my part that resulted from just copying options from the GraphQL.js options.
Unfortunately, directives are not actually supported properly in GiraphQL.   The reason it isn't supported is because of how directives are supported in graphql js.  directives don't have any runtime behavior as part of the graphql spec, and the graphql js library only represents them in the ast nodes of a parsed schema file.  I don't think directives were ever intended to be used as a way to add functionality to a code first API.
All that being said, there are lots of tools and libraries out there that have evolved around directives, and is probably something that should be supported.  I need to look a bit more into how exactly directives work, and work out the details of the API, but taking an initial look just now, it should be possible to generate fake ast nodes for the schema as it's being built, and injecting the directives that way.
The API would probably consist of a few different pieces:
const builder = new SchemaBuilder<{
  ObjectDirectives: {
     rateLimit: { limit: number, duration: number }
  };
  FieldDirectives: {
     rateLimit: { limit: number, duration: number }
  };
}>({});

builder.addDirective('rateLimit', createRateLimitDirective(rateLimitOptions), {
  // TODO, not sure exactly what all we need to know here to generate directives correctly
});

builder.objectType('Example',  {
  // TODO making this an array is awkward, but directives are ordered, and repeatable, so an object doesn't really work.
  directives: [{
    name: 'rateLimit',
    args: { limit: 123, duration: 456 },
  }],
  // What I would prefer (maybe we can allow both).
  directives: {
    rateLimit: { limit: 123, duration: 456 },
  },
  fields: (t) => ({
    foo: t.string({
      directives: [{
        name: 'rateLimit',
        args: { limit: 123, duration: 456 },
      }],
      resolve: () => 'bar
    })
  })
});

I'll try to find some time tomorrow to try to implement this.  I'm not sure how complex the implementation actually is, and what kinds of blockers and issues I'll run into.  If this is easy, I might be able to have something usable by the end of the weekend, if it ends up being more complex, its possible this will either take significantly longer to get done, or may not end up making sense to implement at all.  I should at least have a better idea about what is actually involved in getting this working some time tomorrow.

I'll try to find some time tomorrow to try to implement this.  I'm not sure how complex the implementation actually is, and what kinds of blockers and issues I'll run into.  If this is easy, I might be able to have something usable by the end of the weekend, if it ends up being more complex, its possible this will either take significantly longer to get done, or may not end up making sense to implement at all.  I should at least have a better idea about what is actually involved in getting this working some time tomorrow.

I don't really like the idea of directives implementing functionality either but as you said there's a lot of tooling around it so it would be nice having them.
If it doesn't make sense to implement them, a plugin could be useful here for this field-scoped rate limiting functionality since I believe it's pretty common to use some sort of rate limiting like that for a GraphQL API, I'd be willing to contribute to this plugin (If it's even possible to implement it).

I don't really like the idea of directives implementing functionality either but as you said there's a lot of tooling around it so it would be nice having them.
If it doesn't make sense to implement them, a plugin could be useful here for this field-scoped rate limiting functionality since I believe it's pretty common to use some sort of rate limiting like that for a GraphQL API, I'd be willing to contribute to this plugin (If it's even possible to implement it).

A rate limiting plugin like this should be pretty easy.  I haven't
documented the plugin API yet, because there are a few corner cases I want
to iron out.  What I'll try to do tomorrow is either write a plugin to
support directives, or a plugin to do rate limiting.  Documentation for
writing plugins is coming soon, but without it contributing plugins might
be a bit challenging.
On Sat, Jan 30, 2021, 22:57 Gabriel<EMAIL_ADDRESS>wrote:

I don't really like the idea of directives implementing functionality
either but as you said there's a lot of tooling around it so it would be
nice having them.
If it doesn't make sense to implement them, a plugin could be useful here
for this field-scoped rate limiting functionality since I believe it's
pretty common to use some sort of rate limiting like that for a GraphQL
API, I'd be willing to contribute to this plugin (If it's even possible to
implement it).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/hayes/giraphql/issues/27#issuecomment-770337369, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGHLDY3T33IBSR6LA45DA3S4T5NPANCNFSM4W2Q53MA
.

A rate limiting plugin like this should be pretty easy.  I haven't
documented the plugin API yet, because there are a few corner cases I want
to iron out.  What I'll try to do tomorrow is either write a plugin to
support directives, or a plugin to do rate limiting.  Documentation for
writing plugins is coming soon, but without it contributing plugins might
be a bit challenging.
On Sat, Jan 30, 2021, 22:57 Gabriel<EMAIL_ADDRESS>wrote:

I don't really like the idea of directives implementing functionality
either but as you said there's a lot of tooling around it so it would be
nice having them.
If it doesn't make sense to implement them, a plugin could be useful here
for this field-scoped rate limiting functionality since I believe it's
pretty common to use some sort of rate limiting like that for a GraphQL
API, I'd be willing to contribute to this plugin (If it's even possible to
implement it).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/hayes/giraphql/issues/27#issuecomment-770337369, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGHLDY3T33IBSR6LA45DA3S4T5NPANCNFSM4W2Q53MA
.

@gmencz  I've got a PR up for adding a plugin which adds directives (#29).  I didn't have enough time today to add documentation, but there is a pre-release version you can install (you'll need to install the preview version of giraphql/core and giraphql/plugin-directives).
To get this working with a Directive that uses the schemaVisitor pattern like therate limiter one:
const builder = new Builder<{
  Directives: {
    rateLimit: {
      locations: 'OBJECT' | 'FIELD_DEFINITION';
      args: { limit: number, duration: number };
    }
}>({
  schemaDirectives: {
    rateLimit: createRateLimitDirective()
  }
});

builder.queryType({
  directives: {
    rateLimit: { limit: 5, duration: 10 }
  },
  fields: (t) => ({
    exampleField: t.string({
      directives: {
        rateLimit: { limit: 100, duration: 60 }
      },
      resolve() => 'hi',
    })
  })
})

My syntax above might not be exactly right, but it should be close enough.  I'll try to find some time this week to write docs, but not sure when I'll have time.  I am a lot more busy during the week.
Let me know if you have any questions, or run into any issues.

I installed the preview version of @giraphql/core and @giraphql/plugin-directives and tried what you suggested but the directive isn't added to the GraphQL schema so it doesn't seem to be working.
Here's what I tried:
const builder = new Builder<{
  Context: {
    prisma: PrismaClient;
    req: NextApiRequest & { session: Session };
  };
  Root: {};
  Objects: {
    Member: Member;
    RegisterPayload: RegisterPayload;
  };
  Interfaces: {};
  Scalars: {
    ID: { Input: string; Output: string };
    Date: { Input: Date; Output: Date };
  };
  Directives: {
    rateLimit: {
      locations: "OBJECT" | "FIELD_DEFINITION";
      args: { limit: number; duration: number };
    };
  };
}>({
  plugins: ["GiraphQLRelay", "GiraphQLDirectives"],
  relayOptions: {
    nodeQueryOptions: {},
    nodesQueryOptions: {},
    nodeTypeOptions: {},
    pageInfoTypeOptions: {},
  },
  schemaDirectives: {
    rateLimit: createRateLimitDirective(),
  },
});

builder.queryType({
  directives: {
    rateLimit: { limit: 5, duration: 60 },
  },
});

Am I missing something?

That all looks correct.  One limitation I forgot to mention is that the
directives are not visible in a the playground, or if you try to print the
schema.  This is another limitation of the graphql js library.
It's definitely possible it's not working correctly.  Easiest way to verify
would probably be to set the rate limit very low, and try to exceed it
On Mon, Feb 1, 2021, 07:29 Gabriel<EMAIL_ADDRESS>wrote:

I installed the preview version of @giraphql/core and
@giraphql/plugin-directives and tried what you suggested but the
directive isn't added to the GraphQL schema so it doesn't seem to be
working.
Here's what I tried:
const builder = new Builder<{
Context: {
prisma: PrismaClient;
req: NextApiRequest & { session: Session };
};
Root: {};
Objects: {
Member: Member;
RegisterPayload: RegisterPayload;
};
Interfaces: {};
Scalars: {
ID: { Input: string; Output: string };
Date: { Input: Date; Output: Date };
};
Directives: {
rateLimit: {
locations: "OBJECT" | "FIELD_DEFINITION";
args: { limit: number; duration: number };
};
};}>({
plugins: ["GiraphQLRelay", "GiraphQLDirectives"],
relayOptions: {
nodeQueryOptions: {},
nodesQueryOptions: {},
nodeTypeOptions: {},
pageInfoTypeOptions: {},
},
schemaDirectives: {
rateLimit: createRateLimitDirective(),
},});
builder.queryType({
directives: {
rateLimit: { limit: 5, duration: 60 },
},});
Am I missing something?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/hayes/giraphql/issues/27#issuecomment-770941036, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGHLD36RWESZPKYHLAPTZDS43CF3ANCNFSM4W2Q53MA
.

I tried doing that, I exceeded the rate limit and nothing happened so it's sadly not working, let me know if you need any other details.

Looks like this is an issue in graphql-tools.  I've opened a ticket, but I can probably add a flag to the extension for format things in a way that is compatible.  I'll probably have some time to work on this tonight after work.
Opened an issue with graphql-tools here: https://github.com/ardatan/graphql-tools/issues/2534

This should work now.  I don't think it makes sense to giraphql to actually apply the directives, since that is somewhat dependent on the implementation and there are a few competing conventions.
If you update to the latest preview version, and use a new flag in the options like:
https://github.com/hayes/giraphql/pull/29/files#diff-4a7891da6cc29d97fe21c02e6d1b44261d4ac61396503519868452d4b16a9d70R62
and then then apply the schema directives yourself like:
https://github.com/hayes/giraphql/pull/29/files#diff-d05bfe96369579b3b01a790056e16af95dea91c8e3e6b546dd62b4f34d921336R99-R103
It should work correctly.

It works! 🎉

You can continue to use the preview release for now.  The final version will need to wait until 2.0 is released.  There are some changes I needed to make to get directives working correctly that are technically breaking changes to the type system.  Work for 2.0 will be tracked in #32

directives plugin is live along with the rest of v2.0.  Make sure to read the migration guide when upgrading.  Let me know if you run into any issues


[vim9script] Segmentation fault while accessing member of dynamically typed member

Steps to reproduce
Source this script:
vim9script

class Inner
  this.value: number = 0
endclass

class Outer
  this.inner: any  # GENERIC
endclass

def F(outer: Outer)
  outer.inner.value = 1
enddef

def Test_assign_to_nested_untyped_member()
  var inner = Inner.new(0)
  var outer = Outer.new(inner)

  F(outer)

  assert_equal(1, inner.value)
enddef

Test_assign_to_nested_untyped_member()

Vim should crash. The following version, where Outer.inner's type is provided, results in E1012: Type mismatch; expected unknown but got number:
vim9script

class Inner
  this.value: number = 0
endclass

class Outer
  this.inner: Inner
endclass

def F(outer: Outer)
  outer.inner.value = 1
enddef

def Test_assign_to_nested_typed_member()
  var inner = Inner.new(0)
  var outer = Outer.new(inner)

  F(outer)

  assert_equal(1, inner.value)
enddef

Test_assign_to_nested_typed_member()

Expected behaviour
Vim should not crash and both tests above (or, at least, the second one) should pass.
Version of Vim
9.0.1318
Environment
macOS 13.2
Apple Terminal
xterm-256color
ZSH 5.8.1
Logs and stack traces
Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x19d102280 __kill + 8
1   vim                           	       0x1007fb748 may_core_dump + 64
2   vim                           	       0x1007fb5ec mch_exit + 204
3   vim                           	       0x1009ced60 getout + 1008
4   vim                           	       0x1007ade98 preserve_exit + 212
5   vim                           	       0x1008011f4 deathtrap + 596
6   libsystem_platform.dylib      	       0x19d1682a4 _sigtramp + 56
7   vim                           	       0x100957c3c execute_storeindex + 1524
8   vim                           	       0x100957c3c execute_storeindex + 1524
9   vim                           	       0x10094c854 exec_instructions + 8896
10  vim                           	       0x10095223c call_def_function + 3576
11  vim                           	       0x100928f08 call_user_func + 564
12  vim                           	       0x100928c50 call_user_func_check + 332
13  vim                           	       0x100927604 call_func + 1808
14  vim                           	       0x100926db0 get_func_tv + 476
15  vim                           	       0x1006d011c eval_func + 396
16  vim                           	       0x1006cf9b4 eval9 + 2160
17  vim                           	       0x1006d1d1c eval8 + 512
18  vim                           	       0x1006d1694 eval7 + 52
19  vim                           	       0x1006d0de0 eval6 + 64
20  vim                           	       0x1006d0a3c eval5 + 40
21  vim                           	       0x1006d0658 eval4 + 68
22  vim                           	       0x1006d01f0 eval3 + 44
23  vim                           	       0x1006c7cec eval2 + 44
24  vim                           	       0x1006c1ed0 eval1 + 64
25  vim                           	       0x1006c7a0c eval0_retarg + 168
26  vim                           	       0x1006c14ec eval0 + 52
27  vim                           	       0x100718c90 ex_eval + 140
28  vim                           	       0x100705f14 do_one_cmd + 6948
29  vim                           	       0x1007032f8 do_cmdline + 2736
30  vim                           	       0x10087f2ac do_source_ext + 2904
31  vim                           	       0x10087e748 do_source + 56
32  vim                           	       0x10087e5e0 cmd_source + 496
33  vim                           	       0x10087e3e4 ex_source + 32
34  vim                           	       0x100705f14 do_one_cmd + 6948
35  vim                           	       0x1007032f8 do_cmdline + 2736
36  vim                           	       0x1007cba14 nv_colon + 420
37  vim                           	       0x1007c3ad4 normal_cmd + 2564
38  vim                           	       0x1009cf898 main_loop + 2408
39  vim                           	       0x1009cdf60 vim_main2 + 2648
40  vim                           	       0x1009cb228 main + 1416
41  dyld                          	       0x19ce0fe50 start + 2544

This is a workaround (it fixes both tests above, I show only the code for the first test):
vim9script

class Inner
  this.value: number = 0
endclass

class Outer
  this.inner: any  # GENERIC
endclass

def F(outer: Outer)
  const inn: Inner = outer.inner  # TYPE IS MANDATORY
  inn.value = 1
enddef

def Test_assign_to_nested_untyped_member()
  var inner = Inner.new(0)
  var outer = Outer.new(inner)

  F(outer)

  assert_equal(1, inner.value)
enddef

Test_assign_to_nested_untyped_member()

Defining the assignment in F() in two steps and explicitly setting the type avoids the crashes and the errors.

This test (which also crashes Vim) is probably related to the above, as it produces the same stack trace:
vim9script

class Context
endclass

class ChildContext extends Context
  public this.expected = 0
endclass

def Test_invoke_lambda_on_child_class()
  var ctx = ChildContext.new(1)

  # The lambda is not annotated (likely wrong, but should not crash Vim):
  const F = (ctxt) => {
    ctxt.expected = 2
  }

 # This works as expected:
 # const F = (ctxt: ChildContext) => {
 #   ctxt.expected = 2
 # }

  F(ctx)

  assert_equal(2, ctx.expected)
enddef

Test_invoke_lambda_on_child_class()

If the type of the lambda is not explicitly provided. Vim 9.0.1321 crashes. The code should probably result in error, as the type annotation is likely mandatory.


Negative logprob in "(2 ** (logprobs - logn)).cumsum()"?

Line 40 in model.py:
(2 ** (logprobs - logn)).cumsum()
(2 ** (logprobs - logn)) translates into prob * (1/n), but Dell'Amico and Filippone (2015) Section 3.2 suggests 1/(prob * n). Is line 40 correct or it should be (2 ** (- logprobs - logn))?
Cheers

With some abuse of notation, logprobs are changed of sign (see e.g. how they're generated in pcfg.py, backoff.py or ngram_chain.py).
Thanks for the comment, I've updated model.Model with some docstring to clarify that. If you continue going through the code, please let me know anything that would benefit from being better documented.