Exporting imagefile to a Url.

hi guys, sorry i am a noob but please i really need to make this work. i tried to export the selected image/video from the DKimagepickercontroller. and this is what i have tried. (i change the path: String to Nsurl because i want to export it to a url) i put the code below outside func showimagepickerwithasseststype
let apath = "../desktop"
let url = NSURL(string: "http://localhost/swiftios/upload.php")

// i got this code from the instruction on this github
func writeImageToFile(path: NSURL, completeBlock: (success: Bool) -> Void){
}

then i put that code inside the func showimagepickerwithassesttype
	pickerController.didSelectAssets = { [unowned self] (assets: [DKAsset]) in

		self.assets = assets
		self.previewView?.reloadData()

        // i recall the function above in here like this
        self.writeImageToFile(self.url!, completeBlock:  { (success) in
            if success {
                self.UploadRequest()
                print("file is uploaded")
            } else {
                print("error")
            }
        })

but one i select images and click on SELECT nothing is happening. it didnt even print an error.
did i not write this correctly?? or am i putting the code in the wrong place??

You have to export the selected image/video to the Documents directory, then uploading it to your server.


Blazor signalr connection breaks after syncing large dom / dom element

Describe the bug
On login in our application we load a logo which is displayed. Normally this is quite small but since it is user specific it sometimes can be large. With preview 4 the server connection is broken when this is too large. The client then "freezes" - i.e. does not respond to clicks. The clicks do generate websocket messages but no responses. After a timeout the auto reconnect establishes a new connection and everything is then ok (until the next large dom sync).
This worked fine in preview 3.
To Reproduce
I tried to reproduce with a small update to the template project but could not. Let me know if I should try again. It is 100% reproducible in our application.
I've artificially generated various size images and it seems to break when the image is between 25440 and 25450 bytes. Tracing in chrome the websocket message for this dom sync is between 43772 and 43784 bytes (working / non-working).
Please let me know if there is anything I can do to get more diagnostics on this for the case where it fails.

It sounds like you are hitting the buffer size limit in SignalR.
@anurse Is there any reason to not remove/increase the limit on the outbound buffer size?

Is there any reason to not remove/increase the limit on the outbound buffer size?

The main reason for the limit is to ensure that clients can't over-allocate server resources. I think I vaguely remember that this may not be as much of an issue in recent previews because of how Pipelines tracks the limit now (+ @davidfowl)

The main reason for the limit is to ensure that clients can't over-allocate server resources.

I can understand limiting the inbound buffer size for this reason, but doesn't the server completely control how much data it wants to send to the client?

Turns out in preview4 we shipped with a 32 MB limit right? Are you sure you're hitting that?

@tn-5 does anything show up in the server logs to indicate the nature of the error?

doesn't the server completely control how much data it wants to send to the client?

I'm having deja vu about this conversation. I feel like we talked about this before and removed the outbound limit. Or maybe Blazor configured it away... I can't find the issue though.

Turns out in preview4 we shipped with a 32 MB limit right? Are you sure you're hitting that?

This is true. Due to a typo we actually had a 32 MB limit in preview 4, so it doesn't seem too likely this would be the case.

doesn't the server completely control how much data it wants to send to the client?

Yes, so you can set the limit higher if you'd like.

After some more testing I'm convinced it is not related to a buffer size per se. At this point I'm thinking it is either a timing issue or something related to the actual dom diff code itself. I've tested very large dom syncs (total dom + individual component) - this all works 100%. In this specific instance the reproducible error happens when I request the data from an async api. I'll investigate further to see if it can be reproduced more reliably.

I've managed to reproduce this reliably with some smal changes to the template project. it seems to be a time related issue linked to a large dom sync. The large dom makes some code take a bit longer and then the signalr messages sequences are different. It happens specifically when navigating from one page to another.
   Type: Binary, size: 26, EndOfMessage: True.
dbug: Microsoft.AspNetCore.Components.Server.Circuits.RemoteUriHelper[0]
Location changed to 'http://localhost:49993/'.
trce: Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsTransport[11]
Sending payload: 86 bytes.
   Type: Binary, size: 26, EndOfMessage: True.
trce: Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsTransport[11]
Sending payload: 86 bytes.
dbug: Microsoft.AspNetCore.Components.Server.Circuits.RemoteUriHelper[0]
Location changed to 'http://localhost:49993/'.
You'll see in the failure case there is a websocketstransport message between the "invoke notifylocationchanged" and the "remoteurihelper - location changed to..." message.
Reproduce

dotnet new blazorserverside
Add large dom element to counter.razor

Initialise to large data (500k should reliably break it) - functions block:
string dummydata = "";
protected override async Task OnInitAsync()
{
Random rnd = new Random();
int i = rnd.Next(32, 127);
dummydata  = new string((char)(i), 500000);
}

At this point the application works fine, navigating between different pages works as expected

What seems to then break it is when navigation occurs from another layout (it may also be that there are more different elements to sync). Anyway -, to reproduce:

Create a layout file "Layout1" (no specific content required):
@inherits LayoutComponentBase

@Body

Change the "fetchdata.razor" file to use this layout
Add a button on fetchdata to enable navigation back to the counter page (due to the layout change this is required):
<button onclick="@(() => UriHelper.NavigateTo("counter"))">Counter
This also requires: @inject IUriHelper UriHelper

In this scenario the issue reproduces reliably:

Run application
Navigate to "fetchdata" page
Navigate to "counter" page
Clicks are not being processed. After a timeout the connection is reestablished and it works again

You are some really great folks. Thank you so much.

@danroth27 I think I saw this the other day when trying out a separate bug.
I think what is happening is that the server takes a long time to process the event/render and the signalr connection gives up along the way.
I will investigate more, but I’m not sure we will be able to do anything reasonable here.
I was rendering 100.000 elements at the time, so I didn’t give it much importance given that I was able to reliably render at least 1000 and that if you render large payloads these things are going to happen eventually.
I also have a proposal based on this to not produce large batch updates but to split them into smaller ones to improve responsiveness.
For the record, I would avoid delivering assets this way.

For the record, I would avoid delivering assets this way.

I'd definitely agree with @javiercn here. SignalR isn't really designed with large message payloads in mind. It's designed for frequent small-to-medium updates. Generally, when users ask about transferring large files "through" SignalR, we strongly recommend hosting the content at some URL (blob storage, CDN, etc.) and sending the URL through SignalR instead of the actual content.

I agree in general that this should not be done, at least not without a good reason.
In our use case this logo is a client logo in a large multi-tenant installation. The logo is stored in the database and retrieved from an API and then displayed. Normally the logo should be small (< 20k) and retrieved only once (since it is present on the main layout across all pages).
We are designing our Blazor app primarily to be used client side (wasm) which means the code will directly receive this data from the api using our normal authentication etc.
We only found this issue originally since there was a misconfiguration on one tenant (resulting in a very large logo - several 100k).
@javiercn I am concerned about the way this is exhibiting itself. In the failure case all the data is actually transferred correctly and the client side seems ok - it still keeps sending signalr messages to the server. It seems more likely that some state in the signalr handling on the server side is getting confused than a a simple timeout (we are talking total transfer times of several ms here, not seconds). I am guessing that this is rather indicative of a bug related to receiving responses out of an expected sequence.

@pranavkm didn’t you fix this issue the other day in the message pack implementation?

In our use case this logo is a client logo in a large multi-tenant installation. The logo is stored in the database and retrieved from an API and then displayed.

Generally we would also recommend not storing the image content in the database (instead storing it on blob storage and storing a link) but I realize you may not want to redesign your entire app :).
I'd still advise you consider using a standard server-side ASP.NET Core middleware to allow you to fetch a tenant's image using standard HTTP given the necessary data (tenant ID, authentication, etc.) and then use that URL in the image tag. data URLs require transferring the entire image on every render which means you can't take advantage of browser caching. If, instead, you fill in a URL like , the browser can cache that image appropriately and save a lot of wasted bandwidth (even for small logos) on full-page refreshes.
This is a little tangential of course, since we do still need to investigate the Blazor issue further. Just throwing my design thoughts out there 😸

@davidfowl   I've tested again with latest nightly (11681) and the problem is still there, so it is not fixed.
When I tested now I realised that it only happens when the navigation is performed by using NavigateTo from the UriHelper.
In the repro example you can copy Mainlayout.razor to Layout1.razor. When navigating using the button click (which uses NavigateTo) it fails. When clicking in the link in the navpane it works.
So it seems the issue is somehow related to the UriHelper implementation

I dunno if the fix is merged but there is an issue that @pranavkm found in the current impl. I dunno if it's related to this but it's a bug in the protocol parsing which might be related.

I've investigated this in more detail. The root cause is that there is an issue with the lock handling in the signalR HubConnectionContext.
Specifically, the use case I have fails if the following sequence of events happen:

A call to WriteAsync does not complete immediately and it returns a CompleteWriteAsync task
Immediately afterwards another message is sent, no immediate lock is obtained and it returns a CompleteWriteAsync task.

In this scenario task [2] is triggered when task [1] releases the lock (but before the actual return from CompleteWriteAsync). Upon completion of [2] the _writeLock count is 1 (which is correct). Control flows back to CompleteWriteAsync(to return) and at that point the _writeLock count is 0 (incorrect).
At this point the lock seems to be allocated (although it shouldn't be). No further comms is then allowed until the connection is reset.
I am not sure what the root cause of this is, it may be a subtle issue with the ValueTask being awaited (maybe it caches the same one & then awaits it multiple times which is not allowed?).
So to summarise this issue occurs when the CompleteWriteAsync is still busy and another message needs to be sent and ends up in WriteSlowAsync, awaiting the lock.

@anurse Can we get somebody to look at this?

@BrennanConroy can you take a look?

Some more testing observations:

For the failure case the thread ids of the CompleteWriteAsync and WriteSlowAsync tasks are the same
I can get it to work reliably by changing the await _writeLock.WaitAsync(); to await _writeLock.WaitAsync(100000, default); where 100000 is an arbitrary large number.

In the second case the SemaphoreSlim implementation executes a different code path and the observed thread ids for the CompleteWriteAsync and WriteSlowAsync tasks are different.
Based on my testing it looks like this could be a workaround until someone with enough time can get to the bottom of this. Logically it almost seems as if there is an issue with the SemaphoreSlim implementation in this specific context, but given that this has been around a while it does seem a bit unlikely.

Adding area-signalr and co-assigning @BrennanConroy to do investigation from SignalR side.

FYI, I have not ignored this. I am able to repro the issue, unfortunately I am having debugger issues which is making it difficult to make progress here.

@BrennanConroy
I think the root cause is the await task; in CompleteWriteAsync. I think it should be await task.AsTask(); since the result of this call is wrapped in a new ValueTask by the caller.

That shouldn’t matter

I have the same error when I try to transfer a html page with a weight of 23,000 characters (no pictures, just html), the application crashes as described in the first post.

We're continuing to dig through this. Moving out to preview7 because we aren't confident we can have a fix for preview6.

We've identified the issue and @rynowak is working on a fix


Allow disable of problem emails and add logging

Changes

Allow disabling of problem emails from background jobs by checking Disable Problem Emails on DLRS Custom Setting

Issues Closed
#1016

Do you know how to activate this settings or if it's available on version of DLRS 2.22 ? Thanks a lot !

@mehdibaha this is not included in any releases yet. It will be in v2.23 which should release soon but doesn't have a specific date.


BlockVasil: skip deserialization of tx_witnesses field

BlockVasil: skip deserialization of tx_witnesses field
There is a problem with the deserialization of the Redeemer type, but
since we don't really need the witnesses, we can avoid it by just
skipping the field.
Unfortunately, this requires duplicating some code from the sdk.
TODO: this probably needs to be done for the other block types too, but I'm not aware of those failing

rebase the branch pls. overall lgtm


What do I put in my app.ini?

I want to apply the macchiato theme, but I don't know the theme name for the config.

if you've named the theme file as catppuccin-macchiato.theme you'd use the theme as "catppuccin-macchiato"

The themes should be replaced to all the themes that you installed. And DEFAULT_THEME is the default theme that you want.
[ui]
catppuccin-frappe-blue,catppuccin-frappe-flamingo,catppuccin-frappe-green,catppuccin-frappe-lavender,catppuccin-frappe-maroon,catppuccin-frappe-mauve,catppuccin-frappe-peach,catppuccin-frappe-pink,catppuccin-frappe-red,catppuccin-frappe-rosewater,catppuccin-frappe-sapphire,catppuccin-frappe-sky,catppuccin-frappe-teal,catppuccin-frappe-yellow,catppuccin-latte-blue,catppuccin-latte-flamingo,catppuccin-latte-green,catppuccin-latte-lavender,catppuccin-latte-maroon,catppuccin-latte-mauve,catppuccin-latte-peach,catppuccin-latte-pink,catppuccin-latte-red,catppuccin-latte-rosewater,catppuccin-latte-sapphire,catppuccin-latte-sky,catppuccin-latte-teal,catppuccin-latte-yellow,catppuccin-macchiato-blue,catppuccin-macchiato-flamingo,catppuccin-macchiato-green,catppuccin-macchiato-lavender,catppuccin-macchiato-maroon,catppuccin-macchiato-mauve,catppuccin-macchiato-peach,catppuccin-macchiato-pink,catppuccin-macchiato-red,catppuccin-macchiato-rosewater,catppuccin-macchiato-sapphire,catppuccin-macchiato-sky,catppuccin-macchiato-teal,catppuccin-macchiato-yellow,catppuccin-mocha-blue,catppuccin-mocha-flamingo,catppuccin-mocha-green,catppuccin-mocha-lavender,catppuccin-mocha-maroon,catppuccin-mocha-mauve,catppuccin-mocha-peach,catppuccin-mocha-pink,catppuccin-mocha-red,catppuccin-mocha-rosewater,catppuccin-mocha-sapphire,catppuccin-mocha-sky,catppuccin-mocha-teal,catppuccin-mocha-yellow
DEFAULT_THEME  = catppuccin-mocha-sapphire```

Thanks for the quick answer!
I put that in /data/gitea/conf/app.ini, but the theme does not seem to work
I put the css files in /data/gitea/public/css
Am I doing something wrong?

Thanks for the quick answer! I put that in /data/gitea/conf/app.ini, but the theme does not seem to work

You need to restart the instance of gitea.

when I press update theme after selection, the selection becomes blank and the theme does not change.

when I press update theme after selection, the selection becomes blank and the theme does not change.

Can we see any logs? I'm not to sure what could be wrong from just that since that is what happens when the themes are misconfigured.

_kyan_git_logs.txt

_kyan_git_logs.txt

its trying to apply theme-macchiato so I'm guessing that's the name of the CSS file, however it cannot be found so you might want to check your public/css/ folder to see the names there and ensure they are the exact same same they are in the app.ini without the following .css

It looks great now! Thanks for the help!


xgboost eat all the memory of the master node

@tqchen Hi~ tianqi, sorry to disturb you again. I run the xgboost on yarn, but sometimes the xgboost process will eat all the memory of the machine which I submitted the job. I know the Spark can run in both yan-cluster and yarn-client mode. Which mode dose the xgboost run on yarn? and Is that is why the xgboost will eat all the memory?

I use the top command and find that the jvm launched by xgboost occupy too much virtual memory.

you do not need to worry about virt, http://mugurel.sumanariu.ro/linux/the-difference-among-virt-res-and-shr-in-top-output/

@CodingCat Thanks for you reply! Because there are too many jobs run on the machine which I launch the xgboost, if this process occupy too much VIRT, it must influence other processes. I find that the xgboost run on local mode also occupy around 35G VIRT. I think it should not occupy this size of VIRT on distributed mode.


App not asking for permission

Software Versions

Python:3.6
OS:ubuntu 16
Kivy:1.11.1
Kivy installation method:pip

Describe the bug
I asked for INTERNET permission in both the .spec file and main.py, but still the app does not ask for permission
Expected behavior
asking permission for accessing the INTERNET
To Reproduce
after running the app it just shows the main screen without asking for permission
Code and Logs and screenshots
spec file:
 [app]
(str) Title of your application
title = My Application
(str) Package name
package.name = kvcalc
(str) Package domain (needed for android/ios packaging)
package.domain = org.test
(str) Source code where the main.py live
source.dir = .
(list) Source files to include (let empty to include all the files)
source.include_exts = py,png,jpg,kv,atlas
(list) List of inclusions using pattern matching
#source.include_patterns = assets/,images/.png
(list) Source files to exclude (let empty to not exclude anything)
#source.exclude_exts = spec
(list) List of directory to exclude (let empty to not exclude anything)
#source.exclude_dirs = tests, bin
(list) List of exclusions using pattern matching
#source.exclude_patterns = license,images//.jpg
(str) Application versioning (method 1)
version = 0.1
(str) Application versioning (method 2)
version.regex = version = '"['"]
version.filename = %(source.dir)s/main.py
(list) Application requirements
comma separated e.g. requirements = sqlite3,kivy
requirements = python3,kivy,buildozer,android
(str) Custom source folders for requirements
Sets custom source for any requirements with recipes
requirements.source.kivy = ../../kivy
(list) Garden requirements
#garden_requirements =
(str) Presplash of the application
#presplash.filename = %(source.dir)s/data/presplash.png
(str) Icon of the application
#icon.filename = %(source.dir)s/data/icon.png
(str) Supported orientation (one of landscape, sensorLandscape, portrait or all)
orientation = portrait
(list) List of service to declare
#services = NAME:ENTRYPOINT_TO_PY,NAME2:ENTRYPOINT2_TO_PY

OSX Specific

author = © Copyright Info
change the major version of python used by the app
osx.python_version = 3
Kivy version to use
osx.kivy_version = 1.9.1

Android specific

(bool) Indicate if the application should be fullscreen or not
fullscreen = 0
(string) Presplash background color (for new android toolchain)
Supported formats are: #RRGGBB #AARRGGBB or one of the following names:
red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray,
darkgray, grey, lightgrey, darkgrey, aqua, fuchsia, lime, maroon, navy,
olive, purple, silver, teal.
#android.presplash_color = #FFFFFF
(list) Permissions
android.permissions = INTERNET
(int) Target Android API, should be as high as possible.
#android.api = 27
(int) Minimum API your APK will support.
#android.minapi = 19b
(int) Android SDK version to use
#android.sdk = 20
(str) Android NDK version to use
android.ndk = 21
(int) Android NDK API to use. This is the minimum API your app will support, it should usually match android.minapi.
#android.ndk_api = 21
(bool) Use --private data storage (True) or --dir public storage (False)
#android.private_storage = True
(str) Android NDK directory (if empty, it will be automatically downloaded.)
#android.ndk_path =
(str) Android SDK directory (if empty, it will be automatically downloaded.)
#android.sdk_path =
(str) ANT directory (if empty, it will be automatically downloaded.)
#android.ant_path =
(bool) If True, then skip trying to update the Android sdk
This can be useful to avoid excess Internet downloads or save time
when an update is due and you just want to test/build your package
android.skip_update = False
(bool) If True, then automatically accept SDK license
agreements. This is intended for automation only. If set to False,
the default, you will be shown the license when first running
buildozer.
android.accept_sdk_license = False
(str) Android entry point, default is ok for Kivy-based app
#android.entrypoint = org.renpy.android.PythonActivity
(str) Android app theme, default is ok for Kivy-based app
android.apptheme = "@android:style/Theme.NoTitleBar"
(list) Pattern to whitelist for the whole project
#android.whitelist =
(str) Path to a custom whitelist file
#android.whitelist_src =
(str) Path to a custom blacklist file
#android.blacklist_src =
(list) List of Java .jar files to add to the libs so that pyjnius can access
their classes. Don't add jars that you do not need, since extra jars can slow
down the build process. Allows wildcards matching, for example:
OUYA-ODK/libs/*.jar
#android.add_jars = foo.jar,bar.jar,path/to/more/*.jar
(list) List of Java files to add to the android project (can be java or a
directory containing the files)
#android.add_src =
(list) Android AAR archives to add (currently works only with sdl2_gradle
bootstrap)
#android.add_aars =
(list) Gradle dependencies to add (currently works only with sdl2_gradle
bootstrap)
#android.gradle_dependencies =
(list) add java compile options
this can for example be necessary when importing certain java libraries using the 'android.gradle_dependencies' option
see https://developer.android.com/studio/write/java8-support for further information
android.add_compile_options = "sourceCompatibility = 1.8", "targetCompatibility = 1.8"
(list) Gradle repositories to add {can be necessary for some android.gradle_dependencies}
please enclose in double quotes
e.g. android.gradle_repositories = "maven { url 'https://kotlin.bintray.com/ktor' }"
#android.add_gradle_repositories =
(list) packaging options to add
see https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html
can be necessary to solve conflicts in gradle_dependencies
please enclose in double quotes
e.g. android.add_packaging_options = "exclude 'META-INF/common.kotlin_module'", "exclude 'META-INF/*.kotlin_module'"
#android.add_gradle_repositories =
(list) Java classes to add as activities to the manifest.
#android.add_activities = com.example.ExampleActivity
(str) OUYA Console category. Should be one of GAME or APP
If you leave this blank, OUYA support will not be enabled
#android.ouya.category = GAME
(str) Filename of OUYA Console icon. It must be a 732x412 png image.
#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png
(str) XML file to include as an intent filters in  tag
#android.manifest.intent_filters =
(str) launchMode to set for the main activity
#android.manifest.launch_mode = standard
(list) Android additional libraries to copy into libs/armeabi
#android.add_libs_armeabi = libs/android/.so
#android.add_libs_armeabi_v7a = libs/android-v7/.so
#android.add_libs_arm64_v8a = libs/android-v8/.so
#android.add_libs_x86 = libs/android-x86/.so
#android.add_libs_mips = libs/android-mips/*.so
(bool) Indicate whether the screen should stay on
Don't forget to add the WAKE_LOCK permission if you set this to True
#android.wakelock = False
(list) Android application meta-data to set (key=value format)
#android.meta_data =
(list) Android library project to add (will be added in the
project.properties automatically.)
#android.library_references =
(list) Android shared libraries which will be added to AndroidManifest.xml using  tag
#android.uses_library =
(str) Android logcat filters to use
#android.logcat_filters = *:S python:D
(bool) Copy library instead of making a libpymodules.so
#android.copy_libs = 1
(str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86, x86_64
android.arch = armeabi-v7a

Python for android (p4a) specific

(str) python-for-android fork to use, defaults to upstream (kivy)
#p4a.fork = kivy
(str) python-for-android branch to use, defaults to master
p4a.branch = master
(str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
#p4a.source_dir =
(str) The directory in which python-for-android should look for your own build recipes (if any)
#p4a.local_recipes =
(str) Filename to the hook for p4a
#p4a.hook =
(str) Bootstrap to use for android builds
p4a.bootstrap = sdl2
(int) port number to specify an explicit --port= p4a argument (eg for bootstrap flask)
#p4a.port =

iOS specific

(str) Path to a custom kivy-ios folder
#ios.kivy_ios_dir = ../kivy-ios
Alternately, specify the URL and branch of a git checkout:
ios.kivy_ios_url = https://github.com/kivy/kivy-ios
ios.kivy_ios_branch = master
Another platform dependency: ios-deploy
Uncomment to use a custom checkout
#ios.ios_deploy_dir = ../ios_deploy
Or specify URL and branch
ios.ios_deploy_url = https://github.com/phonegap/ios-deploy
ios.ios_deploy_branch = 1.7.0
(str) Name of the certificate to use for signing the debug version
Get a list of available identities: buildozer ios list_identities
#ios.codesign.debug = "iPhone Developer:   ()"
(str) Name of the certificate to use for signing the release version
#ios.codesign.release = %(ios.codesign.debug)s
[buildozer]
(int) Log level (0 = error only, 1 = info, 2 = debug (with command output))
log_level = 2
(int) Display warning if buildozer is run as root (0 = False, 1 = True)
warn_on_root = 1
(str) Path to build artifact storage, absolute or relative to spec file
build_dir = ./.buildozer
(str) Path to build output (i.e. .apk, .ipa) storage
bin_dir = ./bin
-----------------------------------------------------------------------------
List as sections

You can define all the "list" as [section:key].
Each line will be considered as a option to the list.
Let's take [app] / source.exclude_patterns.
Instead of doing:

#[app]
#source.exclude_patterns = license,data/audio/.wav,data/images/original/

This can be translated into:

#[app:source.exclude_patterns]
#license
#data/audio/.wav
#data/images/original/

-----------------------------------------------------------------------------
Profiles

You can extend section / key with a profile
For example, you want to deploy a demo version of your application without
HD content. You could first change the title to add "(demo)" in the name
and extend the excluded directories to remove the HD content.

#[app@demo]
#title = My Application (demo)

#[app:source.exclude_patterns@demo]
#images/hd/*

Then, invoke the command line with the "demo" profile:

#buildozer --profile demo android debug
`
Additional context
Add any other context about the problem here.

INTERNET isn't a dangerous permission, so your expected behaviour here is incorrect.
https://developer.android.com/reference/android/Manifest.permission

same thing happens for WRITE_EXTERNAL_STORAGE

How are you requesting it in main.py?


[Codelab Feedback]:Maps is not working

Maps is not working!!!!

Looks like an expired key? Here's the error I see in the console:
Google Maps JavaScript API error: ExpiredKeyMapError
https://developers.google.com/maps/documentation/javascript/error-messages#expired-key-map-error


Picture notes

Would like a way to add "picture notes", i.e. upload an image that acts like a regular note.

Can be deleted
Can be liked
Clicking on it expands in the foreground (like baguetteBox)

I'm not sure how the images can be shared over Fluid (stored in the database & UI gets an asset link?) but it would be an interesting challenge!

I'm not sure either! That would be interesting. If we can find a way to store images on the Fluid service we won't have to create a backend service (which I'm trying to avoid)


Add "Contributors Guide" to Wiki

As @jashkenas said

There isn't a contributor's guide written up anywhere ... but we should really add one to the Wiki.

I can get a good start on one just from the things that core contributors have had to take the time to explain to me.

Go for it.

I've never done any Wiki work on github. Do I follow the same fork/edit/commit/pull request cycle as with code, or just edit the existing wiki, like wikis normally work?

We have this: https://github.com/jashkenas/coffeescript/blob/master/CONTRIBUTING.md


[SQL] Change some sums to bigint where it's possible they will go out of range

Description:
Some data / stats are failing to return due to prisma out of range errors.
Corrected this, and also changed a few xp_totals where they could possibly exceed 2.14b
Changes:
Changed ::int to ::bigint in a few places
Other checks:

[ ] I have tested all my changes thoroughly.

changing these from int to bigint is causing an error with toKMB()
"TypeError: Cannot mix BigInt and other types, use explicit conversions"


BigQuery: document proper use of run_async_query/QueryJob/QueryResult

If I run an async query using run_async_query(), get a QueryJob from it and a QueryResult from that by calling job.query_results(), the rows attribute of QR is empty. It seems that when the GET request is sent a parameter maxResults=0 is automatically added, in the client code, which explains why rows is empty.
But this is confusing and not how it behaves for sync queries. I think it should allow getting some rows in that first GET request.
Can you please document the proper use of async queries and QueryResult? Thank you.

@tswast @jba Assigning you two since I am pretty sure this is likely already fixed in the BigQuery work you are doing, but please verify.

We still need to update the docs, but yes, it's covered by the work we're doing.
The sample at https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/bigquery/cloud-client/query.py has the current best practices for async queries.
The gist is to ignore QueryResult for the most part. We are doing some work to make this easier in a future version.

How does one get a count of the rows returned by a query without using QueryResult? Not possible it seems from the destination_table.fetch_data() iterator, even though the REST API does return a totalRows property. Will this also be addressed in the future improvements?

Thanks for the feedback. I'll double-check that this property is covered.

I believe https://github.com/GoogleCloudPlatform/google-cloud-python/issues/4153#issuecomment-336213296 is a duplicate of https://github.com/GoogleCloudPlatform/google-cloud-python/issues/4152. The problem is that the total_rows property is only updated after doing the first request to fetch the first page.
I plan to address this by prefetching the first page of results when doing the function call to list rows.


Cleaner type_type declaration, and faster instance checking.

Codecov Report

Merging #658 into master will decrease coverage by 0.07%.
The diff coverage is 93.33%.

@@            Coverage Diff             @@
##           master     #658      +/-   ##
==========================================
- Coverage   41.05%   40.98%   -0.08%
==========================================
  Files          78       78
  Lines       17575    17573       -2
  Branches     4506     4505       -1
==========================================
- Hits         7216     7202      -14
- Misses       8457     8467      +10
- Partials     1902     1904       +2

Impacted Files
Coverage Δ

vm/src/obj/objtype.rs
40.96% <93.33%> (-4.23%)
:arrow_down:

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 dfb24d7...d7e1d69. Read the comment docs.


Add viewfs dataset

LGTM as a quick fix. Fix for an upstream should probably revisit this place and remove dependency on fs implementations


How to wait for a period of time after clicking?

Steps to reproduce
Tell us about your environment:

Puppeteer version: 9.1.1
Platform / OS version: win 10
URLs (if applicable):
Node.js version: 14.14.44

What steps will reproduce the problem?
Please include code that reproduces the issue.

I'm crawling for content. It needs to be obtained after clicking, and then it needs to wait for a period of time before the content can be displayed.After clicking, there is no network request, just execute the page content.I tried some methods, but I failed.What I can think of is to wait for some time before getting the content, because there is no special selector after clicking.

code: await page.click("div.a > ul.a > li:nth-child(2)", {delay:4000});
await page.evaluate(() => {...

What is the expected result?
I hope that after clicking, I can wait for some time, and then I can get the content.
What happens instead?
I tried this method, but I failed.

you can try waitForSelector()

u should try page.waitForTimeout(ms)

   await  page.waitForNavigation({
        waitUntil: 'networkidle0',
    })


Improve "real HTTP connections are not allowed" error messages

Currently VCR just uses the same error message every time.  However, I think it's often unclear to the end user exactly what they did wrong to get this message.  It would be nice to improve this message (and maybe even have logic that is based on the current context). Examples:

VCR does not currently have an inserted cassette. You should insert a cassette or use the allow_http_connections_when_no_cassette option.
None of the HTTPInteractions in the current cassette match the new request. You might need to use a different :match_requests_on option.

Here are some examples of what I have in mind...
An HTTP request has been made that VCR is not sure how to handle:
  GET http://foo.com/bar?search=q

Currently there is no cassette in use. There are a few ways
you can configure VCR to handle this request:

  * If you want VCR to record this request and play it back during future test
    runs, you should wrap your test (or this portion of your test) in a
    `VCR.use_cassette` block [1].
  * If you only want VCR to handle requests made while a cassette is in use,
    configure `allow_http_connections_when_no_cassette = true`. VCR will
    ignore this request since it is made when there is no cassette [2].
  * If you want VCR to ignore this request (and others like it), you can
    set an `ignore_request` callback [3].

[1] https://www.relishapp.com/myronmarston/vcr/docs/getting-started
[2] https://www.relishapp.com/myronmarston/vcr/docs/configuration/allow-http-connections-when-no-cassette
[3] https://www.relishapp.com/myronmarston/vcr/docs/configuration/ignore-request

An HTTP request has been made that VCR is not sure how to handle:
  GET http://foo.com/bar?search=q

Currently, VCR is using a cassette located at:
  path/to/cassette.yml

Under the current configuration VCR can not find a suitable HTTP interaction
to replay and is prevented from recording new requests. There are a few ways
you can deal with this:

  * The current record mode (:once) does not allow new requests to be recorded
    to a previously recorded set. You can delete the cassette file and re-run
    your tests to allow the cassette to be recorded with this request.
  * Use the `:new_episodes` record mode to allow VCR to record this new
    request to the existing cassette [1].
  * The cassette contains an HTTP interaction that could be replayed if
    your configured `:match_requests_on` option allowed less exact matches.
    These are the strictest request matchers that would allow a match:
    `[:method, :uri]`. Alternately, you can provide your own custom request
    matcher [2].
  * If you want VCR to ignore this request (and others like it), you can
    set an `ignore_request` callback [3].
  * The cassette contains an HTTP interaction that matches this request,
    but it has already been replayed.  If you wish to allow a single HTTP
    interaction to be replayed multiple times, set the `:allow_playback_repeats`
    cassette option [4].

[1] https://www.relishapp.com/myronmarston/vcr/docs/record-modes/new-episodes
[2] https://www.relishapp.com/myronmarston/vcr/docs/request-matching
[3] https://www.relishapp.com/myronmarston/vcr/docs/configuration/ignore-request
[4] https://www.relishapp.com/myronmarston/vcr/docs/request-matching/playback-repeats


request: process arbitrary fields by resolver

I want to process id: ID! field by resolver.
Relay Global Object Identification Specification required This id should be a globally unique identifier for this object.
but almost Database is not support that.
GitHub v4 uses something like echo 010:Repository52265602 | base64 for id.
My app already have ID field and It is difficult to change.
so, I want to modify id value by resolver.
I think that it is good to write in types.json like this.
{
  "Event": {
    "entity": "github.com/vvakame/foobar.Event",
    "fields": {
      "id": {
        "resolver": true
      }
    }
  }
}

I saw #156 and @resolver directive.
but I want to use schema.graphql to communication between server-side engineer and frontend engineer.
I don't want to expose server-side issue to frontend.
What do you think about this idea?

Yeah, a few others have expressed similar sentiments.
I've been trying not to put any logic into types.json to keep it simple. If we do head down we probably should switch to yaml. It's a pain to support two sets of syntax for this though :disappointed:
Another approach would be to provide a gqlgen strip-schema that takes the schema and removes all of its config directives, that doesn't need the service running to easily get a copy.

@vektah I sent a PR that add support to types.yaml 👍
gqlgen strip-schema can not satisfied our team.
because, schema.graphql is modified by server-side engineer and frontend engineer both.
When we want to change GraphQL schema, modify it & sending PR and review each other, make consensus.


[RFC] Developer Documentation Feedbacks

There has been a growing demand for better documentation which many of us totally agree.  Good developer documentation makes others to quickly jump in to use TVM and helps us to get more community users.
We need your help in giving thoughts on how we can do better, in particular:

What do you think are the important categories of docs?

In particular, how can be better (re)organize our docs hierarchy

Would it be helpful to introduce a global architecture diagram? what should that looks like
Propose titles of docs that you would like to say, and a small abstract

This gives us a sense of what specifically the docs we need

How do they fit into the docs hierarchy?
How can we cross-reference docs, should there be a global index into the docs?
When we are doing a particular doc, how can we give the reader a big picture on which part of the system we are talking about?

Please share your thoughts. We will keep this RFC open for a while.  The committers and PMCs will then summarize the discussion into a documentation roadmap and we will make that our top priority in the 0.6 release cycle.
cc @dmlc/tvm-team
Please Comment on Global Docs Organization
This is something that we especially love to pick everyone's brain on. It is very easy to get a bunch of documents, but if we don't organize them clearly and provide pointers they will not be as helpful.

What do you think are the important categories of docs?

I second @FrozenGene's comments. Right now, there's no clear hierarchy in tutorials. We need to consider our users and their level of familiarities. What we would like to give them first and have more for those with more interests. Writing great tutorial is an art and it needs caring which we should strive for when heading to v1.0 release.
What we have is good but not good enough. We need

Very generic overview. What is TVM? think how you'd explain it to your parents and not how you write paper!
Direct, right on to the point use cases oriented broken into compile from onnx, mxnet etc. with nnvm, rpc, autoTVM, quantization etc. The best would be to work on one task (image classification) end-to-end
Introduction to different components (nnvm/relay, tvm, etc.) from high level to some useful and interesting low-level API details broken into separate tutorials and exercises.
Index all API docs. Right now, Rust and Golang are missing from index point of view.
Developers tutorials covering backends and all frontends.

If getting more contribution to the docs is also part of the goal, then it's worth thinking about how to shorten the feedback cycle. Currently in TVM, if people find an issue in the doc, they would need to do one of the following:

feedback: open an issue here linking to the problem doc and describe the doc problem in words.
fix: open a PR by first making a fork, then search and locate the problem doc in the code base, fix it and commit to fork, then open a PR.

We tried these things in other projects:

have a disqus panel at the end of each page so that users can exchange experience (beta.mxnet.io)
provide edit button for each page that links to the editor on github (gluon toolkits)

IMHO, I need two things to get started quickly.

how to use?
An example that uses almost 80% features of the platform (maybe we need one for each platform, such as cpu, opencl, cuda, meta). Currently, we actually have almost all of them, but one has to take a while to find a simple example for meta or fpga. At least, we need a CPU only example. For the employees from AI ASIC accelerator companies, lots of them do not have GPU and the platforms on their computer. If they want to try TVM simply without GPU, they have to eliminate cuda and so on to get an example to work.

how to hack?
llvm gives users the ability to generate IR from clang and also provides ways to output IR after each pass. Currently, I still do not know how many different IRs will be generated from TVM model to cuda (computation graph, halide like for loops, cuda)? Can we generate the textual presentation of the computation graph after graph optimization in nnvm or relay? I think it is better to have an example to show how to hack by adding options to a command.

@szha "edit button" will be very helpful.

I agree with @szha's points.
+1 for edit button
+1 for Disqus panel
BTW, I feel like gluon-nlp's cli demo is super cool stuff that is nice to have.

I want to clarify that people can directly send a pull request to change the docs, without having to send an RFC issue. RFC is only necessary for new features

@tqchen I didn't see the RFC process in the contribute guide. Maybe the RFC process (and that doc change doesn't require one) needs to be documented here: https://docs.tvm.ai/contribute/

Agreed, that is something that would need to be properly documented, so far the decision of (whether RFC is necessary) is done by lazy consensus from committers

Maybe starting by improving inline comment style documents? Many of them are only sentences built by five around words like example below. When I using these APIs, I really need to read the implementation detail to know what will happen :(
def func_example(a):
  """This is Func example.

  Parameters
  ----------
  a: str
  arg a
  """

@jackwish it would be great if you can raise questions about the functions that you would like see improvements, contributions are more than welcomed

@jackwish Agree. Maybe add usage cases as examples in the comments would be helpful. When I start with something that I don't really know, I usually look into the tests folder and locate the code segments that calls the functions/classes. If we can put some brief code samples as Examples along with Parameters, it could be more helpful to understand what would happen.

On the other hand, I found there is unittests and integration tests available for Jenkins. However, code base in apps and tutorials are mostly not tested by Jenkins. To improve the quality of the code base with continuous development and integration, are we considering to add apps and tutorials into Jenkins test?

tutorials and some of the apps(extension) are tested by Jenkins.

@tqchen I will look into things to find where I may contribute some.
@liangfu I think code example is a good idea to help people know how to use, and TVM has many tutorials which the inline document can points to.
I intended to use that example for two aspects: Some APIs don't need the one sentence style document since the API itself is enough. On the other hand, some other APIs actually need a (or several) paragraph(s) to describe the functionalities, restrictions and so on.
Like many people have pointed out, maybe we can categorize the materials for users and developers, as users are likely to import/tune/deploy models rather than to dive into IR things.
Managing decent documents requires extra effort for contributors. Balancing the tradeoff is art :)

There are some good points that are mentioned above - having a set of good getting started guides based on different usecases  would certainly be a good starting point.
One of the things that I found hard to get started with was using tvm as a user was the absence of canned frontends as at the end of the build process one just gets a set of libraries. It is then that one goes and looks at the tutorials for checking that things work just fine - further figuring out the exact version of tensorflow that works with the current trunk of tvm took a bit of time as one cannot expect tensorflow==2.0.0-alpha to work out of the box. Thus follows the question of whether we should also be documenting the versions of the various frameworks that work with TVM for a given version of TVM .
I also think that it is worth also creating an issues page which details what is expected in a bug report and how a user should report a bug  / what's the minimal set of things we require to see in a bug report so that someone else can reproduce it in order to drive a higher quality of bug reports over time for the community.
A link to the ci system from the main website seems due. I stumbled across ci.tvm.ai by accident but it would be good to have some of this handled from the top level.
And thanks for reading till here.
regards
Ramana

Dear all,
Do we have a good documentation for TVM? I am interested in learning more about the TVM compiler optimization strategies especially for Scientific Data for HEP, NP, and DL models for these applications. Any feedback or hint where to start in the source code.

https://github.com/apache/incubator-tvm/pull/6097

I had been working on pytorch a bit lately. One thing that is really great about it, is that pytorch has a 'architecture/code structure' document. It is a detailed description of the core system that allow a good outside coder to build a 'mini-pytorch' just by reading it. Should such a thing exist for tvm?

@MarisaKirisame #6097 aims to achieve part of the goal

Closing for now, the new design and architecture guide now lands in the official docs https://tvm.apache.org/docs/dev/index.html let us open new ones for further improvements


⚠ Processors has degraded performance

In ed634ce, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 41 ms

Resolved: Processors performance has improved in 0c3ae5f.


COLLECTIONS-793 - Simplify Assertion

Coverage decreased (-0.03%) to 90.112% when pulling 47d0a5107a8937245b3bb5c0b9e20b7ddaa3e6ef on arturobernalg:feature/COLLECTIONS-793 into e1f23b035d7caeab8333e8df6739eb143b64affb on apache:master.


Feature/issue 113 notifications

A couple things to note:

This PR includes what I'm referring to as "Expiring notifications" that are removed after N seconds
I've opted to keep timer state in the component as to me it felt that's where it belonged, not in Redux
Currently you will continue to see the same "Task added to my plan" notification when clicking the add button to tasks already in your plan. This works as expected but in the future we will not be displaying the "+" button on tasks already in your plan. This was one of the requests produced from recent testing sessions.

I reviewed commit by commit, but went through and updated comments that were addressed later in the PR.


Migrate uProxy to ES6 imports

We use require everywhere, but that's not valid ES6 code. The Typescript team recommended using the ES6 import format to reduce divergence.

This change is

Nice. I was going to recommend adding the no-require-imports tslint rule for the handful of remaining cases but they will take a little work to move over - I'm happy to do that in a followup. Thanks! :+1:


refactor(api): use document ID instead of URL for content fetching

The application was previously using URLs to fetch document content, but URLs are not guaranteed to be unique across documents. Switch to using Elasticsearch document IDs which are guaranteed unique identifiers. Update types, API endpoints, and components to pass document IDs instead of URLs throughout the content fetching flow.

closing in favor of #155


CREATE FUNCTION/AGGREGATE statement

Thank you guys for a great work. AlaSQL looks really awesome!
Here is a feature request. It would be very handy to be able to define user's functions or aggregates using a SQL notation.
Smth like:
CREATE FUNCTION cube AS function(x) { return x*x*x; };

or
CREATE AGGREGATE myaggr AS function(value, accumulator, stage) { ... };

This would allow to write more advanced transformations being in SQL context only, when javascript context is not available to the user.

Good idea. Hmmmm...
I am thinking about 2 solutions.
a) We make sure the "sql" command - as all other SQL - can be part of a multi SQL statement (seperated by ;) this would demand the function to be surrounded by "or ' like a normal stirng. This is a bit annoying if you have to escape elements as the statement is a string you have to double escape the string representing the function, and dont get started with escaping within stirngswithin the function within the SQL statement...
b) We make a special case where everything after the AS is considered the soruce of the string and simply avoid parsing it. This limits this statment to not being able to be part of a multi statement SQL.
Inputs?

I think option a is more preferable since it's more consistent with other SQL statements. Moreover I'd expect this statement to run as a part of multiple statements scripts in most of the cases.
Regarding quoting issue, I agree, that will be a pain to escape quotes in functions especially the ones using JSON. But this can be approached a postgresql way. For the simplicity I think we don't need fully dynamic dollar quoting, just double dollar quotes would be enough for most of the cases. So the final syntax can be like this:
CREATE FUNCTION cube AS $$ function(x) { return x*x*x; } $$;

What do you think?

Just found out that AlaSQL supports to give javascript as expression - when its surrounded by ``....``
Function is working as expected 👍
Aggregate for some reason only works when you do it async. Looking into why before realeasing next version.

Wow, that was fast! Thank you.
FYI, I just released a new version of SQL Tabs with basic AlaSQL support. Basically it has alasql built in, so people can write SQL queries over files without need to load them to any external database.

Looks really nice
If you make an excel plugin that can let people use sql to make graphs you can sell that.

Was there any specific reason you suggested AGGREATE in your first input? I have a feeling AGGREGATOR is more gramatically in the flow. Is AGGREATE used in other languarges? Inputs?

I just thought that aggregates are very similar to functions,
so should be easy to achieve.
CREATE AGGREGATE statement is present in Postgresql, MS SQL, Oracle. Not sure about other databases. I believe in most of analytical databases it should be present.
From own experience custom aggregates are used not that often as functions, mostly on specific data types where built-in aggregates are not enough. If it makes some complications I think it's fine to leave it outside of this ticket.

We keep both...
Its "fixed" by letting the documentation say that it only workds async... awww - lazy solution...
I will close this issue and make a new one with only the async thing

Wuups - was already closed...


Test buildpacks against multiple builders

Summary

This PR updates automation that will allow buildpack authors to test against multiple builders without making any changes to existing buildpack Golang tests.
./integration.json is the source of truth for the default set of builders to test against. If no builder or builders are provided there, the automation falls back to the existing default, the bionic buildpackless builder.
When running tests locally, scripts/integration.sh will sequentially set each builder as the default builder, then run the full battery of integration tests.
It's possible to run tests against a specific subset of builders. Use scripts/integration.sh --builder uri-of-builder --builder other-uri to override whatever is provided in integration.json.
In CI, Github Actions use the --builder flag to run tests against each builder in separate jobs. The logic that determines which builders to test against is shared between local and GHA runs. It lives in scripts/.util/builders.sh. This will make it easy to change defaults down the road.
It'd be helpful if @paketo-buildpacks/tooling-maintainers and others can play around with this on other buildpack repos to see how it feels. Leave feedback here about bugs, pain points, etc. You can test these out on your own repo by copying the language-family or implementation files into a repo of the appropriate type.
Here's one example using the Go language family: https://github.com/paketo-buildpacks/go/pull/632
And here's an example with the go-dist implementation buildpack: https://github.com/paketo-buildpacks/go-dist/pull/420
Use Cases

Checklist

[ ] I have viewed, signed, and submitted the Contributor License Agreement.
[ ] I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
[ ] I have added an integration test, if necessary.
[ ] I have reviewed the styleguide for guidance on my code quality.
[ ] I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@fg-j I just tested this out with https://github.com/paketo-buildpacks/node-module-bom/pull/87, which has two builders in the integration.json. When I ran just integration.sh, it looks like the tests only ran with the first builder. I would have expected it to run the test suite twice - once for each builder. Is that assumption correct?

@fg-j this works perfectly now! I was able to test out all of the local testing scenarios:

Saw tests run against all the builders in the integration.json
Saw tests run against all builders passed in as arguments to the script
Saw tests run against only the one builder I specified when passed as an argument

I'm happy with this and would be comfortable using this as our testing strategy in the buildpacks

@fg-j is anything else needed to get this undrafted?

I am good with this! Other @paketo-buildpacks/tooling-maintainers, any thoughts before we merge it in?


enable file: links

I have a (reskinned) copy of web/viewer.html from pdfjs-dist in an iframe (within an Atom package), and I'm trying to enable file: links in the PDF.js viewer.
I came across #6072 which pointed to the possibility to override isValidURL, but then found out that it has since been replaced by createValidAbsoluteUrl which calls _isValidProtocol to check for permitted protocols.
I therefore tried to enable file: links by adding a line case 'file:': to _isValidProtocol in build/pdf.js, but this doesn't have an effect.
I also tried to monkeypatch createValidAbsoluteUrl after the pdfjsLib object is created:
pdfjsLib.createValidAbsoluteUrl =
  function createValidAbsoluteUrl(url, baseUrl) {
    if (!url) {
      return null;
    }

    try {
      var absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url);
      return absoluteUrl;
    } catch (ex) {}

    return null;
  }

again unsuccessfully.
How do I override createValidAbsoluteUrl / _isValidProtocol in order to enable file: URLs?
If possible, I would prefer a method that does not involve modifying pdfjs-dist files but patching created objects instead.
Configuration:

Web browser and its version: Atom 1.42.0 / Electron 4.2.7 / Chrome 69.0.3497.128
Operating system and its version: Debian GNU/Linux 10.2
PDF.js version: pdfjs-2.3.200-dist

For (obvious) security reasons, browsers themselves will generally disable linking to file:// URLs.

I therefore tried to enable file: links by adding a line case 'file:': to _isValidProtocol in build/pdf.js, but this doesn't have an effect.

That would suggest that the browser did indeed block the URL.

How do I override createValidAbsoluteUrl / _isValidProtocol in order to enable file: URLs?

You don't, since this is a browser limitation (and furthermore there's no desire to make these methods easily configurable).

The issue is that PDF.js doesn't create an <a> element from a file: URL, as it does for http: URLs.
This has nothing to do with the browser. Otherwise, the code in createValidAbsoluteUrl / _isValidProtocol wouldn't be necessary.

The issue is that PDF.js doesn't create an <a> element from a file: URL, as it does for http: URLs.

It wouldn't really help if the link elements were rendered, since the browser should still prevent navigating to file:// URLs.

I also tried to monkeypatch createValidAbsoluteUrl after the pdfjsLib object is created:

Please note that this won't help, since the relevant parsing is done in the worker-thread which isn't directly accessible.

It wouldn't really help if the link elements were rendered, since the browser should still prevent navigating to file:// URLs.

Since this is all happening in Atom, where <a> elements generally don't do anything by themselves, this is not a problem. I've attached an event listener which takes the appropriate action, including for http: links.

Please note that this won't help, since the relevant parsing is done in the worker-thread which isn't directly accessible.

Alright, so which part of the PDF.js code do I have to modify? I edited build/pdf.js, but that doesn't change the behavior. Do I maybe have to rebuild?

I edited build/pdf.js, but that doesn't change the behavior.

That's expected, since this isn't the worker-thread code. If you're editing the pre-built files directly, the file you need to make your changes in is pdf.worker.js.

Do I maybe have to rebuild?

In order to facilitate updating to new PDF.js versions, it may indeed be easier to build from source (after applying your custom changes) rather than modifying the pre-built library files.

Thanks! Editing build/pdf.worker.js did the trick:

Which makes me wonder, why is identical code in pdf.js and pdf.worker.js?


KAFKA-14304 Use boolean for ZK migrating brokers in RPC/record

With the new broker epoch validation logic introduced in #12998, we no longer need the ZK broker epoch to be sent to the KRaft controller. This patch removes that epoch and replaces it with a boolean.
Another small fix is included in this patch for controlled shutdown in migration mode. Previously, if a ZK broker was in migration mode, it would always try to do controlled shutdown via BrokerLifecycleManager. Since there is no ordering dependency between bringing up ZK brokers and the KRaft quorum during migration, a ZK broker could be running in migration mode, but talking to a ZK controller. A small check was added to see if the current controller is ZK or KRaft before decided which controlled shutdown to attempt.

Two runs with different sets of flaky tests. They are all unrelated to this change (which is gated behind the migration config)


FT-110 # Refactor service function names

Changed

refactored service function names to match localforage functions (Closes #4 )

LGTM 👍


Multi period for HLS

This PR adds the support for multi-period concatenation for HLS, using #EXT-X-DISCONTINUITY between periods.
The new file m3u8_concater.py has the classes used to parse the m3u8 files and reduce multiple files of them into one concatenated file.
HLSConcater is just an API that is exposed to the PeriodConcatNode for abstraction.
MasterPlaylist is a class representing a master hls playlist, the parsing part happens in the __init__ method, creates a MediaPlaylist object for each media(video,text,audio) playlist found in this master playlist, the stream attributes for each playlist is passed to the MediaPlaylist object and stored in it.
MediaPlaylist is a class representing an hls media playlist, the playlist gets parsed in the __init__ method, the biggest part of the playlist is saved mostly unchanged in the self.content variable, but the media segment paths get updated to point to the new relative path of the media segment.
The playlist concatenation methods are the static methods in the MediaPlaylist class (concat_sub, concat_aud, concat_vid, concat_aud_only(to handle the audio-only stream cases)).
No period concatenation is performed if an inconsistent media in periods is detected(e.g. one period has video and one does not).
Things that need addressing:
1- When Shaka Player gets an HLS master playlist containing unsupported and supported audio codecs, it breaks, this happens with:

audio-only playlists with and without concatenation,
video+audio playlists that have been concatenated, but does't happen for the un-concatenated playlists with the same set of codecs, this may have to do with the discontinuities inserted between periods.

2- When Shaka Packager receives an audio-only period to package, it normally creates a stream variant(stream-inf) for each media(audio) playlist generated, but when this audio-only input has one subtitles playlist along with the audio, Shaka-Packager doesn't create the stream-inf playlists, for the current implementation, this will create an error in the HLS concater, we can escape this period as a solution if it has no stream-infs, periods with no stream-inf we can't know its bitrates and codecs and isn't playable in Shaka Player.

Just back from vacation.  Will try to take another pass at review today if at all possible.


Prevent double render in dev mode by branching

In dev the root App component (and its children) always mount twice
because of the structure of the code. I'm not sure if this is desired
but it's a confusing behavior to see double renders in dev.

This seems to cause the error:
Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
(client) <div data-reactid=".z4zt6
(server) <div class="app___3sz-J"
I'm not sure what the correct response to this error is

See #210 and #279


Allow key events to traverse the TopLevel hierarchy

It's quite common for key events to flow up the containment
hierarchy in UI frameworks. This could simplify management
of global hotkeys that can be placed in a top-level "App"
and have all views shown subsequently just "inherit" that
behavior as long as they let the key event to flow.
Make sure we make a copy of the items since a key handler
could modify the top-level collection (i.e. by closing a
dialog in between this processing).

Can you explain the use case for this?
I suspect that this is to implement some sort of fallback - the problem that I have with this is that the Toplevel is supposed to consume all events, and not leak those that are not handled.

Scenario is a subview handling some command, and letting others bubble up to the parent views. In our case (guit) we have local commands and global ones. Say a subview handles Paste differently than a parent view (think some editor view vs a shell handling pasting of filenames)

We discussed in person the scenarios.
What we should get in place is a "bool Modal = true" flag on the Toplevel.   And those that do not want the modal behavior could set this to "False".
In this patch scenario, the foreach essentially has to stop at the first toplevel that has Modal = true.

Addressed the feedback, ready for merging :)


improve check for file path in document validation

This fixes issue #49 where an error would be thrown about the file path being undefined rather than a string when opening a js file in the git diff view. In b6ef79727b84bd4718d944a42450b5741a073622, a fix was introduced for this behavior (see #20), however the API of Files.uriToFilePath() must have changed to return undefined instead of null now.

Thanks for the report and the quick fix!


Added Extra Source Property for QnAMessage Telemetry Logging.

Fixes #
Description

Specific Changes

Testing

 All CLA requirements met.


Readme should cover test flight support

I can't tell from the read me whether there is a supported path for using FLEX with Apple TestFlight builds. Is this something that is even possible?

You can choose to include FLEX in any build you like. The README gives instructions on how to exclude FLEX from certain build configurations. For the configuration you use for TestFlight, simply ignore the exclusion instructions.
You may get rejected by beta app review because FLEX makes use of some private API. I've made an attempt to obfuscate all use of private API in a way that will make it through automated validation, but I don't know what will happen since I haven't tried uploading a build myself.
I would generally caution against using FLEX in beta builds, especially as you get close to the build you plan to submit. It's a good idea to have your beta builds be as close as possible to what you'll ultimately submit to avoid any nasty surprises. You almost certainly do not want to include FLEX in builds that you submit to the public App Store, as noted in the README.
I'm happy to answer more questions here, but I don't plan to add a dedicated TestFlight section to the README for now.


Flaky Context Test in internal Package

TestContext() in internal/http_client_test.go is flaky on Golang 1.6: https://github.com/firebase/firebase-admin-go/blob/master/internal/http_client_test.go#L176
This seems to be caused by some race conditions in Golang 1.6 itself. Lets keep an eye on it.

This just happened with 1.7. After some initial debugging it seems this is a problem with the ctxhttp package (possible race condition).

Possibly a side effect of the race condition referenced in https://github.com/golang/go/issues/14065

Actually this is related to https://github.com/golang/go/issues/25852

This issue has been addressed in Golang, but it's unlikely to be backported to old versions of Go. Closing, since there's not much that can be done in this repo towards "fixing" this.


[BUG] /lib/udev/rules.d/80-nvidia-pm.rules disables rtd3 power control

Describe the bug
The file /lib/udev/rules.d/80-nvidia-pm.rules results in no rtd3 power control on my laptop with RTX3060 and Ryzen 6800H.
To Reproduce
Steps to reproduce the behavior:

Run sudo envycontrol -s hybrid --rtd3 3 --reset-sddm --verbose
See that the GPU never powers off

Expected behavior
The discrete GPU should power off when not used.
System Information:

Model: [Dell G15 5525]
Distro: [Arch Linux]
Kernel: [6.2.12]
DE/WM and Display Manager (if applicable): [KDE Plasma with SDDM]
EnvyControl version: [e.g. 3.2.0]
Nvidia driver version: [525.89.02-1]

Additional context
After removing the file, rtd3 works again.

Interesting results, does it work without the --rtd-3 flag?
On Fri, May 19, 2023, 02:44 cemkaya-mpi @.***> wrote:

Describe the bug
The file /lib/udev/rules.d/80-nvidia-pm.rules results in no rtd3 power
control on my laptop with RTX3060 and Ryzen 6800H.
To Reproduce
Steps to reproduce the behavior:

Run sudo envycontrol -s hybrid --rtd3 3 --reset-sddm --verbose
See that the GPU never powers off

Expected behavior
The discrete GPU should power off when not used.
System Information:

Model: [Dell G15 5525]
Distro: [Arch Linux]
Kernel: [6.2.12]
DE/WM and Display Manager (if applicable): [KDE Plasma with SDDM]
EnvyControl version: [e.g. 3.2.0]
Nvidia driver version: [525.89.02-1]

Additional context
After removing the file, rtd3 works again.
—
Reply to this email directly, view it on GitHub
https://github.com/bayasdev/envycontrol/issues/106, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALY7IYOPDMFZO6U5AXLZV7TXG4QFLANCNFSM6AAAAAAYHNVRU4
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Without the flag, power saving works as intended.
cat /proc/driver/nvidia/gpus/0000:01:00.0/power                                                                         ✔
Runtime D3 status:          Enabled (fine-grained)
Video Memory:               Off

GPU Hardware Support:
 Video Memory Self Refresh: Supported
 Video Memory Off:          Supported

Should I close this issue, as removing the --rtd3 flag solves the problem?


chunk: move MaxDeletes from meta to chunk package

Take over  #1610

Codecov Report

Merging #1611 (a710be1) into main (5fc885c) will decrease coverage by 0.09%.
The diff coverage is 86.66%.

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

@@            Coverage Diff             @@
##             main    #1611      +/-   ##
==========================================
- Coverage   61.49%   61.39%   -0.10%
==========================================
  Files         133      133
  Lines       22475    22476       +1
==========================================
- Hits        13820    13800      -20
- Misses       7088     7108      +20
- Partials     1567     1568       +1

Impacted Files
Coverage Δ

pkg/meta/base.go
71.83% <ø> (-0.41%)
:arrow_down:

pkg/meta/config.go
54.66% <ø> (ø)

pkg/chunk/cached_store.go
75.00% <71.42%> (-1.64%)
:arrow_down:

cmd/fsck.go
68.36% <100.00%> (ø)

cmd/gc.go
78.92% <100.00%> (ø)

cmd/mount.go
70.08% <100.00%> (ø)

pkg/fuse/context.go
56.75% <0.00%> (-10.82%)
:arrow_down:

pkg/vfs/reader.go
80.29% <0.00%> (-4.38%)
:arrow_down:

... and 4 more

Continue to review full report at Codecov.

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


Modernize plugin

With the upgrade to the latest parent pom, e.g. more meta-info and less jar files are packaged in the .hpi, more checks are performed in the build.
Because Java 7 is end-of-life since a while, upgrading to Java 8 and one of the first Jenkins LTS versions that requires it.
Upgrading git dependency to be more up-to-date and that less other dependency versions have to be declared to comply with the maven-enforcer plugin.

hiccups on ci.jenkins.io

@orrc can you have a look again? The build is successful now.

@orrc friendly reminder

Thanks, I released a new version of the plugin with the changes :)


Clone a GitRepository to a temporary location

As ...
P.D. - Nautobot App Developer
I want ...
To be able to clone a GitRepository to a temporary location (tempfile.mkdtemp) and optionally checkout a branch that is not the GitRepository.branch.
So that ...
My app can support development and testing of various GitRepository provided features directly within Nautobot.
I know this is done when...
I can use a Python API in nautobot.apps or on the GitRepository instance to clone a repository and a reference to the file path is returned where the repository has been cloned/checked out.
Optional - Feature groups this request pertains to.

[ ] Automation
[ ] Circuits
[ ] DCIM
[ ] IPAM
[X] Misc (including Data Sources)
[ ] Organization
[ ] Apps (and other Extensibility)
[ ] Security (Secrets, etc)
[ ] Image Management
[ ] UI/UX
[ ] Documentation
[ ] Other (not directly a platform feature)

Database Changes
No response
External Dependencies
No response

With this utility, we explicitly do not want to do any of the git data source processing, this is simply to checkout a copy of the repo at a given ref.

Thinking this might just be an extension of ensure_git_repository to account for the branch, and allow us to make sure all the existing mechanics like usage of GIT_ROOT, etc still work.

Notes from discussion with @glennmatthews
Current approach we decided on is a context manager that will perform a shallow clone to a temporary directory. This should probably be 2 different APIs that live either on the GitRepository model or in the nautobot.extras.datasources.utils module. The 2 APIs would be:

Perform a shallow clone of a GitRepository branch to directory /x/y/z
Context manager that calls the above API and cleans up after itself on exit

Potential performance improvement would be to do a git clone from the local copy of the repository. Something else to look into is git worktree


Update testcontainers-scala-kafka, ... to 0.40.6

Updates

com.dimafeng:testcontainers-scala-kafka
com.dimafeng:testcontainers-scala-scalatest

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

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.dimafeng" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequest = { frequency = "@monthly" },
  dependency = { groupId = "com.dimafeng" }
}]

labels: test-library-update, early-semver-minor, semver-spec-patch, commit-count:1

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
88 unchanged lines in 9 files lost coverage.
Overall coverage decreased (-23.8%) to 51.639%

Files with Coverage Reduction
New Missed Lines
%

core-s3/src/main/scala/io/aiven/guardian/kafka/s3/Config.scala
1
90.63%

core/src/main/scala/io/aiven/guardian/kafka/Errors.scala
1
0%

cli-backup/src/main/scala/io/aiven/guardian/kafka/backup/App.scala
3
0%

core-cli/src/main/scala/io/aiven/guardian/cli/MainUtils.scala
4
0%

core-restore/src/main/scala/io/aiven/guardian/kafka/restore/KafkaProducer.scala
7
18.18%

restore-s3/src/main/scala/io/aiven/guardian/kafka/restore/s3/RestoreClient.scala
8
0%

core-backup/src/main/scala/io/aiven/guardian/kafka/backup/KafkaClient.scala
12
46.15%

core-backup/src/main/scala/io/aiven/guardian/kafka/backup/BackupClientInterface.scala
14
75.65%

backup-s3/src/main/scala/io/aiven/guardian/kafka/backup/s3/BackupClient.scala
38
0%

Totals

Change from base Build<PHONE_NUMBER>:
-23.8%

Covered Lines:
189

Relevant Lines:
366

💛  - Coveralls


Remove invalid phpunit configuration attributes

Remove the warning:
´´´
Warning - The configuration file did not pass validation!
The following problems have been detected:
Line 14:

Element 'phpunit', attribute 'syntaxCheck': The attribute 'syntaxCheck' is not allowed.

Test results may not be as expected.
You can see it even on travis, for example in https://travis-ci.org/johnkary/phpunit-speedtrap/jobs/401361722 .

Hey @fain182! Thank you so much. Looks like this attribute has not had an effect for some time and is safe to remove: https://stackoverflow.com/questions/44328114/phpunit-what-does-syntaxcheck-configuration-parameter-stands-for-exactly


Missing release versions?

The releases page latest version numbers are 0.1.8, 0.1.7, etc. But the Nuget page has release numbers available of 1.0.0 and higher. Is it just that that some commits have not been tagged with those release numbers yet?

Hey man, looks like i just forgot to push them. have done so now.


Is it possible to have a video chat between people from 2 different models?

I am looking for a way to configure video call between members of 2 different models. If it is possible, how would you get about doing so?

what's your purpose   from  different models?


[AMORO-2748]spark need depend on ResolveProcedures to support iceberg procedure call

Why are the changes needed?

Close #2748 .
Brief change log

remove  configuration about ResolveProcedures

How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[x] Run test locally before making a pull request

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@baiyangtx  do you have time to review ? 3ks


Merge main into 3.0 branch

Strange that none of the GitHub actions have run?

Strange that none of the GitHub actions have run?

Possibly because base branch was changed after opening? Not sure if there's a good way to re-trigger without pushing up another commit.


HIVE-27120: Warn when Authorizer V2 is configured

What changes were proposed in this pull request?
This PR will change an internal param name defined in SessionState.
Why are the changes needed?
The param causes WARN unless we disable hive.conf.validation.
pod/hive-hiveserver2-7fc4df88b6-dmn8v: 2023-03-01T13:50:38,959  WARN [main] conf.HiveConf: HiveConf of name hive.internal.ss.authz.settings.applied.marker does not exist

That's because it is not listed in HiveConf even though it starts with hive..
https://github.com/apache/hive/blob/rel/release-4.0.0-alpha-2/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java#L6429-L6440
So, this PR will change the prefix from hive.internal. into _hive.. This manner is inherited from some other private params.
https://github.com/apache/hive/blob/rel/release-4.0.0-alpha-2/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java#L130-L132
Other options I considered.

To put hive.internal.ss.authz.settings.applied.marker in HiveConf

It is weird to me because users must not configure it

To add hive.internal.ss.authz.settings.applied.marker to the allowlist

It sounds too adhoc

To let HiveConf skip validation when a key starts with hive.internal.

I think the approach of this PR is more consistent with other private params

Does this PR introduce any user-facing change?
I assume we can say NO. Precisely, it might change a behavior when a user explicity configures hive.internal.ss.authz.settings.applied.marker. However, I assume this param must not be configured by users.
How was this patch tested?
I have confirmed I don't see the WARN log with this change on my local environment.

Thanks. My environment will be a bit more silent thanks to your reviews!


[Metrics] Support tablet level metrics

Proposed changes
Sometimes we want to detect the hotspot of a cluster, for example, hot scanned tablet, hot wrote tablet, but we have no insight about tablets in the cluster.
This patch introduce tablet level metrics to help to achieve this object, now support 4 metrics on tablets: query_scan_bytes , query_scan_rows , flush_bytes , flush_count . However, one BE may holds hundreds of thousands of tablets, so I add a parameter for the metrics HTTP request, and not return tablet level metrics by default.
ref https://github.com/apache/incubator-doris/issues/3517 https://github.com/apache/incubator-doris/issues/4027
In order to support re-register a same MetricEnity to MetricRegistry, and re-register a same Metric to MetricEntity I also redesign the metric structure.
ref https://github.com/apache/incubator-doris/issues/4396
Types of changes
What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

[] Bugfix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[] Documentation Update (if none of the other choices apply)
[] Code refactor (Modify the code structure, format the code, etc...)

Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

[] I have create an issue on (Fix #ISSUE), and have described the bug/feature there in detail
[x] Compiling and unit tests pass locally with my changes
[] I have added tests that prove my fix is effective or that my feature works
[] If this change need a document change, I have updated the document
[] Any dependent changes have been merged

Further comments

LGTM, but I will run it in our test env to see if it can pass all tests.

@morningman Have you tested in your test env?

LGTM, but I will run it in our test env to see if it can pass all tests.

@morningman Have you tested in your test env?

not yet, there are some bugs in trunk code so the test env failed to pass. I have to fix these bugs first before running your code. Maybe tomorrow.


Mibox 3 540p playback

Bug report
Your Environment

Netflix add-on version: 1.11. 0
Operating system version/name: android 9,kodi 18.9
Device model:  mibox 3

Used Operating system:

[X] Android
[ ] iOS
[ ] Linux
[ ] OSX
[ ] Raspberry-Pi
[ ] Windows

Describe the bug
plays all videos at 540p

https://paste.ubuntu.com/p/D52K3NpFfX/
Expected behavior

Should play video at 1080p as the original Netflix app
Actual behavior

Plays at 540p
Steps to reproduce the behavior

1.i have try many videos and all plays at 540p
2.
3.
Possible fix

I have tried to reset esn but still the same problem
Debug log

The debug log can be found from this link:
https://paste.ubuntu.com/p/D52K3NpFfX/
Additional context or screenshots (if appropriate)

Installation

[ ] I'm using other Netflix Repo

[ ] I'm using a different source

Other information

terminal.txt
Also i sent you on email the esn photo of Netflix app
Screenshots

Netflix app plays at 1080p.

addon debug is disabled:
2020-11-16 22:30:15.814 T:25827    INFO: [plugin.video.netflix (25)] The debug logging level is set as "Disabled"
by following instruction in Readme get a new log

Sorry my friend i didn't managed to upload it on Ubuntu pastebin
#kodi.log

can you say me another two things
have you installed last version of android Netflix app of playStore?
what is your Netflix android app version number?

Try delete the addon with also user data when prompt then install this test:
plugin.video.netflix_1.11.0_20201117_t1.zip

Yes my friend with test version it plays 1080p thnx
Ps and yes i have latest version of Netflix app 8.0.0 build 3642


Not Basic and Api key standard authentication

Expected behavior
Able to authenticate Basic or api key
Screenshots or Response

pfSense Version & Package Version:

pfSense Version: 2.5.2
Package Version  v1.3.3
Hello
I am trying use this great api package with our SOAR system ,which let me automate security workflows
The issue is that is the authentication is seems not be standard regarding Basic auth or api key as i have  with those tools option to build the integration or even when i test with tool like Postman , i must enter the auth part as the parameters or i am doing something wrong
Please advise
Thanks

Hi Tal,
There is no basic authentication, this one in my personal wish list, authenticating via Local DB is part of payload as mentioned in documentation {"client-id": "admin", "client-token": "pfsense"}.
To make Local DB authentication act as basic authentication the change is fairly simple, the function located at:
/etc/inc/api/framework/APIAuth.inc
private function authenticate_local_database() {
    $this->username = $_SERVER['PHP_AUTH_USER'];
    // Authenticate against local database
    if (authenticate_user($this->username, $_SERVER['PHP_AUTH_PW'])) {
        // Ensure user is not disabled
        if (APITools\is_user_disabled($this->username) === false) {
            unset($_SESSION["Username"]);
            $_SESSION["Username"] = $this->username;
            return true;
        }
    }
    return false;
}

rebuild API end points:
/usr/local/share/pfSense-pkg-API/manage.php buildendpoints

Thanks works like charm , hope to see it implemented in the upstream code
Thank you

Thanks @pincher95 for the great insight.
Since this appears to be a duplicate of #174 I will close out this issue. I will provide an update on #174 once this has been implemented on the next release's branch.
Thanks!


upgraded Felix SCR to 2.0.6 and SCR compat to 1.0.4

as discussed on the mailing list, i propose to include the scr upgrade in karaf 4.0.x

I did it already on a local branch.
See: https://issues.apache.org/jira/browse/KARAF-4616

Issue says 2.0.4. But that is broken

Oh thanks ! Fixing that.

R: @jbonofre


Type 'typeof import("@event-calendar/core")' has no construct signatures.ts

in my case when i import calendar like this
import Calendar from '@event-calendar/core'

got ts error

Please see #95

@vkurko if you think you'll keep up with patches/fixes/releases over the next couple years I may be able to commit some time on the Types. Let me know your thoughts.

@vkurko if you think you'll keep up with patches/fixes/releases over the next couple years I may be able to commit some time on the Types. Let me know your thoughts.

I can say that I am not going to abandon the library, so your help with the types will be very useful.

I've been doing some parallel work to this lately, and just noticed this issue.
@blujedis what are your thoughts/plans on how to generate type info?  I'm not familiar with Svelte to know its support for generating type info, can it generate a .d.ts without too much work?  That seems like the best long-term solution.
Alternately, we could solve this issue by giving Vladimir a hand-made .d.ts to put into the npm package, and keep it in sync manually going forward. The downsides there are (a) a bit of testing/review needed for the hand-made file, and (b) ongoing manual changes needed any time the library interface changes.
I've got a .d.ts written for @event-calendar/core that I use on my project, it's working for me but I only exercise 1/2 or 1/3 of the library options so it could use some eyes or testers.  I'm not familiar with npm library packaging but I think you can just package this as-is in the @event-calendar/core distribution and everything will Just Work:
index.d.ts
Additionally, in each of the plugins you'd want to distribute an index.d.ts like this:
export default Interaction

(change as necessary for each plugin).
If anyone in this issue (or in issue #95) wants to test this against their codebase, you should be able to drop the attached index.d.ts file in your codebase as calendar.d.ts and wrap the file contents in a declare module statement, such as:
declare module '@event-calendar/core' {
    export default class Calendar {
    ... snip rest of file contents ...
    }
}

and add another calendar-plugins.d.ts with the following contents, at least it seems to keep WebStorm and tsc happy in my project:
declare module '@event-calendar/time-grid'
declare module '@event-calendar/resource-time-grid'
declare module '@event-calendar/interaction'
... (plus any other plugins you use) ...

Long term it would be best in the source itself for many reasons. Although Vladimir would really need to opt in on that. I think it would be a bad Idea to handicap the lead if he’s not that familiar with TS.
Svelte uses Vite and it’s pretty good at bundling libraries.
It’s a bit of a catch 22 though. Without knowing the lib in and out, it’s somewhat trivial to rewrite as a typed file and just let whatever builder/bundler do its thing and output the type definitions for you.
Writing the declaration files can often result in things being a bit out of sync for obvious reasons. However this may be better for Vladimir as I mention.
At the moment I’d yield to you. Sounds like you’ve looked at it more than I have. I’m going to be spinning up that project late next week so I’ll have a better handle on things at that point.
I suspect adding type defs to this project really will help the project overall.
On Aug 15, 2024 at 7:46 PM -0700, Michael Driscoll @.***>, wrote:

I've been doing some parallel work to this lately, and just noticed this issue.
@blujedis what are your thoughts/plans on how to generate type info? I'm not familiar with Svelte to know its support for generating type info, can it generate a .d.ts without too much work? That seems like the best long-term solution.
Alternately, we could solve this issue by giving Vladimir a hand-made .d.ts to put into the npm package, and keep it in sync manually going forward. The downsides there are (a) a bit of testing/review needed for the hand-made file, and (b) ongoing manual changes needed any time the library interface changes.
I've got a .d.ts written for @event-calendar/core that I use on my project, it's working for me but I only exercise 1/2 or 1/3 of the library options so it could use some eyes or testers. I'm not familiar with npm library packaging but I think you can just package this as-is in the @event-calendar/core distribution and everything will Just Work:
index.d.ts
Additionally, in each of the plugins you'd want to distribute an index.d.ts like this:
export default Interaction
(change as necessary for each plugin).
If anyone in this issue (or in issue #95) wants to test this against their codebase, you should be able to drop the attached index.d.ts file in your codebase as calendar.d.ts and wrap the file contents in a declare module statement, such as:
declare module @./core' {
export default class Calendar {
... snip rest of file contents ...
}
}
and add another calendar-plugins.d.ts with the following contents, at least it seems to keep WebStorm and tsc happy in my project:
declare module @./time-grid'
declare module @./resource-time-grid'
declare module @./interaction'
... (plus any other plugins you use) ...
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>

I'll start looking into best practices for distributing type info (I've only ever used TS in a self-contained sense, so anything declare is new to me). Then I'll work on a PR to get a sense of what it'll look like.
If you or anyone else comes along and does things "right" (with auto-generated type info from the source) I've got no problem throwing away what I've got, so that's not a problem.

I just noticed this issue is closed, I'll add a note to #95 with a reference to here.


ci(travis): Pipe stylelint to tee in CI to paper over stdout problems

overview
We've been getting flaky CI failures all the time where make lint-css fails with an obscure make error about stdout already being closed
In a blind attempt to fix these issues (and without any obvious errors in the stylelint CLI) this PR pipes the stylelint into tee to paper over whatever is causing this
🤷♂
changelog

ci(travis): Pipe stylelint to tee in CI to paper over stdout problems

review requests
Thanks to @sfoster1 for this idea. Open to others if anyone has them

Update: did not fix the issue


Reduce memory consumption by cilium-node-monitor

This change is

test-me-please

Coverage increased (+0.07%) to 41.911% when pulling 2376618e67c85be9ca31f403773f1383aecb5c13 on pr/tgraf/monitor-removal into 10a0e337f0e845d5fa772db8a9f7d162d6d05500 on master.

test-me-please


fix: use open to invoke the app from cli

Fixes https://github.com/microsoft/vscode/issues/102975
Fixes https://github.com/microsoft/vscode/issues/60579
Fixes https://github.com/microsoft/vscode/issues/104525
The breaking change here is that output of --verbose, --status, --telemetry cannot be redirected to the shell, because the app is no longer invoked as a subprocess of shell but rather via launchservices similar to opening from finder.
TODO

[x] Implement --log-file in electron, to store verbose logging in disk https://github.com/electron/electron/pull/25089
[ ] Create a test insiders build from this branch
[ ] use argv._ for parsing file paths
[ ] Push support for --status behind dialog
[ ] Find out about --telemetry usage
[ ] what happens to VSCODE_CLI ?

This will need some extensive testing, I have verified most of the flags. But feel free to test the PR and let me know anything else breaks.

The only breaking change here is that output of --verbose cannot be redirected to the shell, because the app is no longer invoked as a subprocess of shell but rather via launchservices similar to opening from finder. We already store the app verbose logs, that can be obtained via Developer: Open Logs folder, I just have to store electron logs there as well.

Should we maybe keep the old way of spawning if the user runs with --verbose?

I was looking to avoid the old path for any invocation mainly because of the issue mentioned which leads the app into an unidentified state on hardened runtime, we don't know what causes this.
Do you know if there are any GUI apps that have a cli wrapper for launching the app on mac ? I couldn't find any, looking to see for an example on how they handle verbose logging from command line. Almost all of them provide finding logs via the app ui.

this will make our life harder

@bpasero can you expand a bit more what issues this might cause in finding the logs ?

Okay a bit more investigation, for packaged app we don't need to resolve the path arguments as long as we split them like
open -a ~/Downloads/Visual\ Studio\ Code\ -\ Exploration.app/Contents/MacOS/Electron ../gn/ --args --locale zh-cn

open -a <exectuable> <any-file-or-folder-path> --args <rest-of-args>

however this doens't work for OSS build where we have . for the app entry point
open -a /Users/demohan/github/vscode/.build/electron/Code\ -\ OSS.app/Contents/MacOS/Electron . ../gn/ --args

would it be okay to use the old code path for OSS build ? how widely is code-cli.sh used ?

Another affected switch that logs to the console via the app --status , the output will have to be recorded to a temp file rather than console.

@deepak1556 maybe try subl the wrapper for Sublime Text.
I really like the ease of --verbose and for --status we need a solution too, so I think we should try to print to the command line.
What about more complex things like reading from stdin, should also test that.

Thanks for the pointer! at a quick glance they seem to support options that only open supports, I am pretty sure they are relying on it
Deepaks-MacBook-Pro:Caches demohan$ /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl --help
Sublime Text build 3211

Usage: subl [arguments] [files]         Edit the given files
   or: subl [arguments] [directories]   Open the given directories
   or: subl [arguments] -               Edit stdin

Arguments:
  --project <project>: Load the given project
  --command <command>: Run the given command
  -n or --new-window:  Open a new window
  -a or --add:         Add folders to the current window
  -w or --wait:        Wait for the files to be closed before returning
  -b or --background:  Don't activate the application
  -s or --stay:        Keep the application activated after closing the file
  -h or --help:        Show help (this message) and exit
  -v or --version:     Show version and exit

--wait is implied if reading from stdin. Use --stay to not switch back
to the terminal when a file is closed (only relevant if waiting for a file).

Filenames may be given a :line or :line:column suffix to open at a specific
location.

What about more complex things like reading from stdin, should also test that.

Yup we can support that with open -f argument, the following will read from stdin
ps aux | grep electron | open -a ~/Downloads/Visual\ Studio\ Code\ -\ Exploration.app/Contents/MacOS/Electron -f

Can we maybe trick the execution of the application into writing the output to stdout?

we can't unless open supports it. Best path forward is to write the output of --status and --verbose to disk.

Yeah I meant we can maybe write to disk but poll from the file in a fast loop and print to stdout?

@deepak1556

Do you know if there are any GUI apps that have a cli wrapper for launching the app on mac ?

Textmate has a similar CLI. Didn't see that one mentioned in the thread. Maybe it will be a helpful example for the other issues mentioned.
Originally came here looking to figure out how to get code --wait to switch back to the app that executed it(terminal, in this case ), after VS Code returns. This is the behavior that Textmate implements when executing mate -w.