Python Extension: Windows Powershell does not activate the selected conda environment

Does this issue occur when all extensions are disabled?: This is an issue with an extension (the Microsoft Python extension)

VS Code Version: 1.58.1
OS Version: Windows 10

Given an Anaconda environment with PySide2 installed, importing it will work so long as you activate the environment first, but fail if you do not (it will complain about a missing DLL when attempting the nested import of shiboken2). This error can be easily demonstrated by running the environment's python executable in a standard windows command prompt without first activating the environment then attempting the import.
Now in VS Code, even with the environment selected as the Python environment, attempting this import fails when running in Windows Powershell. It will not fail if I set the basic Command Prompt as the default interpreter and then issue Python: Start REPL then import it, nor if with this same profile selected I attempt to run a module containing only this import statement. However both of these WILL fail if Windows Powershell is selected as the default profile.
This error shows that the conda environment is not being activated when you attempt to run code or start the REPL with Windows Powershell. I do note that when you try to start the REPL, the conda activate $env is issued, but when you actually attempt the import the conda activate line mysteriously disappears!
Steps to Reproduce:

Install Anaconda (latest as at 20210714)
Create an environment and install PySide2
Select this environment for the workspace in VS Code
Create a module containing simply the statement import PySide2 (this fails on nested import of shiboken2, which is exactly what happens when you try to importPySide2 using the environments python executable without first activating the environment; and only happens then)
Ensure your default profile is set to Windows Powershell
Press the Run Python File In Terminal button or issue: Python: Run Python File In Terminal

/extPython


Deleted users also appear in inactive report

Please update FAQ that deleted users are expected to appear in this report. There is confusion on whether or not this is expected.

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

ID: 3e0a0671-953a-7797-6e0c-6616420f4c3b
Version Independent ID: a2de95d1-67b2-bcc6-402f-f5d23c53d13a
Content: How to manage inactive user accounts in Azure AD
Content Source: articles/active-directory/reports-monitoring/howto-manage-inactive-user-accounts.md
Service: active-directory
Sub-service: report-monitor
GitHub Login: @MarkusVi
Microsoft Alias: markvi

@willfiddes
Thanks for your feedback! We will investigate and update as appropriate.

Thanks @willfiddes ! I made a pull request to update the guide. https://github.com/MicrosoftDocs/azure-docs-pr/pull/193753
@MarkusVi


Retrieving array elements from object type iterator.

I retrieve an array json::iterator c = itr->find("nodes"); and try to iterate through all arrays in that array (nodes is array that contains arrays):
for (json::iterator ak = c.value().begin(); ak != c.value().end(); ++c)
                            string id = ak[0].get<string>();
I get error, because those iterators aren't of the same type:
JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers"));
How should I iterate and access the elements from the iterated array? Couldn't find documentation on this very issue of object to array type iterator mismatch/switch.

Load document (json document), then find an array called "nodes":
'json::iterator c = document->find("nodes");'


Could not find Livewire component in DOM tree (RichEditor ONLY Simple Resource - Modal)

Package
filament/filament
Package Version
v3.1.0 / v3.1.47
Laravel Version
v10.39.0 / v10.40.0
Livewire Version
No response
PHP Version
8.2
Problem description
I'm creating a new RichEditor component into form, it works perfectly when I'm using complete resources (With CRUD pages), but for some reason, when using a simple resource, generated simply with php artisan filament:resource TestResource --simple it doesn't work...
Same code in each resource:
public static function form(Form $form): Form
    {
        return $form
            ->schema([
                RichEditor::make('body')
                    ->label('Description')
                    ->required(),
            ]);
    }

Returns: Uncaught Could not find Livewire component in DOM tree on console

Expected behavior
I expected a preview image as it works on the complete Resource.
Steps to reproduce

run php artisan make:filament-resource --simple with any resource name;
Open resource and replace the form code:

    public static function form(Form $form): Form
    {
        return $form
            ->schema([
                RichEditor::make('name')
            ]);
    }

Open the resource and try to attach an image
Open the console and take a look on the error.

If you do the same thing, but using php artisan filament:resource TestResource --generate it works.
Reproduction repository
https://github.com/leoblanski/filament-upload-image-bug
Relevant log output
No response

Tried Chrome, Firefox and Safari, and I am unable to reproduce the issue. So I am going to need a better reproduction repository to be able to fix this.
https://github.com/filamentphp/filament/assets/41773797/b47afa88-9cef-438a-b67e-5caf8f66b755

I can reproduce this issue on 3.2.10.
I can also confirm it is only on simple resources.


iOS 8.1, 8.3 forms app crash

Hi!
Xamarin.Forms app crashes on startup after installing Xamarin.FFImageLoading.Forms package.
Log:
Oct 27 22:20:21 focus-mac com.apple.CoreSimulator.SimDevice.812ACCD1-26F3-438D-A00B-C64AB4F790F3.launchd_sim[25784] (UIKitApplication:com.samaritan.jericho[0xd90f][25876]): Service exited due to signal: Trace/BPT trap: 5
Oct 27 22:20:21 focus-mac.samaritan.ru SpringBoard[25798]: Application 'UIKitApplication:com.samaritan.jericho[0xd90f]' crashed.
Oct 27 22:20:21 focus-mac assertiond[25802]: assertion failed: 16B2555 12F70: assertiond + 14647 [D82D8D7B-5253-3300-B083-B6F739F68355]: 0x1
Min iOS version the app with Xamarin.FFImageLoading.Forms  works - 9.0.

I've just ran sample app on older iOS versions and all is working fine. Are you sure it's FFImageLoading issue? Please try to clean project / remove all bin or obj folders and compile it once again.

Yes, I'm sure - uninstalling the package fix the problem.
I've tried your sample forms app and xamarin.ios app - the same behaviour.
Did you try 8.1?

2.1.8 -> 2.2.0-pre-170 - no difference.

I think this is the same issue I am having as well. I will send you the complete stacktrace a bit later when I run it again. But yes, the app crashes on startup for Xamarin.Forms Android.

Xcode 8.0, SDK version 10.0.
There is no problems with Xamarin.Forms Android app for me.

Found the issue. Just call ImageService.Instance.Initialize() before using FFImageLoading.
I'll fix this.

It's fixed, just download 2.2.0-pre-171 package. The exception was thrown when no custom logger was provided. Sorry for that.

Unfortunately it's not fixed.
I've tried to add "ImageService.Instance.Initialize()", tried 2.2.0-pre-173 - nothing changed.
It seems an app crashes before executing "FFImageLoading.Forms.Touch.CachedImageRenderer.Init();"
Visual studio debugger does not show any exception, just:
Launch succeeded. The app  'Jericho.iOS' has been successfully launched on 'iPhone 4s iOS 8.1'.
The app has been terminated.
Simulator device log:
Oct 28 15:14:25 focus-mac assertiond[28730]: assertion failed: 16B2555 12B411: assertiond + 13690 [F3233EFE-D6AB-32E3-BB3E-2CC6D0333C88]: 0x1
Oct 28 15:14:25 focus-mac com.apple.CoreSimulator.SimDevice.2183D3C9-1BE5-433A-AE56-A6FC3F8C6669.launchd_sim[28715] (UIKitApplication:com.samaritan.jericho[0x37a1][32749]): Service exited due to signal: Trace/BPT trap: 5
Oct 28 15:14:25 focus-mac.samaritan.ru SpringBoard[28726]: Application 'UIKitApplication:com.samaritan.jericho[0x37a1]' crashed.
Oct 28 15:14:25 focus-mac assertiond[28730]: assertion failed: 16B2555 12B411: assertiond + 13690 [F3233EFE-D6AB-32E3-BB3E-2CC6D0333C88]: 0x1
The similar thing with your sample "Simple.iOS.Sample":
Oct 28 16:01:44 focus-mac assertiond[28730]: assertion failed: 16B2555 12B411: assertiond + 13690 [F3233EFE-D6AB-32E3-BB3E-2CC6D0333C88]: 0x1
Oct 28 16:01:44 focus-mac com.apple.CoreSimulator.SimDevice.2183D3C9-1BE5-433A-AE56-A6FC3F8C6669.launchd_sim[28715] (UIKitApplication:com.ffimageloading.simple-ios.sample[0x6b04][34144]): Service exited due to signal: Trace/BPT trap: 5
Oct 28 16:01:44 focus-mac.samaritan.ru SpringBoard[28726]: Application 'UIKitApplication:com.ffimageloading.simple-ios.sample[0x6b04]' crashed.
Oct 28 16:01:44 focus-mac assertiond[28730]: assertion failed: 16B2555 12B411: assertiond + 13690 [F3233EFE-D6AB-32E3-BB3E-2CC6D0333C88]: 0x1
Second try:
Oct 28 16:02:27 focus-mac assertiond[28730]: assertion failed: 16B2555 12B411: assertiond + 13690 [F3233EFE-D6AB-32E3-BB3E-2CC6D0333C88]: 0x1
Oct 28 16:02:27 focus-mac.samaritan.ru SpringBoard[28726]: LICreateIconForImage passed NULL CGImageRef image
Oct 28 16:02:27 focus-mac com.apple.CoreSimulator.SimDevice.2183D3C9-1BE5-433A-AE56-A6FC3F8C6669.launchd_sim[28715] (UIKitApplication:com.ffimageloading.simple-ios.sample[0x7f51][34150]): Service exited due to signal: Trace/BPT trap: 5
Oct 28 16:02:28 focus-mac.samaritan.ru SpringBoard[28726]: Application 'UIKitApplication:com.ffimageloading.simple-ios.sample[0x7f51]' crashed.
Oct 28 16:02:28 focus-mac assertiond[28730]: assertion failed: 16B2555 12B411: assertiond + 13690 [F3233EFE-D6AB-32E3-BB3E-2CC6D0333C88]: 0x1
But today (updated repo?) "FFImageLoading.Forms.Sample.iOS" successfully started and works. However the log contains a lot of errors, including "assertion failed: 16B2555 12B411", maybe it can help:
Oct 28 16:14:15 focus-mac assertiond[28730]: assertion failed: 16B2555 12B411: assertiond + 13690 [F3233EFE-D6AB-32E3-BB3E-2CC6D0333C88]: 0x1
Oct 28 16:14:15 focus-mac.samaritan.ru SpringBoard[28726]: LICreateIconForImage passed NULL CGImageRef image
Oct 28 16:14:15 focus-mac com.apple.CoreSimulator.SimDevice.2183D3C9-1BE5-433A-AE56-A6FC3F8C6669.launchd_sim[28715] (com.apple.imfoundation.IMRemoteURLConnectionAgent): The _DirtyJetsamMemoryLimit key is not available on this platform.
Oct 28 16:14:15 focus-mac.samaritan.ru FFImageLoadingFormsSampleiOS[34180]: Xamarin.iOS: Socket error while connecting to IDE on <IP_ADDRESS>:10000: Connection refused
Oct 28 16:14:15 focus-mac FFImageLoadingFormsSampleiOS[34180]: assertion failed: 16B2555 12B411: libxpc.dylib + 69090 [A854576A-3D30-3BF9-B2EC-B36C4B9E393C]: 0x7d
Oct 28 16:14:16 focus-mac assertiond[28730]: assertion failed: 16B2555 12B411: assertiond + 13690 [F3233EFE-D6AB-32E3-BB3E-2CC6D0333C88]: 0x1
Oct 28 16:14:16 --- last message repeated 1 time ---
Oct 28 16:14:16 focus-mac.samaritan.ru SpringBoard[28726]: [MPUSystemMediaControls] Updating supported commands for now playing application.
Oct 28 16:14:16 focus-mac.samaritan.ru FFImageLoadingFormsSampleiOS[34180]: Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib:  dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): no suitable image found.  Did find:
/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: mach-o, but not built for iOS simulator
Oct 28 16:14:16 focus-mac.samaritan.ru FFImageLoadingFormsSampleiOS[34180]: Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0x7c60a410 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded)
Oct 28 16:14:16 focus-mac.samaritan.ru FFImageLoadingFormsSampleiOS[34180]: Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib:  dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): no suitable image found.  Did find:
/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: mach-o, but not built for iOS simulator
Oct 28 16:14:16 focus-mac.samaritan.ru FFImageLoadingFormsSampleiOS[34180]: Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0x7c60a410 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded)
Oct 28 16:14:16 focus-mac.samaritan.ru FFImageLoadingFormsSampleiOS[34180]: Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib:  dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): no suitable image found.  Did find:
/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: mach-o, but not built for iOS simulator
Oct 28 16:14:16 focus-mac.samaritan.ru FFImageLoadingFormsSampleiOS[34180]: Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0x7c60a410 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded)
Oct 28 16:14:16 focus-mac.samaritan.ru FFImageLoadingFormsSampleiOS[34180]: Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib:  dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): no suitable image found.  Did find:
/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: mach-o, but not built for iOS simulator
Oct 28 16:14:16 focus-mac.samaritan.ru FFImageLoadingFormsSampleiOS[34180]: Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0x7c60a410 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded)

I don't think it's an FFImageLoading issue anymore. I can't reproduce it. Did you try to delete all bin & obj folders from solution?

I can't reproduce it.
Please try to start your Simple.iOS.Sample on iOS 8.1...

I've found the reason.

What is the reason?

Deployment Target > 7.1 = crash on start on iOS < 9.0.
The problem actually in WebP.Touch.1.0.2.

Ok,  thanks for the info.  So you're using webp images? What is the source? Local file?

No. Linking with webp is enough to crash on app loading.

It contains native modules compiled for 7.0.
The crash occurs before any program code - on the loading executable stage.

If you set Deployment Target to 6.0 you will see a warning about that.

But why would it work correctly earlier?  Webp support relies on external nuget package and it wasn't changed at all since 2.0

Probably you did not change Deployment Target, it's 6.0 by default.

6.0 gives the warning, but working :)
8.0+ gives no warning and crashes...

Thanks for the debug.  I'll change that then before release.  :)


Add check for ChromeOS to fix blockstack/blockstack-browser#1269

Fix blockstack/blockstack-browser#1269
Details
Use unsupportedBrowser when user agent includes CrOS (ChromeOS).
Additional actions required

Push new version to NPM
Update version of  custom-protocol-detection-blockstack on dependents to 1.1.4

blockstack/blockstack-js
blockstack/blockstack.ts

(Doing a pull request into this branch because I noticed it was the most up to date one)

Thanks @brandonparee for the pull request and making it really easy for me know what actions I have to take to deploy this - really helps!

ChromeOS is not fixed yet!


Missing comma in the template json

The template json at the top of the page is invalid, it's missing a comma.

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

ID: 9ef2d683-1557-7097-0415-ea67a0350718
Version Independent ID: 20667a9c-cd22-ce77-d4d6-61ac10d380c8
Content: Create an Azure Image Builder template (preview) - Azure Linux Virtual Machines
Content Source: articles/virtual-machines/linux/image-builder-json.md
Service: virtual-machines-linux
Sub-service: imaging
GitHub Login: @danis
Microsoft Alias: danis

Thank you for bringing this to our attention.
I have fixed the missing comma after tags parameter. Is there any other issue you are seeing with the template? Let me know.

Thanks for bringing this to our attention. I have created a PR with the update, changes will be live shortly.
Thanks for improving our documentation! Just so you know, it's also possible to make these changes yourself, if you are interested. Doing so will improve our documentation, and it will add you as a contributor to the document.
In case you're interested, these are the steps to do so:

Navigate to the page of interest
Select the "Edit" button at the top right of the page
Select the "Pencil" icon on the right
Modify the text within the text box in markdown format - more info: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
Name your file change and provide a description, if necessary
Select "Propose file change"
Select "Create pull request" on the 'Comparing changes' page
Select "Create pull request" on the 'Open a pull request' page
You can find a GIF that demonstrates the end-to-end process for submitting changes here: https://aka.ms/editsqldocs.


TTNN Rendering Support in TT-Explorer

Added AttrHandler and OpHandler for a more "scaleable" way to render TTMLIR modules in explorer
A few bindings updates

Can you also add a TTNN parse test?
Yeah of course! I'll add some in :)

@vprajapati-tt As discussed offline, you can also delete ttir.py file as it is not used anymore.


Location of 'await' in examples/next.js/pages/login.jsx

Should lines 24/25 of examples/next.js/pages/login.jsx read :-
...
24 mutateUser(
25    await fetchJson("/api/login", {
...
and not :-
...
24 await mutateUser(
25    fetchJson("/api/login", {
...
I was getting intermittent login problems on a slower connection. Making the above change resolved this.
Thanks...

@davebm1 I think you're right but I never got really down to the root cause/which way we should do mutate/fetch.
Can you investigate the root cause and what's the best way to do "mutate local + fetch"? We're using https://github.com/vercel/swr
It's true that on my own app code I tend to do mutate and then await fetch instead of await end then fetch.
Then we can safely update the example code here and in the Next.js repo (https://github.com/vercel/next.js/blob/canary/examples/with-iron-session/pages/login.js)

Thanks, just updated the examples 🙏


Adopt a card-based approach to the product view

(This is taken from the Open Food app)

Where does come this view from ? It's not like that in the Open Food app, which one are you talking about ?

It's a mockup made from the Open Food CH app (unrelated with OFF)

Done.


[Discussion] About Lifecycle

In<EMAIL_ADDRESS>export 'Lifecycle' was not found in 'react-router'
Lifecycle has been deprecated ?

I'm not particularly familiar with early RR features, but I assume that you are referring to this mixin, which was removed in v2. https://github.com/ReactTraining/react-router/blob/c3cd9675bd8a31368f87da74ac588981cbd6eae7/upgrade-guides/v2.0.0.md#lifecycle-mixin

Thanks a lot


Please invite me to the community

Name
Johan leo
Additional Context
I'd like to join the one of the top github community

Invitation sent to join the GitHub Organization. Welcome to Infraform 🎉Please check your mail to accept the invitation sent by GitHub! 🤖About usInfraform is an open source solution for serverless platforms, it is designed for developing solutions and enhancing creators to create their infrastructure 💻 Great to have you in our community ✨ Looking forward to your valuable contributions! 🤓 You can also check our community ✨ Github ✨ LinkedIn 💜 You can also share our community with other folks who want to learn about development, DevOps, tech, and contribute together and with us 👉💜👈


[Enhancement] sync column comment when manually executing refresh external table

What type of PR is this：

[x] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Which issues of this PR fixes ：

Fixes #
Problem Summary(Required) ：

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

run starrocks_admit_test

[FE PR Coverage Check]
:disappointed: fail : 10 / 19 (52.63%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/catalog/HiveTable.java
0
5
00.00%
[188, 189, 190, 191, 193]

:large_blue_circle:
com/starrocks/connector/hive/CacheUpdateProcessor.java
0
1
00.00%
[102]

:large_blue_circle:
com/starrocks/connector/ColumnTypeConverter.java
10
13
76.92%
[476, 480, 484]

run starrocks_admit_test

run starrocks_admit_test

@Mergifyio backport branch-2.5


trying to sign in after clicking email confirmation

Subject: trying to sign in after clicking email confirmation
Description:
trying to sign in after clicking email confirmation
Results:
i would expect to be able to sign in lol.
Backend version: develop-0023fa73
Frontend version:
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
Page: https://couchers.org/login
User: travisemo007 (24511)

already logged in


How to encode surfaces created from prime fd ?

Hi guy,
I try to encode a surface created from prime fd(backed by drm_i915_gem_vgtbuffer).
But it seems to got an incorrect output by my code. It always display a green screen where i expect a
guest desktop snapshot.
Can you please give me some suggestions?
Here is part of my code:

create a VASurfaceID from prime fd {
VASurfaceAttribExternalBuffers external;
memset(&external, 0, sizeof(external));
external.pixel_format = VA_FOURCC_BGRX;
external.width = m_width;
external.height = m_height;
external.data_size = m_width * m_height * BPP / 8;
external.num_planes = 1;
external.pitches[0] = m_width; //can be obtained from vcreate FIXME
external.buffers = prime_fd; /* import from vgtbuffer*/
external.num_buffers = 1;
VASurfaceAttrib attribs[2];
attribs[0].flags = VA_SURFACE_ATTRIB_SETTABLE;
attribs[0].type = VASurfaceAttribMemoryType;
attribs[0].value.type = VAGenericValueTypeInteger;
attribs[0].value.value.i = VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME;
attribs[1].flags = VA_SURFACE_ATTRIB_SETTABLE;
attribs[1].type = VASurfaceAttribExternalBufferDescriptor;
attribs[1].value.type = VAGenericValueTypePointer;
attribs[1].value.value.p = &external;
VAStatus vaStatus = vaCreateSurfaces(*(m_display.get()), VA_RT_FORMAT_RGB32, m_width, m_height, &surfaces,  1,attribs, sizeof(attribs)/sizeof(attribs[0]));
if (vaStatus != VA_STATUS_SUCCESS){
fprintf(stderr,"VA SURFACE CREATE FAILED!\n");
return -1;
}
return 0;
}

create a h264 encoder {
encoder = createVideoEncoder(YAMI_MIME_H264);
...
encoder->start()
}

doing encode {
VideoFrame frame;
frame.surface = surface; /* create by step 1 */
frame.fourcc = YAMI_FOURCC_RGBX;
encoder->encode(frame);
}

get the coded buffer {
output = EncodeOutput::create(outputfile,videoWidth,videoHeight,codec);
do{
status = encoder->getOutput(&outputBuffer,false);
if(status == ENCODE_SUCCESS
&& output->write(outputBuffer.data,outputBuffer.dataSize)){
printf("output data size:%d\n",outputBuffer.dataSize);
}
}while(status != ENCODE_BUFFER_NO_MORE);
}

I do not know why you can create VASurface, but you may need change external.buffers = prime_fd to external.buffers = &prime_fd, because va treat buffers as array:
    if (external_memory_type == I965_SURFACE_MEM_GEM_FLINK)
        obj_surface->bo = drm_intel_bo_gem_create_from_name(i965->intel.bufmgr,
                                                            "gem flinked vaapi surface",
                                                            memory_attibute->buffers[index]);
    else if (external_memory_type == I965_SURFACE_MEM_DRM_PRIME)
        obj_surface->bo = drm_intel_bo_gem_create_from_prime(i965->intel.bufmgr,
                                                             memory_attibute->buffers[index],
                                                             obj_surface->size);

other think maybe the pitch, pitch usually express as byte not pixel

I do not know why you can create VASurface, but you may need change external.buffers = prime_fd to external.buffers = &prime_fd, because va treat buffers as array:

you are right, it should be &prime_fd.  I had fixed it and I have created VASurface successfully.
Today, i dumped the 3)VideoFrame to a jpeg file, i can see a rough guest desktop what i expect.
i'm quite new for libyami,  so i'm not clear how to set the pitch.

more question: Do I need to convert the VideoFrame from RGBX to YUV before I do the encoding encoder->encode(frame);

you can check this  https://www.x.org/wiki/Development/Documentation/HowVideoCardsWork/ and this http://stackoverflow.com/questions/20541111/how-to-calculate-framebuffer-pitch

No need, We will crate new surface and convert it in libva. However if you have nv12 surface pool you many have better performance. PooledFrameAllocator may make your life easier:
template <class T>
class VideoPool : public EnableSharedFromThis<VideoPool<T> >
{
public:

    SharedPtr<T> alloc()
    {
        SharedPtr<T> ret;
        boost::upgrade_lock<boost::shared_mutex> lock(m_mutex);

        if (!m_freed.empty()) {
            T* p = m_freed.front();
            m_freed.pop_front();
            ret.reset(p, Recycler(this->shared_from_this()));
        }
        return ret;
    }

    VideoPool(std::deque<SharedPtr<T> >& buffers)
    {
            m_holder.swap(buffers);
            for (size_t i = 0; i < m_holder.size(); i++) {
                m_freed.push_back(m_holder[i].get());
            }
    }

private:
    void recycle(T* ptr)
    {
        boost::upgrade_lock<boost::shared_mutex> lock(m_mutex);
        m_freed.push_back(ptr);
    }

    class Recycler
    {
    public:
        Recycler(const SharedPtr<VideoPool<T> >& pool)
            :m_pool(pool)
        {
        }
        void operator()(T* ptr) const
        {
            m_pool->recycle(ptr);
        }
    private:
        SharedPtr<VideoPool<T> > m_pool;
    };

    boost::shared_mutex m_mutex;

    std::deque<T*> m_freed;
    std::deque<SharedPtr<T> > m_holder;
};

struct SurfaceDestoryer
{
private:
    SharedPtr<VADisplay> m_display;
    std::vector<VASurfaceID> m_surfaces;
public:
    SurfaceDestoryer(const SharedPtr<VADisplay>& display, std::vector<VASurfaceID>& surfaces)
        :m_display(display)
    {
        m_surfaces.swap(surfaces);
    }
    void operator()(VideoPool<VideoFrame>* pool)
    {
        if (m_surfaces.size())
            vaDestroySurfaces(*m_display, &m_surfaces[0], m_surfaces.size());
        delete pool;
    }

};

class PooledFrameAllocator
{
public:
    PooledFrameAllocator(const SharedPtr<VADisplay>& display, int poolsize)
        :m_display(display)
        , m_poolsize(poolsize)
    {
    }
    bool setFormat(uint32_t fourcc, int width, int height)
    {
        std::vector<VASurfaceID> surfaces;
        surfaces.resize(m_poolsize);

        VASurfaceAttrib attrib;
        attrib.flags = VA_SURFACE_ATTRIB_SETTABLE;
        attrib.type = VASurfaceAttribPixelFormat;
        attrib.value.type = VAGenericValueTypeInteger;
        attrib.value.value.i = fourcc;

        VAStatus status = vaCreateSurfaces(*m_display, VA_RT_FORMAT_YUV420, width, height,
                                           &surfaces[0], surfaces.size(),
                                           &attrib, 1);
        if (status != VA_STATUS_SUCCESS) {
            ELOG_ERROR("create surface failed, %s", vaErrorStr(status));
            return false;
        }
        std::deque<SharedPtr<VideoFrame> > buffers;
        for (size_t i = 0;  i < surfaces.size(); i++) {
            SharedPtr<VideoFrame> f(new VideoFrame);
            memset(f.get(), 0, sizeof(VideoFrame));
            f->surface = (intptr_t)surfaces[i];
            f->fourcc = fourcc;
            buffers.push_back(f);
        }
        m_pool.reset(new VideoPool<VideoFrame>(buffers), SurfaceDestoryer(m_display, surfaces));
        return true;
    }

    SharedPtr<VideoFrame> alloc()
    {
        return  m_pool->alloc();
    }
private:
    SharedPtr<VADisplay> m_display;
    SharedPtr<VideoPool<VideoFrame> > m_pool;
    int m_poolsize;
};

you can check this https://www.x.org/wiki/Development/Documentation/HowVideoCardsWork/ and this http://stackoverflow.com/questions/20541111/how-to-calculate-framebuffer-pitch

Thank you very much, I will have look.

No need, we will create new surface and convert the RGB to NV12 in libva. However if you have NV12 surface pool you many have better performance. PooledFrameAllocator may make your life easier:

My demo have implemented a suface pool primefd-demo:https://github.com/zhijianli88/primefd-demo
But I have not bring it up. It need more investigation.

Thanks, I will have a look;
On 10/27/2016 11:58 AM, Xu Guangxin wrote:

you can check this  https://www.x.org/wiki/Development/Documentation/HowVideoCardsWork/ and this http://stackoverflow.com/questions/20541111/how-to-calculate-framebuffer-pitch


how to change record Frame rate and  sampwidth?

Hello!
Unfortunately, there are many inconsistencies across different browsers when setting the sample rate/width for audio recordings. Often, the sample rate is fixed and cannot be changed. Depending on the hardware and the browser, you can sometimes change it but it is very random and inconsistent. Therefore, I chose not to provide an interface to set the sample rate. The best in general is to post process the audio if you need a specific sample rate for further processing.
Sorry about that.


Scheduler nuked a cluster after discoverd blip

A user in IRC had a cluster where nothing other than flynn-host was running on all 3 nodes in the cluster. Here is the debug-info from each:
<IP_ADDRESS>: https://gist.github.com/anonymous/217f1e5c6791be897429
<IP_ADDRESS>: https://gist.github.com/anonymous/14e8e235844b2fd1113e
<IP_ADDRESS>: https://gist.github.com/anonymous/7d43556b81879befda16
The discoverd logs from .4 show errors related to connections to the other nodes at 2016/02/20 02:17:10:
2016/02/20 02:17:10 [INFO] raft: aborting pipeline replication to peer <IP_ADDRESS>:1111
2016/02/20 02:17:10 [INFO] raft: aborting pipeline replication to peer <IP_ADDRESS>:1111
2016/02/20 02:17:10 [INFO] raft: pipelining replication to peer <IP_ADDRESS>:1111
2016/02/20 02:17:10 [INFO] raft: pipelining replication to peer <IP_ADDRESS>:1111

It then marked a bunch of services as expired, thus broadcasting many down / leader events:
t=2016-02-20T02:17:13+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=cluster-monitor instance.id=876debd453fc6f909386f8cc61e3c810 instance.addr=<IP_ADDRESS>:1113
t=2016-02-20T02:17:13+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=discoverd instance.id=84c5e3cb37240d31091b6aea0a74936c instance.addr=<IP_ADDRESS>:1111
t=2016-02-20T02:17:13+0000 lvl=info msg="broadcasting down event" component=discoverd fn=broadcast event=down service=cluster-monitor instance.id=876debd453fc6f909386f8cc61e3c810 instance.addr=<IP_ADDRESS>:1113
t=2016-02-20T02:17:13+0000 lvl=info msg="broadcasting down event" component=discoverd fn=broadcast event=down service=discoverd instance.id=84c5e3cb37240d31091b6aea0a74936c instance.addr=<IP_ADDRESS>:1111
t=2016-02-20T02:17:13+0000 lvl=info msg="broadcasting leader event" component=discoverd fn=broadcast event=leader service=cluster-monitor instance.id=719bfebcef0ee4ab467a2d2ef1edb8d5 instance.addr=<IP_ADDRESS>:1113
t=2016-02-20T02:17:13+0000 lvl=info msg="broadcasting leader event" component=discoverd fn=broadcast event=leader service=discoverd instance.id=fa128102fb0b1dfa1e0e622480ea5521 instance.addr=<IP_ADDRESS>:1111
t=2016-02-20T02:17:14+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=flynn-host instance.id=876debd453fc6f909386f8cc61e3c810 instance.addr=<IP_ADDRESS>:1113
t=2016-02-20T02:17:14+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=redis-api instance.id=f67cce117de83b772c775f5d37619b74 instance.addr=<IP_ADDRESS>:80
t=2016-02-20T02:17:14+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=controller-worker instance.id=904a7885a76c29aaf60a7bc75b532bbf instance.addr=<IP_ADDRESS>:5000
t=2016-02-20T02:17:14+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=logaggregator instance.id=dab283f7769e9fa6a2fe738d6688ccff instance.addr=<IP_ADDRESS>:514
t=2016-02-20T02:17:14+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=status-web instance.id=b5424be48a1aebe5ccea458511b02e9a instance.addr=<IP_ADDRESS>:80
t=2016-02-20T02:17:14+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=postgres instance.id=b74d8ee16302898bed5211c52607b3eb instance.addr=<IP_ADDRESS>:5432
t=2016-02-20T02:17:14+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=router-api instance.id=e08ccae094d1298ce90103f24d45b004 instance.addr=<IP_ADDRESS>:5000
t=2016-02-20T02:17:14+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=router-api instance.id=f1c1e50f7effbb5d4b0bcaa988570f6a instance.addr=<IP_ADDRESS>:5000
t=2016-02-20T02:17:14+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=cluster-monitor instance.id=719bfebcef0ee4ab467a2d2ef1edb8d5 instance.addr=<IP_ADDRESS>:1113
t=2016-02-20T02:17:14+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=postgres-api instance.id=3084c8f5c09f7a04347628c3012af874 instance.addr=<IP_ADDRESS>:80
t=2016-02-20T02:17:14+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=router-http instance.id=ead4fb76cf8de9072817bfa427555b8d instance.addr=<IP_ADDRESS>:80
=2016-02-20T02:17:14+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=router-http instance.id=a5056d14498fd2ecf38d4c81c9a4d0cb instance.addr=<IP_ADDRESS>:80
t=2016-02-20T02:17:14+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=dashboard-web instance.id=da0e50bbed9a178b540b5f072a1e5e3b instance.addr=<IP_ADDRESS>:80
t=2016-02-20T02:17:14+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=discoverd instance.id=55702893c868ed7ab99c11aae7bf12ce instance.addr=<IP_ADDRESS>:1111
t=2016-02-20T02:17:14+0000 lvl=info msg="marking instance for expiry" component=discoverd fn=EnforceExpiry service=controller-scheduler instance.id=8c05ebea23be8e685e1dc08bb5566f40 instance.addr=<IP_ADDRESS>:5000

On receipt of a discoverd down event for itself, the postgres primary on .6 assumed a deposed role and ultimately crashed:
t=2016-02-20T02:17:14+0000 lvl=info msg="discoverd peers" app=postgres component=peer peers=2
t=2016-02-20T02:17:14+0000 lvl=dbug msg=moving app=postgres component=peer
t=2016-02-20T02:17:14+0000 lvl=info msg="starting state evaluation" app=postgres component=peer fn=evalClusterState
t=2016-02-20T02:17:14+0000 lvl=dbug msg="at rest" app=postgres component=peer fn=rest
t=2016-02-20T02:17:14+0000 lvl=info msg="got discoverd state" app=postgres component=peer fn=handleDiscoverdState index=171 state=true
t=2016-02-20T02:17:14+0000 lvl=dbug msg=moving app=postgres component=peer
t=2016-02-20T02:17:14+0000 lvl=info msg="starting state evaluation" app=postgres component=peer fn=evalClusterState
t=2016-02-20T02:17:14+0000 lvl=info msg="assuming deposed role" app=postgres component=peer role=deposed fn=assumeDeposed
t=2016-02-20T02:17:14+0000 lvl=info msg="reconfiguring postgres" app=postgres component=peer fn=pgApplyConfig
t=2016-02-20T02:17:14+0000 lvl=info msg="nothing to do" app=postgres component=postgres fn=reconfigure reason="null role"
t=2016-02-20T02:17:14+0000 lvl=dbug msg="stopping postgres" app=postgres component=peer fn=pgApplyConfig
t=2016-02-20T02:17:14+0000 lvl=info msg="stopping postgres" app=postgres component=postgres fn=stop
...
t=2016-02-20T02:17:14+0000 lvl=info msg="applied pg config" app=postgres component=peer fn=pgApplyConfig
t=2016-02-20T02:17:14+0000 lvl=info msg="skipping config apply, no changes" app=postgres component=peer fn=pgApplyConfig
t=2016-02-20T02:17:14+0000 lvl=dbug msg="at rest" app=postgres component=peer fn=rest
t=2016-02-20T02:17:15+0000 lvl=info msg="discoverd peers" app=postgres component=peer peers=1
t=2016-02-20T02:17:15+0000 lvl=dbug msg=moving app=postgres component=peer
t=2016-02-20T02:17:15+0000 lvl=info msg="starting state evaluation" app=postgres component=peer fn=evalClusterState
panic: unexpected role deposed

The scheduler on .5 saw postgres die and started a new job:
t=2016-02-20T02:17:15+0000 lvl=info msg="handling job event" component=scheduler fn=HandleJobEvent job.id=flynn1455741945vm2-be0c0427-24b2-4270-92ae-13eb98c4a469 event.type=stop
t=2016-02-20T02:17:15+0000 lvl=info msg="handling job status change" component=scheduler fn=handleJobStatus job.id=flynn1455741945vm2-be0c0427-24b2-4270-92ae-13eb98c4a469 app.id=18cec376-f2df-4787-aba7-12a7789bbefa release.id=9023147c-b2cb-447c-a52b-64f095ef824c job.type=postgres from=running to=stopped
t=2016-02-20T02:17:15+0000 lvl=info msg="expected different from actual" component=scheduler fn=formationDiff app.id=18cec376-f2df-4787-aba7-12a7789bbefa release.id=9023147c-b2cb-447c-a52b-64f095ef824c expected="map[postgres:3 web:2]" actual="map[postgres:2 web:2]" diff="map[postgres:1 web:0]"
t=2016-02-20T02:17:15+0000 lvl=info msg="scheduling job restart" component=scheduler fn=restartJob job.id=cc000dc9-e5c9-48c2-bfe0-af1853f7ea00 attempts=1 delay=0
t=2016-02-20T02:17:15+0000 lvl=info msg="starting job" component=scheduler fn=StartJob app.id=18cec376-f2df-4787-aba7-12a7789bbefa release.id=9023147c-b2cb-447c-a52b-64f095ef824c job.type=postgres
t=2016-02-20T02:17:15+0000 lvl=info msg="placing job in the cluster" component=scheduler fn=StartJob app.id=18cec376-f2df-4787-aba7-12a7789bbefa release.id=9023147c-b2cb-447c-a52b-64f095ef824c job.type=postgres
t=2016-02-20T02:17:15+0000 lvl=info msg="handling placement request" component=scheduler fn=HandlePlacementRequest app.id=18cec376-f2df-4787-aba7-12a7789bbefa release.id=9023147c-b2cb-447c-a52b-64f095ef824c job.type=postgres job.tags=map[]
t=2016-02-20T02:17:15+0000 lvl=info msg="placed job on host with least postgres jobs" component=scheduler fn=HandlePlacementRequest app.id=18cec376-f2df-4787-aba7-12a7789bbefa release.id=9023147c-b2cb-447c-a52b-64f095ef824c job.type=postgres job.tags=map[] host.id=flynn1455741945vm2

Around the same time, the scheduler on .4 got promoted to leader, synced formations and then decided that all formations should be scaled down :scream:
t=2016-02-20T02:17:15+0000 lvl=info msg="received leader event" component=scheduler fn=discoverd.Register self.addr=<IP_ADDRESS>:5000 leader.addr=<IP_ADDRESS>:5000
t=2016-02-20T02:17:15+0000 lvl=info msg="handling leader promotion" component=scheduler fn=HandleLeaderChange
...
t=2016-02-20T02:17:15+0000 lvl=info msg="syncing formations" component=scheduler fn=SyncFormations
t=2016-02-20T02:17:15+0000 lvl=warn msg="formation should not be active, scaling down" component=scheduler fn=SyncFormations app.id=4efb6c0b-6b3a-4bbf-b14d-0db7baa31b86 release.id=a6b235c2-4f00-47be-b404-b8a694371d50
t=2016-02-20T02:17:15+0000 lvl=warn msg="formation should not be active, scaling down" component=scheduler fn=SyncFormations app.id=85cd6d83-13de-49ba-bc6d-181e608fe96d release.id=dde79808-ea6a-463a-9470-26fc8c8975cb
t=2016-02-20T02:17:15+0000 lvl=warn msg="formation should not be active, scaling down" component=scheduler fn=SyncFormations app.id=cbfc6ff3-82fc-4c8b-bfc9-e1493daf565b release.id=5c0ec6fa-0943-4488-adfc-b6ec577865d7
t=2016-02-20T02:17:15+0000 lvl=warn msg="formation should not be active, scaling down" component=scheduler fn=SyncFormations app.id=e501766a-c8a3-416f-a756-a286f718325f release.id=7509997e-ede2-4b14-8a92-0041ee91a76b
t=2016-02-20T02:17:15+0000 lvl=warn msg="formation should not be active, scaling down" component=scheduler fn=SyncFormations app.id=2a6810cb-73c8-4490-bbf9-570435816f7f release.id=66f3b6f0-e432-418d-b78e-51ef7c134efb
t=2016-02-20T02:17:15+0000 lvl=warn msg="formation should not be active, scaling down" component=scheduler fn=SyncFormations app.id=650e1838-15bc-4f3f-adc0-e08f1b70a3ac release.id=13d27017-821a-4a34-9629-cd24cf3c83ed
t=2016-02-20T02:17:15+0000 lvl=warn msg="formation should not be active, scaling down" component=scheduler fn=SyncFormations app.id=7b278840-a59e-4111-8199-d4a7dcf91665 release.id=d21fbcc2-41c6-466d-8a3b-df9471d48dbf
t=2016-02-20T02:17:15+0000 lvl=warn msg="formation should not be active, scaling down" component=scheduler fn=SyncFormations app.id=fc9ebdd5-0b19-49d4-bf49-8ecb5c9275cc release.id=2600f14f-0610-41c6-8bfa-0bb5a1f19ea6
t=2016-02-20T02:17:15+0000 lvl=warn msg="formation should not be active, scaling down" component=scheduler fn=SyncFormations app.id=d062d02e-8aaf-4512-a349-d133bd177043 release.id=aae07e00-a147-4961-8160-5fb560af183a
t=2016-02-20T02:17:15+0000 lvl=warn msg="formation should not be active, scaling down" component=scheduler fn=SyncFormations app.id=f2b45145-d8c4-4e8b-9604-6ec6354fe1ec release.id=966d4a60-fee4-4b87-b642-08acace60e90
t=2016-02-20T02:17:15+0000 lvl=warn msg="formation should not be active, scaling down" component=scheduler fn=SyncFormations app.id=9ccad256-011f-4f84-8eec-a9f658ad3c19 release.id=492871c5-6515-4235-af8d-14f4a1a7e673
t=2016-02-20T02:17:15+0000 lvl=warn msg="formation should not be active, scaling down" component=scheduler fn=SyncFormations app.id=18cec376-f2df-4787-aba7-12a7789bbefa release.id=9023147c-b2cb-447c-a52b-64f095ef824c
t=2016-02-20T02:17:15+0000 lvl=warn msg="formation should not be active, scaling down" component=scheduler fn=SyncFormations app.id=e26a510f-dc29-4730-a900-ec26bfad654c release.id=c0908b0f-f34b-4dac-b47a-5dec686d2462

This was the nail in the coffin, leaving the cluster with no jobs running.
Questions:

Should the PostgreSQL primary have crashed?
Why did the scheduler think all formations should not be active? Did it get an empty response when listing active formations? If so, why?
Why did the cluster-monitor not kick in and restart jobs?

Potential actions:

Modify the scheduler so that it never treats system formations as inactive

/cc @titanous @josephglanville

The bug that triggered this was fixed. Any other actions before we close?

I do think the root cause is fixed so we should probably close it out, but in the interests of completeness.
Should the PostgreSQL primary have crashed?
If the Sync took over then yes, it should have as even if the become connected to discoverd again it would have transitioned to Deposed which would kill it.
Why did the scheduler think all formations should not be active?
As you noted I think it's very likely it got an empty list with a non-error status because the formations endpoint was not correctly checking the error contained in the pgx rowset. Thus it would have returned an empty list of formations and no error, which is most unfortunate..
Why did the cluster monitor not kick in and restart jobs?
The current iteration of the cluster-monitor has some safety restraints on it for now to ensure it doesn't potentially mess with a healthy cluster. Chief among them is it will only act when it is able atleast the number of peers that were in the initial bootstrap. That is flynn-host is running and connected to the discoverd cluster.
Because the discoverd formation was destroyed by the errant scheduler the cluster-monitor was powerless to do anything.
This is also why the fixer is still a thing, because it acts offline and is only triggered by an operator when the cluster is known to be broken it can be more aggressive than the cluster-monitor in terms of how strongly it acts to restore the cluster to operational state.

@josephglanville thanks for the clarification, I will close this as I believe with the scheduler fix, this cluster would have been able to heal itself.


Integrate with submodules

This enables neogit to work with submodules

Fixes: #870

In order to get submodules working properly I found it necessary to make the status buffer not be a global state but rather instance based. The reason is that opening and going back and forth between submodules status panes would make these status buffers trample that same global state.
This approach makes the status buffer an object which can be manipulated and returned/found based on the git repositories root, and will in theory allow having multiple instances of neogit for different repositories open at the same time in tabs, splits, or the background.

Cool, the change makes sense. I always thought the global status buffer thing was weird conceptually, but :shrug: it's from before my time here.
I'd say don't worry too much about the status buffer - I'm going to be replacing it soon with a rewrite built using the UI framework. I finally got a couple building blocks in place to make that work:

on_open callback function for "folded" content for lazy-loading diffs
an index built into the renderer so finding components under the cursor is (nearly) o(1). All components are indexed by line number in a table, so finding the right one is much faster than iterating through all components starting at line 1.

Still a WIP... lots of functions to pull in from the existing buffer. If you're up for it I wouldn't mind help :) But all good either way.
https://github.com/NeogitOrg/neogit/pull/1161

Awesome!
Thanks for the heads up
I think both of these rewrites would go quite well together.
Will daily run this one for a bit and see how it fairs and fix any issues (and get the tests to pass).
Have some more time and mental energy now to pursue my side projects, which feels fantastic :smile:
Don't worry too much about merge conflicts, as the Swedish saying goes: "As one makes their bed, so they must lie"

Given the number of conflicts, I think it's safe to assume this can be closed. However, I've copied the core change - displaying submodule status - here: 51450329e04860f71a31d8c7ef5178fce6e60524


END key state on navigating lines for TextEdit

Meooowww... I made END key state for TextEdit.
Looks like this:

Can we re-run workflows? I removed trailing whitespace.

@Paulb23 Okiii I will look.

Can we not set caret.last_fit_x to a very large value rather then adding more state here?

I tried to set it to high value on in TextEdit::_move_caret_to_line_end() but it doesn't work.

Seems to work okay for me? set_caret_column will reset the value, so it needs to be adjusted it at the end of the method.

Hiiii @Paulb23 yesss I figured out that this time 😊
Buuuuuut I think is_eol state is better because because it works for all cases like folding the line that we go to end of:
With is_eol state:

With setting caret.last_fit_x to INT_MAX:

it works for all cases like folding

We should be able to add a small check in CodeEdit for that, so we don't set the caret column if it's already eol.

it works for all cases like folding

We should be able to add a small check in CodeEdit for that, so we don't set the caret column if it's already eol.

We could check if it is INT_MAX.

We could check if it is INT_MAX.

We'd have to expose last_fit_x for that to work, which I'm not a big fan of, for this single usecase.

We could check if it is INT_MAX.

We'd have to expose last_fit_x for that to work, which I'm not a big fan of, for this single usecase.

If you mean "checking if it is end of current line" with that, it would be bad imo because the common end key behaviour for text editors is like that if you go to end of line with arrows, it is not end state but if you use end key it is end state.

Not a fan of the extra state, when we can handle it with an existing system.
I'm proposing, on end key press we set caret.last_fit_x to INT_MAX. Then in CodeEdit::fold_line, if the caret is already eol, skip calling set_caret_column after set_caret_line, to avoid updating caret.last_fit_x .


Flanking Strike

Request to track Hunter's Leg Rune: Flanking Strike

[ ] Does it proc from a buff? No, procs from a usable action, expected to be spell ID 415320
[x] Where does it come from (baseline, talent, etc.)? Leg Rune
[x] Should it display a Spell Alert? No

[ ] Where? N/A
[ ] Which texture? N/A
[ ] Which size? N/A
[ ] Change color? N/A
[ ] Spell Alert enabled by default for all hunters? N/A

[x] Should it glow buttons? Yes, because this ability can be reset by chance when casting Raptor Strike

[x] Which buttons should it glow? Flanking Strike
[x] Which glowing buttons should glow by default? Flanking Strike

Implemented in 1.1.0-beta with the following assumptions (confirmation needed by hunters, please!)

Glowing Button with spell ID 415320
Spell Alert displayed when the action is usable
Spell Alert uses texture tooth_and_claw displayed "Left + Right"

This texture is just permanently active on a fresh SoD Hunter once you engage in combat.

This texture is just permanently active on a fresh SoD Hunter once you engage in combat.

Hi and thank you for your feedback. This issue has been fixed in version 1.1.1, released today. Make sure to check it out :)

@ennvina to me from version 1.15.0, flanking strike is bugged. Whenever flanking strike is off cool down, it always glows as active, even though no proc was triggered or anything. had to downgrade to 1.14 to disable this behavior.

@ennvina to me from version 1.15.0, flanking strike is bugged. Whenever flanking strike is off cool down, it always glows as active, even though no proc was triggered or anything. had to downgrade to 1.14 to disable this behavior.

Hi, and thank you for your feedback.
I believe your version numbers are wrong. The last addon version is 1.1.3, released a few days ago.
We are aware of issues about the Flanking Strike ability. It is kinda intended to have it glow even without a 'proc' and, although there's not much we can do about it, we will try to make it less annoying.
There is another issue where the effect is visible when you get the buff after casting the ability. This is not intended at all and shall be fixed eventually.

@ennvina to me from version 1.15.0, flanking strike is bugged. Whenever flanking strike is off cool down, it always glows as active, even though no proc was triggered or anything. had to downgrade to 1.14 to disable this behavior.

Hi, and thank you for your feedback.
I believe your version numbers are wrong. The last addon version is 1.1.3, released a few days ago.
We are aware of issues about the Flanking Strike ability. It is kinda intended to have it glow even without a 'proc' and, although there's not much we can do about it, we will try to make it less annoying.
There is another issue where the effect is visible when you get the buff after casting the ability. This is not intended at all and shall be fixed eventually.

Oh, right. It was game version, not addon version. Though with latest version, I was not even able to disable that glow. If I would go to settings and uncheck boxes, to not show it, it would still glow. So only reverting to older version, would disable it:).
But shouldn't that glow trigger when you do a proc after raptor strike?, indicating that you can attack again with flanking strike (as it resets flanking strike CD)? Making it glow just off CD seems weird as it would glow forever and without even going to combat.

Oh, right. It was game version, not addon version. Though with latest version, I was not even able to disable that glow. If I would go to settings and uncheck boxes, to not show it, it would still glow. So only reverting to older version, would disable it:).

If the spell is already glowing and you disable the checkbox, it will not un-glow it immediately. The current design is to prevent future glows. To force an un-glow, one may disable the checkbox and then reload UI.

But shouldn't that glow trigger when you do a proc after raptor strike?, indicating that you can attack again with flanking strike (as it resets flanking strike CD)? Making it glow just off CD seems weird as it would glow forever and without even going to combat.

This one is a tough call. As a player, I would expect the ability to glow only on resets. But this has two drawbacks:

it is almost impossible to detect the ability was made available due to a reset. The game only tells "the ability is ready". It doesn't tell "the ability is ready because there was a reset".
we have to decide a duration for which the spell alert and glowing buttons should be active. Because the ability is available "forever", we might display it forever (PS. this is what the addon currently does) or we might display it for a limited duration.

We could solve problem 1 by estimating when the ability cooldown is supposed to be available with full cooldown, and when it becomes available sooner, it indicates there was a proc. We could also cross check with Raptor Strike casts (which we can detect) to reduce chance of detecting false positives.
This is not too complex to do, but this would be weird if Raptor Strikes resets Flanking Strike e.g. 1 secs before FS cooldown. The addon would tell "hey you are lucky, you got a proc" while in fact the ability would have been usable after the GCD anyway. We could implement a "don't show proc if it happens less than $x$ secs before the cooldown end time" but choosing the $x$ number would not be easy, not to mention it would be cumbersome.
For problem 2, displaying the effect for a limited duration sounds like a reasonable choice, but if so, for how long? If we display it for e.g. 10 secs, the player might s/he has up to 10 secs to cast the ability, otherwise the ability is lost. But in practice, casting it 12 or 15 secs later is totally possible. So, with this 10-sec example, it would fool the player into rushing the cast, while in fact there's no rush.

Closing this issue, as no problem has been reported in a long time. Plus, recent development should have made things even smoother.


Codechef solutions

Please assign me this issue so I can upload my CodeChef solutions in CPP.
Thank you.

I would like to work on it, please assign it to me.

I would like to contribute please assign..

Assign me I would like to contribute

Please assign me i would like to contribute

Assign me I am intrested in contributing

Please assign me this issue . I would like to contribute in it

Pls Assign me this issue  would like to contribute to it

Please, assign me I want to contribute

@keshavsingh4522 I would like to share the solutions for some of the codechef problems i have worked with

Can you please assign this task to me

Can you please assign this to me?

Hello sir, can you  please assign me this issue . I would like to contribute.

Hi sir, can you assign me this issue. I want to contribute. I already solve 50 or more problem on the codechef. You can also check my profile on codechef. Its username is kartik_9977
@keshavsingh4522

Hi sir, can you assign me this issue? I would like to contribute. I have already solved around 130 problems on the CodeChef. You can also check my profile on CodeChef. Its username is dipika_jain12 https://www.codechef.com/users/dipika_jain12

Hey @keshavsingh4522 , can you assign me this issue. I solved 450+ problems on codechef.
link;- https://www.codechef.com/users/kartik_9977

Can you also tell what exactly we need to do, I'm new to open source, Need help

@keshavsingh4522 Please assign me this issue. I want to contribute to this issue. I have solved around 300+ problems on Codechef.

assign me this issue i will do it.my leetcode profile-https://leetcode.com/u/eeshsaxena/


Is it still necessary to call promote()

Hi,
Kue at early days suggest to call promote() in the docs, and few weeks back I upgraded Kue into version 0.8.12 and still calling promote() at my code. But in the newer version the suggestion or explanation about promote() is no longer in the docs but still existed in code example https://github.com/Automattic/kue/blob/master/examples/delayed.js
So I just wondering is it still necessary to call promote() using this newer version?

I've forgotten to update examples directory @tianp My Bad!
from Kue 0.9 on you don't need promote however if you are on 0.8 branch you still need to stick to it. You can read the 0.8.x docs https://github.com/Automattic/kue/tree/0.8

https://github.com/Automattic/kue/issues/640


Conventions

This Issue will document the conventions to be used in the project.
If you have any suggestions, please mention them.
Variable Names:
varName
Constant Names:
CONST_NAME
Function Names:
function_name
Class Names:
ClassName
File Names:
file_name.ext
Indentation:
4 spaces
brackets:
void foo(int i) {
    int x = (i + 2)/2;
}

Moved to wiki


Bump Svelte 5 to stable

Bumped

Svelte 5 to stable
others deps to latest

Sorry, I have other plans.


Unpublish or Deprecate pepr:0.0.0-development from NPM registry

Environment
Device and OS: MacOS
App version: Local Development
Kubernetes distro being used: k3d
Other: N/A
Steps to reproduce
npm run test:journey:build
npx --yes file:pepr-0.0.0-development.tgz init --skip-post-init
# Name module `pepr-test-module`
cd pepr-test-module
npx --yes file:../pepr-0.0.0-development.tgz build

Expected result
I can successfully run npx ${PEPR_ALIAS} build without errors as shown below.
Actual Result
Module does not build.
Visual Proof (screenshots, videos, text, etc)

Working off of main on a5ae3cc35944b4b42182e3a44a48a9f0483710ed: error.log

Severity/Priority
Medium
Additional Context
0.0.0-development was accidentally published to the npm registry. As a result, one issue I ran into was working on a local development version of Pepr, which would build a new local artifact. However, running any pepr commands (e.g., npx file:pepr-0.0.0-development.tgz build) would actually pull from npm and fail with an error. Since this is an opaque failure conditiona, this has added significant troubleshooting time to development.
NPM unpublishing docs.

Just gave the un-pub a try -- since my NPM creds were working -- and it looks like NPMjs wants us to un-pub it instead (because it has dependents). :cry:

IRT our troubleshooting collab today, I think a deprecation would've been enough to let us know something was wrong (cuz the npm install would have complained about us using a dep'd version).
...but now, as I go back to try & deprecate it, my NPM creds have dropped again. sigh
Next person in line (or future me if my creds come back): try to deprecate it!

Working with tech support to get my the NPM creds sorted right 'chnow. :crossed_fingers:

Alllllll righty -- was able to get the account creds all sorted.  NPMjs.com's<EMAIL_ADDRESS>officially deprecated.

got it, looks good to close.


Issue with k8s.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/

This is a...

[ ] Feature Request
[x] Bug Report

Problem:
Persistent volumn claim results in a yaml validation error: error: error validating "https://k8s.io/examples/pods/storage/pv-claim.yaml": error validating data: field spec.dataSource for v1.PersistentVolumeClaimSpec is required; if you choose to ignore these errors, turn validation off with --validate=false
Proposed Solution:
Page to Update:
https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/

1.13

avejidah@the-man:~/dev/bayren/etool/k8s/dev$ dpkg -l |grep kubectl
ii  kubectl                                     1.13.1-00                                                                   amd64        Kubernetes Command Line Tool
avejidah@the-man:~/dev/bayren/etool/k8s/dev$ kubectl create -f https://k8s.io/examples/pods/storage/pv-pod.yaml
pod "task-pv-pod" created
avejidah@the-man:~/dev/bayren/etool/k8s/dev$ kubectl create -f https://k8s.io/examples/pods/storage/pv-volume.yaml
persistentvolume "task-pv-volume" created
avejidah@the-man:~/dev/bayren/etool/k8s/dev$ kubectl create -f https://k8s.io/examples/pods/storage/pv-claim.yaml
error: error validating "https://k8s.io/examples/pods/storage/pv-claim.yaml": error validating data: field spec.dataSource for v1.PersistentVolumeClaimSpec is required; if you choose to ignore these errors, turn validation off with --validate=false

This was a problem with my install: I had two versions of kubectl installed and was using an older one.  Sorry for the false report.


Make opening visualizer the default grid value action

Description
This PR:

Replaces grid value menu (has copy and launch visualizer options) with a button that just launches visualizer. The visualizer has a copy button so folks can copy from the dialog.
Changes visualizer to be launched server side. The previous system seemed very complex for no value. Previous steps: adding attributes to an HTML element, listening for the elements in a document click event, triggering a server method and streaming the element values back to the server, then showing the dialog. @adamint Is there a reason it was implemented this way?
Changes visualizer launch icon to the same icon displayed in the visualizer
Fixes masking spacing issue

Fixes https://github.com/dotnet/aspire/issues/6685

Checklist

Is this feature complete?

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

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

[ ] Yes
[x] No

Did you add public API?

[ ] Yes

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

[ ] Yes
[ ] No

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

[ ] Yes
[ ] No

[x] No

Does the change make any security assumptions or guarantees?

[ ] Yes

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

[ ] Yes
[ ] No

[x] No

Does the change require an update in our Aspire docs?

[ ] Yes

Is this introducing a breaking change?

[ ] Yes

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

[ ] No

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

[x] No

Microsoft Reviewers: Open in CodeFlow

UI change based on customer feedback. Feels like a good improvement.
cc @leslierichardson95 @DamianEdwards @davidfowl

@JamesNK yeah this looks like a good improvement! 👍


decide on game idea

choose a theme and game idea

We decided that the fluid simulation lends itself well to puzzle games so we created a system which lets us create unlimited individually sandboxed puzzles for the player to explore the mechanics of the fluid sim


[NOMRG] WIP Use tensor transforms within PIL transforms

FYI this could have performance / accuracy impacts, so any change here should be very careful

Closing this for now: we need to make sure transforms are at least equivalent in terms of results and this isn't the case yet https://github.com/pytorch/vision/issues/2950


Feature Request: Image filter chaining

This PR makes filter chaining possible.
Filters do now accept a chain of specs in a pipe-like syntax.
My use case is to add a watermark filter after applying a fill-width-height filter.

# Converts the image with the fill operation to 480x200, applies a fictional blackandwhite filter and adds
# a fictional watermark with the fictional opacity of 1
spec = 'fill-480-200|blackandwhite|watermark-1
filter = Filter(spec=spec)

# likewise
rendition = image.get_rendition(spec)

# in templates it's just like args
{% image fill-480-200 watermark %}
# ... all tests for all those fancy image tag stuff pass ...
{% image fill-480-200 watermark  as img%}

Oh, https://github.com/torchbox/wagtail/pull/1861 somehow went in. Let me fix that.


Additional Sensor Data

Feature request
Thank you for making a new integration for Weatherlink. The old one worked fine, but the developer haven't responded on requests for quiet some time. And the sensors generated by the integration did not resulted in long-term statistics - just historic data.
So applaus to you for bringing this up to date. 👏
But I would like some additional sensors :

Wind direction i degrees
Solar radiation (I have the solar sensor)
Temp outside THSW (Feels like)

In addition to my primary station "Vantage Pro2, Wireless"(ID1) - I also have a "Sensor Suite"(ID2) with an external Temp-sensor attached which measures the sea temperature.
Both sensor stations sends data through the WeatherlinkLIVE-gateway.
I hope you could provide data for that ID2 Sea-temp sensor also through the integration.
Regards/Hälsningar
Gunnar Malmgård

What version of the integration are you using?
v0.9.4
Anything in the logs that might be useful for us?
No response
Additional information
No response

The three sensors are easy to add. However, to add data from an additional sensor suite I need help with collecting data. The easiest way is if you could share your station with me. I hope the shared data is enough, Weathelink removes all "sensitive" data in the shared data stream. You find the sharing function close to the upper right corner of the front bulletin screen. My username is astrandb on weatherlink also.

Now I have shared the station with you.

There is now a beta release (v0.9.5b1) available for test.  You can download it by selecting redownload in the hacs/weatherlink page. Remember to enable "Show beta versions". Then download and restart HA.
I need to think a little more how to display data from secondary devices like your sensor suite with sea temperature.
Awaiting another rainy day...
All feedback  is appreciated.
You could help me by making a diagnostic download from the weatherlink device overview page. Then drag the file into this issue thread. I can then see how your external sensor is represented from your end.

Hi @gunmalmg
Regarding sensors connected to a sensor suite:
I have taken a deep dive into the documentation and done some testing. It is absolute possible to display your sea-water temperature but I would like to make a universal solution. The aim is to support 0-8 sensor suites and 0-8 leaf/soil sensors that are connected to Live and console devices and display them in a logical way in HA. I have an idea how to acheive that but it will take some time and concentration. I will have to refactor the way detection of devices and sensors are done today.
To just support one device is doable but the effort is wasted when going for the ultimate solution.
I hope you can wait. The integration is a hobby project so I can't promise a delivery date. In the mean time I can make a release of the beta version mentioned above.

Hi
Thank you for your swift response.
Regarding missing sea-temp readings:
The ekstra sensor station is online, but I have taken it indoors, due to stormy winter season (I have got 2 stations broken earlier) .  The station is online but the temp-sensor is detached - so no readings there now.
So there is no wrong with your permissions :-)
I have attached a DATA EXPORT for all data from 1.juli.2023. Hope that's what you were asking for regarding diagnostics.
I have installed the beta, and I now get the THSW, The Wind direction in deg, and Solar radiation . But I don't see any sea-temp-sensor

I Understand that you would develop a universal solution for the option to add extra sensor stations . And I understand that this is just a hobby and that this could take som time.
If I get a beta that reads my sea-temp I will be happy for the time beeing.  But there is no rush - since I have disabled the sea-sensor for the winter season.
I appreciate your work en effort.

Lille_Lyngholmen_LIVE_4-7-23_00-00_1_Day_1702906979_v2 (1).csv

Thanks,
That explains the unavailable sea temp sensor.
I will prepare a proper release for the added sensors within a few days so that everybody can enjoy them. I just need to filter out solar related sensors from Vue stations.
Sensors attached to extra sensor transmitters will have to wait until the new sensor discovery logic is in place. It will most likely be a breaking change. The users will have to uninstall/reinstall the integration to get rid of  stale entities and devices in HA. Hopefully it will be a one-time-only exercise.

Hi Gunnar
I have prepared a new beta release v0.9.6b1 that handles extra sensor suites.
Please give it a try and report back if you find any issues. The sea temperature sensor displays Unknown as explained above but I think it will work when the probe is connected.
I have managed to avoid to break any old configurations (I hope).

Hi Åke
Thank you for the new beta.
It seems to work perfectly. The Sensorsuite  ID2 is showing up as a new Device. We have to wait until I got to connect the sea-sensor again. Hopefully just over new year. Its on at cottage.
You may look at the ID2-rain Entities. That seems to have values - even though there is not connected any rail sensor to the transmitter.

Thank you for your work. Excellent.
And good explanations.
I come back to you when the sea-sensor is back.
In the meanwhile : God jul och gott nytt år 🎄

Fixed in v0.9.6


Extending the 'sawtooth' CLI  to support for listing blocks etc.

Extending the 'sawtooth' CLI (in sawtooth-core) to have support for listing out blocks and transactions.  basically "sawtooth block list|show [--url URL]" and "sawtooth store show [--url URL] [--block=BLOCKID] [--incremental]".

Implemented via #11


PowerRename crash

Microsoft PowerToys version
0.49.1
Running as admin

[X] Yes

Area(s) with issue?
PowerRename
Steps to reproduce

Select files
Shift+right click > Powerrename
rename window opens, shows rename options as per last rename, and closes itself,

✔ Expected Behavior
should be able to let me rename the selected files
❌ Actual Behavior
crashed
PowerToysReport_2021-11-15-13-31-48.zip
https://user-images.githubusercontent.com/25426218/141744525-b8913bfe-7a20-44f0-afe6-ae4a04197aab.mp4
Other Software
No response

after reading other threads,
scaling display to 100% does not make powerename crash, and it lets me rename the files

refer #14356


Integrate some grading infrastructure

E.g. nbgrader or okpy
Need to figure out what kind of barrier to entry there is for connector instructors.

closing in favor of #42


fix: delete default host in taosws

Codecov Report

Merging #198 (653ac96) into 3.0 (826b7cf) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              3.0     #198   +/-   ##
=======================================
  Coverage   81.17%   81.17%
=======================================
  Files          20       20
  Lines        2577     2577
=======================================
  Hits         2092     2092
  Misses        485      485

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Add a new operator mocks numpy.flip

Flip the input tensor similar to numpy.flip. For example, when axes=(3,),
given an input tensor M of shape (N, C, H, W), the output will be
similar as numpy.flip(M, 3). And when axes=(2,), the output will be
similar as numpy.flip(M, 2).

This solves #932

@bddppq mind take a look?

Thank you for your contribution! PyTorch and Caffe2 are now officially merged with the PyTorch 1.0 preview release. Please submit on https://github.com/pytorch/pytorch if this is still an issue over there.


Token Expiry Issue

I lost another blog post! 😰
No big, it's actually interesting... Really didn't expect it, but in retrospect I think I may know what happened...
Basically, in fear of losing my session I opened an additional tab to refresh my session... and that alone is the mistake! This new session had no access-token (these are now in-memory only), so it issued a request to refresh the session and... invalidated the session in the other window as a result.
That's a problem.
Two Things

Do keep data stored while allowing a session refresh by the user (i.e. the modal approach previously discussed)
Reconsider session invalidation on refresh-token refreshing...

You could just not refresh the token, let it live out its life
You could set some... if token is older than 4 hours, refresh it?

That second approach would... invalidate any session older than four hours WHEN it gets a refresh request. And... sounds good to me.
But four hours is a pretty short window, so... we do still have the same risk. To mitigate which, we really need to keep data in store while allowing the user to reobtain a token.

Current defaults for token behaviour:

Access token is invalid after 4 hours
Refresh token can be used to renew access token, up to 14 days

My implementation:

Throws away the refresh token if a 401 is received from server on use of access token (it should try a refresh, then reattempt the action with a new token)
Redirects to login on a 401 (it should persist all data and have the user login in-place, with no data loss)

Token behaviour isn't the problem. Only my implementation needs fixing.

Think about PWA behaviour too...
Any edit should be stored locally. In browser, this can be... Dexie.js or even just plain old localstorage.
An edit should be handed to a service worker? [question mark] Because... diddily-dee... offline support. The service-worker can submit the data at the next opportunity (not sure how this will work with access tokens, refresh tokens, etc. needs additional thought)
App should also know who has the more recent edit - the server, or us. If collaborators are each working on the same thing, nobody wants their work overwritten without warning. ...so we should be able to catch that by comparing updated_at values.

I want to address a thought I've had and reject it outright...
We could just store access-token in localstorage, meaning a session in the same browser wouldn't invalidate another tab
Here's why that's a bad idea...
It doesn't solve the problem. Four hours down the line, the access token is invalid anyway, the server responds with a 401 and we delete the refresh token (shouldn't do that).
What would be ideal is...
Some kind of before action?
Like a before in the store that runs if any action has an axios request to perform. It would check the validity of the present access token, and issue a refresh request if it's been invalidated.
Yup, that's actually a sound plan. We can, in fact, simply create such an action and add a dispatch in front of every action that needs to do this... A lot of duplication though. Gotta see if Vuex has some kind of before hook that can be... 'cause we don't need to run it for all actions, but... most. Always good to refresh that token.
Preferably... see it expires in 4 hours. Preferably issue a request for a new token, maybe, if it's half an hour out from expiry or less?
We need that leeway because if a request is submitted on the hour, we still encounter this problem. We can, in fact, implement this on the server for convenience: https://github.com/jwt/ruby-jwt#expiration-time-claim

Interesting
It just occurs to me that... we decode tokens on the server to check their validity. This only works because our issuer and resource server are one and the same and share a secret.
An auth server should use a unique key per client, which they should be able to obtain and use on their own server? Correct, at least so far as HMAC and HS256 are concerned.
An alternative is to use RSA and RS256, which would have a private key on the auth server and a public key utilised by resource servers. Consider adding this as an option to https://github.com/thombruce/credible

Client Side
If session has no accessToken (or it is expired) but does have refreshToken, refresh and obtain new accessToken. This currently invalidates any other refreshToken, as the session is refreshed server side.
Server Side
Presented with a valid accessToken, it authenticates the user.
Presented with a valid refreshToken, it destroys current session, creates new session, issues new accessToken and refreshToken.
So what happens if we have two tabs open?
We know that the second tab will have no accessToken, as this is stored in memory, so it use the refreshToken to request a new accessToken. This will invalidate the old refreshToken (which is probably fine, right? It gets replaced in localStorage - but not in the other tab's application memory, bear that in mind) But it also invalidates our other accessToken.
This is a server side issue: The accessToken should be accepted for its lifetime; Credible should not be verifying it against a session. No need to find a session from db. Just validate the authenticity of the token and accept its credentials.
On the client side... the refreshToken will have been invalidated, but this is... This is stored in local-storage and should be changed across all tabs. VERIFY THIS!
Which just leaves...
Token timeout
The... client application should be aware of token expiry? For both accessToken and (less important) refreshToken, so that it can refresh and obtain a new accessToken ahead of it timing out.
Which means...
Todo

[ ] Credible: Do not load resource to authenticate accessToken - check it's valid, that's all.
[ ] Helvellyn.js/Credible Demo: Application needs to be aware of accessToken expiry, and should issue a refresh request ahead of time, prior to any other API request requiring the renewed accessToken

closed by dbcf8215831daccf61d1a8e5736520dc1dc460a7


🚧Setup all workflows

I have done the items below . . .

[X] I have updated the title by replacing the '<title>' section.

Description
Setup all of the workflows for the project.
Acceptance Criteria
This issue is finished when:

[x] Create status check scripts

[x] prev-version-status-check.js
[x] prod-version-status-check.js

[x] Create tag does not exist status check workflow

This will use the new VersionValidator github action and will replace the TagVerifier actions

[ ] Create preview build status check workflow

This will use the new VersionValidator github action and will replace the TagVerifier actions

[ ] Create release version status check workflow

This will use the new VersionValidator github action and will replace the TagVerifier actions

[ ] Create preview unit testing status check workflow
[ ] Create preview release workflow
[ ] Create production build status check workflow
[ ] Create release version status check workflow
[ ] Create unit testing status check workflow
[ ] Create production release workflow
[ ] Create QA release workflow

ToDo Items

[ ] Draft pull request created and linked to this issue
[x] Priority label added to issue (low priority, medium priority, or high priority)
[x] Issue linked to the proper project
[x] Issue linked to proper milestone
~~ Unit tests have been written and/or adjusted for code additions or changes~~
All unit tests pass

Issue Dependencies
No response
Related Work
No response

Creating status check scripts will not be implemented with this.  This functionality is now performed by the new VersionValidator GitHub action

After further investigation, the Tag Does Not Exist Status Check workflow did not need to be replaced by the VersionValidator GitHub action.

After further investigation, the Preview Build Status Check workflow did not need to be replaced by the VersionValidator GithHub action.

After further investigation, the Production Build Status Check workflow did not need to be replaced by the VersionValidator GithHub action.

Originally there was different YAML workflow files for each environment for each type of status check as well as version check and build and unit testing.
This has all be improved and consolidated into single workflows that work for all of the required branches/environments.


Feature suggestion: transformations

Hi,
It would be nice to be able to pass a function to a query which would be applied to every record after retrieval in order to transform properties/records. I don't think something like this exists currently. It's not hard do it in the callback but it would save the whole hassle of writing a loop to iterate over the retrieved records.
A good example of this can be seen in oriento:
db
.select('name')
.from('OUser')
.where({status: 'ACTIVE'})
.transform({
  status: function (status) {
    return status.toLowerCase();
  }
})
.limit(1)
.one()
.then(function (user) {
  console.log('user status: ', user.status); // 'active'
});

I need this feature right now jeje :)


Update tests related to homepage's popular links so they use examples from publishing-api

⚠ This repo is Continuously Deployed: make sure you follow the guidance ⚠
What
While https://github.com/alphagov/frontend/pull/4157  was developed, the test examples in publishing-api were still not ready, so the tests were prepared using a different approach. The example has now been added, so we need to update the tests to use it.
Why
In order to keep all api examples in a single place and to allow the same examples to be shared between different applications, so they can be easily updated at the same time api is updated.
Trello card

@unoduetre
I think this PR can be closed as the changes are about to be made as part of Leena's work here


Improve ordering and match Excel colors for plots

E.g. for fraction plot, copy stacking order from Excel balance. Also apply similar color scheme.

Closed as part of #36


AdaptiveDialogBot should load the AdaptiveDialog resources in the constructor

technically it should load the resource on the first turn and not in the constructor


kernel restart when logging to console in debug mode

Kernel restarts when running a trivial console logging example in debug mode.
If i run it in non-debug model (F5), it works fine. If i log only a file , it also works fine.
is it a duplicate of https://github.com/spyder-ide/spyder/issues/4421 ?
What steps will reproduce the problem?

Run the following program with Debug (CTRL+F5) + Continue (CTRL+F12). No breakpoints are set
logger = logging.getLogger(name)
logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
ch.setFormatter(formatter)
logger.addHandler(ch)
logger.info('test')
logger.info('test2')
ch.close()
logger.removeHandler(ch)
logging.shutdown()

What is the expected output? What do you see instead?
Expect to see 2x log messages:
2017-05-20 10:39:11,200 - main - INFO - test
2017-05-20 10:39:11,208 - main - INFO - test2
Instead see :
2017-05-20 10:38:41,663 - main - INFO - test
ipdb>
Restarting kernel because an error occurred while debugging
Please provide any additional information below
Versions and main components

Spyder Version: 3.1.4
Python Version: 3.5.3 (ipython console reported)
Qt Version: 5.6.2
PyQt Version:  5.6.0
Operating system: Windows 10

Dependencies
Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:
jedi >=0.9.0     :  0.10.2 (OK)
matplotlib >=1.0 :  2.0.2 (OK)
nbconvert >=4.0  :  5.1.1 (OK)
numpy >=1.7      :  1.12.1 (OK)
pandas >=0.13.1  :  0.20.1 (OK)
pep8 >=0.6       :  1.7.0 (OK)
pyflakes >=0.6.0 :  1.5.0 (OK)
pygments >=2.0   :  2.2.0 (OK)
pylint >=0.25    :  1.6.4 (OK)
qtconsole >=4.2.0:  4.3.0 (OK)
rope >=0.9.4     :  0.9.4-1 (OK)
sphinx >=0.6.6   :  1.3.1 (OK)
sympy >=0.7.3    :  1.0 (OK)

is it a duplicate of #4421?

Yes, I'm afraid it is. This will be fixed in PR #4202, which will be part of Spyder 3.2. Sorry for the inconveniences this causes you in the meantime.
You can also downgrade to Spyder 3.1.3, which doesn't have this problem.

hi, it also works for me to disable logging to console before running in debug mode. Logging to file [only] seems to work fine. Im writing this comment in case it helps anyone else, who like me, prefers not to downgrade to avoid this bug

Yep, the problem really has to do with printing to the console while debugging. That's what makes the kernel to restart.

How to disable logging to the console please? I'm looking for it in the preferences but cannot find it...


test running budget allocator nb

Just a test, do not merge! It actually worked in https://github.com/pymc-labs/pymc-marketing/pull/919/commits/72100773b57095cb7a5e68ff9533d57ea90f37cc

📚 Documentation preview 📚: https://pymc-marketing--919.org.readthedocs.build/en/919/

When I run all the notebooks it fails ... maybe a memory issue?

When I run all the notebooks it fails ... maybe a memory issue?

We need to comment on file saving, which is something we can do, as it is much more beneficial when trying to find bugs!


management runas module error

Empire Version
1.5.0
OS Information (Linux flavor, Python version)
Running Empire on Ubuntu 12.04 x64
Python 2.7.3
Command executed on - Microsoftr Windows Serverr 2008 Enterprise, 6.0.6002 Service Pack 2 Build 6002
Expected behavior and description of the error, including any actions taken immediately prior to the error. The more detail the better.
Error is thrown when using the module management/runas
Attempting to use domain admin creds to add a new user to DC
Screenshot of error, embedded text output, or Pastebin link to the error
(Empire: management/runas) > info

           Name: Invoke-RunAs
         Module: management/runas
     NeedsAdmin: False
      OpsecSafe: True
   MinPSVersion: 2
     Background: False
OutputExtension: None

Authors:
  rvrsh3ll (@424f424f)

Description:
  Runas knockoff. Will bypass GPO path restrictions.

Options:

  Name       Required    Value                     Description
  ----       --------    -------                   -----------
  UserName   False       dadmin               Username to run the command as.
  CredID     False       29                        CredID from the store to use.
  Domain     False       targetdomain              Optional domain.
  Cmd        True        'net user                 Command to run.
                         newuser
                         password /add /domain'
  Agent      True        2REGBMBGWN3UYZKS          Agent to run module on.
  ShowWindow False                                 Switch. Show the window for the created
                                                   process instead of hiding it.
  Password   False       dadminpass                Password for the specified username.

(Empire: management/runas) >
(Empire: management/runas) >
(Empire: management/runas) > execute
(Empire: management/runas) >
**[!] Error in runas: Exception calling "Start" with "1" argument(s): "Access is denied"**

Any additional information
Not sure if this module can be or should be used to create a new user on DC. I guess it can be used. If not, please feel free to close the issue.
Thanks.

The runas module was originally meant for process launching/token impersonation so we didn't think about executing commands in this particular way. There's now an Arguments parameter for the module with the following commit to dev https://github.com/PowerShellEmpire/Empire/commit/7a47ea358319ea31b0a0eb7ac37be302bc8f4365 - I tested it for your scenario and it worked (user was added).

Also, make sure you unset the CredID field if you're manually specifying credentials - I imagine this is what was giving you the access is denied error.


.Net: C# InvokeStreamingAsync doesn't behave as expected

Describe the bug
I was following Example67_KernelStreaming and I noticed InvokeStreamingAsync doesn't behave as expected. At least for me.
To Reproduce
I have a prompt that takes around 10s to complete. The prompt has 2 native functions embedded in the skprompt.txt that take around 0.3s each to complete. I mention this in case you find it helpful.
I then created a Kernel and called it twice, once with InvokeAsync and another one with InvokeStreamingAsync

var result = await agent.Kernel.InvokeAsync(PromptFolder, ChatFunction, args);

// It takes around 10 seconds to get here. All good, that's how long the prompt takes.
var resultValue = result.GetValue<string>();

await foreach (var update in agent.Kernel.InvokeStreamingAsync<string>(PromptFolder, ChatFunction, args))
{
     // I would expect to start hitting this point soon after the kernel is launched. However it takes
     // as long as without streaming to get here.
     yield return update;
 }

Expected behavior
I would expect the second snippet to start yielding updates pretty much immediately. Instead it takes around 10s to start yielding and when it does it blurts our the entire response in a quick loop.
It doesn't yield everything in one iteration, I checked.
Platform

OS: Mac
IDE: Rider
Language: C#
Source: NuGet package version 1.0.1

Hi, try chec again on latest SK release 1.1
Could you show your skprompt content?

Hi @Krzysztof318
Same behaviour on 1.1. I'm using GPT4. I've tried with 0613 and 1106-preview.
I can show a bit of the prompt, but I'll remove some things that identify the customer if that's ok with you. Those bits are just text, so it shouldn't affect the prompt too much.
I'm also including comments with // to explain what certain things do. // comments aren't included in the prompt when it runs
Some lengthy description that tells the agent how to behave

You can use the following questions and answers as an example on how to answer questions. They provide with guidance as to how to answer questions and the tone of the answers.

Sample questions and answers:

// This is a native function that uses AzureAISearchMemoryStore to RAG 5 examples. This completes in around 0.3s
{{ qna.RetrieveQnA question=$input numQuestions="5"}}

This is the chat history between you and the user:

// This native function retrieves the chat history from a Cosmos. It also completes in 0.4s
{{ history.RetrieveChat $sessionId}}

// This is just the text input from the user
{{$input}}

Your response should be the next message in the conversation. Only include one message. Avoid including JSON in your response.

It's also worth mentioning that the Kernel has been configured to make use of a DataSource, in case that affects it in any way.
var config = new AzureOpenAIChatCompletionWithDataConfig()
{
       CompletionEndpoint = openAiConf["Endpoint"],
       CompletionApiKey = openAiConf["Key"],
       CompletionApiVersion = openAiConf["ApiVersion"],
       CompletionModelId = openAiConf["Deployment"],
       DataSourceEndpoint = dataSourceConf["Endpoint"],
       DataSourceIndex = dataSourceConf["IndexName"],
       DataSourceApiKey = dataSourceConf["Key"]
};

// This is the logger provider that comes from the API app. It'd be nice to use it to log the kernel
var existingLoggerProvider = _serviceProvider.GetRequiredService<ILoggerProvider>();

var kernelBuilder = Kernel.CreateBuilder();
kernelBuilder.Services
    .AddAzureOpenAIChatCompletion(config:config)
    .AddLogging(c => c.AddProvider(existingLoggerProvider))
    .AddAzureOpenAITextEmbeddingGeneration(openAiConf["Embeddings"], openAiConf["Endpoint"], openAiConf["Key"]);

Kernel = kernelBuilder.Build();

Maybe any proxy issue like here LINK

M... that doesn't seem to be it :( I tried with a local version and a deployed version (AppService)

Have you resolved this problem?

Let's close it for now, I still see a difference between doing a request to AOAI in stream mode and through SK. But I don't have enough information to argue against closing the issue.


feat: extend forest-cli chain head

Summary of changes

Changes introduced in this pull request:

adds forest-cli chain head --tipsets [and -n] option, which allows for printing multiple last tipsets
breaking change as I added epoch label

❯ forest-cli chain head
[2097089]
bafy2bzaceajfbzlhuwudsdu3swuhgys2govtyel46akjdbarq2752w7cz7gde
bafy2bzaceapu74bbaxoftc76qbez7vr5a3hmkjcxjfk5pofufwv3wnlk36b3w
bafy2bzaceb2372awzqenvkdgpnkt34ssz64redtf4qb2ewugzbbpekl4kfftq
bafy2bzacebzh3llwhllzxsremaop4u37kbm4quu5bpjiwuoagzgmudmmwsywo

❯ forest-cli chain head -n 5
[2097089]
bafy2bzaceajfbzlhuwudsdu3swuhgys2govtyel46akjdbarq2752w7cz7gde
bafy2bzaceapu74bbaxoftc76qbez7vr5a3hmkjcxjfk5pofufwv3wnlk36b3w
bafy2bzaceb2372awzqenvkdgpnkt34ssz64redtf4qb2ewugzbbpekl4kfftq
bafy2bzacebzh3llwhllzxsremaop4u37kbm4quu5bpjiwuoagzgmudmmwsywo
[2097088]
bafy2bzacecxn5fuwwrhanvut4sisoe6ubp64kguhjalmawt6bdqxwvde6n4pe
bafy2bzacebbcf4xzbzfge7hqri3pa2ladnk4urqmlg24nmqdw3v2dzlzu35ia
bafy2bzacebv73y7v42f6nv2rinmfkuoaubmamz5uqsrsp5xe2g6dogsl7uiei
bafy2bzacecmxda677fteaap73ot6pfugcg4ixhsy2axyfnowjxvihg5pf4jds
[2097087]
bafy2bzaceckhkuybrh5uxzubse33kpeyeddzhmt5f3p23myh75c6cr4gnq3jk
bafy2bzacebu7pg2ne3b7tssw4dlf4jmflpid735nwn3rdlqgevzal36o6v5kg
bafy2bzaceblhetqnlhrhedt4hqzypnl4s6kbyqijbklqzl5nqy7euzu4v4qxc
bafy2bzacecwmdjo4zlagcqoqrd47iudkej5z5lzjbunhobxtzyucccjoptldw
[2097086]
bafy2bzaced5nc6tiaa2sada3qee3lveu5jhh45ouec7nwn74fe4nzadkxswg6
bafy2bzacecrna54zlij2gbtzuetliselajexb2nptzqzujdzpggh5wwxwkqq4
bafy2bzacec7iysjbauybb3ooiohgrxqkibuwiqhjno4p5xfqaycc6ur4jvow6
[2097085]
bafy2bzaceae3zvxgzqukg5sznohxozvz3ykf2rnyhthc5zs3lyhy3fneofnvo
bafy2bzacedckvm74g2tsr2vyqgay6xtljwh5xgem66hvri3dy65jmv5mdp6ac
bafy2bzacedat26oxwybmxqxqhzfvn3hspvoknvmgiqr2dvpx7ijagt5ggqu2m

Reference issue to close (if applicable)

Closes
Other information and links

Change checklist

[x] I have performed a self-review of my own code,
[x] I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
[x] I have added tests that prove my fix is effective or that my feature works (if possible),
[x] I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

It'd be great to support --format json (Not necessarily in this PR)

It'd be great to support --format json (Not necessarily in this PR)

Totally agree, not only for this subcommand but also for some others.

@hanabi1224 I removed the edge case in https://github.com/ChainSafe/forest/pull/4952/commits/f5d1adbc755d452368a2670d9e6ab2e507fe3f03, it was an artefact from a different approach. with saturating_sub it's not needed.


subscribe button translate

translate button
issue https://github.com/kubernetes/website/issues/22933

/language de

/assign @rlenferink

Thanks for fixing!
/lgtm
/approve

(Because of file in the i18n dir which is still not possible)


fix the tag on example 'AJAX validation recipe'

django-jsonview needs a '_' to be used as a tag

Current coverage is 96.31%

Merging #509 into dev will not affect coverage as of 1f79409

@@              dev    #509   diff @@
=====================================
  Files          23      23
  Stmts        2281    2281
  Branches      206     206
  Methods         0       0
=====================================
  Hit          2197    2197
  Partial        35      35
  Missed         49      49

Review entire Coverage Diff as of 1f79409

Powered by Codecov. Updated on successful CI builds.


python38Packages.rx: 3.1.0 -> 3.1.1

Motivation for this change
https://github.com/ReactiveX/RxPY/releases/tag/v3.1.1
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[x] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 112102 run on x86_64-linux 1

1 package marked as broken and skipped:

python39Packages.starlette

2 packages failed to build:

python38Packages.fastapi
python38Packages.starlette

20 packages built:

python37Packages.fastapi
python37Packages.graphene
python37Packages.graphql-core
python37Packages.graphql-relay
python37Packages.graphql-server-core
python37Packages.influxdb-client
python37Packages.rx
python37Packages.starlette
python38Packages.graphene
python38Packages.graphql-core
python38Packages.graphql-relay
python38Packages.graphql-server-core
python38Packages.influxdb-client
python38Packages.rx
python39Packages.graphene
python39Packages.graphql-core
python39Packages.graphql-relay
python39Packages.graphql-server-core
python39Packages.influxdb-client
python39Packages.rx


Fixed screenshot indentation to fix numbering

The numbering in the Creating a test project procedure isn't correct, so I indented the two screenshots that were causing the numbering errors.
Summary
Describe your changes here.
Fixes #Issue_Number (if available)

It looks like the build is stuck. Closing and reopening.


Update AboutUs

Created a copy of my own markdown page (leezhixuan.md) and uploaded my picture to update AboutUs.md

Codecov Report

Merging #114 (88bb873) into master (ba53b8c) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #114   +/-   ##
=========================================
  Coverage     72.15%   72.15%
  Complexity      399      399
=========================================
  Files            70       70
  Lines          1232     1232
  Branches        125      125
=========================================
  Hits            889      889
  Misses          311      311
  Partials         32       32

Continue to review full report at Codecov.

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