Add Coproduct support

This PR adds Coproduct support to Guardrail for Scala projects. What this means is that, if I have a Swagger/Open API schema which defines responses for some operation foo like the following:
responses:
  '200':
    schema:
      $ref: '#/definitions/Success'
  '400':
    schema:
      $ref: '#/definitions/Failure'
  '500':
    schema:
      $ref: '#/definitions/Failure'

Then Guardrail will generate a FooResponse like the following:
sealed abstract class FooResponse {
  type CoproductType = Success :+: Failure :+: CNil
  def toCoproduct: CoproductType
}

Then, any time I have a value fooResponse of type FooResponse, I can select, map, etc., the various response values:
val successO: Option[Success] = fooResponse.toCoproduct.select[Success]
val failureO: Option[Failure] = fooResponse.toCoproduct.select[Failure]

object handler extends Poly1 {
  implicit def caseSuccess = at[Success](success => log(s"Succeeded with $success"))
  implicit def caseFailure = at[Failure](failure => log(s"Failed with $failure"))
}

fooResponse.toCoproduct.map(handler)

Pros

Guardrail responses are effectively sum types. Shapeless offers Coproducts, a powerful type for working generically with sum types. By providing a mapping from Guardrail responses to Coproducts, we enable engineers to leverage features in Shapeless while saving them the trouble of writing error-prone conversions themselves.
Coproducts offer map, flatMap, etc., operations that ensure each case is covered. Unless you enable fatal warnings (not always feasible), this is something match won't give you. fold is better but, due to the way handlers are often written in-line, it's possible that, when updating Open API schemas, cases get mixed up.
Coproducts offer a select function which projects/selects the Coproduct to an Option of the desired type. In other words, if a Coproduct contains a value foo of type Foo, you can select[Foo] to get Some(foo); if the Coproduct does not contain a value of type Foo, you get None.
The way Coproduct is used here allows distinct responses to be projected to a common value. For example, some HTTP applications return a uniform error response, irrespective of the actual HTTP status code. If your client doesn't care that it got a 400, 401, etc., just that it got an error response, using select, map, etc., with Coproduct reduces the number of cases you have to handle. Same for success cases.

Cons

All Scala projects incur a dependency on Shapeless 2.x, even if they'll never use Coproduct. This could perhaps be solved with a configuration option to include/exclude Coproduct support, not unlike tracing.
We could provide many of the same "Pros" listed above by implementing our own select, our own traits for consuming responses, without depending on Shapeless.
The way Coproduct is used here is (intentionally) lossy. For example, if two Guardrail responses are empty, they'll both map to Unit. Now, when calling map on the Coproduct, we can no longer distinguish the two responses: we only have a single Unit case to deal with. This could be solved using discriminated unions, where elements of the Coproduct are labeled with their HTTP status code, the type of the response they were projected from, etc. I plan to explore this next.
Coproduct performance may be slower (at both compile- time and run-time).

Other Notes/Questions

In this PR, in order to access the Coproduct representation, you call a function toCoproduct on the Guardrail response. Should we instead provide an implicit conversion to CoproductType, such that, if the implicit is in scope, calling toCoproduct is not necessary?
In this PR, Coproduct support is directly added to the Guardrail response, right below the fold function. Should we instead generate this in its own file? Would that be easier to include/exclude if we wanted to allow toggling Coproduct?

Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

[x] I acknowledge that all my contributions will be made under the project's license.

Codecov Report

Merging #870 (39f1750) into master (26c90b9) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #870      +/-   ##
==========================================
+ Coverage   82.80%   82.83%   +0.02%
==========================================
  Files          73       73
  Lines        5404     5413       +9
  Branches      146      156      +10
==========================================
+ Hits         4475     4484       +9
  Misses        929      929

Impacted Files
Coverage Δ

...guardrail/generators/Scala/AkkaHttpGenerator.scala
29.26% <ø> (ø)

...uardrail/generators/Scala/EndpointsGenerator.scala
22.66% <ø> (ø)

...o/guardrail/generators/Scala/Http4sGenerator.scala
26.47% <ø> (ø)

...ilio/guardrail/generators/Scala/Http4sHelper.scala
100.00% <100.00%> (ø)

.../com/twilio/guardrail/generators/syntax/Java.scala
75.18% <0.00%> (+0.94%)
:arrow_up:

Continue to review full report at Codecov.

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

I love this!  It's also delightful how tiny the diff is!

In this PR, in order to access the Coproduct representation, you call a function toCoproduct on the Guardrail response. Should we instead provide an implicit conversion to CoproductType, such that, if the implicit is in scope, calling toCoproduct is not necessary?

Probably not.  Implicit conversions are considered an anti-pattern these days and I think might even be slated for removal in Scala 3.

All Scala projects incur a dependency on Shapeless 2.x, even if they'll never use Coproduct. This could perhaps be solved with a configuration option to include/exclude Coproduct support, not unlike tracing.

I'm a little worried about this, especially given:

Coproduct performance may be slower (at both compile- time and run-time).

But:

We could provide many of the same "Pros" listed above by implementing our own select, our own traits for consuming responses, without depending on Shapeless.

I'd rather we don't do this.  People who are interested in using our coproduct support are likely going to expect it to be shapeless, and rolling our own even if it has an identical API, would be weird.  Not to mention it's more generated stuff for us to maintain.

n this PR, Coproduct support is directly added to the Guardrail response, right below the fold function. Should we instead generate this in its own file? Would that be easier to include/exclude if we wanted to allow toggling Coproduct?

I would go with whichever makes more readable generated code.  My instinct is that means putting it in the same file, but also I think if we put it in a separate file, that might make it easier for consumers to just leave out the shapeless dependency at runtime (maven scope provided; not sure if there's an equivalent sbt concept) and still use the code as-is, without needing an enable/disable switch on guardrail itself.  IIRC the JVM won't try to resolve classes/imports until first use, so that might work?

The way Coproduct is used here is (intentionally) lossy [...] This could be solved [...] I plan to explore this next.

I actually really like the simplicity of the lossiness here.  But I do imagine there are some APIs out there where the response code is significant but can't be divined from the contents of the entity body...

@kelnos

I love this! It's also delightful how tiny the diff is!

Thanks! Although I have an update adding support for discriminated unions which will increase the code size a bit (partially due to a bunch of scaladoc I've added…).

Probably not. Implicit conversions are considered an anti-pattern these days and I think might even be slated for removal in Scala 3.

Thanks, good to know. I took a look at some other Scala 3 changes which informed some other things I was considering (e.g., symbol literal deprecation in Scala 3 informed my choice to use strings instead of symbols in extensible records — will share this experiment soon).

I'd rather we don't do this. People who are interested in using our coproduct support are likely going to expect it to be shapeless, and rolling our own, even if it has an identical API, would be weird. Not to mention it's more generated stuff for us to maintain.

Agree.

I would go with whichever makes more readable generated code. My instinct is that means putting it in the same file, but also I think if we put it in a separate file, that might make it easier for consumers to just leave out the shapeless dependency at runtime (maven scope provided; not sure if there's an equivalent sbt concept) and still use the code as-is, without needing an enable/disable switch on guardrail itself. IIRC the JVM won't try to resolve classes/imports until first use, so that might work?

Still need to explore this…

I actually really like the simplicity of the lossiness here. But I do imagine there are some APIs out there where the response code is significant but can't be divined from the contents of the entity body...

I will share an update which adds discriminated union support (toUnion) and re-implements toCoproduct in terms of toUnion. This ideally brings "the best of both worlds". That experiment will also examine extensible records, which may identify one potential path forward on #77, although I'm not looking at re-implementing DTOs yet.


service-weights Causes traffic to be fully directed to canary pod

Welcome!

[X] Yes, I've searched similar issues on GitHub and didn't find any.
[X] Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you do?
service-weights Causes traffic to be fully directed to canary pod
What did you see instead?
When using the canary function, in the wrr scenario, two groups of services, A serves 9 pods, B serves 2 pods, the grayscale weight A is 80%, and B is 20%
http://<IP_ADDRESS>:80 | 8888
http://<IP_ADDRESS>:80 | 8888
http://<IP_ADDRESS>:80 | 8888
http://<IP_ADDRESS>:80 | 8888
http://<IP_ADDRESS>:80 | 8888
http://<IP_ADDRESS>:80 | 8888
http://<IP_ADDRESS>:80 | 8888
http://<IP_ADDRESS>:80 | 8888
http://<IP_ADDRESS>:80 | 8888
http://<IP_ADDRESS>:80 | 10000
http://<IP_ADDRESS>:80 | 10000

When this happens, the traffic will only be directed to the canary pods. After many verifications, it seems that it is because 80000/9 cannot be eliminated. If the test can be eliminated in other scenarios, the traffic will not be fully directed to the canary pods.
The canary weights are set as follows
    traefik.ingress.kubernetes.io/service-weights: |
      ttt-ww: 80%
      ttt-ww-canary: 20%

What version of Traefik are you using?
1.7.26
What is your environment & configuration?
metadata:
  annotations:
    kubernetes.io/ingress.class: traefik
    traefik.ingress.kubernetes.io/service-weights: |
      ttt-ww: 80%
      ttt-ww-canary: 20%

If applicable, please paste the log output in DEBUG level
no

Hello @wolgod and thanks for your interest in Traefik,
We are not supporting the v1.x branch anymore thus we will close this issue.
If you confirm the problem still exists on v2 please do not hesitate to open a new issue.


Cant start tests

I cant debug and start tests

Is the project built before running the tests? This error indicates that Gauge VS is unable to locate the project's output path

Yes i do rebuild also

1>  gaugePreview -> C:\Users\Documents\Visual Studio 2015\Projects\gauge-preview\bin\Debug\gauge-preview.dll
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

Closing as a possible duplicate of getgauge/gauge-csharp#49. Please reopen if this needs to be tracked in gauge than the issue reported in the gauge-csharp issue tracker.

This is not a duplicate... I see tests but i cant start it look at the picture


reuse template with slide specific highlighting?

I'm using remark to solve a problem that couldn't solve with any other software till now. I've specified a template slide that I reuse throughout my slides (e.g. "the points we will cover today"), but every time I reuse the slide I want to highlight a specific point.
Since I'm a css / html newb, the way I'm doing this now is as follows:
(see also http://jsfiddle.net/zjb5a92g/)
my question: is there a more elegant approach to this (especially concerning the css part)
html
<textarea id="source">
name: points
layout: true

first

second

third

fourth

---
template: points
class: first

</textarea>

css
.first #first,
.second #second,
.third #third,
.fourth #fourth,
.fifth #fifth{
  color: hotpink;
}

posted this on stackoverflow: https://stackoverflow.com/questions/69329191/css-selector-parent-class-matches-child-class


Resource manager needs to pool, instead of opening unlimited number of images

Compiling a big application will run into MacOS's limit on concurrently open files.

@cboulanger please can you confirm that this exists?  There is already a pool implemented at https://github.com/qooxdoo/qooxdoo-compiler/blob/master/source/class/qx/tool/compiler/resources/Manager.js#L274 which looks like it protects against loading more than 10 images at a time

I don't see any problems any more! Thank you. Closing the issue.


Update dependency on Cheerio

@tbranyen We talked about this a while ago. The problem was in two parts: one in our tests (fixed here) and one in Cheerio itself (fixed here). Sorry for the delay--I've been waiting on a new release of Cheerio.
Commit message:

Recent releases of the Cheerio library included a regression that
triggered test failures in this project. The latest release of Cheerio
addresses that regression.

Awesome, thanks @jugglinmike!

'twas my pleasure


Updated for a change in Linux headers after about 4.12

@ejohnson73 Thank you for your fix!  I appreciate you taking the time to fix the header include so that the code compiles with newer kernels.


Added in on_flash support for output_invert for lastState.

This could be a fix for https://github.com/josephdadams/TallyArbiter/issues/661. Based on code inspection is looks plausible but I don't have any board to test with at the moment.

Tested with one led on raspberry pi both "normal" and "inverted" with expected behaviour, i.e., the current state is restored after flash.


[Test] Update outdated test in "Identity provider Facebook in develop section [UI] "

Describe the Issue:
"Identity provider Facebook in develop section [UI] " test outdated and should update according to the latest changes
Test description
Scenario:
Identity provider Facebook
Sub scenarios:
Create identity provider Facebook
List Identity provider
Remove identity provider
Update identity provider Facebook general settings
Update identity provider Facebook Advanced settings
Update identity provider Facebook Attribute settings
Update identity provider Facebook Outbound provisioning settings
Update identity provider Facebook Authentication settings
Update identity provider Facebook Just-in-Time provisioning settings

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!


React docs part 8

Adding documentation on React boolean propTypes.
Also adding some placeholders for upcoming React documentation.

🚢 :shipit:


Regarding Pulse sensor

Hii
I am a student and I am doing project to get the heart sensor data using arduino but not able to get the accurate result. So, while I just started with coding and I am getting erratic values like 250+ and sometime only get around 20 or 30 BPM.
So please help me with this.
The Pulse sensor which I used is VMA340 from velleman. And for the coding I only used the example code from Pulse sensor playground Bpm to monitor code.

@uanis301
Thanks for reaching out!
This repository is no longer in use. Please use our PulseSensor Playground Library repository, and read the read-me, that's what it's there for!
As to your question. You purchased the VMA340 from Velleman. While we think that Velleman makes great kits and other cool stuff, this product is a knockoff our our original Pulse Sensor, and so I am unable to troubleshoot your problem since I have no idea what hardware they are using.
I'll try to be as generous as possible, and recommend that you go to their forum and tell the that you're having trouble with their cloned part.
Please support the original makers of Open Source Hardware and purchase legit parts.
You can get Pulse Sensor from www.pulsesensor.com
We also sell through Adafruit and SparkFun.
Check out the SparkFun website. At the bottom of their pages they have a link to distributors that will show you where on the planet they ship their hardware to brick-and-mortar stores. There might be one in your area that sells our Pulse Sensor.


Deny-overrides rule combining algorithm - Missing obligations from Permit rules after the first one

Discussed in https://github.com/authzforce/core/discussions/90

Originally posted by zeno521 November  9, 2023
Hi AuthzForce team,
We are working on a POC with Authzforce PDP engine. We have multiple permit rules (each with obligations) in a policy with deny overrides rule combining algorithm. We expected the obligations from all rules to be returned in the results when all the rules and policy return Permit. However, we can only see the obligations returned from the first permit rule.
Could you indicate if this is an expected behaviour please? If it is, how to return the obligations from all the rules?
Your earliest response is highly appreciated!

Confirmed as a bug.


data security

Data encryption is highly needed when deployed on cloud or in traditional enterprise.

Yes, we also need to ensure the network security, so we will support SSL later.

@ngaut
Should we need to introduce certificate now?


Run Button

Hi,
I am trying to use the vollseg-napari plugin but I am not able to click on run. Why might this be happening?

Best,
Cristina

Hi Cristina,
Do you have 2 time points in this image, then the image axes should be TZYX instead of ZTYX. If something appears red in the panel it means the choices are not valid. For example look at my panel that I have when using unet and denoising model, pull the repo again as I just made some changes and they work well for your type of images. ALso these pre trained models are for ascadian embryos so they wont work well with the image that you have. Also pip install the latest version of vollseg that I relmeased a few minuets ago (2.8.5). Let me know if the program works this time, also you may want to increase the tiles to (1,4,4,4) to avoid it going out of memory. Run button will appear when all your choices are valid, image axes matching with the model axes, etc

Did it work for you now? I released a version 2.0.1 where things should be working fine with the run button being activated by valid choices.


Fix Callysto prod hub's display name

This affects the list of running hubs and just makes the table more readable

I'll merge this without review because it is a minor change

CI/CD failed on this PR, but we actually didn't need it to run since display_name only affects docs, not the actual deployment.
I opened an issue regarding why (a lot of) CI/CD failed as it's a recurring issue that I haven't been able to figure out yet

https://github.com/2i2c-org/infrastructure/issues/1686


Update scalafmt-core to 3.0.5

Updates org.scalameta:scalafmt-core from 3.0.4 to 3.0.5.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scalameta", artifactId = "scalafmt-core" } ]

labels: library-update, semver-patch

Codecov Report

Merging #271 (277027a) into main (1623b12) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #271   +/-   ##
=======================================
  Coverage   96.22%   96.22%
=======================================
  Files           8        8
  Lines         980      980
  Branches       93       93
=======================================
  Hits          943      943
  Misses         37       37

Impacted Files
Coverage Δ

core/shared/src/main/scala/cats/parse/Parser.scala
96.10% <0.00%> (ø)

Continue to review full report at Codecov.

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


Allow setting notifyProductionAPI

Hi All
We're currently working on a 🇨🇦version of the Notify service.
The problem:
I recently did a test of the Node Client API and noticed the endpoint is hardcoded.
https://github.com/alphagov/notifications-node-client/blob/f0a34ffe26a33dcc0629f111a993db923f101e9d/client/api_client.js#L4
Ideally we would like to avoid creating forks of all the client libraries (the endpoint is also hardcoded in the other client libs I looked at).
The ask:
Wondering if you would accept a Pull Request which would allow that variable to be set via an environment variable while defaulting to your endpoint if that variable not available / set.
i.e.
notifyProductionAPI = the_env_var || 'https://api.notifications.service.gov.uk'

Hey @timarney 👋
All of our clients allow a different endpoint to be passed in when you instantiate them. For example the Node.js client lets you do this:
var notifyClient = new NotifyClient('https://example.canada.ca', apiKey);

If an environment variable would work better for you then we’d be totally happy to accept a pull request though.

Thanks for the quick response @quis .
Perfect I see that in the code now and and it will handle our needs 💯 .

Q: Is that listed in the docs site some where? I found setup instructions here that section doesn't mention setting the base url.

We don’t document that parameter because we didn’t anticipate people outside our team needing to use it (and therefore don’t want to distract them). The reason it’s there in the first place is because we run automated tests against a non-production environment, which lives on a different domain.
I’m going to close this now because I think you’ve got what you need. But anything else we can help with, let us know. You can also reach us via https://www.notifications.service.gov.uk/support if you have a question that doesn’t directly relate to one repository or another.


Distributed Inference Doesn't Work

I followed the instructions in the README to install the conda environment and run the video inference sample code. I get an error
line 289, in prepare_inputs_labels_for_multimodal
    cur_new_input_embeds = torch.cat(cur_new_input_embeds)
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:6! (when checking argument for argument tensors in method wrapper_CUDA_cat)

The code runs successfully when I limit the visible cuda devices to a single GPU, e.g. CUDA_VISIBLE_DEVICES=0.

HELLO @dfan what gpu are you using ?
Are I'm facing the same problem as you, Have you solve this problem ?

ok guys, i fixed the same problem using the command
--device "cuda:0"
might help you

CUDA_VISIBLE_DEVICES=0 your_script.py

Thx ~

@dfan , were you able to run it with multiple GPUs? I see that some other people are discussing single-GPU inference in this thread about distributed inference. I also need to use multiple GPUs for my task.

@dfan , were you able to run it with multiple GPUs? I also need distributed inference.

@dfan, I've fixed it in https://github.com/PKU-YuanGroup/Video-LLaVA/pull/145. We no longer need to restrict inference to a single device (e.g., cuda:0). With this PR, we can distribute the inference to as many GPUs as we want (e.g., coda:0,1 for 0 and 1 or cuda for all GPUs available).
@LinB203 , please check this.

@shouborno, I'm having the same issue. Just to make sure I understand your fix: doesn't it just write everything onto 1 again? How can I use all GPU available?

It should allow using all your GPUs. For example, if your VRAM runs out of allocatable mamory space with a single GPU, that shouldn't happen with this LLaVA distributed inference fix.

@shouborno, I'm having the same issue. Just to make sure I understand your fix: doesn't it just write everything onto 1 again? How can I use all GPU available?

It should allow using all your GPUs. For example, if your VRAM runs out of allocatable mamory space with a single GPU, that shouldn't happen with this LLaVA distributed inference fix.

After implementing your proposed fix:
`[...]
cur_new_labels.append(torch.full((cur_image_features.shape[0],), IGNORE_INDEX, device=cur_labels.device, dtype=cur_labels.dtype))
        cur_new_input_embeds = [x.to(self.device) for x in cur_new_input_embeds]

        cur_new_input_embeds = torch.cat(cur_new_input_embeds)
        cur_new_labels = torch.cat(cur_new_labels)`

`File ~/anaconda3/envs/languagebind/lib/python3.10/site-packages/torch/nn/modules/module.py:1520, in Module._call_impl(self, *args, **kwargs)
1515 # If we don't have any hooks, we want to skip the rest of the logic in
1516 # this function, and just call forward.
1517 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks
1518         or _global_backward_pre_hooks or _global_backward_hooks
1519         or _global_forward_hooks or _global_forward_pre_hooks):
-> 1520     return forward_call(*args, **kwargs)
1522 try:
1523     result = None
File ~/anaconda3/envs/languagebind/lib/python3.10/site-packages/accelerate/hooks.py:165, in add_hook_to_module..new_forward(*args, **kwargs)
163         output = old_forward(*args, **kwargs)
164 else:
--> 165     output = old_forward(*args, **kwargs)
166 return module._hf_hook.post_forward(module, output)
File ~/anaconda3/envs/languagebind/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py:346, in LlamaAttention.forward(self, hidden_states, attention_mask, position_ids, past_key_value, output_attentions, use_cache)
343     attn_weights = attn_weights + attention_mask
345 # upcast attention to fp32
--> 346 attn_weights = nn.functional.softmax(attn_weights, dim=-1, dtype=torch.float32).to(query_states.dtype)
347 attn_output = torch.matmul(attn_weights, value_states)
349 if attn_output.size() != (bsz, self.num_heads, q_len, self.head_dim):
OutOfMemoryError: CUDA out of memory. Tried to allocate 1.41 GiB. GPU 0 has a total capacity of 14.58 GiB of which 940.50 MiB is free.`
Running it without your fix throws the 'expected' error
          line 289, in prepare_inputs_labels_for_multimodal     cur_new_input_embeds = torch.cat(cur_new_input_embeds) RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:6! (when checking argument for argument tensors in method wrapper_CUDA_cat)

@dandre0102 , it might depend on your data and the number of tokens. For example, for my use case, with a total of 48GB GPU (cuda:0,1), I need 4bit quantization. With cuda:0 or cuda:1 on their own (24GB), it runs out of memory even with 4bit quantization.


Feature: New checkbox to show / hide status of components (like graphs)

In the http://URL/dashboard/settings/setup page you can choose if you want to show the graphs at the start page (checkbox display_graphs).
I would love to see such a checkbox for the status of the components as well, to be able to hide them.
In my use case i don't use Cachet as an incident system directly.  For this, i have components of course, but i don`t track the status (operational, etc.) for them.
I may would provide a PR for this (with the help of https://github.com/cachethq/Cachet/issues/1106), if you would accept this?

This is actually already done now :)

@jbrooksuk Where?
Can you point me to a commit or to a line of code?
I can`t see something similar like this:

https://github.com/cachethq/Cachet/blob/master/resources/views/index.blade.php#L14
https://github.com/cachethq/Cachet/blob/master/resources/views/dashboard/settings/app-setup.blade.php#L69

https://github.com/cachethq/Cachet/commit/c89691cb2c97eb943437c7494d08f7abe5b1fae0

Thx


Make it possible to specify request timeout

It would be nice to specify a time at which to give up searching for or making a request to a local bridge.

It would be nice to specify a time at which to give up searching for or making a request to a local bridge.

I take it this is non-trivial then. Your library was a life saver when I saw it got around my CORS problems but without being able to shorten the timeout it just replaces my CORS issue with a timing problem (I'm trying to sync commands to music). Commands which get delayed fire so late that they ruin the effect I'm going for. Dropping that command all together would be preferable.


Should be able to manage interface state

present, absent, up, down.

https://github.com/xaque208/puppet-bsd/pull/42

Complete.


[bug] Don't use package: write permissions for container workflow

Using package: write on the workflow is convenient but is not setting least privilege in the case where users are not using ghcr.io. We should force users to set the username and password and log into ghcr.io manually.
Related to #547

If the GitHub token does not have package: write permissions, logging in using Docker succeeds but cosign fails when trying to upload the image attestation.
This may be an issue with cosign or the workflow's usage of it. Maybe it's trying to use the job's GHA token rather than using Docker's login credentials?
Error: signing ghcr.io/ianlewis/actions-test@sha256:5d7b0d4b8d68d8aceef2027401c31d1db67ffb9a8e36e5fc52f0c123b37798d3: POST https://ghcr.io/v2/ianlewis/actions-test/blobs/uploads/: DENIED: installation not allowed to Write organization package
main.go:62: error during command execution: signing ghcr.io/ianlewis/actions-test@sha256:5d7b0d4b8d68d8aceef2027401c31d1db67ffb9a8e36e5fc52f0c123b37798d3: POST https://ghcr.io/v2/ianlewis/actions-test/blobs/uploads/: DENIED: installation not allowed to Write organization package

This may be an issue with cosign or the workflow's usage of it. Maybe it's trying to use the job's GHA token rather than using Docker's login credentials?

The workflow uses cosign login to login to the repository, but this doesn't seem to work with GHA tokens even if you set package: write permissions on the call to the reusable workflow and you pass the token in the registry-password secret.

#1283 will reopen this. It seems there is an issue with cosign not using the registry credentials provided by cosign login for some requests. I'm assuming it's because the fact that it's preferring the ambient GitHub credentials provided by GitHub actions.
I created https://github.com/sigstore/cosign/issues/2489 to track.

This appears to be also failing against Artifact Registry (full trace for the above error here)
main.go:62: error during command execution: signing us-west1-docker.pkg.dev/cloudy-s3c/s3cme/s3cme@sha256:f17fc9c49e3e1cef22022332c0f55a51d60b12d7403990a6aac6564f4bbd4910: GET https://us-west1-docker.pkg.dev/v2/token?scope=repository%3Acloudy-s3c%2Fs3cme%2Fs3cme%3Apull&service=: DENIED: Permission "artifactregistry.repositories.downloadArtifacts" denied on resource "projects/cloudy-s3c/locations/us-west1/repositories/s3cme" (or it may not exist)

This is despite of the cosign login to registry being succesful in the previous step
login to us-west1-docker.pkg.dev
auth.go:191: logged in via /home/runner/.docker/config.json

Also, cosign attest (after authentication with the same OIDC token), with the same predicate.json file, on the same image, works fine, so the rights of the impersonated service account for which the token was issued are correct.
COSIGN_EXPERIMENTAL=1 cosign attest --force --predicate predicate.json --type slsaprovenance $IMG_DIGEST

I ended up abandoning this reusable workflow and just used the released slsa-github-generator artifact manually (after sha verification).
FWIW, a Go app repo template with image build/publish pipelines, SBOM, and SLSA provenance (using your slsa-github-generator), and OIDC, KMS and Artifact Registry is available in https://github.com/mchmarny/s3cme

@mchmarny I'm pretty sure this doesn't have to do with the GITHUB_TOKEN's package:write permissions so I created issue #1545 to track.


Use TestContext.Progress.Writeline instead of Debug

NUnit requires you to use TestContext.Progress.WriteLine to actually see the output with dotnet test at least in version 3.12 and NUnit3TestAdapter 3.17
https://github.com/nunit/nunit3-vs-adapter/issues/343#issuecomment-455885676
This was found when going through https://docs.educationsmediagroup.com/unit-testing-csharp/nunit/lifecycle-of-a-test-fixture
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
RootFixtureSetup:OneTimeSetUp
FixtureSetup:OneTimeSetUp
Tests:Constructor
Tests:OneTimeSetUp
Tests:SetUp
Tests:Test1
Tests:TearDown
Tests:SetUp
Tests:Test2
Tests:TearDown
Tests:OneTimeTearDown
FixtureSetup:OneTimeTearDown
RootFixtureSetup:OneTimeTearDown

Passed!  - Failed:     0, Passed:     2, Skipped:     0, Total:     2, Duration: 5 ms - /Users/home/RiderProjects/UnitTesting/UnitTesting/bin/Debug/net5.0/UnitTesting.dll (net5.0)

I can do a PR if you'd like.

Hi @davidhenley,
Thank you for suggesting this change!
If you can do a pull request, I'd be grateful. Otherwise I'll try to do it myself sometimes in the coming week!

Closing #42


Custom CSS is overwritten on theme build

Describe the bug
As far as I can tell, we've been directly editing SASS-generated CSS for quite some time for the custom themes of various subsites (detroitmi, intranet, detroitatwork, etc.). I believe the only subsites that hasn't been affected are gdyt (since it's fairly new) & neighborhoods (since the theme was rebuilt as part of CityOfDetroit/detroitmi#1184).
The downside of this is that the next time we want to use SASS (e.g. using Bootstrap breakpoints, instead of manually listing media queries) or even just rebuild the theme to bring in an update base theme, it would overwrite all the custom CSS that was written into the CSS files for that custom theme.
Historical context:
detroitmi used to use a base theme that relied on LESS. At some point LESS was migrated to SASS and around that time, we started editing CSS directly instead of using the SASS system.
Expected behavior
SASS-generated CSS should not be modified directly; only by building the theme.
There are a couple ways we could prevent this from happening in the future (after fixing the themes or creating new themes):

Remove CSS from source control and add a post-merge hook on Acquia servers to recompile sass (i.e. on git pull)
Alternative: Move all CSS generated files to production build folder. Then, add a github action that builds the themes for each site, compares the generated CSS with the latest commit and emits an error if they differ.

We discussed in the standup: We'll leave this be for now. When we're building the new theme for detroitmi (and potentially a base theme for other sites like intranet) we'll address this issue.


Add env variable to make it possible to disable registration

Initial fix for https://github.com/papercups-io/papercups/issues/127 and https://github.com/papercups-io/papercups/issues/180
Users who are self-hosting can disable registration by setting the following environment variable:
export PAPERCUPS_REGISTRATION_DISABLED=1
# or
export PAPERCUPS_REGISTRATION_DISABLED=true

in Heroku, this might look like:
heroku config:set PAPERCUPS_REGISTRATION_DISABLED=true

When this is set, users will see the following error if they try to register:

cc @masonhensley @ruruiye sorry for the delay on this!

Right on! Thanks - I think this will help y'all with adoption from security minded folks.
It's on a mental checklist when checking out self hosted software. 💯

question @reichert621 if you enable this, how can you create an admin? Is the use case to quickly create the admin, then flip this env variable and restart server?

@johncadengo yup exactly


switch to fuzzaldrin-plus

For issue #7, this is a first run at this. Basically had to copy the code for populateList out of SelectListView and put it here so we can override fuzzaldrin. This is almost exactly what the built in command palette package is doing.
Seems to be working, but I haven't written any additional specs yet.
/cc @mehcode

Looks good to me. It's a shame that SelectListView doesn't use the newer fuzzy matcher yet. It also probably won't ever as Atom is moving away from space-pen.

As for tests. It'd be awesome if we could mock out @populate and run functional tests on the finder view. Is that something you want to take on?

Moved this over to another PR from a local branch so we both have access. I wanted to make sure I didn't cause a merge conflict.


Run evaluation against an isolated local model API

Hi,
I would like to evaluate a local AWQ quantized model. The model implements all the HuggingFace AutoModelForCausalLM APIs - however since it's a quantized model - it has a few custom layers (it implements zero point quantization under the hood, so all the Linear layers are replaced by a custom layer, etc.).
I also want to run this model in an isolated environment because it has conflicting dependencies with those of helm (for e.g. different PyTorch versions, etc.).
Is there a way to run my custom LLM locally as a REST service / API and obtain helm results?
Thanks!

There currently isn't an easy way to run a model server and connect it to HELM, but I think that would be a good thing to add to HELM.
Could you let me know which dependency conflicts you are running into? I'm planning to expand the set of allowable versions to avoid conflicts. I am also planning to upgrade the PyTorch version in HELM.
In the meantime, my recommendation would be to, in a virtual environment, install HELM, and then manually uninstall PyTorch and reinstall the PyTorch version that you need. This is a rather hacky workaround though.
Also, we just added support for evaluating Hugging Face models on local disk without needing to push them to Hub in #1505 using --enable-local-huggingface-models. This is on the main branch but not yet released on PyPI. You might find this useful!


Merge pull request #21 from uonafya/upgrade Teen Sinovuyo Final assment draft... @ian

Upgrade
[Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.]
https://link.to/ticket
Type of change
Please delete options that are not relevant.

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

How Has This Been Tested?
What tests did you run to verify your changes? Provide instructions so we can reproduce. Please also list any relevant
details for your test configuration

[x] Test A
[x] Test B

Checklist:

[ ] This review follows the Google Python Style Guide
[ ] I have performed a self-review of my own code
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works(Optional)
[ ] New and existing unit tests pass locally with my changes (Optional)

@ian-njuguna11 Congratulations. This has now been merged


Add Companies – Search and Create

https://testflight.apple.com/join/2RQUId5L
Available: Y
Description: https://companies.app

done

Good Day.


[T6A1][F11-C1]

Ready for review.

Good to see all you pitched in for this PR :+1:
@louietyj @ChaseYaoCong @irvinlim Please close PR after reading comments.


extend admin instead overwriting everything

Using the block to extend.
This will add compatibility to 6.3, too.

doesn't work proper. have to check it more


Jest extension integration

Base configuration to make the Jest extension work with our project

@LucasBrazi06 : just merged that one because i need the jest config for testing the other branches


Send Video

Hi, I'm using your chat application  but I don't sent video in chat.
I am trying to send video it as a file and I get  error from it.

Hi @ahmetoguzer ,
Thanks a lot for the feedback. There was some issues in our architecture previously that causing you not able to upload a video. It has been fixed now please try again.
We are sorry for the inconvenience, let us know if you still facing any problem


feat: Add Utterance controls for real-time

Add configureEndUtteranceSilenceThreshold and forceEndUtterance to real-time transcriber

@Swimburger We don't have code examples for me to test this feature on. Would you happen to have something I can use right away? Preferably with this code here

I'm thinking something like this:
public final class RealTimeTest {

    public static void main(String... args) throws IOException {
        Thread thread = new Thread(() -> {
            try {
                RealtimeTranscriber realtimeTranscriber = RealtimeTranscriber.builder()
                        .apiKey("API_KEY")
                        .sampleRate(16_000)
                        .onSessionStart(sessionBegins -> System.out.println(
                                "Session opened with ID: " + sessionBegins.getSessionId()))
                        .onPartialTranscript(transcript -> {
                            if (!transcript.getText().isEmpty())
                                System.out.println("Partial: " + transcript.getText());
                        })
                        .onFinalTranscript(transcript -> System.out.println("Final: " + transcript.getText()))
                        .onError(err -> System.out.println("Error: " + err.getMessage()))
                        .build();

                System.out.println("Connecting to real-time transcript service");
                realtimeTranscriber.connect();

                System.out.println("Starting recording");
                AudioFormat format = new AudioFormat(16_000, 16, 1, true, false);
                // `line` is your microphone
                TargetDataLine line = AudioSystem.getTargetDataLine(format);
                line.open(format);
                byte[] data = new byte[line.getBufferSize()];
                line.start();
                while (!interrupted()) {
                    // Read the next chunk of data from the TargetDataLine.
                    line.read(data, 0, data.length);
                    realtimeTranscriber.sendAudio(data);
+                   realtimeTranscriber.configureEndUtteranceSilenceThreshold(300);
+                   realtimeTranscriber.forceEndUtterance();
                }

                System.out.println("Stopping recording");
                line.close();

                System.out.println("Closing real-time transcript connection");
                realtimeTranscriber.close();
            } catch (LineUnavailableException e) {
                throw new RuntimeException(e);
            }
        });
        thread.start();

        System.out.println("Press ENTER key to stop...");
        System.in.read();
        thread.interrupt();
        System.exit(0);
    }
}

@smithakolan I used the code that's in the sample that simulates microphone input from an audio file.
I set a break point and manually called the methods from the IDE.
It seemed to work but it's kinda hard to test.


TypeScript intelisense- no suggestions for implement all inherited abstract members and methods

Issue Type: Bug
I have some complex abstract class which contains both methods and abstract methods and members.
When I create a class that extends it and implements abstract methods, I got errors that abstract methods are not implemented but not any intelisense hint for auto generating these methods

VS Code version: Code 1.24.0 (6a6e02cef0f2122ee1469765b704faf5d0e0d859, 2018-06-06T17:35:40.560Z)
OS version: Windows_NT x64 10.0.17134

System Info

Item
Value

CPUs
AMD A8-5600K APU with Radeon(tm) HD Graphics    (4 x 3592)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: unavailable_softwarevideo_decode: enabledvideo_encode: enabledvpx_decode: enabledwebgl: enabledwebgl2: enabled

Memory (System)
23.94GB (10.81GB free)

Process Argv
C:\Program Files\Microsoft VS Code\Code.exe

Screen Reader
no

VM
0%

Extensions (10)

Extension
Author (truncated)
Version

gitlens
eam
8.3.5

tslint
eg2
1.0.30

prettier-vscode
esb
1.5.0

dotnet-test-explorer
for
0.3.0

gc-excelviewer
Gra
2.0.21

csharpextensions
jch
1.3.0

csharp
ms-
1.15.2

PowerShell
ms-
1.7.0

debugger-for-chrome
msj
4.6.0

vscode-docker
Pet
0.0.27

Please share complete some example code as text. I can't repo this in a simple example:
abstract class Base {
    abstract f();
}

class Sub extends Base {}

@mjbvz
`import { Action } from 'redux';
import { AsyncActionCreators, actionCreatorFactory, Action as FsaAction, Success, Failure } from 'typescript-fsa';
import { ReducerBuilder } from 'typescript-fsa-reducers';
import { AppDispatch } from 'services';
const actionCreator = actionCreatorFactory();
export abstract class ApiAction<TState, TRequest, TResult> {
actionCreators: AsyncActionCreators<TRequest, TResult, {}>;
handlers = {
started: this.started,
done: this.done,
failed: this.failed
};
constructor(type: string) {
this.actionCreators = actionCreator.async<TRequest, TResult>(type);
}
buildReducer(builder: ReducerBuilder<TState, TState>): (state: TState, action: Action) => TState {
return builder
.caseWithAction(this.actionCreators.started, this.handlers.started)
.caseWithAction(this.actionCreators.done, this.handlers.done)
.caseWithAction(this.actionCreators.failed, this.handlers.failed);
}
dispatchStarted(dispatch: AppDispatch, request: TRequest) {
dispatch(this.actionCreators.started(request));
}
dispatchDone(dispatch: AppDispatch, request: TRequest, result: TResult, multiTabShare: boolean = false) {
const success = {
params: request,
result: result
};
dispatch(this.actionCreators.done(success, { multiTabShare }));

}
dispatchFailed(dispatch: AppDispatch, request: TRequest, error: {}) {
const failed = {
params: request,
error: error
};
dispatch(this.actionCreators.failed(failed));

}
showLoader = true;
// Should result of action be shared between all opened browser tabs
abstract multiTabShare: boolean;
// Actual action that should happen- eg. API call
abstract run(dispatch: AppDispatch, request: TRequest): void | Promise;
// Action started reducer
abstract started(state: TState, action: FsaAction): TState;
// Action done reducer
abstract done(state: TState, action: FsaAction<Success<TRequest, TResult>>): TState;
// Action failed reducer
abstract failed(state: TState, action: FsaAction<Failure<TRequest, {}>>): TState;
}
`

Thanks but I still can't repo this.

How are you triggering the suggestions? Clicking the lightbulb? Keyboard shortcut?

@mjbvz so any suggestions what can be wrong with my vscode?
Maybe some cache files should I delete?

Yes. Are you using a custom version of typescript in your workspace?


Fix triple slash usage of inheritdoc.

Description
Many of the container-based hosting integrations include an internal tags class, that stores the various container registry, image and tags. Since these members are internal the .NET Aspire API docs doesn't expose them in the rendered API docs. Nor are they available to IntelliSense.
For example, see RedisBuilderExtensions.AddRedis Method: Remarks.
To fix this, when we rely on <inheritdoc /> we must specify the path (XPath) to the desired value. Before my change:

After my change:

This will also fix the .NET Aspire API docs too, the next time we release.
Checklist

Is this feature complete?

[x] Yes. Ready to ship.
[ ] No. Follow-up changes expected.

Are you including unit tests for the changes and scenario tests if relevant?

[ ] Yes
[x] No

Did you add public API?

[ ] Yes

If yes, did you have an API Review for it?

[ ] Yes
[ ] No

Did you add <remarks /> and <code /> elements on your triple slash comments?

[ ] Yes
[ ] No

[x] No

Does the change make any security assumptions or guarantees?

[ ] Yes

If yes, have you done a threat model and had a security review?

[ ] Yes
[ ] No

[x] No

Does the change require an update in our Aspire docs?

[ ] Yes

Is this introducing a breaking change?

[ ] Yes

Link to aspire-docs issue (please use this breaking-change template):

[ ] No

Link to aspire-docs issue (please use this doc-idea template):

[x] No

Microsoft Reviewers: Open in CodeFlow

Can you fix these 2 as well?
https://github.com/dotnet/aspire/blob/c0ff16dff269c0d3409c790e287e54e766ba89d9/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIDeployment.cs#L37-L51

There are 3 Azure ones that appear to be missed:
https://github.com/dotnet/aspire/blob/c0ff16dff269c0d3409c790e287e54e766ba89d9/src/Aspire.Hosting.Azure.Storage/AzureStorageExtensions.cs#L85
https://github.com/dotnet/aspire/blob/c0ff16dff269c0d3409c790e287e54e766ba89d9/src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBExtensions.cs#L109
https://github.com/dotnet/aspire/blob/c0ff16dff269c0d3409c790e287e54e766ba89d9/src/Aspire.Hosting.Azure.EventHubs/AzureEventHubsExtensions.cs#L81
(Although, that EventHubs one appears misplaced. It should be on the RunAsEmulator method.)

I recently created a PR that was fixing all these. Didn't we merge release/9.0 back to main? Pretty sure I updated everything to use  in both the APIs and the tags.

Yes, that's it, check the release/9.0, it's fine there: https://github.com/dotnet/aspire/blob/release/9.0/src/Aspire.Hosting.Elasticsearch/ElasticsearchContainerImageTags.cs

release/9.0 is fine, but the PR didn't get merged back correctly apparently (conflicts got resolved using main) https://github.com/dotnet/aspire/pull/6433

There might be an issue with the .NET API docs. I'm investigating that and will report back.


Clean up non-core commands

This separates out the collections and registry commands from the Commands module, allowing to simplify the first stage of bootstrap:

Moves the command implementations to new modules PackageCollectionsTool and PackageRegistryTool.
Adds a new multi-tool entry point executable swift-package-manager. This used to be included in swift-package, but that would render the separation moot and also seems like a better structure. For installation into the toolchain, we're simply installing the new executable under the name swift-package, so nothing changes there.
Remove package-collections related stuff from the CMake build, it was anyway completely unused.

@swift-ci please smoke test

@swift-ci please smoke test

@swift-ci please smoke test

Moves the command implementations to new modules PackageCollectionsTool and PackageRegistryTool.

Based on this, would you like experimental-destinations command introduced in https://github.com/apple/swift-package-manager/pull/5911 to be moved to a separate module too?

Based on this, would you like experimental-destinations command introduced in https://github.com/apple/swift-package-manager/pull/5911 to be moved to a separate module too?

I think it's fine to be in Commands since it doesn't need further dependencies. The main goal of this is to thin out the number of things that need to be built with CMake and to ideally not grow them.

--- bootstrap: note: Installing /home/build-user/build/buildbot_incremental/swiftpm-linux-x86_64/x86_64-unknown-linux-gnu/release/swift-package-manager to /home/build-user/build/buildbot_incremental/toolchain-linux-x86_64/usr/bin/swift-package/swift-package-manager

Looks like the change to bootstrap is not quite right, it is creating a directory called swift-package 😆

@swift-ci please smoke test

cc @yim-lee

@swift-ci please test package compatibility

Hmmmm

[/Users/ec2-user/jenkins/workspace-private/swift-package-manager-source-compat-suite-PR-macos/swift/utils/build-script] ERROR: can't find CMake (please install CMake)

Is that an infra issue, @shahmishal?

@swift-ci please test package compatibility

Adds a new multi-tool entry point executable swift-package-manager.

Is this new multi-tool entry point supposed to be the only one available? Is there much sense in declaring separate executableTargets for new top-level commands, in addition to adding a case to this entrypoint?

Is this new multi-tool entry point supposed to be the only one available? Is there much sense in declaring separate executableTargets for new top-level commands, in addition to adding a case to this entry point?

Yes, for two reasons:

not all platforms support symlinks in the way Unix-style platforms do, so e.g. on Windows we will not use the multi-tool but instead the individual binaries
for local testing/debugging, it can be useful to just build and run the individual tools, especially because the symlinking is not something that we can currently express in SwiftPM, so only builds with the bootstrap scripts have them.


[Debugger] Test the breakpoint verification feature

Description:
$subject
Suggested Assignees (optional):
@SumayyaZiyad

Verified and handed over with #36462


Create python-publish.yml

@qbarthelemy @sylvchev @toncho11 I think there is enough material to publish version 0.0.3dev.
I suggest we put the package also on Pypi if this works for you.

Ok for me to publish 0.0.2 and to open 0.0.3-dev.

Published versions should not contain "dev" in their names.
https://pyriemann-qiskit.readthedocs.io/en/latest/whatsnew.html

Thanks for spotting the incoherence :)

It should be 0.3, not 0.4?

I forgot to update the version after release v0.0.2.
Since we are releasing v0.0.3, I think we are now opening v0.0.4-dev.

@toncho11 definitely not awake today. Thanks ^^


time: UnixNano() is rounded to microsecond

Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
1.11
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/huydx/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/huydx/.gvm/pkgsets/go1.11/global"
GOPROXY=""
GORACE=""
GOROOT="/Users/huydx/.gvm/gos/go1.11"
GOTMPDIR=""
GOTOOLDIR="/Users/huydx/.gvm/gos/go1.11/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/fx/gbbzrp_s1dz7b3dtxy6bzd240000gp/T/go-build430174837=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?
package main

import (
	"fmt"
	"time"
)

func main() {
	fmt.Println(time.Now().UnixNano())
}

What did you expect to see?
NOT microsecond rounded every time
What did you see instead?
microsecond rounded every time

Got same issue today, looks like introduced here https://go-review.googlesource.com/c/go/+/110655

/cc @randall77 @ianlancetaylor

https://go-review.googlesource.com/c/go/+/110655 introduced getting time by calling gettimeofday
but it does not return nanoseconds at all according to man
struct timeval {
time_t       tv_sec;   /* seconds since Jan. 1, 1970 /
suseconds_t  tv_usec;  / and microseconds */
};

Well, we use gettimeofday for the wall clock and mach_absolute_time for the monotonic clock.
Yes, gettimeofday returns only microsecond resolution. I couldn't find anything on Darwin that gives higher resolution.
However, mach_absolute_time has nanosecond resolution. Thus, the monotonic time has nanosecond resolution. If you do:
package main

import (
	"fmt"
	"time"
)

func main() {
	a := time.Now()
	b := time.Now()
	fmt.Println(b.Sub(a))
}

You'll get nanosecond resolution.
So I'm going to close this as unfortunate. Nanosecond resolution is available for timing things within a process. You'll only get microsecond resolution when timing things across processes or machines. That seems not so bad.

A slightly more complete example of getting, roughly, "now" in nanoseconds:
package main

import (
	"fmt"
	"time"
)

func main() {
	start := time.Now()
	for i := 0; i < 4; i++ {
		diff := time.Since(start)
		fmt.Println(start.Add(diff).UnixNano()) // 🤢
		time.Sleep(time.Millisecond)
	}
}

// Output like:
//<PHONE_NUMBER>436503279
//<PHONE_NUMBER>437885044
//<PHONE_NUMBER>439308031
//<PHONE_NUMBER>440693511


Container border on touch

Thanks for a great plugin!
I found a small problem.
When using this plugin on a touch device the border of the _container is visible as a dot when the loading indicator is hidden.
I added display none/block to the container when hiding/showing the indicator which solved the problem, but i belive this needs to be fixed in the upcomming versions.
Also fiering hide/show events would be nice.
Thanks again

Thanks for this @torsture. Mind posting a minimal example of what you're seeing? I am having a hard time recreating it on my touch devices, so I'm wondering if there is something in your CSS that is leading to it?

Sorry, I should’ve been more thorough when describing the problem.
I’m using the plugin with leaflet-0.7.3 and in separate-mode, same as your separate example. I checked it out and get the same problem in the example(http://ebrelsford.github.io/Leaflet.loading/separate.html), I’ve tested with both a touchscreen laptop and my android smartphone and get the problem in both so you should be able to replicate it using your own demo.
Leaflet adds the css class “leaflet-touch” to the map container when a touch-device is running the map, I've also tried adding this class manually on nontouch  devices and get the same issue, so you can also use this to replicate the problem.
Hope this helps.

Got it. Would you be interested in submitting a pull request? Otherwise I
should be able to get to this soon enough.
On Wed, Jan 18, 2017, 4:37 AM torsture<EMAIL_ADDRESS>wrote:

Sorry, I should’ve been more thorough when describing the problem.
I’m using the plugin with leaflet-0.7.3 and in separate-mode, same as your
separate example. I checked it out and get the same problem in the example(
http://ebrelsford.github.io/Leaflet.loading/separate.html), I’ve tested
with both a touchscreen laptop and my android smartphone and get the
problem in both so you should be able to replicate it using your own demo.
Leaflet adds the css class “leaflet-touch” to the map container when a
touch-device is running the map, I've also tried adding this class manually
on nontouch devices and get the same issue, so you can also use this to
replicate the problem.
Hope this helps.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ebrelsford/Leaflet.loading/issues/39#issuecomment-273427785,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAW42lv3jY0eJN-d-madRogo2bedLO6eks5rTd1HgaJpZM4LlaPR
.

I'm kinda new to github so I think it's for the best if you take care of it.

Works like a charm, nice work thank you!


os/exec: sometimes Run doesn't return even though the process has finished

What version of Go are you using (go version)?

$ go version
go version go1.20.2 linux/amd64

Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/xxx/.cache/go-build"
GOENV="/home/xxx/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/xxx/gocode/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/xxx/gocode"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/home/xxx/go"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/home/xxx/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1084134332=/tmp/go-build -gno-record-gcc-switches"

What did you do?

a.go:
package main

import (
	"fmt"
	"io"
	"os"
	"os/exec"
	"time"
)

func main() {
	cmd := exec.Command("./b")
	pr, pw := io.Pipe()
	_ = pr
	cmd.Stdout = pw
	cmd.Stderr = os.Stderr
	go func() {
		<-time.After(5 * time.Second)
		if err := cmd.Process.Signal(os.Interrupt); err != nil {
			fmt.Println("Signal:", err)
		}
		time.Sleep(time.Second)
		if err := cmd.Process.Kill(); err != nil {
			fmt.Println("Kill:", err)
		}
	}()
	if err := cmd.Run(); err != nil {
		fmt.Println("Run[a]:", err)
	}
	fmt.Println("Run returned.")
}

b.go:
package main

import (
	"fmt"
	"io"
	"os"
	"os/exec"
)

func main() {
	cmd := exec.Command("tail", "-f", "/dev/null")
	pr, pw := io.Pipe()
	_ = pw
	cmd.Stdin = pr
	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr
	if err := cmd.Run(); err != nil {
		fmt.Println("Run[b]:", err)
	}
}

After building the binaries and putting them in the same directory, I run ./a.
What did you expect to see?
The program prints Run returned. in 5 seconds and exits.
What did you see instead?
Kill: os: process already finished
The program doesn't exit until I press Ctrl+C.

Note that Go 1.20 introduces a new WaitDelay field to help address this kind of problem.  https://pkg.go.dev/os/exec#Cmd.WaitDelay


ambiguous output in multiline query with sqlite_query

785dbf1485bf347c260fa540c4d0955d4d079901
This will cause ambiguous ouput for multiline query in sqlite_query, since sqlite_query use \n as line separator.

well no ambiguity indeed...


App Service - Basic Tier - 99.9% ?

Is this value right?
In https://azure.microsoft.com/en-us/support/legal/sla/app-service/v1_4/ we can find it's 99.95%

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

ID: 1cd57b6d-3c6f-e546-b3ea-f83892f4c23d
Version Independent ID: 27aecc7b-f107-96d4-b044-ae026bca2727
Content: Azure subscription limits and quotas
Content Source: articles/azure-subscription-service-limits.md
Service: billing
GitHub Login: @rothja
Microsoft Alias: byvinyal

Thanks for your comment. We are actively investigating and will get back to you shortly. Thanks for your patience.

@tiagocostapt I think Cephas might be the best person to investigate which SLA is accurate. @cephalin  could you take a look at this app service SLA issue? #assign:@cephalin. Thanks!

cephalin. is not a valid GitHub ID, or is not a collaborator on this repo.

#assign:cephalin

@rothja Thanks
@cephalin If you need some help or input, please reach out to me.

Any updates?

@cephalin  - any input please?

@tiagocostapt Thanks for reporting this. I've updated the doc with 99.95% now and it should be published sometime today. #please-close.


Support for opening links in new tabs/windows

I needed a simple Markdown syntax modification for potentially opening links in new tabs/windows.
If you add a '+' sign just before the http link there's a "target='_blank'" attribute added to a HTML A element.
Yes, it's a Markdown syntax modification...

Thanks for this, but since it's not part of the specification, its place is in an extension.


feat(authz): added groups mechanism

What type of PR is this?

Which issue does this PR fix:
#983
What does this PR do / Why do we need it:
If an issue # is not available please add repro steps and logs showing the issue:
Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?
Does this PR introduce any user-facing change?:

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

to summarize: group policies have priority over user policies which have priority over default policy.
can you add a test please in controller_test?

@aokirisaki please prove me wrong but right now in your config groups are hardcoded into the config file and not taken from LDAP
Those kind of approch should be avoided like the plague, as it's not scalable neither it's correct as LDAP should be the only source of thruth for group membership
This is not solving the issue #983 which clearly states that group should be read by the userinfo endpoint.
Downvoting this

Some notes:

We need a mechanism to be able to use groups also for local users, not just ldap, so even if the PR does not resolve #983, some of the group related code is the same.
For LDAP there will be extra settings needed, but I'm not sure how the config would look (for example attribute of the LDAP group to match against policies, basically the group name).

wrt LDAP (served by Windows AD backend at least),
"sAMAccountName" and "memberOf" return the two pieces of info relevant here.
Pls. enhance LDAP config to also include GroupAttribute to allow for @Skiepp's ask.

Thank you @rchincha, but as @andaaron suggested the attribute should be part of config.
Your proposal is perfect for us (we are using AD), but many other people use other services like OpenLDAP and samba, which uses different attributes.
Restrict to those filelds only would be limitative.
Thanks to all for the interest

@Skiepp understood, these attributes are not hard-coded, and you are allowed to configure what the attributes are called and zot would just query of those attributes. If there is sample backend config that you can share, we will be happy to include it in our CI/CD tests.

In the commit msg, also describe the authn/authz behavior including ldap. This will likely be a long commit description.

feat(groups)!: added "groups" mechanism for authZ

BREAKING CHANGE: repository paths are now specified under a new config key called "repositories" under "accessControl" section in order to handle "groups" feature. Previously the repository paths were specified directly under "accessControl".

This PR adds the ability to create groups of users which can be used for authZ policies, instead of just users.

{
"http": {
   "accessControl": {
       "groups": {

Just like the users, groups can be part of repository policies/default policies/admin policies. The 'groups' field in accessControl can be missing if there are no groups. The permissions priority is user>group>default>admin policy, verified in this order (in authz.go), and permissions are cumulative. It works with LDAP too, and the group attribute name is configurable. The DN of the group is used as the group name and the functionality is the same. All groups for the given user are added to the context in authn.go. Repository paths are now specified under a new keyword called "repositories" under "accessControl" section in order to handle "groups" feature.


Refactoring mouse events.

Pull Request Description
This pull request (PR) introduces a new approach to handle mouse events. Previously, mouse events were managed in the following manner:

All mouse events were directed to the Scene.mouse.frp structure, which was a significant FRP multiplexer for the events.
Whenever a new shape was under the mouse, events were redirected from the aforementioned structure to the PointerTarget structure, which was included in every shape defined with the ensogl_core::shape! macro.
Users of EnsoGL could read the events either from the shape.events structure or the Scene.mouse.frp structure.

This API is preserved as refactoring all of its usages is a complex task that should be performed gradually. The API was renamed to discourage its further use. In particular, the following renaming was applied:

Scene.mouse.frp -> Scene.mouse.frp_deprecated;
shape.events -> shape.events_deprecated;
PointerTarget -> PointerTarget_DEPRECATED.

One significant issue with the above API was that the events were not propagated through the display object hierarchy, making it impossible to handle them in a flexible way. For instance, to implement a vector editor, some events need to be caught on a shape's parent and then decide whether to propagate them to the children, such as when dragging sliders belonging to the vector editor.
Therefore, the above APIs were replaced by the event system built into the display objects API. For instance, instead of using shape.events.mouse_down, you can now use shape.on_event::<mouse::Down>(). This provides you with a similar FRP but a more powerful endpoint as it allows:

Controlling the event propagation (capturing and bubbling phases);
Cancelling the event;
Reading additional data from the event, such as the associated position on the screen of the pointer when the event was emitted (similar to JS events).

Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:

[x] The documentation has been updated, if necessary.
[x] Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
[x] All code follows the
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
All code has been tested:

[x] Unit tests have been written where possible.
[x] If GUI codebase was changed, the GUI was tested when built using ./run ide build.

Plus, the PR mentions the capturing phase, but I don't see how it could work, given that we emit mouse events directly on targets,

Regarding, Plus, the PR mentions the capturing phase, but I don't see how it could work, given that we emit mouse events directly on targets, - the bubbling/capturing phases are implemented for some time in display objects already and they work OK :)


Deprecated MAINTAINER cmd

Replace deprecated Dockerfile MAINTAINER cmd with the new LABEL cmd.
What labels should be used?

Resolve in 0b8b137eca3138b9da56968eebe91f906716b569


Make Asset Helpers Optional

Hi there, I'm using sprockets-sass in http://middlemanapp.com/
Right now, I'm having to stay locked on the 0.3.x gems because 0.4.x overwrites custom helpers/functions we need in the project (cache busting, asset hosts, etc).
Any way we can make the helper/function inclusion optional?

Yeah I think that's a good idea. I actually wanted it to work this way initially, but I couldn't think of a way for the functions to be included by default and still have this option.
I'll look into it.

All my tests pass, thanks!

Awesome, I just pushed 0.5


Use simple-git

Description
Switch to using node's simple-git module for checking out code to support timeouts and progress indication.
Steps

[ ] Move checkout logic from shell script into node
[ ] Add timeout plugin
[ ] Add progress indication plugin and update the status for the process accordingly

implemented


Does the adapter work on a regional GKE cluster?

Has anyone managed to setup the prometheus adapter on a regional GKE cluster?
When installing the helm chart, the APIService is not registered.
$ kubectl describe apiservice v1beta1.custom.metrics.k8s.io
Name:         v1beta1.custom.metrics.k8s.io
Namespace:
Labels:       app=prometheus-adapter
              chart=prometheus-adapter-v0.2.0
              heritage=Tiller
              release=prometheus-adapter
Annotations:  <none>
API Version:  apiregistration.k8s.io/v1beta1
Kind:         APIService
Metadata:
  Creation Timestamp:  2018-11-19T09:19:29Z
  Resource Version:    2415470
  Self Link:           /apis/apiregistration.k8s.io/v1beta1/apiservices/v1beta1.custom.metrics.k8s.io
  UID:                 3803d79d-ebdc-11e8-bd39-4201ac10200b
Spec:
  Ca Bundle:                 <nil>
  Group:                     custom.metrics.k8s.io
  Group Priority Minimum:    100
  Insecure Skip TLS Verify:  true
  Service:
    Name:            prometheus-adapter
    Namespace:       kube-system
  Version:           v1beta1
  Version Priority:  100
Status:
  Conditions:
    Last Transition Time:  2018-11-19T09:19:29Z
    Message:               no response from https://<IP_ADDRESS>:6443: Get https://<IP_ADDRESS>:6443: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
    Reason:                FailedDiscoveryCheck
    Status:                False
    Type:                  Available
Events:                    <none>

The prometheus-adapter service is running fine and reachable from pods. The adapter logs show that healthchecks are working. I tried both self-signed and previously generated certificates. Does this mean there are connectivity issues between the Custer masters and the adapter service? I have other APIservices set up that work fine, eg. certmanager.k8s.io/v1alpha1 for instance.
Kubernetes version: v1.11.2-gke.18
Prometheus adapter docker image: latest (I tried them all)
Kubernetes Master CIDR range: <IP_ADDRESS>/28
Kubernetes Services CIDR range: <IP_ADDRESS>/20
Kubernetes Pod CIDR range: <IP_ADDRESS>/16
I have firewall rules allowing all egress and ingress traffic between these CIDR ranges.
It seems GCP recommends exporting prometheus metrics to stackdriver and then scale on external metrics but that doesnt seem like a clean efficient way of doing things to me, ref. https://cloud.google.com/kubernetes-engine/docs/tutorials/external-metrics-autoscaling.
Is the prometheus-adapter just not supported in GKE yet?

Ok It took me forever to understand that I had to whitelist the port on which the prometheus-adapter pod listens (not the service) for access from the kubernetes master (eg. hardcoded 6443 in the official helm chart)
GKE only whitelists ports 443 and 10250 by default.
Hope this helps someone else ;)
This helped: https://github.com/kubernetes-incubator/metrics-server/issues/45

Hey all - had this problem today.
This is NOT a problem with Prometheus Adapter - as stated above, it is a problem with Google Kubernetes Engine (well, not a problem, just a feature for Cluster Security).
Here's a solution other than tinkering with the helm chart:
gcloud compute firewall-rules create allow-prometheus-adapter
--action ALLOW
--direction INGRESS
--source-ranges <IP_ADDRESS>/28 \ # Master CIDR Block
--rules tcp:6443
--network {{VPC Network Name}}

If using helm on GKE, here's a solution that involves just changing your helm chart.  In Chart.yaml, include dependencies for prometheus:
dependencies:
- name: kube-prometheus-stack
  version: '*'
  repository: https://prometheus-community.github.io/helm-charts
- name: prometheus-adapter
  version: '*'
  repository: https://prometheus-community.github.io/helm-charts

In values.yaml, include the following:
prometheus-adapter:
  listenPort: 10250

Since port 10250 is already whitelisted, no need to change firewall settings.  Tried port 443, but that created a collision.


Type providers are not resolved when using FSharp.Core 4.1.17 and FCS

I'm trying to use FCS built from this repo and can't get some type providers working with FSharp.Core 4.1.17 (net45) loaded at runtime. Getting FS3005 warning ("Referenced assembly '%s' has assembly level attribute '%s' but no public type provider classes were found") and unresolved symbol errors. When using <IP_ADDRESS> from GAC type providers work properly.

Got it working with FSharp.Core 4.1.17 targeting net40. Previously tried 4.1.17 targeting net45 and the build from visualfsharp repo (built in fcs task).

@auduchinok Could you add a step-by-step repro please? thanks

@dsyme I'd like to provide a repro but I cannot reproduce it anymore. Currently I'm using FSharp.Core 4.1.18 (net45) with FCS from master and it seems to work fine in projects I had came across to this problem.
I'm closing the issue and will reopen in case it reproduced again.

I previously tried it using bindingRedirect to FSharp.Core <IP_ADDRESS>, but using it in runtime is not feasible in our case, so I'm trying to reference the version we're shipping.
I can reproduce this bug when changing the FSharp.Core reference in FCS project like this:
<Reference Include="FSharp.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
  <HintPath>..\packages\FSharp.Core.4.1.18\lib\net45\FSharp.Core.dll</HintPath>
  <Private>false</Private>
</Reference>

@auduchinok I think we need a step-by-step repro for this.  Which tool is ultimately executing FSharp.Compiler.Service.dll?  (e.g. fsc.exe, fsi.exe, devenv.exe, ...)  All such tools need a binding redirect to the latest FSharp.Core.dll if they are to load type providers

@dsyme Thank you for the tip about redirecting, we've managed to use a binding redirect to FSharp.Core that we ship for the tool executing FSharp.Compiler.Service.dll (JetBrains.ReSharper.Host64.exe).


changing the destination in the app

Right now the destination is specified as a geo coordinate in config.js file. We should let users select the destination by searching for it in the app. This can be a step before they reach the visualization page.

#13 a search bar has been added to help select a destination


az  show has inconsistent exit status

Following template scripts generated from the Portal's Automation Script section, the CLI script uses checks for existing resources such as
az group show $resourceGroupName 1> /dev/null

if [ $? != 0 ]; then
	echo "Resource group with name" $resourceGroupName "could not be found. Creating new resource group.."
	set -e
	(
		set -x
		az group create --name $resourceGroupName --location $resourceGroupLocation 1> /dev/null
	)
	else
	echo "Using existing resource group..."
fi

az group show and az storage account show both return non-zero when the resource is missing and so the above pattern works. If being consistent across resources throughout my scripts, examples such as az storage share show and az vm show return zero regardless of the resource existing or not. Thus cannot be used to determine missing resources.
The issue is that the 'show' action doesn't always return a non-zero code for missing resources when used on other resource types. For consistency and approachability to new commands, I would thing these would behave the same across resources?
Environment summary
az --version 2.0.21
Python (Darwin) 3.6.3
Installed via homebrew

I am quite surprised to see that this is open and not a priority. How are users expected to do the absolute most basic of tasks, such as, (as @damienpontifex demonstrates) ensuring that resources exist and creating them if they don't exist? I thought it was stunning when the PS commandlets lacked a clear way to do this, but the fact that it existed in azure-cli, regressed and hasn't been given any attention or priority is just concerning.
Really though, more immediately, how is anyone doing "ensure" logic reliably? How many bugs have been introduced because of this silently stopping to work due to whatever release regressed this and people not realizing that a widespread convention is no longer followed? I ask because it appears that this problem has grown since @damienpontifex filed this originally -- storage account and storage container now behave incorrectly as well.
Is it the CLI's official stance that folks need to be catching and parsing string output in order to script Azure through the official CLI?
Finally, assuming this is a bug and will be fixed, can there please be positive and negative tests added for all resource types to ensure this doesn't happen again?
cc: @tjprescott

A few things:

We don't control the portal's script generation script.  If they are using non-zero error code as exists then it is a bug in their generation script
As you pointed out, it is intentional that we don't raise an error for this situation. You can chat with @johanste on the philosophy of it. :)
The commands which have exists are because those services have that endpoint and the command would return what the service does. What do you mean when you say it doesn't extend to the third or fourth resources you tried?

Two reasons for the original change:

Differentiate between:
a) The command successfully completed, but there was no matching resource.
b) The command failed for some reason - we don't know if there is a resource.
c) The command successfully completed, and there is a resource.

Enable users to use set -e in their bash scripts.

There should not be any parsing of the output needed (unless checking for an empty string constitutes parsing).
The only time where a command should return a failure code on exists is if an empty string does not uniquely indicate that the resource doesn't exists (consider a blob content show like command where it would be impossible to distinguish between an existing blob with empty content and a non-existent blob. If this is not happening, please open a bug.
@colemickens, are you advocating for having a universal "exists" command? The only other alternative I see is to have different error codes for "doesn't exist" and "failed to determine if it exists" - with the downside of this being a breaking change (again) as well as breaking the ability to use set -e in many cases...

However, as the title points out, it is true that not all show commands follow the empty_on_404 convention--however, it is what we promote.

I am surprised and disappointed that we sort of seem to be bike-shedding about rather basic functionality of a CLI, and that apparently, there isn't a prescribed, documented, and tested way of implementing "ensure resource" logic for Azure with the official CLI.
To be specific:

The current behavior doesn't follow conventions of other CLI tools. Docker, Kubectl, Gcloud, AWS CLI, none of them behave this way. It would, in my opinion, be far more appropriate to return a non-zero exit code and a string message to standard error.
Docker:
$ docker stats thisdoesnotexist; echo $?
Error response from daemon: No such container: thisdoesnotexist
1

AWS:
$ aws ec2 describe-instance-status --instance-ids="i-0598c7d356eba48d7"; echo $?
An error occurred (InvalidInstanceID.NotFound) when calling the DescribeInstanceStatus operation: The instance ID 'i-0598c7d356eba48d7' does not exist
255

GCP:
$ gcloud compute instances describe notarealinstance --zone=us-west1-a; echo $?
ERROR: (gcloud.compute.instances.describe) Could not fetch resource:
 - The resource 'projects/t2hrowawa2/zones/us-west1-a/instances/notarealinstance' was not found

1

Kubectl:
$ k get pod notarealpod; echo $?
Error from server (NotFound): pods "notarealpod" not found
1

And then Azure:
$ az group show -n thisaintreal; echo $?
0

None of them behave the way the Azure CLI has been made to behave.

This flat out broke scripts that I had written before this change was made. I feel bad for anyone with real production deployments who thought they could upgrade the CLI and expect basic idempotent resource creation scripts to work consistently. (Maybe this was announced as a breaking change and I couldn't find it?)

(There's no Portal involved here anywhere....)

I don't know what set -e has to do with it. I have set -e in all of my bash scripts, including the ones authored when az behaved like other, similar, unix tools.

Some day, it would be nice to write this, and have the CLI just do the right things:
az group ensure -n group0 -l westus2
az network vnet ensure -n net0 -g group0
az network subnet ensure -n subnet0 -v net0 -g group0
...

In lieu of that, an exists subcommand for all resource types would be sufficient.
Whatever the answer is, please, please, document it and write an integration test so that I don't have to revisit my most basic provisioning scripts in another year.
And yeah, I guess if you're going to keep the existing behavior, it ought to be consistently... blank... so that users don't accidentally assume they can rely on exit codes.

Take a look at https://github.com/Azure/azure-cli/issues/6612 for updates to this issue and our decision to resolve it.

@williexu Thank you for cross-linking. I'm also quite happy with the decision. Cheers!


Limit CPUs

Hello,
Is there a way to limit the number of used CPUs during the run? I am working on a shared server and the program is occupying everything during the run.
Thanks!

Saved the problem with taskset -c (maybe not perfect but working)


Fix the names of the fields for CHART_EQUITY streaming

The fields of the CHART_EQUITY streaming should be fixed like this:
"FIELD_1":  -> "SEQUENCE"
"FIELD_2":  -> "OPEN_PRICE"
"FIELD_3":  -> "HIGH_PRICE"
"FIELD_4":  -> "LOW_PRICE"
"FIELD_5":  -> "CLOSE_PRICE"
"FIELD_6":  -> "VOLUME"
"FIELD_7":  -> "CHART_TIME"
"FIELD_8":  -> "CHART_DAY"

I made local changes which look like this:
465c465
<         FIELD_1 = 1
---
>         SEQUENCE = 1
468c468
<         FIELD_2 = 2
---
>         OPEN_PRICE = 2
471c471
<         FIELD_3 = 3
---
>         HIGH_PRICE = 3
474c474
<         FIELD_4 = 4
---
>         LOW_PRICE = 4
477c477
<         FIELD_5 = 5
---
>         CLOSE_PRICE = 5
480c480
<         FIELD_6 = 6
---
>         VOLUME = 6
483c483
<         FIELD_7 = 7
---
>         CHART_TIME = 7
486c486
<         FIELD_8 = 8
---
>         CHART_DAY = 8


The behavior of repr is different on different platforms

Here's my program:
from cheap_repr import cheap_repr

def this_is_my_function():
    def bar():
        pass

    print(cheap_repr(bar))

this_is_my_function()

On Mac, the result is <function this_is_my_function.<locals>.bar at 0x1104218b0>.
On Linux, it's <function this_is_my_functio...ocals>.bar at 0x7f7239c9baf0>
It seems Linux has a lower threshold for string length, but since this is not documented, I would expect the behavior to be the same across different platforms.

The problem is just that the address at the end is a different length accross your machines:
0x7f7239c9baf0
0x1104218b0

Functions don't have a special repr so they fall back to the default which may be truncated. That's silly since they never get really long, so I'm making it use the normal untruncated repr.

Thanks for the quick fix!

Will you release a new version?

Released 0.4.3


On loading the page for the 1st time, user doesn't know at which part of the documentation is in front view

When the page is loaded for the 1st time, the Info section should be selected/highlighted.
But it doesn't happen.
When user browse other sections and then clicks on Info section, it then appears as selected.

The aurelia version will need a new issue for this problem once it becomes relevant (aurelia version does not yet have a navigation bar)


Extend block format with health

Add support for new block format with health
Rename BlockData structure to BlockTypeInfo to more clearly state that
it keeps information about the different BlockTypes
Create new structure BlockData to replace "char" as the storage format
for a single block in a chunk (1 byte to 4 byte per block)
Update all parts of the code to use the new BlockData structure

@nsg This works with the new format used by the server. It also doesn't do anything with the block health, but the idea was to get both parts into a working state as soon as possible.

@petterarvidsson looks good! :+1:


CORS policy not work

server error: A CORS policy named 'CorsPolicy' could not be found.
client error:
xhr.js:178 OPTIONS http://05b9f069.ngrok.io/api/somemethod 500 (Internal Server Error)
btrips:1 Failed to load http://05b9f069.ngrok.io/api/somemethod: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 500.

ConfigureServices method:
void ConfigurePolicy(CorsPolicyBuilder builder)
{
    builder
        .WithOrigins("http://localhost", "http://localhost:3000")
        .AllowAnyOrigin()
        .AllowAnyMethod()
        .AllowAnyHeader()
        .AllowCredentials();
}

services.AddCors(options =>
{
    options.AddPolicy(StartupConstants.CorsPolicy, ConfigurePolicy);
});

services.AddMvc()

Configure method
app.UseCors(StartupConstants.CorsPolicy);
app.UseMvc();

Removing [EnableCors("AllowSpecificOrigin")] from controller fix 500 error and now no server errors, but 404 on client
Failed to load http://05b9f069.ngrok.io/api/btrips: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 404.

The configure method you used doesn't create a named policy; you're mixing two approaches. The first approach applies CORS to the entire app, the second, the one with named policies only applies it to wherever you put the attribute.
Which approach are you wanting to use?

I want to set global cors based on tutorial https://docs.microsoft.com/en-us/aspnet/core/security/cors?view=aspnetcore-2.1
As i understand code below should enable global cors policy, and it's enough, isn't it?:
void ConfigurePolicy(CorsPolicyBuilder builder)
{
    builder
        .WithOrigins("http://localhost", "http://localhost:80", "http://localhost:8080", "http://localhost:3000", "http://localhost:3001")
        .AllowAnyOrigin()
        .AllowAnyMethod()
        .AllowAnyHeader()
        .AllowCredentials();
}

services.AddCors(options =>
{
    options.AddPolicy(StartupConstants.CorsPolicy, ConfigurePolicy);
});
...
app.UseCors(StartupConstants.CorsPolicy);


Discord Button on Main Menu

Summary
It would be nice to have a Discord button to connect players with the community. Link should be configurable.

Closed via #249.


fix: hooks.contextModuleFactory should use cmf not nmf

Summary

Require Documentation?

[ ] No
[ ] Yes, the corresponding rspack-website PR is __

Weirdly, this change breaks our build.
[Error:   × TypeError: Cannot read properties of undefined (reading 'tap')
  │     at /repo/node_modules/webpack/lib/ContextReplacementPlugin.js:100:27
  │     at Hook.eval [as call] (eval at create (/repo/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)
  │     at Hook.CALL_DELEGATE [as _call] (/repo/node_modules/tapable/lib/Hook.js:14:14)
  │     at Compiler._Compiler_newCompilation (/repo/node_modules/@rspack/core/dist/Compiler.js:843:37)
  │
] {
  code: 'GenericFailure'
}

I'm not sure why contextModuleFactory is missing hooks.afterResolve.
I wish this PR had a test that proves it fixed something.


Nested array with parent attributes

Question. How do you write a JsonPath for a nested array (ie. $[*].events[*]) that includes attributes of the parent?
Illustrative Example
Consider this JSON data that contains a list of trip objects, each with an array of events.
[
    {
        "trip_id": "trip1",
        "events": [
            {
                "event_id": "eventA"
            },
            {
                "event_id": "eventB"
            }
        ]
    },
    {
        "trip_id": "trip2",
        "events": [
            {
                "event_id": "eventA"
            },
            {
                "event_id": "eventB"
            }
        ]
    }
]

I need an array of events so I write a JsonPath like this $[*].events[*], that returns this result:
[
    {
       "event_id" : "eventA"
    },
    {
       "event_id" : "eventB"
    },
    {
       "event_id" : "eventA"
    },
    {
       "event_id" : "eventB"
    }
 ]

Now, see this result is confusing. The JsonPath has returned the events...but how do you know which trip each belongs too? Is there a way to write a JsonPath that includes attributes from the parent? I am after a result like this:
 [
    {
       "trip_id": "trip1",
       "event_id" : "eventA"
    },
    {
       "trip_id": "trip1",
       "event_id" : "eventB"
    },
    {
       "trip_id": "trip2",
       "event_id" : "eventA"
    },
    {
       "trip_id": "trip2",
       "event_id" : "eventB"
    }
 ]

Is this possible using JsonPath? Thank you!

I also encountered this problem. Is there any solution

I think the best option is to extract events per trip. The root of each
event is the trip and thats what the trip even structure is available for
otherwise it could have been a an element along with the even, if you get
what I mean. Hope this helps
On Wed, 28 Sep 2022 at 11:39 PM, luojiwen @.***> wrote:

I also encountered this problem. Is there any solution
—
Reply to this email directly, view it on GitHub
https://github.com/json-path/JsonPath/issues/853#issuecomment-1260717988,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACXO3ZOV6XGPABULD7YLNLDWAQN5TANCNFSM5657NO6Q
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

--
~_ යුහාන් _~

Hi sorry, I don't understand. Could you provide an example? Before I was using this JsonPath $[*].events[*] what changes should I make?

Hi Joshep,
If you want to extract the events per trip then use the following approach
,
Json path with trip specified : @.**_id =='trip1' )].events[]
Result :
[
{
"event_id": "eventA"
},
{
"event_id": "eventB"
}
]
Similarly you can extract the events for trip2
Hope this helps.  On Thu, 29 Sep 2022 at 3:56 AM, Joseph Samela <
@.***> wrote:

Hi sorry, I don't understand. Could you provide an example? Before I was
using this JsonPath $[].events[] what changes should I make?
—
Reply to this email directly, view it on GitHub
https://github.com/json-path/JsonPath/issues/853#issuecomment-1261037110,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACXO3ZOEYGNHQ6F4KIFPHUDWARMAXANCNFSM5657NO6Q
.
You are receiving this because you commented.Message ID:
@.***>

--
~_ යුහාන් _~

Hi I'm going to close this issue. I was unable to extract the events I wanted using JSON Path. I was working in AWS Glue and ended up using Spark to transform the data into the format I needed. Hopefully, JSON Path will be updated to support this feature.


The sed commands need to be updated in section "Download the image configuration template example"

The sed commands in this section are apparently intended to find/replace some text which no longer exists in the helloImageTemplateWin.json file. These commands do not work.

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

ID: cd4c4f41-2050-234e-e35b-750158cfba54
Version Independent ID: 09c0145e-fa2b-210d-d1a0-4acb8c790bc3
Content: Create a Windows VM with Azure Image Builder (preview) - Azure Windows Virtual Machines
Content Source: articles/virtual-machines/windows/image-builder.md
Service: virtual-machines-windows
Sub-service: imaging
GitHub Login: @cynthn
Microsoft Alias: cynthn

Thanks for the feedback! We are currently investigating and will update you shortly.

After troubleshooting more myself, it appears the problem I was having was not with the sed commands. The template file being curled appears to be missing the location property so I was able to fix it by adding a jq command to the script, but I haven't made a pull request for this change since it requires having a non-standard package installed (jq). Perhaps yall want to just update the template json file instead.

We are currently cleaning up old issues and closing out items that are greater than 90 days old. If an issue is still present, please open a new feedback item on the document so we can prioritize correctly.
#please-close


Loggable with custom types

Hi!
First of all great log extenstion. Thank you for you work.
We use loggable with doctrune custom type. This type is very complex and could not be serialized into LogEntry::data . It would be very handy if you provide checking custom type and call Type::convertToDatabaseValue / Type::convertToPHPValue before logging/reverting.
best regards
Alexey

Hello, and thank you for your contribution.
In the interest of spring cleaning and package modernization, I'm going through and closing old issues that have had no recent activity and/or are no longer relevant.
If this problem is still relevant to you, please open a new issue with the appropriate information and steps to reproduce.
Thank you!


Refactor

Apply Black formatting
Use except Exception: instead of bare except
empty string is falsey, change to "not" format

Conflicts


#issue1 fix

issue #1 fix.

I extract the function GetSyscallFnNameWithSymFile, and run a loop of 10 as an example. It looks like a memory leak due to substring.
And here is my reference: https://go101.org/article/memory-leaking.html

After fixing, it looks fine now

LGTM,thanks.


[OSX] popups shouldnt have shadow

OSX: Fixes a regression where shadow was added to popups.

You can test this PR using the following package version. 0.10.999-cibuild0021553-beta. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]


Accept -p as custom port parameter

Description
Accept the port parameter -p as defined in the documentation. I didn't remove --p to avoid adding a breaking change for people already using it.
I can add the alternative in the documentation, but I think it's better to keep it as is and have it as the default flag.
Related Issue
Fixes #85

As commented in #85, this was a misunderstanding on my part. Closing this for now.