Question : How to debug my Startup.cs within docker-compose ? (debugger is attached too late)

Issue Description
Hi, I managed to debug an asp .net core 3.1 application within an Ubuntu WSL-2 distro (on Windows 10), using a docker-compose file thanks to this Vs code tutorial, but I can't figure out how to debug early executed files like Program.cs or Startup.cs, the breakpoints are never hit in this files.
We start the container using a docker-compose up command, then we attach the debugger, all breakpoints set in Program.cs or Startup.cs are not hit. Indeed the app has already pocessed these files when I manually attach the debugger, it's too late. All other breakpoints (in controllers or background process ...) are hit as expected.
When debugging the same project with Visual Studio 2019 Community, all my breakpoints are hit, even those in Program.cs or Startup.cs which is the expected behavior here, indeed I guess the container is already up when we attach the debugger in VS Community, that's the main difference.
What am I doing wrong ?
I also tried to attach the debugger before the container is launched, which indeed fails : no process exist to be linked with the debugger
Error: Process 'docker exec -i "myapp...' exited with code 1
Error: Error: No such container: myapp

Steps to Reproduce
Set a breakpoint to any line in Startup.cs

Create a dockerfile in the project we want to debug
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base
WORKDIR /app
EXPOSE 80

FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /src
COPY ["src/myapp/src/v.csproj", "src/myapp/src/"]

RUN dotnet restore "src/myapp/src/myapp.csproj"  -nowarn:msb3202,nu1503 --verbosity diag
COPY . .
WORKDIR "/src/src/myapp/src"
RUN dotnet build "myapp.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "myapp.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "myapp.dll"]

Create a docker-compose.debug.yml file
version: '3.7'

services:
  myapp:
    image: myapp
    container_name: myapp
    build:
      context: .
      dockerfile: src/myapp/src/Dockerfile
    ports:
      - "60713:80"
    environment:
      - ASPNETCORE_ENVIRONMENT=Development
      - ASPNETCORE_URLS=http://+:80
    volumes:
      - ~/.vsdbg:/remote_debugger:rw
networks:
    default:
      external:
         name: mynetwork

Create a debug configuration (launch.json)
{
   "version": "0.2.0",
   "configurations": [
       {
           "name": "Docker .NET Core Attach (Preview)",
           "containerName": "myapp",
           "type": "docker",
           "request": "attach",
           "platform": "netCore",
           "sourceFileMap": {
               "/src": "${workspaceFolder}"
           }
       }
]
}

Then
Launch the file (docker-compose -f "docker-compose.debug.yml" up -d --build)
Finally attach the debugger using the dedicated button

Expected Behavior
I expect the breakpoints set in Startup.cs to be hit (this file is processed before I attach the debugger, as soon as the docker-compose command is played)
Actual Behavior
All breakpoints set in Startup.cs are not hit, but breakpoints in long process like Background services or in a controller are hit as expected (they are processed after I attach the debugger)
Logs
No log, as it's not a error, nor an exception
OmniSharp log
No log, as it's not a error, nor an exception
C# log
No log, as it's not a error, nor an exception
Environment information
VSCode version: 1.50.1
C# Extension: 1.23.4
Mono Information
        OmniSharp using built-in mono
Dotnet Information
.NET Core SDK (reflecting any global.json):
 Version:   3.1.403
 Commit:    9e895200cd
Runtime Environment:
OS Name:     ubuntu
OS Version:  20.04
OS Platform: Linux
RID:         ubuntu.20.04-x64
Base Path:   /usr/share/dotnet/sdk/3.1.403/
Host (useful for support):
Version: 3.1.9
Commit:  774fc3d6a9
.NET Core SDKs installed:
3.1.403 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.9 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.9 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions

Extension
Author
Version

csharp
ms-dotnettools
1.23.4

vscode-docker
ms-azuretools
1.7.0

I believe the Docker extension adds support for setting up your docker containers to support debug launch.

I believe the Docker extension adds support for setting up your docker containers to support debug launch.

I'm sure you're right, but following the official documentation didn't mention it, all I see is the following

then in step 4 when launching the docker-compose up command, the application is launched as well, attaching the debugger is necessarily launched too late then.
Do you have any idea on how I could make it works ?

The official documentation doesn't provide a path to launching under the debugger - just attaching. I don't know if this is intentional or not. @bwateratmsft do you know why the article that Nicolas referenced doesn't suggest using the Docker extension? Is it just out-of-date with best practices, or is there some reason one might want to do things that way?
If you do NOT want to use the Docker extension for some reason, the only way to debug startup code is to add something like: while (!Debugger.IsAttached) { Thread.Sleep(100); } to the beginning of your startup code so that it will not proceed until a debugger is attached.

@gregg-miskelly the article referenced is focused on docker-compose. Right now our only supported story for that is to launch it manually and then attach.
We have an issue to add "real" compose debugging (https://github.com/microsoft/vscode-docker/issues/840), and we also have the "real" non-compose debugging documented (https://code.visualstudio.com/docs/containers/quickstart-aspnet-core).

@gregg-miskelly  I'll give a try to wait for the debugger to be attached, thank you
@bwateratmsft Ok great, I felt alone with my use case, I'm glad it's referenced at Microsoft. Do you have any roadmap on it ?
Is it the same for other languages ? (Python, Node.js ... )
Thank you

@gregg-miskelly
It worked, thank you.

I'll use this method and get in touch for a solution supplied for VSCode

@bwateratmsft Ok great, I felt alone with my use case, I'm glad it's referenced at Microsoft. Do you have any roadmap on it ?
Is it the same for other languages ? (Python, Node.js ... )
Thank you

@NicolasReyDotNet Yes, we have debugging support for Python and Node.js in addition to .NET. For all three, there's a "simple" debugging experience that doesn't involve docker-compose--just F5 and go--and a "less simple" debugging experience that involves compose up'ing a docker-compose.debug.yml file (which we scaffold for you), and then using a remote attach configuration to attach a debugger. One could easily set a preLaunchTask in the launch config that would compose up the docker-compose.debug.yml, in order to avoid having to do that manually, and/or a postDebugTask to compose it back down (more on those options here).
Python simple: https://code.visualstudio.com/docs/containers/quickstart-python
Node simple: https://code.visualstudio.com/docs/containers/quickstart-node
.NET simple: https://code.visualstudio.com/docs/containers/quickstart-aspnet-core
docker-compose debugging (all three): https://code.visualstudio.com/docs/containers/docker-compose#_debug

@bwateratmsft thank you for your help, it's very clear. I'll follow this evolution with interest


Program looks like someone else is logging into my account

What is this? Running through linux btw.

The interesting part is I didn't get notified on my phone. Removed my steam guard and reset my password. Setup steam guard again and all is fine. Is this an indicator that someone else had access to my account? I had emails and phone verification and the account was accessible so I'm not sure if this was a bug or something else.

This is not me. Could be account be compromised?

This is not me. Could my account be compromised?

I believe that is an example picture to show you what the notification will look like on your mobile device with Steam Guard. I had the exact same picture when clicking the info button.

I ended up downloading depots manual. When it failed in the terminal I was very worried and went and updated my steam password XD thanks.

I ended up downloading depots manual. When it failed in the terminal I was very worried and went and updated my steam password XD thanks.

No problem, dealing with the OpenSSL issue right now good luck and mind the gap 😏

I ended up downloading depots manual. When it failed in the terminal I was very worried and went and updated my steam password XD thanks.

No problem, dealing with the OpenSSL issue right now good luck and mind the gap 😏

I had openSSL errors in terminal as well but had wayland crash. Try your luck with my method
https://github.com/Fallout-London/FOLON-FO4Downgrader/issues/9


Number of sent messages quota: Quota.Application

Readiness checklist

[x] I added/updated unit tests.
[ ] I added/updated integration tests.
[x] I ensured that the PR title is good enough for the changelog.
[x] I labeled the PR.

With the latest fixes to MetricStatus, we are back to the Transport tests tripping on that one test that fails most times, i.e., the other tests are now passing.

@tnotheis I have merged the target branch with main as well.


Fix CheckboxSetField's getOptions() $items creation

This change fixes a bug in framework/forms/CheckboxSetField.php's
getOptions() method that triggered warnings such as the following:
Warning at framework/forms/CheckboxSetField.php line 167: in_array()
expects parameter 2 to be array, object given (http://foo/admin/
pages/edit/EditForm/field/Dishes/item/416/edit)
This was due to $items being expected to always be an array, which didn't
hold true for the combination of $source being an Array and $values being
an instanceof SS_List object.

This is the patch from https://github.com/silverstripe/silverstripe-framework/issues/3777, this time as a pull request for easier merging.

Thanks @pief, the patch seems to make sense. It’d be good to get some test coverage for this: ideally a test for each of the different possible source/value combinations.

Yes, also a test that would have failed before this patch. Thanks.

I have no knowledge about writing SilverStripe test cases yet, but let me see if I can find an example.

@pief there are a ton of tests in the framework you can use as a starting point.
Start by looking at CheckboxSetFieldTest.php and adding a test function to that class that basically instantiates a CheckboxSetField that would have caused the unexpected behaviour you're solving here.

Hmm, the docs do explicitly state that if the options are an array then the values should be too. so this isn't a bug and is (in fact) intended functionality.

ASSUMPTION -> IF you pass your source as an array, you pass values as an array too. Likewise objects are handled the same.

Therefore, if this behaviour is to change in a BC way it needs to be against 3 branch

Well, in that case the docs (I assume you mean the comment at the top of CheckboxSetField.php) do not match the current code or vice versa, seeing that the current code explicitly tries to handle mixed cases.

I've been spending some more time tracking down how I actually hit this behavior. I'm still convinced that my patch is right, seeing that it implements the same behaviour as the current code, only in a simpler fashion. But your comment about the "documented behavior" made me curious if my own code is the culprit.
So I came up with the following example:

DailyMenuPage a ''Page'' that contains a GridView for
Dish DataObjects with a ''Many_Many'' relationship with
DishLabel

Now I can trigger the behavior if in Dish I rename DishLabels() to getDishLabels(). Then, Form's loadDataFrom() will get an Object of type ManyManyList which will be stored in the CheckboxSetField's $value property, causing the described situation in getOptions() later on.

Also, if I implement getDishlabels() like this:
	public function getDishLabels() {
		return $this->DishLabels()->map()->toArray();
	}

while I get no more error the checkboxes on the edit form do not get checked anymore. So apparantly it is expected to return a ManyManyList (that gets stored in CheckboxSetField's $value and thus picked up by getOptions()).

@pief - is this a contrived example or something which you've actually needed to do? I'm wondering if we are overcomplicating what will eventually become CheckboxSetField input validation rather than being in the getOptions method?

is this a contrived example or something which you've actually needed to do

Yes, I'm struggling to completely understand this and why it's a problem and how it's not working as expected.
Tests are somewhat essential to allowing us to understand and to demonstrate it's a real world problem.

If tests are a struggle, simply create a Gist with the code that causes an issue and I'll look at turning it into a test for you.

Well, naturally this was meant to be an easier, standalone example. The actual code I have at hand here is, of course, more complex: there is a Dish class and also a CustomDish class, but CustomDish is meant to exist within the database only. Dish has magic methods that regard the current subsite and do the linking to the appropriate CustomDish, which holds additional subsite-specific data -- in this case, the DishLabels.
So in the real world Dish's getDishLabels() actually determines the correct CustomDish and then calls out to CustomDish->DishLabels() and returns it.

So, CustomDish has the Many-Many-Relationship on DishLabel, CustomDish->DishLabels() returns a ManyManyList object and thus Dish->getDishLabels() does so as well.

@pief if you can devise the least complex example where this is a problem ,then that would be good

For a test case? Yes, I can probably come up with something, but so the use case is clear now? Basically any "virtual property" method getFoo() that calls out some other class' Many-Many-Relationship-imposed method Foo()?

@pief this needs rebasing and still requires some tests

This has probably been fixed in master, see https://github.com/silverstripe/silverstripe-framework/pull/4568.
Still worth fixing in 3.x


Read timeout

Hi, I've tested it several times and this Read timeout error occurred several times. The capturing job will quit while the stream is still live. I run the app in docker and here's a log of one of them:
2022-12-22 21:57:04 | automator.handle | INFO | Automator channel.update event for nadeshot
-- | -- | -- | --
2022-12-22 21:57:04 | automator.updateGame | INFO | Channel nadeshot not capturing, saving channel data to cache: Call of Duty: Warzone (☢Nukes (0/5 🏆) \| Warzone 2 with ??????)
2022-12-22 21:57:51 | hook | INFO | Hook called with message ID ******, version 1, type stream.online (retry 0, type notification, date 2022-12-22T13:57:50.610849649Z)
2022-12-22 21:57:51 | automator.handle | INFO | Automator stream.online event for nadeshot (retry 0)
2022-12-22 21:57:51 | automator.handle | INFO | nadeshot stream has ID<PHONE_NUMBER>1, started 2022-12-22T13:57:33Z
2022-12-22 21:57:51 | automator.download | ERROR | VOD ID already exists for nadeshot
2022-12-22 21:57:51 | channel | INFO | Create VOD JSON for nadeshot: nadeshot_2022-12-22T13_57_33Z_41637368331.json @ /usr/local/share/twitchautomator/data/storage/vods/nadeshot/nadeshot_2022-12-22T13_57_33Z_41637368331
2022-12-22 21:57:51 | vod.saveJSON | SUCCESS | Saving JSON of nadeshot_2022-12-22T13_57_33Z_41637368331 (create json)
2022-12-22 21:57:51 | vod | ERROR | No chapters on nadeshot_2022-12-22T13_57_33Z_41637368331!
2022-12-22 21:57:51 | vod.load | WARNING | Loaded VOD nadeshot_2022-12-22T13_57_33Z_41637368331 is not finalized!
2022-12-22 21:57:51 | vod.saveJSON | WARNING | Saving JSON of nadeshot_2022-12-22T13_57_33Z_41637368331 with no chapters!!
2022-12-22 21:57:51 | vod.saveJSON | SUCCESS | Saving JSON of nadeshot_2022-12-22T13_57_33Z_41637368331 (is_capturing set)
2022-12-22 21:57:51 | automator.download | INFO | Update game for nadeshot_2022-12-22T13_57_33Z_41637368331
2022-12-22 21:57:51 | automator.updateGame | SUCCESS | Channel data for nadeshot fetched from cache.
2022-12-22 21:57:51 | vod.addChapter | INFO | Adding chapter ☢Nukes (0/5 🏆) \| Warzone 2 with ?????? (Call of Duty: Warzone) to nadeshot_2022-12-22T13_57_33Z_41637368331
2022-12-22 21:57:51 | chapter | WARNING | No next chapter or vod end time for chapter ☢Nukes (0/5 🏆) \| Warzone 2 with ?????? (2022-12-22T13:57:04.146Z), duration will probably be 0.
2022-12-22 21:57:51 | vod.saveJSON | SUCCESS | Saving JSON of nadeshot_2022-12-22T13_57_33Z_41637368331 (game update)
2022-12-22 21:57:51 | automator.updateGame | SUCCESS | Stream updated on 'nadeshot' to 'Call of Duty: Warzone' (☢Nukes (0/5 🏆) \| Warzone 2 with ??????) using cache.
2022-12-22 21:57:51 | vod.saveJSON | SUCCESS | Saving JSON of nadeshot_2022-12-22T13_57_33Z_41637368331 (dt_capture_started set)
2022-12-22 21:57:51 | automator.captureVideo | INFO | Starting capture with filename nadeshot_2022-12-22T13_57_33Z_41637368331.ts
2022-12-22 21:57:51 | automator.captureVideo | SUCCESS | Spawned process 70 for capture_nadeshot_41637368331
2022-12-22 21:57:51 | job | INFO | Save job capture_nadeshot_41637368331 with PID 70 to /usr/local/share/twitchautomator/data/cache/pids/capture_nadeshot_41637368331.json
2022-12-22 21:57:56 | automator.captureVideo | INFO | Stream resolution for nadeshot_2022-12-22T13_57_33Z_41637368331: 1080p60
2022-12-22 21:57:56 | automator.captureVideo | INFO | Capturing of nadeshot_2022-12-22T13_57_33Z_41637368331, will try to remove ads!
2022-12-22 21:57:56 | automator.captureVideo | INFO | Streamlink now writing output to container.
2022-12-22 22:04:12 | automator.captureVideo | ERROR | Read timeout, exiting for nadeshot_2022-12-22T13_57_33Z_41637368331!
2022-12-22 22:04:12 | automator.captureVideo | INFO | Stream ended for nadeshot_2022-12-22T13_57_33Z_41637368331!
2022-12-22 22:04:12 | automator.captureVideo | INFO | Closing currently open stream for nadeshot_2022-12-22T13_57_33Z_41637368331!
2022-12-22 22:04:13 | automator.captureVideo | ERROR | Job capture_nadeshot_41637368331 exited with code 1, signal null

the fact that it doesn't output a few dozen chunk 404 errors is also pretty concerning

the fact that it doesn't output a few dozen chunk 404 errors is also pretty concerning. could you send the capture/streamlink log? you can censor stuff in there

Where can I find those logs? I used cloudflare to hide the real ip of my server, is this related?

they're in /data/logs/software/capture_*.log

they're in /data/logs/software/capture_*.log

nothing special, read timeout, I guess it's a network instability issue:
[cli][info] Found matching plugin twitch for URL https://twitch.tv/nadeshot
[cli][info] Available streams: audio_only, 160p (worst), 360p, 480p, 720p60, 1080p60 (best)
[cli][info] Opening stream: 1080p60 (hls)
[cli][info] Writing output to
/usr/local/share/twitchautomator/data/storage/vods/nadeshot/nadeshot_2022-12-22T13_57_33Z_41637368331/nadeshot_2022-12-22T13_57_33Z_41637368331.ts
[plugins.twitch][info] Will skip ad segments
error: Error when reading from stream: Read timeout, exiting
[cli][info] Stream ended
[cli][info] Closing currently open stream...

since the news about south korea limiting bandwidth for twitch, i got a suspicion there might be more restrictions placed around the world, but i don't have any claims for it
vpn won't work since the public url won't work, it will be an annoying issue to fix 🤔

Got it, then the issue becomes tricky. I'll do more tests.

it might be a lot for some troubleshooting, but if you install streamlink locally and run the command at the top of the log file on your own machine, adapted to local paths, could that change the outcome perhaps?

I do have a local installed streamlink and I'll try. Thanks!

so was it a local issue?

Should be a connection issue, I'll keep it running for several days to find.


ModelParallel not freeing gradInput cache

In AbstractParallel there is a _freeCaches that empties input/gradoutput/gradinput buffers :
https://github.com/facebook/fbcunn/blob/master/fbcunn/AbstractParallel.lua#L41-L45
In ModelParallel it explicitly doesn't free gradInput_gpu :
https://github.com/facebook/fbcunn/blob/master/fbcunn/ModelParallel.lua#L29-L32
I'm having issues when I do ( :float() / torch.save / torch.load / :cuda() ) on a ModelParallel : I cannot run it again after loading it because all gradInput_gpu tensors go to GPU 1 by default.
Is there any specific reason for having done that ?

Thank you for reporting this issue and appreciate your patience. We've  notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.


InternVideo2_chat_8B_HD cannot load llm properly?

I was trying to run this demo on the model card https://huggingface.co/OpenGVLab/InternVideo2_chat_8B_HD
yet I obtained the warning " Some weights of the model checkpoint at  my_local_model_path/ were not used when initializing InternVideo2_VideoChat2: ['lm.base_model.model.lm_head.weight', 'lm.base_m...“
and the output of the demo became all "<unk><unk>" in the end. I could not find anything that might cause this issue. Anyone got the same issue like this? how did you solve it?

If it is convenient, please tell me your version of peft. We recommend using 0.5.0

If it is convenient, please tell me your version of peft. We recommend using 0.5.0
Thanks for quick response!  yeah I was using peft 0.5.0, It might be because the path of pretrained models of bert. After I changed to local_dir then it worked like a charm! Thanks again!

Hey I am facing the same issue and the response is coming as null character? What did you change @sszzsupersupersupersuper ?
The code is mentioned below:
import os
try:
token =os.environ['HF_TOKEN']
except:
print("paste your hf token here!")
token = "entertoken"
os.environ['HF_TOKEN'] = token
import torch
import gradio as gr
from gradio.themes.utils import colors, fonts, sizes
from transformers import AutoTokenizer, AutoModel
========================================
Model Initialization
========================================
tokenizer =  AutoTokenizer.from_pretrained('OpenGVLab/InternVideo2-Chat-8B',
trust_remote_code=True,
use_fast=False,
token=token)
if torch.cuda.is_available():
model = AutoModel.from_pretrained(
'OpenGVLab/InternVideo2-Chat-8B',
torch_dtype=torch.bfloat16,
trust_remote_code=True).cuda()
else:
model = AutoModel.from_pretrained(
'OpenGVLab/InternVideo2-Chat-8B',
torch_dtype=torch.bfloat16,
trust_remote_code=True)
from decord import VideoReader, cpu
from PIL import Image
import numpy as np
import numpy as np
import decord
from decord import VideoReader, cpu
import torch.nn.functional as F
import torchvision.transforms as T
from torchvision.transforms import PILToTensor
from torchvision import transforms
from torchvision.transforms.functional import InterpolationMode
decord.bridge.set_bridge("torch")
========================================
Define Utils
========================================
def get_index(num_frames, num_segments):
seg_size = float(num_frames - 1) / num_segments
start = int(seg_size / 2)
offsets = np.array([
start + int(np.round(seg_size * idx)) for idx in range(num_segments)
])
return offsets
def load_video(video_path, num_segments=8, return_msg=False, resolution=224, hd_num=4, padding=False):
decord.bridge.set_bridge("torch")
vr = VideoReader(video_path, ctx=cpu(0), num_threads=1)
num_frames = len(vr)
frame_indices = get_index(num_frames, num_segments)
mean = (0.485, 0.456, 0.406)
std = (0.229, 0.224, 0.225)

transform = transforms.Compose([
    transforms.Lambda(lambda x: x.float().div(255.0)),
    transforms.Resize(224, interpolation=transforms.InterpolationMode.BICUBIC),
    transforms.CenterCrop(224),
    transforms.Normalize(mean, std)
])

frames = vr.get_batch(frame_indices)
frames = frames.permute(0, 3, 1, 2)
frames = transform(frames)

T_, C, H, W = frames.shape

if return_msg:
    fps = float(vr.get_avg_fps())
    sec = ", ".join([str(round(f / fps, 1)) for f in frame_indices])
    # " " should be added in the start and end
    msg = f"The video contains {len(frame_indices)} frames sampled at {sec} seconds."
    return frames, msg
else:
    return frames

video_path = "example1.mp4"
sample uniformly 8 frames from the video
video_tensor = load_video(video_path, num_segments=8, return_msg=False)
video_tensor = video_tensor.to(model.device)
chat_history= []
response, chat_history = model.chat(tokenizer, '', 'describe the action step by step.', media_type='video', media_tensor=video_tensor, chat_history= chat_history, return_history=True,generation_config={'do_sample':False})
print(response)
The video shows a woman performing yoga on a rooftop with a beautiful view of the mountains in the background. She starts by standing on her hands and knees, then moves into a downward dog position, and finally ends with a standing position. Throughout the video, she maintains a steady and fluid movement, focusing on her breath and alignment. The video is a great example of how yoga can be practiced in different environments and how it can be a great way to connect with nature and find inner peace.
response, chat_history = model.chat(tokenizer, '', 'What is man wearing', media_type='video', media_tensor=video_tensor, chat_history= chat_history, return_history=True,generation_config={'do_sample':False})
# The woman in the video is wearing a black tank top and grey yoga pants.
print(response)

@Divyanshupy Hi, Please check your peft version and make sure it is 0.5.0

Wow!! It worked like a charm. Thank you again for the great work!!

Thanks for quick response! yeah I was using peft 0.5.0, It might be because the path of pretrained models of bert. After I changed to local_dir then it worked like a charm! Thanks again!

I met the same problem, could you share how to change the bert path? I didn't find the bert path from the config files of the model.


Coordinate System Confusion

Hey,
So I'm having problems getting my brains to learn, and I am trying to double check if I am feeding falken position and location information properly. Based on this thread and the quoted comment from math_utils.h in hellofalken:
  // Falken uses 3D coordinates. We therefore interpret game 2D locations as
  // 3D positions on the XZ plane. We translate a HelloFalken angle into a
  // quaternion that specifies a rotation around the Y-axis. We need to
  // modify the angle in two ways before constructing the quaternion:
  // 1) We need to offset the angle by 90 degrees. This is because Falken
  //    assumes that an object at neutral orientation points towards the
  //    Z-axis, but an object at neutral orientation in HelloFalken points
  //    towards the X-axis.
  // 2) Falken uses a left-handed coordinate system, so rotations around the
  //    Y-axis are clockwise (when looking at the XZ plane from above). Since
  //    angles in HelloFalken are counter-clockwise, we need to negate the
  //    angle.

the falken service expects a left-handed axis with +y pointing out of the page, making +z downward while +x is to the left. My program uses a left-handed coordinate system with +z pointing out of the page, +y pointing up and +x pointing left. So to convert positions between the two seems simple, where I need to make an (x,y,z) in my program (x,z,-y) when I feed it to falken. The rotation thing is a bit more involved however, but I have the pitch, yaw, and roll for my player as defined relative to my axes, and since it is a left handed axis system where positive rotations around the out of the page axis increases in the clockwise direction, as expected by falken, I think converting these to a quaternion to feed to falken should work.
The use case is pretty simple, right now I am just trying to train an agent to steer toward a target, basically a reimplementation of HelloFalken in my program, but it keeps crashing on passing control to the brain because the brain isn't able to learn and outputs nans.
Am I missing something?

Hey Matt, can you try checking if the quaternion is NaN before sending observations to Falken and don't send if it is NaN and see if that works?

Can you hepl me woth my issue

https://github.com/google-research/falken/issues/27#issue-1050953480


Add list_locks

Closes #395
Because of #400 , it's not the cleanest PR ever, but the PR that will handle #400 will fix this.
Also, an ORM would definitely help.

Successful PR Checklist:

[x] Tests

[ ] (not applicable?)

[x] Documentation

[ ] (not applicable?)

👋 @elemoine

This looks great @ewjoachim. I just added a few comments that we may want to take into account.


Add release notes

This is to keep track of any updates on Z-Manager

\cc @bzz for review

Looks great to me, modulo minor nits above on formatting.

merging if no more discussion


TypeError: Cannot read property 'reuseInstances' of undefined

Hi,
I just updated to the latest acorn and tern from NPM, and I now get the following error
/usr/lib/node_modules/tern/lib/infer.js:388
      if (cx.parent && !cx.parent.options.reuseInstances) this.noReuse = true;
                                         ^
TypeError: Cannot read property 'reuseInstances' of undefined
    at Object.exports.IsCtor.constraint.addType (/usr/lib/node_modules/tern/lib/infer.js:388:42)
    at withWorklist (/usr/lib/node_modules/tern/lib/infer.js:772:21)
    at Object.extend.propagate (/usr/lib/node_modules/tern/lib/infer.js:90:25)
    at inferExprVisitor.NewExpression (/usr/lib/node_modules/tern/lib/infer.js:1126:14)
    at Object.NewExpression (/usr/lib/node_modules/tern/lib/infer.js:990:7)
    at infer (/usr/lib/node_modules/tern/lib/infer.js:1176:39)
    at Object.walk.make.VariableDeclaration (/usr/lib/node_modules/tern/lib/infer.js:1196:11)
    at c (/usr/lib/node_modules/acorn/dist/walk.js:82:35)
    at Object.skipThrough [as Statement] (/usr/lib/node_modules/acorn/dist/walk.js:180:3)
    at c (/usr/lib/node_modules/acorn/dist/walk.js:82:35)

It would appear to be triggered by the following code:
var infer = require("tern/lib/infer");

var defs = [{
  "OneWire": {
    "!type": "fn(pin: +Pin) -> ?",
    "!doc": "Create a software OneWire implementation on the given pin",
    "!url": "http://www.espruino.com/Reference#l_OneWire_OneWire"
  }
}];
var fileContents = 'var ow = new OneWire(A1);\n'+
'var sensor = require("DS18B20").connect(ow);\n'+
'setInterval(function() {\n'+
'  console.log(sensor.getTemp());\n'+
'}, 1000);';

var cx = new infer.Context(defs, this);
infer.withContext(cx, function() {
    var ast = infer.parse(fileContents);
    infer.analyze(ast, "myID");
});

I've stripped this back a bit, but running it triggers the problem. Removing defs makes it work.
This used to work before I updated tern/acorn - any ideas what I'm doing wrong? Has the format of  'defs' changed?
thanks!

Why are you passing the global scope object as parent argument to new infer.Context? That should either be null or a tern.Server instance. Remove that argument, and you should get better results.

Thanks, it's fine now.
Sorry for wasting your time. I'm not sure how that got there - I guess I probably copied it out of the server code (or similar) and missed the this.


python310Packages.sqlalchemy: 2.0.17 -> 2.0.18

https://github.com/sqlalchemy/sqlalchemy/releases/tag/rel_2_0_18
Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Uh, FYI lots of simple fallout from this, mainly in 9249f6008755


Remove LevelZero from Releases

I don't think we want to release that in it's current form, or even at all since it's only a component of our game

Additionally, our game isn't just level zero. Therefore it doesn't fit as a "release" which describes a working version of a game we envisioned


The pickup does not appear

I'm trying to create a pickup, but it doesn't show up in the game
Used code:

Values returned when creating the pickup:

Doesn't seem to be a problem
Do you create this object in GameMode's OnInit?
Are the characters in the same world and coordinates?
Remember, everything about the game should be done inside the callback event, not outside it.
Also, the I of modelid in your code should be lowercase, if not the font display problem.

There doesn't seem to be an issue.
Have you instantiated this object within the GameMode's OnInit function?
Are the characters located within the same virtual world and coordinates?
Please keep in mind that all game-related actions should be performed within the callback event, and not outside of it.
Additionally, please note that the "I" in modelid should be lowercase
const gm = new GameMode();
gm.onInit = () => {
  new DynamicPickup({
    modelid: 19135,
    type: 1,
    x: 1536.8569,
    y: -1688.5819,
    z: 13.5469,
    streamdistance: 20,
    worldid: 0,
    interiorid: 0,
  }).create();
};

Solved, thank you.


Enums are all integer instead of string in v0.2.9

The last release has made all enum values show as number rather than string!
https://github.com/abelsilva/swaggerwcf/commit/f831753ec01077b2b7b1d26a1d5955a98a11bb8c.

WCF uses numbers, not strings


Bump stemcell to 621.29

What
In https://github.com/alphagov/paas-cf/pull/2197 we upgraded the stemcells to 621.23 but did not make the change in paas-bootstrap. We should keep stemcells in sync.
We were checking for the stemcell sha when raising this PR, and discovered that there were some CVE fixes in 621.29:

USN-4211-1
USN-4205-1
USN-4203-1
USN-4213-1
USN-4210-1
USN-4204-1

How to review
Code review
Check the pivotal network: https://docs.pivotal.io/platform/stemcells/stemcells.html
Who can review
Done as pair with @schmie

This works in my dev environment


Issue with fractions within the address number

example:
>>> import usaddress
>>> usaddress.tag('4422 1/4 Lincoln Ave, Los Angeles, CA, 90041')
(OrderedDict([('AddressNumber', u'4422'), ('StreetName', u'1/4 Lincoln'), ('StreetNamePostType', u'Ave'), ('PlaceName', u'Los Angeles'), ('StateName', u'CA'), ('ZipCode', u'90041')]), 'Street Address')

1/4 should actually part of the AddressNumber.

Good catch @wangzhixuan!
Our options for fixing this are similar to the ones I described in #152 – are you interested in either training a new model or providing us with some example addresses?

Might be worth detecting fractions as a feature:
https://github.com/datamade/usaddress/blob/master/usaddress/__init__.py#L247
On Wed, Dec 21, 2016 at 6:18 PM, Jean Cochrane<EMAIL_ADDRESS>wrote:

Good catch @wangzhixuan https://github.com/wangzhixuan!
Our options for fixing this are similar to the ones I described in #152
https://github.com/datamade/usaddress/issues/152 – are you interested
in either training a new model or providing us with some example addresses?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/datamade/usaddress/issues/151#issuecomment-268682801,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAgxbRmq0N1iKx4hSXkA2iJBVecfAZHxks5rKcG4gaJpZM4LTdgt
.

--
773.888.2718

@jeancochrane I would love to retrain the model then create a pull request. One more question, I remember I see somewhere in the document saying there needs to be 4-6 examples for each pattern, but I cannot find that specific part. Do these numbers (4-6 per pattern) looks reasonable to you?

Examples with fractions in the address name
"12006 1/4 Saticoy St, North Hollywood, CA 91605" "4128 3/4 Rowland Ave Apt C El Monte, CA 91731" "16003 1/4 Pioneer Blvd Unit 13B, Norwalk, CA 90650" "5015 3/4 Hayter Ave, Lakewood, CA 90712" "9092 3/4 E Las Tunas Dr, Temple City, CA 91780" "628 1/2 7th Ave, Newport, MN 55055"

Thanks @wangzhixuan!


Look into switching from imageio to openimageio

No apparent way to embed ICC color profiles with imageio API.

OIIO PyPi build seems to be WIP. Pillow/PIL is a bad fit for numerous reasons. Not seeing many better alternatives for a Python environment.


Unmarshaling errors for packed fields

protoc --decode-raw does not return any error, but golang/protobuf does.
Given the following message
message NinRepPackedNative {
  repeated double Field1 = 1 [packed = true];
  repeated float Field2 = 2 [packed = true];
  repeated int32 Field3 = 3 [packed = true];
  repeated int64 Field4 = 4 [packed = true];
  repeated uint32 Field5 = 5 [packed = true];
  repeated uint64 Field6 = 6 [packed = true];
  repeated sint32 Field7 = 7 [packed = true];
  repeated sint64 Field8 = 8 [packed = true];
  repeated fixed32 Field9 = 9 [packed = true];
  repeated sfixed32 Field10 = 10 [packed = true];
  repeated fixed64 Field11 = 11 [packed = true];
  repeated sfixed64 Field12 = 12 [packed = true];
  repeated bool Field13 = 13 [packed = true];
}

Given the following inputs
[]byte{0x6a, 0x16, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xb9, 0x30}

returns bad wiretype for Field4
[]byte{0x6a, 0x16, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0xf6, 0xfa, 0x30, 0x30, 0x30, 0xc1, 0xaf, 0xf5, 0x30, 0x30, 0x30, 0xcf, 0x30, 0x30, 0xb9, 0x30, 0x7a, 0xd, 0x30, 0x85, 0x30, 0xd3, 0x30, 0x30, 0x30, 0xa8, 0x30, 0xa7, 0x30, 0x30, 0x30}

returns unexpected eof
[]byte{0x6a, 0x16, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0xf6, 0xfa, 0x30, 0x30, 0x30, 0xc1, 0xaf, 0xf5, 0x30, 0x30, 0x30, 0xcf, 0x30, 0x30, 0xb9, 0x30, 0x7a, 0xd, 0x30, 0x85, 0x30, 0xd3, 0x30, 0x30, 0x30, 0x30, 0x27, 0x30, 0x30, 0x30, 0x30}

returns cant skip wiretype
These were found using go-fuzz @dvyukov
Using this fuzz test
https://github.com/gogo/fuzztests/tree/e62df375312286dd3e1e65abffef3a3407dcd6b0

Odd input 1. Field4 has tag 4, wire 2, which means its header should be 0x24. I don't see that byte anywhere. The first byte, 0x6a, is 13<<3|2, which is for Field13, followed by 0x16 (len=22), followed by 22 bytes. That should code into Field13, and nothing else. Are you sure proto.Unmarshal is saying bad wiretype for Field4?

Yes my generated code and protoc decode-raw decode those bytes into
&fuzztests.NinRepPackedNative{Field13: []bool{true, true, true, true, true, true, true, true, true, true, true, true, true, true},
		XXX_unrecognized:[]byte{0x7a, 0xd, 0x30, 0x85, 0x30, 0xd3, 0x30, 0x30, 0x30, 0x30, 0x27, 0x30, 0x30, 0x30, 0x30},
		}

, but the reflected/unsafe code returns this error
proto: bad wiretype for field fuzztests.NinRepPackedNative.Field4: got wiretype 7, want 0

I have those tests here and ready to go
https://github.com/gogo/protobuf/tree/master/test/fuzztests
Simply change the Makefile to go_out instead of gogofast_out and then enable the disabled tests

BadWireType
UnexpectedEOF
CantSkipWireType
They are written to expected an error, which is a bit weird, but I initially thought there was something wrong with my generated code.

The first input,
[]byte{0x6a, 0x16, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xb9, 0x30}

is valid. The Go code is incorrectly returning unexpected EOF. 0x6a is 13<<3|2 (field 13, with length-delimited data), followed by 0x16 (22 bytes), but only 21 values (the last is a two byte varint bool; stupid, but valid). dec_slice_packed_bool is at fault; it is counting the number of values it reads, not the number of bytes.

0c959e8 deals with dec_slice_packed_bool. I'll take a look at the next one now.

The second input ([]byte{0x6a, 0x16, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0xf6, 0xfa, 0x30, 0x30, 0x30, 0xc1, 0xaf, 0xf5, 0x30, 0x30, 0x30, 0xcf, 0x30, 0x30, 0xb9, 0x30, 0x7a, 0xd, 0x30, 0x85, 0x30, 0xd3, 0x30, 0x30, 0x30, 0xa8, 0x30, 0xa7, 0x30, 0x30, 0x30}) now parses without error. Its prefix was tripping the same bug in dec_slice_packed_bool.

The third input ([]byte{0x6a, 0x16, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0xf6, 0xfa, 0x30, 0x30, 0x30, 0xc1, 0xaf, 0xf5, 0x30, 0x30, 0x30, 0xcf, 0x30, 0x30, 0xb9, 0x30, 0x7a, 0xd, 0x30, 0x85, 0x30, 0xd3, 0x30, 0x30, 0x30, 0x30, 0x27, 0x30, 0x30, 0x30, 0x30}) now parses without error too, and I believe it was also tripping the dec_slice_packed_bool bug.
I think everything is fixed here. Thanks for the report!

My pleasure :)
Thanks go-fuzz @dvyukov
I suspect there is another bug where golang/protobuf is throwing away unrecognized bytes.
You should be able to reproduce it using some quick editing of my fuzztests Fuzz function.
Basically I think what happens is there is some unrecognised bytes and those bytes contain some error that jump you across the total buffer length.  All those bytes are thrown away.
Or you can wait a few months for when I get the time to do the inefficient varint detecting to properly catch those bugs.

fuzz tests for packed fields are looking good :+1:


3.0.0-beta9 ionic serve - TypeError: args.env.prompt is not a function

What version of the CLI are you using? Output of ionic --version
3.0.0-beta9
Short description of the problem:
$ ionic serve
TypeError: args.env.prompt is not a function
    at Object.<anonymous> (/Users/jorg/Documents/ADev/track4d/node_modules/@ionic/cli-plugin-ionic-angular/dist/serve.js:28:54)
    at Generator.next (<anonymous>)
    at /Users/jorg/Documents/ADev/track4d/node_modules/@ionic/cli-plugin-ionic-angular/dist/serve.js:7:71
    at __awaiter (/Users/jorg/Documents/ADev/track4d/node_modules/@ionic/cli-plugin-ionic-angular/dist/serve.js:3:12)
    at Object.serve (/Users/jorg/Documents/ADev/track4d/node_modules/@ionic/cli-plugin-ionic-angular/dist/serve.js:16:12)
    at Object.<anonymous> (/Users/jorg/Documents/ADev/track4d/node_modules/@ionic/cli-plugin-ionic-angular/dist/index.js:67:24)
    at Generator.next (<anonymous>)
    at /Users/jorg/Documents/ADev/track4d/node_modules/@ionic/cli-plugin-ionic-angular/dist/index.js:7:71
    at __awaiter (/Users/jorg/Documents/ADev/track4d/node_modules/@ionic/cli-plugin-ionic-angular/dist/index.js:3:12)
    at Hook.hooks.register [as callable] (/Users/jorg/Documents/ADev/track4d/node_modules/@ionic/cli-plugin-ionic-angular/dist/index.js:66:61)

What behavior are you expecting?
normal start
Steps to reproduce:

install beta9
run ionic server - received

ionic serve
[WARN] Locally installed CLI Plugin @ionic/cli-plugin-cordova has an update available! Please upgrade:
           npm install --save-dev @ionic/cli-plugin-cordova@beta

[WARN] Locally installed CLI Plugin @ionic/cli-plugin-ionic-angular has an update available! Please upgrade:
           npm install --save-dev @ionic/cli-plugin-ionic-angular@beta

did the updates above (installed the beta1)
tried to run ionic serve again

Post the output of ionic info below please
npm (global):
@ionic/cli-utils : 1.0.0-beta0
cordova          : 6.5.0
ionic            : 3.0.0-beta9

npm (local):
@ionic/app-scripts              : 1.3.5
@ionic/cli-plugin-cordova       : 1.0.0-beta1
@ionic/cli-plugin-ionic-angular : 1.0.0-beta1
Ionic Framework                 : ionic-angular 3.1.0

System:
Node       : v7.4.0
OS         : macOS Sierra
Xcode      : Xcode 8.3.1 Build version 8E1000a
ios-deploy : 1.9.1
ios-sim    : 5.0.13

ran
npm i -g @ionic/cli-utils@beta
with the result
<EMAIL_ADDRESS>and
UNMET PEER DEPENDENCY<EMAIL_ADDRESS>... but with the same result (ionic serve -> TypeError: args.env.prompt)

You'll also need to update the cli globally with npm i -g ionic@beta
I'm not sure why it didn't also notify you of that update. I will investigate tomorrow.

This is the root of the problem. We should've used dots for the beta versions, apparently. Won't be a problem going forward.
Let me know if you still are having issues.


$location's url is wrong when navigating backward

First, I want to point out that if I use ui-router v0.0.1 (long way to go), I do not have the problem :)
But I use v0.2.5 and I'm having issues with the $locationProvider while trying to handle navigation history in my SPA.
I have a page with a paginated grid. The URL is:
http://myserver/#/products
If I browse to page 2 of the Product list, the URL is:
http://myserver/#/products?pagingOptions[currentPage]=2
If I browse back to page 1, the URL is:
http://myserver/#/products?pagingOptions[currentPage]=1
Note that the $$absUrl property of the $location service matches the URL of the browser and the $$search property also contains the correct query parameters.
Now I browse to a different page, for example to edit a Product from my list. The URL becomes:
http://myserver/#/products/3/edit
And then I browse back to the list using the back button of the browser. Obviously, the URL becomes:
http://myserver/#/products?pagingOptions[currentPage]=1
However, in the $location service, the $$absUrl is not the one displayed in the browser ! Now the $$absUrl property is http://myserver/#/products. And the $$search property is empty !
What could be the reason(s) for this behaviour ?

https://gist.github.com/eddiemonge/f6a58169c2846731a1eb


modelChangedEvent Add triggered twice: on drag enter & drop

Hi! Awesome integration!
With a palette and a diagram where allowDrop is true, when the user drags a node from the palette onto the diagram, the add event is triggered twice. Once when the cursor enters the diagram and again on the drop.
function createDiagram(id) {
  const diagram = $(go.Diagram, id, {
    allowDrop: true, // permit accepting drag-and-drops
  })
 //...
}

Thanks for your feedback. I confirm the bug.
I will investigate...

why not trigger modelChangeEvent when transaction is finished?

There may be a way forward.
I just know that this part is a sensitive one. gojs events do not always work as expected.

Currently, I am pretty busy. But I plan to work on this issue as soon as possible.


Raylib not compiling on Windows x64

Hello,
Raylib not compiling on Windows x64.
To test I use this simple code:
#include <iostream>
extern "C"
{
      #include "raylib.h"
}

int main()
{

         SetTraceLogLevel(LOG_NONE);

         //-----------------------------------------
         int screenWidth = 800;
         int screenHeight = 450;

         InitWindow(screenWidth, screenHeight, "taylib");
         SetTargetFPS(60);
         //-----------------------------------------

         while (!WindowShouldClose())    // Detect window close button or ESC key
         {
             BeginDrawing();
             ClearBackground(RAYWHITE);
             EndDrawing();
             CloseWindow();
         }
}

Errors:
Error LNK2005 CloseWindow is already defined in user32.lib(USER32.dll)
Error LNK1169 Multiple defined symbol encountered - one or more Raylib

No release, no debug version on Windows 64 - Not compiles.
On x32 windows it compiles without problems.

You should link raylib.lib before other libraries.

I think there are two things here.
First, <iostream> is a C++ library, not a C library.  There is no point to having it n that sample.
Secondly, You don't  need the extern "C" around the use of raylib.h.  The raylib.h file is designed to be used properly from a C++ program and it provides any needed `extern "C" on detecting it is being included in a C++ compile.
Finally, what compiler are you using?
I compile all examples like yours using VC/C++ on a Windows x64 machine and targeting Windows x64 and it works just great.  I am not trying to pass you off with a "works for me."  I suggest the difference, if any, after fixing the source code is how you are doing the build.

You should link raylib.lib before other libraries.

This helped thanks. It's not clear why it worked on x32.

First, <iostream> is a C++ library, not a C library. There is no point to having it in that sample.

Why ? I need a standard C++ Iostream.
What difference does it make to you which header I connect?

Secondly, You don't need the extern "C" around the use of raylib.h. The raylib.h file is designed to be used properly from a C++ program and it provides any needed `extern "C" on detecting it is being included in a C++ compile.

Indeed it works. Thank you.

Finally, what compiler are you using? And what is the name of the file? Does it have a *.c name?
Visual Studio 2022.

PS: Ditch the SetTraceLogLevel() and move the CloseWindow(); outside the while loop :)
Oops, it's just a copy error. Actually CloseWindows is outside of the loop.

@JaydenSu There was no need for <iostream> in the example.  And if it as a C Language program, #include "stdio.h" would have been a better choice.  But you didn't need that either.
I presume, because you are using VS 2022, that your program has a *.cpp name.


How to Override onPreview

I want to override the button preview, So i'm trying override the method onPreview.
app.directive("markdowntextarea", ['$http', function ($http) {
    return {
        link: function (el_scope, element, attr) {
            element.markdown(
                {
                    autofocus: false,
                    savable: false,
                    onPreview: function (e) {
                        console.log('im here!!');
                        var previewContent = "preview";
                        if (e.isDirty()) {
                            var originalContent = e.getContent();
                            $http({
                                url: '/api/markdown/',
                                data: {"body": originalContent},
                                method: 'POST'
                            }).then(function successCallback(response) {
                                console.log(response.data.content);
                                previewContent = response.data.content; // set previewContent inside the callback
                            });
                        } else {
                            previewContent = "";
                        }
                        return previewContent;
                    },
                });
        }
    }
}]);

I'm not sure if I have some error or what, but always after I add some text and click preview button, i got the text "preview". Could you please let me know if is my mistake or if is something wrong here? Thanks

@J88G Your HTTP call was done asynchronously, thats why. I think you could use promise concept in Angular.


⚠ Bofrost.com has degraded performance

In 048451b, Bofrost.com (https://www.bofrost.com) experienced degraded performance:

HTTP code: 200
Response time: 2004 ms

Resolved: Bofrost.com performance has improved in 1ec496d.


error: the path "/opt/usi_csv/prediction/model_serving/usi_csv_kubernetes_deployment.yaml" does not exist`

... letsencryptcontainer letsencryptcontainer configmap/environment-configmap created deployment.apps/auth-deployment created service/auth-service created deployment.apps/ga-chp-deployment created service/ga-chp-service created deployment.apps/ga-chp-bq-deployment created service/ga-chp-bq-service created error: the path "/opt/usi_csv/prediction/model_serving/usi_csv_kubernetes_deployment.yaml" does not exist

tried this on 2 separate clouds. clean ubuntu 16.04 same result. Any ideas?

What model are you using?
Did you create the usi_csv folder?


Upgrade to Infinispan 14.0.9

Infinispan version should be the same as in Quarkus. Need to rollback


first pass at cart delete functionality

Manually added new code to avoid the bundle.js issue, so we can resolve it for good.


Raise proper exception when creating VLAN over IP over Infiniband

The IP over IB has no layer 2, so it cannot hold VLAN. We should raise NmstateValueError when desire state try to.

Can I try this one out?


Cannot run local

When trying to run the API-Portal locally, I am getting the following error:

Hi @AndersLindPedersen, thank you for reporting the issue, we'll fix that. However, it should not really be blocking the work of the portal.

Hi @azaslonov - nope not blocked by this, just a heads-up. ;)

Ran locally as mentioned in the documentation : https://github.com/Azure/API-Portal/wiki, but getting the error:
ERROR in ./node_modules/routing-controllers/esm2015/ActionParameterHandler.js
Module not found: Error: Can't resolve 'class-validator' in '/Users/sudheerkumar/Documents/DAC/Code/GitHub/API-Portal/catalog/node_modules/routing-controllers/esm2015'
@ ./node_modules/routing-controllers/esm2015/ActionParameterHandler.js 2:0-63 200:19-27
@ ./node_modules/routing-controllers/esm2015/RoutingControllers.js
@ ./node_modules/routing-controllers/esm2015/index.js
@ ./src/startup.host.ts
@ multi ./src/startup.host.ts
Node version : 14.17.4

@cvsudheer108, I just tried to repro with fresh bit from scratch, but it works fine for me. You did npm install before running the project, right?


Secure boot and flash encryption complete process on fresh device for production. (IDFGH-5137)

Hi,
How do I create the production grade device using flash encryption, secure boot, using host generated flash encryption key, secure boot signing key and secure bootloader digest. Also what are the efuse bits i need to burn and protect in order for UART access disable and bootloader locking.
Thanks

Thanks for reporting. Would you please help provide more details as suggested in the issue template? Information like elf, sdk configuration, backtrace, log outputs, commit ID, hardware and etc. would help us debug further. Thanks.

Hi,
I have resolved my queries about the process in other thread. Thanks to @projectgus .

can you share the link for the other thread? thanks

Here it is... 6916


Enhancement: A fallback image should display instead of error image loading

fallback-src does't work.


Question: How is Cocoapods Rome different than Cocoapods-Packager?

They are clearly related. Cocoapods-packager can  also create dynamic libraries.
What are the specific differences and reasons to use one instead of the other?

The idea of the packager is to create a single binary, which vendors all its dependencies, so that people can offer a compiled version of their Pod. In contrast to that, Rome builds each Pod individually for manual integration into your own project.

Sorry for waking up an old issue.
@neonichu
I'm using cocoapods with use_frameworks activates(we use swift)
But could I use rome to wrap all pods, which my project depends on but can't install with cocoapods because of transitive dependencies that include static binaries, in a dinamyc framework?


fix: handle all IPv4 addresses case

[x] This is a bugfix
[ ] This is a new feature
[ ] This is a code refactor
[ ] This is a test update
[ ] This is a typo fix
[ ] This is a metadata update

For Bugs and Features; did you add new tests?
Can't found how do this :confused:
Motivation / Use-Case

Breaking Changes
no
Additional Info
When we use host: <IP_ADDRESS> web socket client should use window.location.hostname to connect to right host.

Also related: shouldn't it be possible to set a different server and client host via the host option?

@shellscape this bug occurs only when you run webpack-serve on remote host.
Step:

Create any working repo.
Set host: <IP_ADDRESS> for hot option in webpack-serve.
Open browser.

Also related: shouldn't it be possible to set a different server and client host via the host option?

It is not possible because i can access to dev server using <IP_ADDRESS>, <IP_ADDRESS> or other public IP (example <IP_ADDRESS>). In webpack-dev-server it is do sockjs automatically. Now we use Websocket package directly and need do this.

@shellscape when i use <IP_ADDRESS> i don't know publicHost because we use kubernetes for fast developing and testing and it is always difference internal public IP (for one developer it is <IP_ADDRESS>, for other <IP_ADDRESS>).

@evilebottnawi sorry, can't quite understand that last message

@shellscape i migrate from <IP_ADDRESS> to using internal-ip and public-ip packages to set host value.


Uncertainties in the indicators

Given the uncertainties on the RVs, RVerr, the uncertainties in the indicators are

for the FWHM, 2.35 * RVerr
for the BIS, 2 * RVerr

done!


Implement the evolutionary algorithm

Looks like you can't really test this, so this looks good! Thanks :)


Tab Background Color

how can I change the background color in your library?! there is no example and it's always matches with primary color...
will be appreciated if you can help me out.
Best Regards

android:background="@color/your_color" This will give you the same background color for all tabs.

@freundyotam How to set ColorStateList to the background of all tabs?  Thanks!


Clean up unneeded dependencies

This PR removes:

babel-core - this is contained inside babel, we don't need it
karma - We don't need a browser
jsx-loader - was only needed for karma
babel-loader - was unused, it would have replaced jsx-loader

master 18 seconds
asa@asa ~/repos/react-a11y % time npm test

><EMAIL_ADDRESS>test /home/asa/repos/react-a11y
> jsxhint . && karma start --single-run

INFO [karma]: Karma v0.12.31 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 43.0.2357 (Linux)]: Connected on socket xQ-a7VuPn6Wy7ZPHnjm_ with id 55189116
.........................
Chrome 43.0.2357 (Linux): Executed 25 of 25 SUCCESS (0.02 secs / 0.011 secs)
npm test  17.67s user 0.98s system 117% cpu 15.874 total

clean-dependencies 3 seconds
asa@asa ~/repos/react-a11y % time npm test

><EMAIL_ADDRESS>test /home/asa/repos/react-a11y
> jsxhint . && mocha  --compilers js:babel/register lib/__tests__

  props
    onClick
      ✓ warns without role
      ✓ does not warn with role
      labels
        ✓ warns if there is no label of any sort
        ✓ does not warn if onClick is null
        ✓ does not warn if onClick is undefined
        ✓ does not warn if there is an aria-label
        ✓ does not warn if there is an aria-labelled-by
        ✓ does not warn if there are text node children
        ✓ does not warn if there are deeply nested text node children
        ✓ does not error if there are undefined children
        ✓ does not error if there are null children
        ✓ does not warn if there is an image with an alt attribute
        ✓ warns if there is an image with an empty alt attribute
      when role="button"
        ✓ requires onKeyDown
        ✓ requires onKeyDown
    tabIndex
      when element is not interactive
        ✓ warns without tabIndex
        ✓ does not warn when tabIndex is present
        ✓ does not warn when tabIndex is present
      when element is interactive
        ✓ does not warn about tabIndex with a[href]
        ✓ does not warn about buttons

  tags
    img
      ✓ requires alt attributes
      ✓ ignores proper alt attributes
      ✓ dissallows the word "image" in the alt attribute
    a
      with [href="#"]
        ✓ warns
      with a real href
        ✓ does not warn

  25 passing (22ms)

npm test  2.80s user 0.15s system 101% cpu 2.904 total


Deprecate kyma provision k3d command

Description
Changes proposed in this pull request:

Deprecate kyma provision k3d command

Related issue(s)

https://github.com/kyma-project/kyma/issues/18652

/retest


iMessage crashes when recording a voice message

{"blame":[],"app_name":"MobileSMS","timestamp":"2019-03-04 23:07:58.79 ….pdf
Crash log
Bug exists on Unc0ver 3.0.0 b40

No tweaks are installed


Integrate DataManager with coordinates (8 man days)

A couple of gotchas to consider while integrating the DataManager.

Printing an AuxCoord realises a lazy points array. What's hard to determine is whether this is desirable behaviour or not: on the one hand, if I print a coord I want to see what its points are; but on the other hand a print operation should not affect the underlying state of the object being printed! For example:

>>> ldc = iris.coords.AuxCoord(as_lazy_data(np.array([1, 2, 3]), units='m')
>>> is_lazy_data(ldc._points)
True
>>> print ldc
AuxCoord(array([1, 2, 3]), standard_name=None, units=Unit('m'))
>>> is_lazy_data(ldc._points)
False

A DimCoord does not preserve a lazy points array at all. It seems that we have this line to thank for this. For example:

>>> dldc = iris.coords.DimCoord(as_lazy_data(np.array([1, 2, 3]), standard_name='height', units='m')
>>> is_lazy_data(dldc._points)
False

My views on these (for the record, already discussed offline)

Printing an AuxCoord realises a lazy points array
... a print operation should not affect the underlying state of the object

I think it's acceptable.
Our whole conception of 'lazy' data is that it is transient and the "real" content of a Cube (or Coord, now) is the "real" data.  Thus, when you need the data you realise it and "the lazy" is gone, but the essential object content is unchanged, because that data "is" the true state of the object.
Thus, the 'lazy' aspect has to be seen as a kind-of internal concept -- even though it is not actually hidden or private.

A DimCoord does not preserve a lazy points array at all.

Given the monotonic requirement, I think this it is simply unavoidable.
We could instead load the data, make the test, throw it away + keep it lazy.
However, I'm really not in favour of that, as it is against the spirit of "touch once and it's gone" which is a nice straightforward model of the behaviour.

@pp-mo some helpful views, thanks! I think we might just need to be careful about when we print coords if we need (for some reason) to maintain lazy coord data...

For reference, the PR for this is #2527.

This is done now that #2527 is merged!


Segmentation Fault problems on OS X

Hi,
I am having issues with Segmentation Faults when running on OS X, it's the same issue as mentioned here: https://stackoverflow.com/questions/32978429/python-luigi-died-unexpectedly-with-exit-code-11
I run the task simply, with no additional workers, etc.:
PYTHONPATH="." luigi --module tasks TaskName --date 2018-07-13 --local-scheduler

But then fails:
2018-07-13 19:25:02 - Task SubTask_2018_07_13_23988_12796bfc6b died unexpectedly with exit code -11
INFO: Task SubTask_2018_07_13_23988_12796bfc6b died unexpectedly with exit code -11

By adding some debug lines, it seems the issue is making a POST request with the requests module:
req = requests.post(... )

Strangely it works fine on our Ubuntu server - exactly the same task files and dependencies.
This is driving me crazy, so it'd be great if anyone has any ideas of how to better debug it. ipdb doesn't work, as it seems it must be running in a subprocess or something.
The only thing unusual is the warning at the start of running the task, which only appears on OS X:
/Users/jamesmcm/anaconda3/lib/python3.6/site-packages/luigi/parameter.py:261: UserWarning: Parameter "task_process_context" with value "None" is not of type string.
  warnings.warn('Parameter "{}" with value "{}" is not of type string.'.format(param_name, param_value))

I see the same but as ERROR log:
ERROR:root:/usr/lib/python3.6/site-packages/luigi/parameter.py:261: UserWarning: Parameter "task_process_context" with value "None" is not of type string.

 Could you consider to create a PR on this repo?

Nice, but I doubt that's the issue causing the segfaults. Nevertheless, I'll try with that patch next week.

@jamesmcm You're right my commit was unrelated to the segmentation faults but I came across this issue because I was receiving the same warning. (Didn't know referencing the issue number in my repository would include me in this comment! Was surprised haha). To me allowing the default value seems sensible (though perhaps the constructor of the Parameter should ensure that the default is parse(serialize(_default)) == _default or otherwise the user could have accidently provided an incompatible default...)

I see the same as UserWarning on CentOS 7.3 and Python 2.7.5.
/usr/lib/python2.7/site-packages/luigi/parameter.py:261: UserWarning: Parameter "task_process_context" with value "None" is not of type string.
  warnings.warn('Parameter "{}" with value "{}" is not of type string.'.format(param_name, param_value))

I am seeing the same thing. I'm using a Ubuntu 18.04 docker container.
/miniconda3/lib/python3.6/site-packages/luigi/parameter.py:284: UserWarning: Parameter "task_process_context" with value "None" is not of type string.
  warnings.warn('Parameter "{}" with value "{}" is not of type string.'.format(param_name, param_value))

Regarding the segmentation faults, I think this happens on Mac OSX when forked threads call _scproxy.so, triggering dispatchlib, which is not fork safe.
A possible workaround is calling Luigi using an environment with no_proxy set to '*'.


[releases/24.x][Copilot] Backport of update to function calling

Summary
Backports of PRs
#882
#928
#945
#719
#1037
Work Item(s)
Fixes AB#493212

Do not merge just yet

BaseApp/Firstparty uptake succeeds, merging and uptaking internal PR.


FY23Q4 content refresh

run through all exercise steps in associated MSLearn module to validate good working order
updated steps & fixed typos where necessary
updated slides where necessary
update code samples to reflect MSLearn HOL exercise refresh & updates
any & all users/names/company names/pictures/IDs are not real people/tenants... all are from M365 demo tenants provided by Microsoft

NOTE: supersedes #62

Awesome - thanks for the updates! 👏🚀


Blank screen displayed for Test Java Source

I have downloaded the JAR and Kept in Java class path. For the Test Java source, I got the below console output and in Swing component shows blank screen
ant -f C:\Users\589103\Documents\NetBeansProjects\test -Dnb.internal.action.name=run.single -Djavac.includes=test/Test.java -Drun.class=test.Test run-single
init:
Deleting: C:\Users\589103\Documents\NetBeansProjects\test\build\built-jar.properties
deps-jar:
Updating property file: C:\Users\589103\Documents\NetBeansProjects\test\build\built-jar.properties
Compiling 1 source file to C:\Users\589103\Documents\NetBeansProjects\test\build\classes
compile-single:
run-single:
[12:36:48.981][main/INFO ] #
[12:36:48.983][main/INFO ] # Launching Pandomium 67.0.4
[12:36:48.983][main/INFO ] # Chromium Version: 67.0.3396.62
[12:36:48.983][main/INFO ] # CEF Version: 3.3396.1775.g5340bb0
[12:36:48.983][main/INFO ] #
[12:36:48.984][main/INFO ] Progress: 0%
WARNING: An illegal reflective access operation has occurred
[12:36:48.989][main/INFO ] Progress: 100%
WARNING: Illegal reflective access by org.panda_lang.pandomium.util.SystemUtils (file:/C:/Users/589103/Downloads/pandomium-67.0.4.jar) to field java.lang.ClassLoader.sys_paths
WARNING: Please consider reporting this to the maintainers of org.panda_lang.pandomium.util.SystemUtils
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
initialize on Thread[AWT-EventQueue-0,6,main] with library path C:\Users\589103\Documents\NetBeansProjects\test\natives
[0201/123649.416:ERROR:gpu_process_transport_factory.cc(1027)] Lost UI shared context.
Please help

Use Java 8, jcef doesn't support higher versions


Question: external dependencies

Hello,
Is this project relying on some externally fetched data like:

images,
iframes,
api?

Literally anything? I keep searching for email builder that does not wrap things into one big iframe or contacts external api to work. Is this full "self-hosted", not relying on anything from outside?

Actually I found out quickly that it does rely on external services:

qiniu.com

Which handles the files upload.
Would that be possible for You to list the known cases where such cases as that are present?

Not have any external services. This is just an example and you need to use your backend service to upload images.
https://github.com/arco-design/easy-email/blob/master/demo/src/pages/Editor/index.tsx#L133-L141

Great.
That solves it then. Thx.


publish docker images to quay.io as well

see https://github.com/jupyterhub/repo2docker-action#push-image-to-quayio
but we want to push these to both dockerhub and quay and possibly others in the future so we'll use this https://github.com/marketplace/actions/push-to-registry
to do this manually:
docker login quay.io
#Username: ROBOT USER NAME
#Password:  ROBOT ACCESS TOKEN
docker tag uwhackweek/template:latest  quay.io/uwhackweek/template:latest
docker push quay.io/uwhackweek/template:latest

to do this manually:
docker login quay.io
#Username: ROBOT USER NAME
#Password:  ROBOT ACCESS TOKEN
docker tag uwhackweek/template:latest  quay.io/uwhackweek/template:latest
docker push quay.io/uwhackweek/template:latest

Just a note that I followed this PR with some commits to get things working, the final step configuration looks like this:
    - name: Also Push To quay.io
      id: push-to-quay
      uses: redhat-actions/push-to-registry@v2
      with:
        image: ${{ env.DOCKER_IMAGE }}
        tags: ${{ steps.calver.outputs.version }}
        registry: quay.io
        username: ${{ secrets.QUAY_USERNAME }}
        password: ${{ secrets.QUAY_PASSWORD }}


Reinstate compute_newOutcome on exit-format-trunk

https://github.com/statechannels/statechannels/pull/3736/commits/61b01068dd371b8c723f9008fa2efca390d02df1
:question: Which events should be emitted by claim?

computeNewOutcome is consumed by the server-wallet package (used in the chain-service) and is used by clients to update their accounting of the current on-chain outcome and holdings. It is part of funds recovery in the unhappy case:

Channel between A and B breaks down (say, A has gone offline)
B challenges, waits for the timeout, and then transfers available assets
After A comes back online, the connection with B is lost. Recovering the funds available on chain requires providing the current on chain outcome, which A does not know

computeNewOutcome relies on A combing knowledge of the prior outcome with on-chain transaction history of the NitroAdjudicator contract. B's transfer of funds emits event logs with sufficient information for A to calculate the updated state.
Desired properties:

logging information sufficient to guarantee that other channel participants can reconstruct the current outcome
logging as little information as possible, resulting in the smallest possible gas fees

I think the problem also happens in the happy case

A and B conclude their channel collaboratively
A calls transfer with indices != [], paying out just her part of the outcome (she wants to save a bit of gas)
the outcome changes on chain but B can only read the fingerprint of the new outcome, not the full outcome
B needs to compute that new outcome to get her transfer to work.

I think the case you described highlights another issue where a client may not have the first outcome that gets recorded on chain. To get that, they may need to listen for ChallengeRegistered events and Concluded events. Of course they may also have some of this information off chain, too.

As I understand it:
Wallet event-listening setup
A non-exhaustive search (based mostly on grepping for .on event subscriptions on ethers provider or contract objects) suggests that event listening is currently implemented in server-wallet, and not in wallet-core or browser-wallet.
Events subscriptions live in the constructor for the chain service (src/chain-service/chain-service.ts). Subscriptions include:

block events (on the provider)
Concluded and ChallengeRegistered events on the nitroAdjudicator contract
asset-management specific events, via listenForAssetEvents

listenForAssetEvents applies no filter to incoming events, so the listener will be triggered by events from all channels. Owing to the recent removal of separate AssetHolder contracts, it will also be triggered by other NitroAdjudicator events. Instead, events are filtered in the onAssetEvent function, which switches on event types (Depositied, AllocationUpdated), and then further filtered against the chain service's internal list of channels-to-watch via the channelToEventTrackers map. These event-trackers are responsible for updating the wallet's "understainding" of each channel's current state.
:exclamation: Unless I'm mistaken, a side effect of this listening / filtering strategy is that the vast majority of events observed by the server wallet will either end up logged as Unexpected event ${ethersEvent} (all Conclude or Challenge events that happen on the adjudicator, for all channels), or discarded as not relevent to this wallet (which is fine, and likely no different than what ethers does under the hood when filters are supplied to the event listener).
:exclamation: As I read it, server-wallet is attempting to computeNewAllocation on every AllocationUpdated event logged by the adjudicator, instead of only computing for channels that the wallet has an interest in. IE, computeNewAllocation is performed before the cross check against registered channelIds
Previous claim workflow
(circa May 19, 4f0def9fe640dceeb778dc66bb03a9d491077dbc, chosen randomly)

call claim using the guarantor channel Id, guarantee bytes, allocationBytes from the target channel, and target payee indices from the target channel
claim would:

calculate a new outcome for the target channel by applying its holdings and priority order against the target channel outcome in order to construct an array of payouts
update the target channel outcome (or delete it if the channel outcome is all zeros)
execute these payouts (either as transfers to addresses or as holdings bumps to channels
emit AllocationUpdated(guarantorChannelId, guarantorChannelInitialHoldigs)

This is a slight abuse of notation! The guarantor channel's allocation (ie, the guarantee) was not actually changed along the way - only its holdings. In any case, the emitted event provides a listening wallet with:

the id and previous holdings of the guarantor channel
the target outcomeBytes at the time of the claim operation (from calldata)
the payout indices (from calldata)

... which is enough for the wallet to calculate the updated outcome at the target channel using the same logic as in _claim.
:question: (from conversation w/ Andrew yesterday afternoon). If Alice is calling claim via the Alice-Ingrid guarantor channel, how is Bob notified? Catching this emitted event requires that Bob can recognize the channelId of the A-I guarantor channel, but he cannot compute this id independently. Is there a prefund step that involves exchange of guarantor channel ids?


[YUNIKORN-1809] Fix queue config doc to not to use fraction in resour…

…ce spec
What is this PR for?
A few sentences describing the overall goals of the pull request's commits.
First time? Check out the contributing guide - http://yunikorn.apache.org/community/how_to_contribute
What type of PR is it?

[ ] - Bug Fix
[x] - Improvement
[ ] - Feature
[x] - Documentation
[ ] - Hot Fix
[ ] - Refactoring

Todos

[ ] - Task

What is the Jira issue?
https://issues.apache.org/jira/browse/YUNIKORN-1809
Fix queue config doc to not to use fraction in resource spec
How should this be tested?
I tested it with local doc build
Screenshots (if appropriate)
Questions:

[ ] - The licenses files need update.
[ ] - There is breaking changes for older versions.
[ ] - It needs documentation.

@yzhangal in the future, please do fill out the issue template (including the link back to the JIRA issue). This makes it much easier to review PRs as we can navigate back easily to the original issue.

@yzhangal, please do fill out the issue template (including the link back to the JIRA issue). This makes it much easier to review PRs as we can navigate back easily to the original issue.

Done, thanks


Remove console messages

Describe the bug
There are console.log messages getting displayed on the browser console tab which are not required and also not a good practice.
To Reproduce
Steps to reproduce the behavior:

Go to 'Sign up page' or 'Home page'
We can see them on the console tab

Expected behavior
Remove all the unnecessary console.log messages from the code
Screenshots

Please assign me this issue so that I can work on this issue under GSSOC'23.

Tell me after doing the assigned issues then I will reopen this issue for you

Tell me after doing the assigned issues then I will reopen this issue for you

Ok

@SurajPratap10, I have completed all the other issues assigned to me so could you reopen this issue.


tuf/api: Expose tuf.api as a package

This just adds tuf/api/__init__.py, turning it into a full package for distribution purposes.

[x] The code follows the Code Style Guidelines
[N/A] Tests have been added for the bug fix or new feature
[N/A] Docs have been added for the bug fix or new feature

Amusingly this now breaks the CI, since tuf.api is now correctly discovered and linted 😉

According to the pylintrc docs

If the current working directory is in a Python module, Pylint searches up the hierarchy of Python modules until it finds a pylintrc file. This allows you to specify coding standards on a module-by-module basis. Of course, a directory is judged to be a Python module if it contains an init.py file.

I think we could add a pylintrc in tuf/api to support the style there?

I think we could add a pylintrc in tuf/api to support the style there?

That's actually a really good idea. The linter configuration would need a redo anyway even without style guide change (see https://github.com/in-toto/in-toto/pull/296#issue-297658607, which also applies here). But I'm reluctant to change the default pylintrc as it would require many fixes in code that won't survive the upcoming refactor.
If we create a new config in tuf/api we can use it for new code only and make it the default later. :)

I've taken this change to a new PR which also adds a linter for tuf/api https://github.com/theupdateframework/tuf/pull/1177


Improve Intel SGX SDK Attestation Sample

Purpose

I was trying out the Intel SGX based SDK attestation sample, and had to do multiple changes to the steps which are currently mentioned for quote generation and quote validation. Creating this PR with changes I had to do in the steps to make it work, to help in easing the consumption of this sample by others in future.
Following is the summary of all the changes in this PR,

Adding more packages which are required to be installed

Without these various related errors are observed at various steps

Adding details about installing Azure DCAP

Otherwise PCCS is tried to be contacted instead of Azure THIM

Add instruction about performing Azure login using Azure CLI which is required for the Quote verification step
Changing the sample quote validation code

This change is as suggested by a related issue in azure-sdk-for-net (https://github.com/Azure/azure-sdk-for-net/issues/17052#issuecomment-729998843)
Without this change, quote validation step was not going through

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type
What kind of change does this Pull Request introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[x] Documentation content changes
[ ] Other... Please describe:

How to Test

Test the code

Follow the instructions in the Intel SGX SDK based Attestation Sample

Other Information
This was observed and tested on a Intel SGX based Azure VM with Ubuntu 20.04 as the Operating System

@microsoft-github-policy-service agree


Added sling project.

Thanks!
You may want to rename the .babel file to a .nimble file :)

Will do!


Not working everywhere, is there anything wrong?

// test.mjs
import { createWorker } from 'await-sync';

const awaitSync = createWorker();

const sync = awaitSync(async () => {
  return new Uint8Array();
});

console.log(sync());

Node.js:
node:internal/errors:490
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_WORKER_INVALID_EXEC_ARGV]: Initiated Worker with invalid execArgv flags: --import
    at new NodeError (node:internal/errors:399:5)
    at new Worker (node:internal/worker:202:13)
    at #loadModule (file:///Users/JounQin/Workspaces/Study/worker-study/node_modules/whatwg-worker/node-worker.js:96:20)
    at new Worker (file:///Users/JounQin/Workspaces/Study/worker-study/node_modules/whatwg-worker/node-worker.js:49:21)
    at createWorker (file:///Users/JounQin/Workspaces/Study/worker-study/node_modules/await-sync/mod.js:14:18)
    at file:///Users/JounQin/Workspaces/Study/worker-study/test.mjs:3:19 {
  code: 'ERR_WORKER_INVALID_EXEC_ARGV'
}

Bun.js:
1 | export default Worker;
                  ^
ReferenceError: Can't find variable: Worker
      at /Users/JounQin/Workspaces/Study/worker-study/node_modules/.deno/whatwg-worker@1.0.1/node_modules/whatwg-worker/browser-worker.js:1:15

Deno
error: Uncaught (in worker "") TypeError: Could not resolve 'blob:null/a1a3f86f-a252-4652-8491-8eac3194ed14' from<EMAIL_ADDRESS>  Caused by:
    [ERR_UNSUPPORTED_ESM_URL_SCHEME] Only file and data URLS are supported by the default ESM loader. Received protocol 'blob'
    at async file:///Users/JounQin/Workspaces/Study/worker-study/node_modules/.deno/await-sync@1.0.0/node_modules/await-sync/worker.js:29:27

Hmm, darn...
i tested this in NodeJS v19 and it worked out just fine. and now when i went back to test it out in a newer version (v20) it didn't work anymore...
To answer your issues:
Node.js:
Initiated Worker with invalid execArgv flags: --import
it seems like the NodeJS version you tested this on are a bit older, as it didn't have support for it.
to help out you better i would need to know which NodeJS version you use.
Bun.js:
Hmm, seems like there are bigger issues here...
deno don't have postMessage, MessageChannel, BroadcastChannel, web worker or even support for NodeJS worker_threads
so this package will likely not even work in bun.js until they implement something
i have never actually really tested out bun.js before until today.
deno
hmm, 🤔
i remember having seen the error ERR_UNSUPPORTED_ESM_URL_SCHEME before in a unrelated project
and it's coming from NodeJS. and it sure was coming from NodeJS, so i don't know how you got this error message.
i have actually tested this package out in deno by running:deno run test/spec.js and it runs just fine.
i have tested loading this via some CDN... some fails by trying to mess around with trying to convert every package to esm.

jspm fails, created an issue for it here: https://github.com/jspm/jspm-core/issues/82
jsdeliver don't even list my new package, but the cdn works regardless from https://cdn.jsdelivr.net/npm/await-sync/mod.js just using https://cdn.jsdelivr.net/npm/await-sync cuz of the same reason as jspm. i think it would be better if it tried to redirect to the main file instead.
esm.sh dose actually a good job correctly.

so maybe try this out in deno:
import { createWorker } from<EMAIL_ADDRESS>
onst awaitSync = createWorker();

const sync = awaitSync(async () => {
  return new Uint8Array();
});

console.log(sync());

it seems like the NodeJS version you tested this on are a bit older, as it didn't have support for it.
to help out you better i would need to know which NodeJS version you use.

I'm using v18.16.0

On Node 19, it works a bit unexpectedly:

Hmm 🤔
That is weird. i guess what happens is:
that console logs in worker_threads aren't really logged to the terminal in the workers. I suppose the main threads just reads the stdout from another process and then main thread just pipe the worker.stdout via a stream to the main process. and that streams uses some next event loop stuff internally. so:

the main threads creates a worker and pipes the worker.stdout to it's own process.stdout in the main thread
the main thread freezes (gets blocked). so nothing can ever be logged. i notice this when i tried to debug/log stuff when the main thread was frozen and got nothing back. had to use the file reader to dump logs to a file instead...
the main thread unfreeze and continue running console.log(sync()) where it left of.
then process.stdout.write() gets called afterwards

I'm going to put in some investigation into trying to get it to work on older and newer nodejs versions.
it kind of is in beta stage ATM. haven't really had much time testing this package out much yet. it's relative new.
I wanted my whatwg-worker to support importing stuff from blob urls and https imports too. it was a little side-dependency/useful tool i wanted to have along with this project so both are relative new both are not even 3 weeks old.
So excuse me if things are not working properly.

To support importing from other sources other than npm i had to add in experimental loaders flag when starting up worker_threads.Worker with custom execArgs but i guess they are very experimental ATM. the http loader have changed quite much between all releases. and now it apparently run in a total other context too that broke some stuff in v20

I may have found a way to improve the logging while the main thread is blocking.
i found out how NodeJS do it here: https://github.com/nodejs/node/blob/0b3fcfcf351fba9f29234976eeec4afb09ae2cc0/lib/internal/worker/io.js#L360-L396
It basically did confirmed what i tough and said. they send the logs to the parent thread instead with postMessages.
An alternative solution would be to take the process.stdout.fd from the main thread and write directly to that one instead in the worker instead of doing postMessage stuff
I'm experimenting with it now. to be able to console log stuff while the main thread is blocked

Hmm, i guess you have used a package.json when running deno?
i have had this in the package.json
  "exports": {
    "browser": "./browser-worker.js",
    "node": "./node-worker.js"
  },

do you think that is the reason why?
do deno have own support for this?
would it work if i added
  "exports": {
    "browser": "./browser-worker.js",
    "deno": "./browser-worker.js",
    "node": "./node-worker.js"
  },

1.0.1 release 🎉
fixes console logs so they logs in the correct order
And you can now also use console.log even dough the main thread is blocked, which helps a LOT!
now instead of using postMessages it writes directly to the stdio file descriptor.


Problem publishing a page

I get this error when i try to publish a page.
Tested django-cms versions: 3.1.3, 3.1.4, 3.2
Internal Server Error: /rm/admin/cms/page/285/rm/publish/
Traceback (most recent call last):
  File "/home/vagrant/.virtualenvs/example/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/vagrant/.virtualenvs/example/local/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/home/vagrant/.virtualenvs/example/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/home/vagrant/.virtualenvs/example/local/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 233, in inner
    return view(request, *args, **kwargs)
  File "/home/vagrant/.virtualenvs/example/local/lib/python2.7/site-packages/django/utils/decorators.py", line 34, in _wrapper
    return bound_func(*args, **kwargs)
  File "/home/vagrant/.virtualenvs/example/local/lib/python2.7/site-packages/django/views/decorators/http.py", line 45, in inner
    return func(request, *args, **kwargs)
  File "/home/vagrant/.virtualenvs/example/local/lib/python2.7/site-packages/django/utils/decorators.py", line 30, in bound_func
    return func.__get__(self, type(self))(*args2, **kwargs2)
  File "/home/vagrant/.virtualenvs/example/local/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
    return func(*args, **kwargs)
  File "/home/vagrant/.virtualenvs/example/local/lib/python2.7/site-packages/reversion/revisions.py", line 297, in do_revision_context
    return func(*args, **kwargs)
  File "/home/vagrant/.virtualenvs/example/local/lib/python2.7/site-packages/cms/admin/pageadmin.py", line 973, in publish_page
    published = page.publish(language)
  File "/home/vagrant/.virtualenvs/example/local/lib/python2.7/site-packages/cms/models/pagemodel.py", line 669, in publish
    if page.publisher_public.parent.is_published(language):
  File "/home/vagrant/.virtualenvs/example/local/lib/python2.7/site-packages/cms/models/pagemodel.py", line 536, in is_published
    return self.get_title_obj(language, False, force_reload=force_reload).published
AttributeError: 'NoneType' object has no attribute 'published'

Any idea why?
Edit:
I don't know if it has something to do with it, but i used python manage.py cms copy-lang de rm before.

@Wirzi Hi there,
You mentioned you can reproduce on 3.1.3, 3.1.4, 3.2.
Did you run python manage.py cms copy-lang de rm on each version as well?

@czpython No only on 3.1.3 and upgraded afterwards.

This is fixed on 3.3
Please run ./manage.py cms fix-tree before upgrading.


can we have something similar to jvmtop?

Can we have something similar to https://github.com/patric-r/jvmtop/blob/master/doc/ConsoleProfiler.md It has been very useful and so simple to use. Quickly shows where the CPU cycles are spent. I tried to replicate the same using stcap and ssa but I couldn't quite get the output similar to jvmtop?

Below is output of ssa --histo --by-term -f dump.sjk command which is IMHO very similar to your example.
 Which is true. There is no relaible way to distinguish on-CPU from idle frame in thread dump based sampling, though you can explicitly filter frames which is known to be non-CPU operation. Or on can use different sampling tool (out of box sjk can process JFR recordings, perf format is on road map).
If there are other key differences, please explain.


Metrics when using partitioning

I expected themetric-counters to be in the slaves' stepExecutionContexts when using partitioning, but they are in the masters. Is that expected behaviour?
Did somebody explore if they behave correctly when doing restarts while using partitioning?

Yes, we actually save them in the masters. When using partitioning please register the LoggerListener also in the slave-steps to ensure the MDC is correctly filled with the jobLogFileName for Logback.
See example here:
https://github.com/codecentric/spring-boot-starter-batch-web/blob/master/src/test/resources/META-INF/spring/batch/jobs/partitioned-flat-file-job.xml
We are now using the StepSynchronizationManager in the Metrics to obtain the job and step identifiers, so here you should not get any problems anymore.


Add hovering effect on social media icons

Will I add some hovering effect on the social media icons in the footer, like some color changes, and scaling.
Can I add this change under hacktoberfest'22?

assign this to me!!

The changes are as follows:
https://user-images.githubusercontent.com/95460021/197013193-b8ad4e70-9e47-4a71-ad63-5c731e2b8faf.mp4

Go for PR!


Unable to hydrate the AWS launch template cache, RequestCanceled: request context canceled

Version
Karpenter: v0.8.0
Kubernetes: v1.19.1
Expected Behavior
Karpenter pod should start-up after helm install
Actual Behavior
karpenter pod goes into CrashLoopBackOff
Steps to Reproduce the Problem

create the IAM resources using AWS CloudFormation. using   "aws cloudformation deploy..."
access to instances using the profile to connect to the cluster . using "eksctl create iamidentitymapping ...."
Create the KarpenterController IAM Role.  using "eksctl create iamserviceaccount ...."
Install chart using helm

Resource Specs and Logs
2022-04-01T02:45:30.313Z        INFO    Successfully created the logger.
2022-04-01T02:45:30.313Z        INFO    Logging level set to: debug
{"level":"info","ts":1648781130.418466,"logger":"fallback","caller":"injection/injection.go:61","msg":"Starting informers..."}
2022-04-01T02:45:30.418Z        INFO    controller      Initializing with version v0.8.0        {"commit": "476804d"}
2022-04-01T02:45:30.418Z        DEBUG   controller.aws  AWS region not configured, asking EC2 Instance Metadata Service {"commit": "476804d"}
2022-04-01T02:45:34.728Z        DEBUG   controller.aws  Using AWS region eu-west-1      {"commit": "476804d"}
2022-04-01T02:45:34.728Z        DEBUG   controller.aws  Discovered caBundle, length 1025        {"commit": "476804d"}
2022-04-01T02:45:34.728Z        DEBUG   controller.aws.launchtemplate   Hydrating the launch template cache with names matching "Karpenter-euw1-prod-*"       {"commit": "476804d"}
panic: Unable to hydrate the AWS launch template cache, RequestCanceled: request context canceled
caused by: context canceled
goroutine 1 [running]:
github.com/aws/karpenter/pkg/cloudprovider/aws.(*LaunchTemplateProvider).hydrateCache(0xc000104d20, {0x27db3b8, 0xc0005ca2d0})
github.com/aws/karpenter/pkg/cloudprovider/aws/launchtemplate.go:229 +0x4f4
github.com/aws/karpenter/pkg/cloudprovider/aws.NewLaunchTemplateProvider({0x27db3b8, 0xc0005ca2d0}, {0x28afb58, 0xc0003195a8}, 0xc0006389a0, 0xc0003195e8, 0xc0005bdf40, 0xc00037db00)
github.com/aws/karpenter/pkg/cloudprovider/aws/launchtemplate.go:70 +0x225
github.com/aws/karpenter/pkg/cloudprovider/aws.NewCloudProvider({0x27db3b8, 0xc0005ca2a0}, {0x1e0c260})
github.com/aws/karpenter/pkg/cloudprovider/aws/cloudprovider.go:90 +0x5d3
github.com/aws/karpenter/pkg/cloudprovider/registry.newCloudProvider(...)
github.com/aws/karpenter/pkg/cloudprovider/registry/aws.go:27
github.com/aws/karpenter/pkg/cloudprovider/registry.NewCloudProvider({0x27db3b8, 0xc0005ca2a0}, {0x0})
github.com/aws/karpenter/pkg/cloudprovider/registry/register.go:25 +0x28
main.main()
github.com/aws/karpenter/cmd/controller/main.go:80 +0x30c
Extra Information :
I checked https://github.com/aws/karpenter/issues/1452 and checked the annotation on the "karpenter" sa and that seems correct. The annotation there corresponds to a role in the IAM and the role has the correct policy attached which has the permisisons including "ec2:DeleteLaunchTemplate" & "ec2:CreateLaunchTemplate".
For testing I added "ec2:*" to for checking and it still gave the same.
Thank you for you help !
Shirish

I've got 0.8.0 running on my cluster and I'm not seeing this.
2022-04-01T02:45:34.728Z DEBUG controller.aws.launchtemplate Hydrating the launch template cache with names matching "Karpenter-euw1-prod-*" {"commit": "476804d"}
panic: Unable to hydrate the AWS launch template cache, RequestCanceled: request context canceled
caused by: context canceled

Do you see the calls in your account's CloudTrail? I wanted to confirm if you're seeing an access denied from the EC2 API or if the calls aren't reaching EC2 at all due to some networking configuration - (restrictive security groups / private subnets etc)

Shouldn't our logs be spitting out access denied? It seems like we might be squashing an error somewhere.

Shouldn't our logs be spitting out access denied? It seems like we might be squashing an error somewhere.

I agree. I can't reproduce this on my side however which is why I wanted to know if the requests are even making it to EC2.

Apologies, the EKS is v1.17 rather than v1.19.
I will try to get the cloudtrail logs. anything particular I should be looking for ?
I can also confirm I have an EKS v1.21 (karpenter installed via cluster yaml setting rather than the manual install I am facing in this issue). The v1.21 uses the same subnets and security groups as v1.17

I have since upgraded my EKS cluster and have not faced this issue. so probably it was something in v1.17 that karpneter didn't like.


Package Requested

[ ] I would like someone else to build the manifest.
[ ] I would like help so I can submit the manifest.
[ ] I have performed a search and couldn't find this package.
[ ] I have checked that the installer for this package is not a standalone or portable executable or a .zip file
[ ] I think there is a new version available and I have provided the URL.

Please provide the following information
Publisher: https://github.com/r-darwish
Publisher Url: https://github.com/r-darwish/topgrade
Package Name: topgrade
Description: Keeping your system up to date usually involves invoking multiple package managers. This results in big, non-portable shell one-liners saved in your shell. To remedy this, topgrade detects which tools you use and runs the appropriate commands to update them.
Package Version: 9.0.1
Installer URL: https://github.com/r-darwish/topgrade/releases/download/v9.0.1/topgrade-v9.0.1-x86_64-pc-windows-msvc.zip
Current Package Identifier (for new versions):

Blocked by microsoft/winget-cli#140
@soredake - This isn’t the first time I’ve mwntioned that .zip files are not yet supported
https://github.com/microsoft/winget-pkgs/issues/61766#issuecomment-1134994407
I’m asking that you refrain from opening issues requesting packages distributed as .zip files until the client supports them, as creating these issues now is needlessly clogging up the issues queue