MonitorControl quit when pc goes standby or close lids or disconnect external monitor

Before opening the issue, have you...?

[X] Searched for existing issues
[X] Looked through the wiki
[X] Updated MonitorControl to the latest version (if applicable)

Describe the bug
When my MacBook Air M1 goes in standby, or close lid or disconnect the external monitor the app quit
Steps to reproduce
close lid and wait some minute to make Mac goes standby. Wakeup Mac and the monitor control.app is quitted
Expected behavior
remain in background with icon in the top
Anything else?
No response
Environment Information (please complete the following information)
- macOS version: 12.5 Monterey
- Mac model: Mackbook Air M1 2020
- MonitorControl version: 4.1.0 build 7034
- Monitor(s): Integrated, and LG 34WP75C
- Apple Silicon/M1 (yes or no): yes

This seems to be a bug. If you have a crash log, you might want to attach it. Thank you!

Hi I find this, hope help
MonitorControl-2022-08-26-163856.ips.txt
s

Hello,
I've got the same problem on my Here:

macOS vesion: 12.5.1 Monterey
Mac model: Mac Studio
MonitorControl version: 4.1.0 Build 7034
Monitor(s): 2 AOC U3277PWQU (HDMI on Mac Studio + Displayport on CalDigit USB-C Dock
Apple Silicon/M1 (yes or no): yes (M1 Max)

Here is the Crash Diagnostic Report :
MonitorControl-2022-08-29-103044.ips.txt

Hi,
got the same problem on my M2 MBA

macOS 12.6 Monterey
MacBook Air M2 2022
MonitorControl version: 4.1.0 Build 7034
external Monitor: Samsung LU28R55 via DisplayPort cable

here is my crashlog MonitorControl-2022-09-22-123814.ips.txt

Hi,
got the same problem on my M1 MBA
macOS 12.6.1 Monterey
MacBook Pro  M1 Max 2021 14
MonitorControl version: 4.1.0 Build 7034
external Monitor: Philips 279m1rev via DisplayPort1.4 cable
Full Report
{"app_name":"MonitorControl","timestamp":"2022-10-29 16:11:30.00 +0800","app_version":"4.1.0","slice_uuid":"a857b9bd-10a7-3197-84b9-221022fe0b4d","build_version":"7034","platform":1,"bundleID":"me.guillaumeb.MonitorControl","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 12.6.1 (21G217)","incident_id":"A3B1D084-ABB6-41C2-B547-22537B50957A","name":"MonitorControl"}
{
"uptime" : 2600,
"procLaunch" : "2022-10-29 16:00:21.7089 +0800",
"procRole" : "Default",
"version" : 2,
"userID" : 501,
"deployVersion" : 210,
"modelCode" : "MacBookPro18,4",
"procStartAbsTime" :<PHONE_NUMBER>3,
"coalitionID" : 1491,
"osVersion" : {
"train" : "macOS 12.6.1",
"build" : "21G217",
"releaseType" : "User"
},
"captureTime" : "2022-10-29 16:11:28.8751 +0800",
"incident" : "A3B1D084-ABB6-41C2-B547-22537B50957A",
"bug_type" : "309",
"pid" : 1947,
"procExitAbsTime" :<PHONE_NUMBER>9,
"translated" : false,
"cpuType" : "ARM-64",
"procName" : "MonitorControl",
"procPath" : "/Applications/MonitorControl.app/Contents/MacOS/MonitorControl",
"bundleInfo" : {"CFBundleShortVersionString":"4.1.0","CFBundleVersion":"7034","CFBundleIdentifier":"me.guillaumeb.MonitorControl"},
"storeInfo" : {"deviceIdentifierForVendor":"323B92B6-864E-5DB7-9614-1F4333DF10B7","thirdParty":true},
"parentProc" : "launchd",
"parentPid" : 1,
"coalitionName" : "me.guillaumeb.MonitorControl",
"crashReporterKey" : "0FB825A9-6D27-383A-0F15-78B77580BAE6",
"sip" : "enabled",
"isCorpse" : 1,
"exception" : {"codes":"0x0000000000000001, 0x0000000104b51f68","rawCodes":[1,4373946216],"type":"EXC_BREAKPOINT","signal":"SIGTRAP"},
"termination" : {"flags":0,"code":5,"namespace":"SIGNAL","indicator":"Trace/BPT trap: 5","byProc":"exc handler","byPid":1947},
"extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":11},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
"faultingThread" : 0,
"threads" : [{"triggered":true,"id":43003,"threadState":{"x":[{"value":0},{"value":259},{"value":2},{"value":1},{"value":115},{"value":115},{"value":115},{"value":0},{"value":0},{"value":0},{"value":1},{"value":2147483646},{"value":1},{"value":2147483646},{"value":3538401280},{"value":247},{"value":6538449820,"symbolLocation":0,"symbol":"_os_nospin_lock_unlock"},{"value":8052957408},{"value":0},{"value":0},{"value":1},{"value":4},{"value":1},{"value":0},{"value":105553169454288},{"value":0},{"value":1},{"value":1},{"value":105553130323968}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6288010246601645556},"cpsr":{"value":1610616832},"fp":{"value":6092988032},"sp":{"value":6092987888},"esr":{"value":4060086273,"description":"(Breakpoint) brk 1"},"pc":{"value":4373946216,"matchesCrashFrame":1},"far":{"value":5595366408}},"queue":"com.apple.main-thread","frames":[{"imageOffset":57192,"imageIndex":0},{"imageOffset":56820,"imageIndex":0},{"imageOffset":320716,"imageIndex":0},{"imageOffset":320436,"imageIndex":0},{"imageOffset":324452,"imageIndex":0},{"imageOffset":338644,"imageIndex":0},{"imageOffset":314696,"imageIndex":0},{"imageOffset":16820,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":1},{"imageOffset":30320,"symbol":"_dispatch_continuation_pop","symbolLocation":500,"imageIndex":1},{"imageOffset":108768,"symbol":"_dispatch_source_invoke","symbolLocation":1596,"imageIndex":1},{"imageOffset":75296,"symbol":"_dispatch_main_queue_drain","symbolLocation":756,"imageIndex":1},{"imageOffset":74524,"symbol":"_dispatch_main_queue_callback_4CF","symbolLocation":44,"imageIndex":1},{"imageOffset":813464,"symbol":"CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE","symbolLocation":16,"imageIndex":2},{"imageOffset":539656,"symbol":"__CFRunLoopRun","symbolLocation":2532,"imageIndex":2},{"imageOffset":535172,"symbol":"CFRunLoopRunSpecific","symbolLocation":600,"imageIndex":2},{"imageOffset":205624,"symbol":"RunCurrentEventLoopInMode","symbolLocation":292,"imageIndex":3},{"imageOffset":204980,"symbol":"ReceiveNextEventCommon","symbolLocation":564,"imageIndex":3},{"imageOffset":204392,"symbol":"_BlockUntilNextEventMatchingListInModeWithFilter","symbolLocation":72,"imageIndex":3},{"imageOffset":267548,"symbol":"_DPSNextEvent","symbolLocation":860,"imageIndex":4},{"imageOffset":261652,"symbol":"-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]","symbolLocation":1328,"imageIndex":4},{"imageOffset":204768,"symbol":"-[NSApplication run]","symbolLocation":596,"imageIndex":4},{"imageOffset":23272,"imageIndex":0},{"imageOffset":6868,"symbol":"autoreleasepool(invoking:)","symbolLocation":64,"imageIndex":5},{"imageOffset":23064,"imageIndex":0},{"imageOffset":20620,"symbol":"start","symbolLocation":520,"imageIndex":6}]},{"id":43020,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":7}]},{"id":43032,"name":"AMCP Logging Spool","frames":[{"imageOffset":6380,"symbol":"semaphore_wait_trap","symbolLocation":8,"imageIndex":8},{"imageOffset":125484,"symbol":"caulk::mach::semaphore::wait_or_error()","symbolLocation":28,"imageIndex":9},{"imageOffset":10156,"symbol":"caulk::concurrent::details::worker_thread::run()","symbolLocation":56,"imageIndex":9},{"imageOffset":9164,"symbol":"void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::)(), std::__1::tuplecaulk::concurrent::details::worker_thread* > >(void)","symbolLocation":96,"imageIndex":9},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":7},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":7}]},{"id":43063,"name":"com.apple.NSEventThread","frames":[{"imageOffset":6320,"symbol":"mach_msg_trap","symbolLocation":8,"imageIndex":8},{"imageOffset":7456,"symbol":"mach_msg","symbolLocation":76,"imageIndex":8},{"imageOffset":545296,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":372,"imageIndex":2},{"imageOffset":538304,"symbol":"__CFRunLoopRun","symbolLocation":1180,"imageIndex":2},{"imageOffset":535172,"symbol":"CFRunLoopRunSpecific","symbolLocation":600,"imageIndex":2},{"imageOffset":1761536,"symbol":"_NSEventThread","symbolLocation":196,"imageIndex":4},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":7},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":7}]},{"id":50516,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":7}]},{"id":50625,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":7}]},{"id":50815,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":7}]}],
"usedImages" : [
{
"source" : "P",
"arch" : "arm64",
"base" :<PHONE_NUMBER>,
"CFBundleShortVersionString" : "4.1.0",
"CFBundleIdentifier" : "me.guillaumeb.MonitorControl",
"size" : 901120,
"uuid" : "a857b9bd-10a7-3197-84b9-221022fe0b4d",
"path" : "/Applications/MonitorControl.app/Contents/MacOS/MonitorControl",
"name" : "MonitorControl",
"CFBundleVersion" : "7034"
},
{
"source" : "P",
"arch" : "arm64e",
"base" :<PHONE_NUMBER>,
"size" : 290816,
"uuid" : "b3c7a004-1069-3171-b630-2c386a8b399c",
"path" : "/usr/lib/system/libdispatch.dylib",
"name" : "libdispatch.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" :<PHONE_NUMBER>,
"CFBundleShortVersionString" : "6.9",
"CFBundleIdentifier" : "com.apple.CoreFoundation",
"size" : 5533696,
"uuid" : "fc3c193d-0cdb-3569-9f0e-bd2507ca1dbb",
"path" : "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation",
"name" : "CoreFoundation",
"CFBundleVersion" : "1866"
},
{
"source" : "P",
"arch" : "arm64e",
"base" :<PHONE_NUMBER>,
"CFBundleShortVersionString" : "2.1.1",
"CFBundleIdentifier" : "com.apple.HIToolbox",
"size" : 3358720,
"uuid" : "aaf900bd-bfb6-3af0-a8d3-e24bbe1d57f5",
"path" : "/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox",
"name" : "HIToolbox"
},
{
"source" : "P",
"arch" : "arm64e",
"base" :<PHONE_NUMBER>,
"CFBundleShortVersionString" : "6.9",
"CFBundleIdentifier" : "com.apple.AppKit",
"size" : 15437824,
"uuid" : "5ece5db5-a167-3ab1-a1cf-af442beecea6",
"path" : "/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit",
"name" : "AppKit",
"CFBundleVersion" : "2113.60.148"
},
{
"source" : "P",
"arch" : "arm64e",
"base" :<PHONE_NUMBER>,
"size" : 12288,
"uuid" : "26a1bf11-c23f-3aab-aad0-0b83471709e6",
"path" : "/usr/lib/swift/libswiftObjectiveC.dylib",
"name" : "libswiftObjectiveC.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" :<PHONE_NUMBER>,
"size" : 393216,
"uuid" : "24d09537-e51b-350e-b59e-181c9d94d291",
"path" : "/usr/lib/dyld",
"name" : "dyld"
},
{
"source" : "P",
"arch" : "arm64e",
"base" :<PHONE_NUMBER>,
"size" : 53248,
"uuid" : "63c4eef9-69a5-38b1-996e-8d31b66a051d",
"path" : "/usr/lib/system/libsystem_pthread.dylib",
"name" : "libsystem_pthread.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" :<PHONE_NUMBER>,
"size" : 229376,
"uuid" : "dbf55fdd-2b9b-3701-93b6-7a3ce359bd0e",
"path" : "/usr/lib/system/libsystem_kernel.dylib",
"name" : "libsystem_kernel.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" :<PHONE_NUMBER>,
"CFBundleShortVersionString" : "1.0",
"CFBundleIdentifier" : "com.apple.audio.caulk",
"size" : 159744,
"uuid" : "fbaaa1ec-abbe-3c0d-a491-0dc66ee9d8ce",
"path" : "/System/Library/PrivateFrameworks/caulk.framework/Versions/A/caulk",
"name" : "caulk"
}
],
"sharedCache" : {
"base" :<PHONE_NUMBER>,
"size" :<PHONE_NUMBER>,
"uuid" : "7cf73f63-0640-33ec-8444-138d9834ecb5"
},
"vmSummary" : "ReadOnly portion of Libraries: Total=1.0G resident=0K(0%) swapped_out_or_unallocated=1.0G(100%)\nWritable regions: Total=1.8G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.8G(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nAccelerate framework               896K        7 \nActivity Tracing                   256K        1 \nCG image                           960K       38 \nCG raster data                      80K        2 \nColorSync                          608K       27 \nCoreAnimation                     26.2M      263 \nCoreGraphics                        48K        3 \nCoreUI image data                 4512K       33 \nFoundation                          16K        1 \nImage IO                            16K        1 \nKernel Alloc Once                   32K        1 \nMALLOC                           326.3M       61 \nMALLOC guard page                  192K       10 \nMALLOC_MEDIUM (reserved)           1.1G        9         reserved VM address space (unallocated)\nMALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)\nSTACK GUARD                       56.1M        7 \nStack                             11.2M        7 \nVM_ALLOCATE                        352K       11 \n__AUTH                            2665K      299 \n__AUTH_CONST                      20.5M      491 \n__CTF                               756        1 \n__DATA                            15.8M      481 \n__DATA_CONST                      17.5M      498 \n__DATA_DIRTY                      1809K      201 \n__FONT_DATA                          4K        1 \n__LINKEDIT                       577.9M        5 \n__OBJC_CONST                      3337K      263 \n__OBJC_RO                         83.0M        1 \n__OBJC_RW                         3168K        1 \n__TEXT                           497.2M      515 \n__UNICODE                          592K        1 \ndyld private memory               1024K        1 \nmapped file                      457.5M       43 \nshared memory                      848K       13 \n===========                     =======  ======= \nTOTAL                              3.5G     3298 \nTOTAL, minus reserved VM space     2.1G     3298 \n",
"legacyInfo" : {
"threadTriggered" : {
"queue" : "com.apple.main-thread"
}
},
"trialInfo" : {
"rollouts" : [
{
"rolloutId" : "6112dda2fc54bc3389840642",
"factorPackIds" : {
"SIRI_DICTATION_ASSETS" : "631730a28520965d1cba0681"
},
"deploymentId" : 240000145
},
{
"rolloutId" : "60f8ddccefea4203d95cbeef",
"factorPackIds" : {
  },
  "deploymentId" : 240000021
}

],
"experiments" : [
]
}
}

Refreshing this issue. MacBook Air M2, Ventura 13.5. App is closing whenever Mac goes to sleep.


Allow initializing w/ empty hostname (=local); remote paths with spaces; FAT hints

A few minor fixes and user hints to make setup for syncing to transiently mounted USB devices with funny mountpoint names just a little smoother. FAT filesystems are pretty much a standard on these things; spaces in the names are common, and the things are almost always found locally attached. It's a use case which unison fails spectacularly badly at, to the extent of forcing a full comparison the first time on each new mount. rsync is dumber, so bitpocket seems to handle it better, given the right options.

Just FYI- I added support for empty hostname (local syncs) in #66 and released it in v0.2

@achadwick @runar0 would it be acceptable to add the FAT hints as a wiki page here or as a commented-out line in the default configuration?

@greezybacon
It's been a while since I've played with bitpocket, but a commented-out line in the default config or template would work for me.


Add test for failed task retry

Companion PR: https://github.com/SubstraFoundation/substra-backend/pull/66

Sounds good!
The main reason I wrote this test is that it make it very convenient for testing (that the retry works). I wasn't sure myself if it was worth adding to the tests repo. With the new information from @inel (we're going to use a celery option instead of a homemade retry mechanism) it makes even less sense to add this test. Thank you!
Closing


Support TypeScript

Can you support TypeScript and release the package？Thanks.

This is open source, feel free to open a pull request.


Exclude el files as they are emacs

Purpose
*.el files are emacs-specific. See https://github.com/codecov/codecov-python/pull/297/files
Notable Changes
I also alphabetized.
Tests and Risks?
Nope
Update the SHA hash files
Done

See https://github.com/codecov/codecov-python/pull/297

@drazisil-codecov

@drazisil yup, that's it. My aversion is mostly around setting your own local .gitignore to prevent specific files from getting into version control


(TWILL-248) Upgrade to use Netty-4.1

Also enable ResourceReportClient to use HTTP compression

One question about change form using BufferedReader,  but looks good.
If passes tests +1


nixos/stage1: run fsck on battery too

We are in 2021 almost 2022 not in 2004 when this may have been an issue!
https://alioth-lists.debian.net/pipermail/pkg-sysvinit-devel/2009-May/003196.html
https://www.nico.schottelius.org/blog/debian-ubuntu-fsck-skip-on-battery-bug/
https://github.com/OpenRC/openrc/commit/d29daf395299fc97b8e13676bc282800a8bddae8
https://bugs.launchpad.net/ubuntu/+source/laptop-mode/+bug/11194

Motivation for this change
The code was added in 2008! 477ea7015c8e50dc07fcb20af67c22152cf94470
Things done

Built on platform(s)

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

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

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

In an ideal world, we'd probably instead look for a "good enough" charge level and ask with a timeout if the user wants to continue with fsck anyway. Let's say under 30% of power.
But I don't want to move the goalposts on that. Don't take this as a rejection, but a way forward if other maintainers don't like the idea of removing this.

:+1: for removing the restriction.
has ext4 moved away from periodic checks? if so there's really no reason to skip fsck ever.

has ext4 moved away from periodic checks? if so there's really no reason to skip fsck ever.

i think so, at least on my raspberry pi's ext4 partition has Maximum mount count as -1 which means its disabled
sudo tune2fs -l  /dev/sda2 | grep Maximum

-c max-mount-counts
Adjust  the  number  of mounts after which the file system will be checked by
e2fsck(8).  If max-mount-counts is the string "random", tune2fs  will  use  a
random  value  between 20 and 40.  If max-mount-counts is 0 or -1, the number
of times the file system is mounted will be disregarded by e2fsck(8) and  the
kernel.
Staggering  the  mount-counts at which file systems are forcibly checked will
avoid all file systems being checked at one time when  using  journaled  file
systems.
Mount-count-dependent  checking is disabled by default to avoid unanticipated
long reboots while e2fsck does its work.  If you  are  concerned  about  file
system  corruptions  caused  by potential hardware problems of kernel bugs, a
better solution than mount-count-dependent checking is to use the  e2scrub(8)
program.   This  does  require placing the file system on an LVM volume, how‐
ever.

weren't the long fsck's mainly a ext2 or ext3 problem instead of ext4?

think so. didn't intend to reference fsck speed either, just that skipping fsck on boot is a thing that would've mostly benefited extN (and others that do periodic fscks when nothing looks wrong). if they don't do it anymore we needn't keep that optimization around either.

In an ideal world, we'd probably instead look for a "good enough" charge level and ask with a timeout if the user wants to continue with fsck anyway. Let's say under 30% of power.
But I don't want to move the goalposts on that. Don't take this as a rejection, but a way forward if other maintainers don't like the idea of removing this.

I think one of the referenced issues just said that if you are not at home (so on battery) you don't want to wait for the fsck if you e.g. want to show somebody something so I think charge level wasn't even an argument

I think one of the referenced issues just said that if you are not at home (so on battery) you don't want to wait for the fsck if you e.g. want to show somebody something so I think charge level wasn't even an argument

Yeah, I didn't make this clear enough: if the feature is still desired by some maintainers, and they block this change. I personally agree.


New version: logisim-evolution.logisim-evolution version 3.8.0

Pull request has been created with WinGet Automation :rocket:
Microsoft Reviewers: codeflow:open?pullrequest=https://github.com/microsoft/winget-pkgs/pull/115105&drop=dogfoodAlpha

@wingetbot run

Double-clicking the Desktop icon gives:


[minecraft-server] option to use forge

I'm going to try and figure this out and maybe fork and merge, but what do you think about having an argument to use a forge server? Or should that be a totally different image?

I can't find a Minecraft Forge version json file, so what might be easier is to prefer and only allow the recommended versions.

I'm not sure how to scrape that information... It would be nice if they supplied either a json or a URL redirect for recommended downloads.

Perhaps something like xidel would work.
Here is the html inspection for the version button pictured above:

That could get us all of the possible versions, and then we could generate a path from that perhaps? The data on the Minecraft Forge website is in a table.

I'm going to try out xidel and see what I can do with it.

What might be simpler is if I create a script that automatically generates a json file that you can consume. That would keep your Dockerfile, start.sh, etc. much cleaner. Let me know what you think.

I think the option for a Forge server is a fantastic idea. I waiting and watching (but then forgot) while they sorted our their 1.8 support. It was under that FML designation and was all a little odd. Packaging mods for FML 1.8 wasn't working for me, which added to my waning interest :)
Back to your follow up questions, yes, a nice, clean REST API on their part would be ideal. Scraping pages is not fun (what with HTML being not-XML), but I've resorted to that myself once or twice to get the job done.
The offline script to produce JSON is a tempting idea. I have pondered doing that for the vanilla versioning of this Minecraft image. For Chrome development I have been pleased with https://parse.com/ and was thinking of digging into their Cloud Code support.
With all that said, see if there's a way to script it within the container's startup, just so we can minimize adjacent dependencies. Depending on Python seems reasonable. I was half expecting it to already have snuck into my ubuntu-openjdk-7 image, but it's not. It would only add 16 MB itself:
The following extra packages will be installed:
  libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python-minimal
  python2.7 python2.7-minimal
Suggested packages:
  python-doc python-tk python2.7-doc binutils binfmt-support
The following NEW packages will be installed:
  libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python
  python-minimal python2.7 python2.7-minimal
0 upgraded, 7 newly installed, 0 to remove and 5 not upgraded.
Need to get 3734 kB of archives.
After this operation, 16.0 MB of additional disk space will be used.

BTW, I double checked and they have a non-adfly link alongside each of the download links, which is what the container would have to use.
Meanwhile, I'm going to poke around for a semi-RESTful interface into their file repo. I know bukkit has a nice once, but doesn't mean Forge does :)

Sounds great! I'm part way through a Scrapy script (doesn't work yet / still playing around):
import scrapy

class MinecraftVersion(scrapy.Item):
    name = scrapy.Field()
    url = scrapy.Field()

from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors import LinkExtractor

class MinecraftForgeSpider(CrawlSpider):
    allowed_domains = ['minecraftforge.net']
    start_urls = ['http://files.minecraft.net']
    rules = [Rule(LinkExtractor(allow=['/minecraftforge/\d+\.\d+(\.d+)?', 'parse_minecraft_version']))]

    def parse_minecraft_version(self, response):
        minecraft_version = MinecraftVersion()
        minecraft_version['name'] = resonse.url
        return minecraft_version

I noticed they have "branch pages", such as http://files.minecraftforge.net/minecraftforge/1.8 , which might narrow the scraping needed.

Yup. I was able to get the two branches they have up:
[{"url": "http://files.minecraftforge.net/minecraftforge/1.8", "name": "http://files.minecraftforge.net/minecraftforge/1.8"},
{"url": "http://files.minecraftforge.net/minecraftforge/1.7.10", "name": "http://files.minecraftforge.net/minecraftforge/1.7.10"}]

Just so we don't lose any work: https://github.com/DanTheColoradan/minecraft-forge-scrapy.

I was able to scrape the Promotions portion of the Minecraft Forge downloads page. I can also easily get it to scrape other pages, but they can have quite a bit of information. It takes longer if I do more pages.
Here is a sample (pretty formatting mine):
[{
    "promotion": ["1.5.2-Latest"],
    "version": ["<IP_ADDRESS>8"],
    "minecraft": ["1.5.2"],
    "downloads": {
        "Installer": "http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.5.2-<IP_ADDRESS>8/forge-1.5.2-<IP_ADDRESS>8-installer.jar",
        "Universal": "http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.5.2-<IP_ADDRESS>8/forge-1.5.2-<IP_ADDRESS>8-universal.zip",
         "Javadoc": "http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.5.2-<IP_ADDRESS>8/forge-1.5.2-<IP_ADDRESS>8-javadoc.zip",
         "Src": "http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.5.2-<IP_ADDRESS>8/forge-1.5.2-<IP_ADDRESS>8-src.zip"
    },
    "time": ["06/17/2013 10:36:00 AM"]
}]

The code is a bit complex right now since I used scrapy startproject but I think I should be able to squash it into one file.
Let me know what you think :)

I feel like there should an easy way to get the "latest" and "recommended" info... They are using a script to determine which versions to display, but I haven't figured out how the script determines which are "latest" and recommended". Those tags have to be stored somewhere....

Minecraft Forge Downloads

I'm pretty sure I figured it out. It looks like they don't have "latest" and "recommended for anything before 1.5.2. I'm going to see if I can just use the last build for any before 1.5.2.

Ok. So here is my new plan...
Problem: Anything before 1.5.2 does not have an installer and / or recommended build.
Solution:

Start dictionary (Minecraft version = Forge source download link)
Fill all with Latest forge source link (i.e. Minecraft version 1.1 to 1.8)
Replace any that have Recommended builds (i.e. 1.5.2+)
Output json

You could then just grab the correct version of Forge for whatever Minecraft version asked for. Then, you would need to run the install.sh script to inject Forge into the Minecraft jar.
Working on this now...

I would actually recommend not bothering to support before 1.5.2 :) ; however, if you have a personal need to use a mod compiled against an older version, then go for it. Can always enhance it later, if needed.
Yeah, I poked around in their JavaScript. It does offer some hints, but they are rendering the actual version list server-side, so still needs to be scraped.

...did you have any thoughts about how users would install mod jars into a particular container? Since most mods are downloaded behind an adfly URL, a docker exec ... wget type approach won't always work. Otherwise, requiring attaching of /data to a host directory would probably be fine, right?

Hm. I don't have a need for anything pre-1.5.2. I mostly wanted to include it for the sake of completeness since it looks like you are able to get any version of Minecraft already?
And I hadn't given that thought yet! Attaching /data sounds ok to me.

I have finished up the script to a workable stage for you.
import scrapy
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors import LinkExtractor
from scrapy.selector import Selector

class MinecraftForgeDownload(scrapy.Item):
    url = scrapy.Field()
    promotion = scrapy.Field()
    minecraft = scrapy.Field()

class MinecraftForgeSpider(CrawlSpider):
    name = "MinecraftForgeSpider"
    allowed_domains = ["minecraftforge.net"]
    start_urls = ['http://files.minecraftforge.net']

    def parse(self, response):
        selector = Selector(response)
        rows = selector.xpath('//table[@id="promotions_table"]//tr')
        header = rows.pop(0)
        for row in rows:
            cells = row.xpath('td')
            minecraft = ''.join(cells[2].xpath('text()').extract())
            promotion = cells[0].xpath('text()').re('([a-zA-Z]+)')
            installer = cells[4].xpath('a[text()="Installer"]')
            url = installer.xpath('@href').re('http://adf.ly/\d+/(.+)')

            download = MinecraftForgeDownload()
            download['minecraft'] = minecraft
            download['promotion'] = promotion
            download['url'] = url
            yield download

This produces a json that you should be able to digest :) You can run the script with Scrapy installed:
scrapy runspider minecraftforge_spider.py -o latest.json

I'm thinking of formatting it as similar as I can to the amazon version you download. Would that be helpful?

Yeah, that would be great. Perhaps introduce new types, such as "forge-recommended" and "forge-latest", so it could look something like:
{
  "latest": {
    "snapshot": "1.8.2-pre7",
    "release": "1.8.3",
    "forge-recommended": "1.8-<IP_ADDRESS>9",
    "forge-latest": "1.8-<IP_ADDRESS>3"
  },
  "versions": [
    {
      "id": "1.8-<IP_ADDRESS>9",
      "time": "???",
      "releaseTime": "???",
      "type": "forge-recommended",
      "url": "http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.8-<IP_ADDRESS>9/forge-1.8-<IP_ADDRESS>9-installer.jar"
    },
   ...

I was able to create a very similar layout for the Forge downloads:
[{
	"latest": {
		"forge_recommended": ["1.7.10"],
		"forge_latest": ["1.8"]
	},
	"versions": [
			{
				"url": ["http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.5.2-<IP_ADDRESS>8/forge-1.5.2-<IP_ADDRESS>8-installer.jar"],
				"type": "forge_latest",
				"id": ["1.5.2"],
				"time": ["06/17/2013 10:36:00 AM"]
			},
			{
				"url": ["http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.5.2-<IP_ADDRESS>7/forge-1.5.2-<IP_ADDRESS>7-installer.jar"],
				"type": "forge_recommended",
				"id": ["1.5.2"],
				"time": ["06/15/2013 02:27:00 AM"]
			}
	[...]
	}
}]

Would you like me to have python amalgamate what I produce with the Mojan json? I'm not sure how easy it'll be, but I can try if you like.

Whoops! I just need to fix the versions. I have the minecraft versions there instead of the forge versions.

Nah, the two separate, very extremely similar file formats will be just fine. The bootstrap script will need to decide vanilla or forge from the start anyway.

Great! Ok. How about the id?
Do you want:
"id": ["1.8-<IP_ADDRESS>9"]

or
"id": ["<IP_ADDRESS>9"]

In other words, do you want the minecraft version included in the id? I could also just make it a separate field:
"id":["<IP_ADDRESS>9"]
"minecraft":["1.8"]

A separate fields seems more flexible to me, but I'm not sure how you plan to implement this.

Since their id seems to be unique, I agree, let's go with separate fields to maximize flexibility.

Fantastic. Then I think most of what you need is in my repo:
The python Scrapy file is the following:
import scrapy
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors import LinkExtractor
from scrapy.selector import Selector

import re

class Forge(scrapy.Item):
    versions = scrapy.Field()
    latest = scrapy.Field()

class ForgeVersions(scrapy.Item):
    id = scrapy.Field()
    minecraft = scrapy.Field()
    type = scrapy.Field()
    time = scrapy.Field()
    url = scrapy.Field()

class ForgeLatest(scrapy.Item):
    forge_latest = scrapy.Field()
    forge_recommended = scrapy.Field()

class ForgeSpider(CrawlSpider):
    name = "ForgeSpider"
    allowed_domains = ["minecraftforge.net"]
    start_urls = ['http://files.minecraftforge.net']

    def parse(self, response):
        forge = Forge()
        forge['versions'] = []
        forge['latest'] = ForgeLatest()

        selector = Selector(response)
        rows = selector.xpath('//table[@id="promotions_table"]//tr')
        header = rows.pop(0)
        for row in rows:
            cells = row.xpath('td')

            id = cells[1].xpath('text()').extract()
            minecraft = cells[2].xpath('text()').extract()
            type = cells[0].xpath('text()')
            time = cells[3].xpath('text()')
            url = cells[4].xpath('a[text()="Installer"]/@href')

            #if has version
            has_version = re.match('(.+)\-.+', ''.join(type.extract()))
            if has_version:
                download = ForgeVersions()
                download['id'] = id
                download['minecraft'] = minecraft
                download['type'] = 'forge_' + ''.join(type.re('([a-zA-Z]+)')).lower()
                download['time'] = time.extract()
                download['url'] = url.re('http://adf.ly/\d+/(.+)')

                forge['versions'].append(download)
            else:
                is_recommended = re.match('Recommended', ''.join(type.extract()))
                if is_recommended:
                    download = ForgeLatest()
                    forge['latest']['forge_recommended'] = id
                else:
                    download = ForgeLatest()
                    forge['latest']['forge_latest'] = id

        return forge

My native language is C++ so feel free to fix my python code as needed. phew If you have an eta, let me know :) I'm quite excited. Also let me know if you need anything else. Once you incorporate the changes, I'll just delete my repo so we don't have extra info anywhere and so my github stays somewhat empty.
:beers:

How about you do a pull request with your script added under /minecraft-server. Then you'll get properly attributed for the contribution? I created a forge branch where you can aim the pull request.
I'll then follow up with the final changes, which I should be able to do sometime this week.
My native language is Java, so I won't be picky about your python :)
Thanks for all your help with this, BTW.

Sounds great! And no problem :+1:

Quick progress update:
I added installation of python and scrapy in this commit
https://github.com/itzg/dockerfiles/commit/b4ec3cfb7112f9f207bdec6af969b275ab7f0ca8
...but I'm a little concerned about the increase in image size, where mc is the build against the forge branch:
REPOSITORY               TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
mc                       latest              5790d52f7022        4 seconds ago       669.7 MB
itzg/minecraft-server    latest              8a09745a5a4b        4 weeks ago         395.4 MB

I have been dabbling in go and might later play with their html parsing library :).

Wow! Yah. That's unacceptable. Out of curiosity, why go?

Good question :). It is very common in the Docker world and produces nice, statically linked binaries. I used to be a C/C++ developer, a long time ago, so there's a nostalgia factor too.

Kk :D Sounds like something I would be interested in then too. Have you tried the html parsing library yet? I might look at it in a bit.

I haven't tried it yet, but have been impressed with their other standard library/modules.

K. I'll give it a shot after I get some work done. Feel free to get it done before me though if you have free time.

Bingo! I was starting up Minecraft (with the Forge client) and noticed it stated a new version was available. I fired up Wireshark and found the conversation, below, with files.minecraftforge.net. So here's the magic JSON URL:
http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
GET /maven/net/minecraftforge/forge/promotions_slim.json HTTP/1.1
User-Agent: Java/1.8.0_31
Host: files.minecraftforge.net
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 04 Mar 2015 21:22:06 GMT
Content-Type: application/json
Content-Length: 1063
Last-Modified: Wed, 04 Mar 2015 19:36:43 GMT
Connection: keep-alive
ETag: "54f75ecb-427"
Accept-Ranges: bytes

{
  "homepage": "http://files.minecraftforge.net/minecraftforge/",
  "promos": {
    "1.5.2-latest": "<IP_ADDRESS>8",
    "1.5.2-recommended": "<IP_ADDRESS>7",
    "1.6.1-latest": "<IP_ADDRESS>5",
    "1.6.2-latest": "<IP_ADDRESS>1",
    "1.6.2-recommended": "<IP_ADDRESS>1",
    "1.6.3-latest": "<IP_ADDRESS>8",
    "1.6.4-latest": "<IP_ADDRESS>5",
    "1.6.4-recommended": "<IP_ADDRESS>5",
    "1.7.10-latest": "<IP_ADDRESS>1",
    "1.7.10-latest-1.7.10": "<IP_ADDRESS>7",
    "1.7.10-latest-new": "<IP_ADDRESS>6",
    "1.7.10-recommended": "<IP_ADDRESS>1",
    "1.7.10_pre4-latest-prerelease": "<IP_ADDRESS>9",
    "1.7.2-latest": "<IP_ADDRESS>7",
    "1.7.2-latest-mc172": "<IP_ADDRESS>1",
    "1.7.2-recommended": "<IP_ADDRESS>1",
    "1.8-latest": "<IP_ADDRESS>5",
    "1.8-latest-1.8": "<IP_ADDRESS>5",
    "1.8-recommended": "<IP_ADDRESS>4",
    "latest": "<IP_ADDRESS>5",
    "latest-1.7.10": "<IP_ADDRESS>7",
    "latest-1.8": "<IP_ADDRESS>5",
    "latest-mc172": "<IP_ADDRESS>1",
    "latest-new": "<IP_ADDRESS>6",
    "latest-prerelease": "<IP_ADDRESS>9",
    "recommended": "<IP_ADDRESS>4"
  }
}

Holy crap! hahah awesome!

Here is a sample link:
http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.5.2-<IP_ADDRESS>8/forge-1.5.2-<IP_ADDRESS>8-installer.jar

So:
http://files.minecraftforge.net/maven/net/minecraftforge/forge/$minecraft-$forge/forge-$minecraft-$forge-installer.jar

Perhaps?

Yeah, that seems to be it. And then use their identifiers to find "latest", "recommended", etc
I haven't checked yet if we'll need the installer or universal jar.

I tried the installer on your Minecraft image and it started no issues.
The universal has a more complex setup:
"Open your minecraft.jar file and the universal zip file. Drop the contents of the zip file into minecraft.jar then delete the files in META-INF which begin with MOJANG.
To complete the forge installation - start minecraft and log in. Minecraft will then download some more instal files from http://files.minecraftforge.net/fmllibs/ and install them to .minecraft/lib. However, it will fail to find two files - bcprov-jdk15on-148.jar and scala-library.jar. For some reason these two files are on the files.minecraftforge.net but have been renamed scala-library.jar.stash and bcprov-jdk15on-148.jar.stash. So you need to manually download bcprov-jdk15on-148.jar.stash and scala-library.jar.stash to .minecraft/lib and remove the .stash extension from the file names. After doing this - restart minecraft and login again. The final forge setup phase should then complete.
If using a mod manager, place the forge zip under the jarmods section." Wiki
So I think the installer would be a better choice, yah?

Yep, installer will work out much better then. I vaguely remember it has a headless mode.

...sorry missed the first part of your last comment. Sounds like it's close then!

I think I'm getting close, but I'm having an issue with docker build. I'm not sure what is up, but I just wanted to let you know.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/cups/libcupsimage2_1.7.2-0ubuntu1.2_amd64.deb  404  Not Found [IP: <IP_ADDRESS> 80]

I found I have to add an apt-get update on my images now.

Well, I'm not sure what's up, but if you get the change, check out my forge branch. Docker seems to run it and then stop. I'm going to keep messing with it.

I'm looking...but from here I usually launch the container running bash and fiddle with the script from there:
docker run -it --rm mc bash

and then
root@333b54269394:/data# bash -x /start-minecraft
+ '[' '!' -e /data/eula.txt ']'
+ cd /data
+ case $TYPE in
+ case $VERSION in
++ wget -O - https://s3.amazonaws.com/Minecraft.Download/versions/versions.json
++ jsawk -n 'out(this.latest.release)'
--2015-03-05 00:59:51--  https://s3.amazonaws.com/Minecraft.Download/versions/versions.json
Resolving s3.amazonaws.com (s3.amazonaws.com)... <IP_ADDRESS>
Connecting to s3.amazonaws.com (s3.amazonaws.com)|<IP_ADDRESS>|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21973 (21K) [application/octet-stream]
Saving to: 'STDOUT'

100%[===========================================================================================================>] 21,973      --.-K/s   in 0.05s

2015-03-05 00:59:51 (446 KB/s) - written to stdout [21973/21973]

+ export VANILLA_VERSION=1.8.3
+ VANILLA_VERSION=1.8.3
+ export SERVER=minecraft_server.1.8.3
+ SERVER=minecraft_server.1.8.3
+ '[' '!' -e minecraft_server.1.8.3 ']'
+ echo 'Downloading minecraft_server.1.8.3 ...'
Downloading minecraft_server.1.8.3 ...
+ wget -q https://s3.amazonaws.com/Minecraft.Download/versions/1.8.3/minecraft_server.1.8.3
+ '[' '!' -e server.properties ']'
+ '[' -n '' -a '!' -e ops.txt.converted ']'
+ '[' -n '' -a '!' -e server-icon.png ']'
+ exec java -Xmx1024M -Xms1024M -jar minecraft_server.1.8.3
Error: Unable to access jarfile minecraft_server.1.8.3

Thanks :+1:

That definitely helped. Now I'm able to debug. Quite a few problems.

Like missing the ".jar" suffix ;) I see you pushed the fix already.

Haha that was one xD Another is I'm not checking the vanilla version vs what version is on forge, so I get links that don't work:
http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.8.3-<IP_ADDRESS>4/forge-1.8.3-<IP_ADDRESS>4-installer.jar
The 1.8.3 doesn't match the forge build.

Oh yeah, starting with 1.8, forge doesn't require matching up on the third version part, right?

If I understand your question correctly, I don't believe so.
Btw, should I keep going with fixing it? Or do you want to take over?
The debugging is going a lot faster now, so if you have other things to do, I can keep going.

Yeah, go for it.

K.

I'll be offline for a bit, but just discovered https://gitter.im/itzg/dockerfiles

Moving our conversation there.


Situations where HTML isn’t well-formed

This is more of an FYI than a true issue report.
In testing Pagefind with the Astro SSG, I’ve seen that it can’t index pages with malformed HTML even though browsers can manage to display the HTML normally. For example, Astro sometimes generates pages lacking the wrapping  (and Pagefind fails to index them, in my testing) even though the HTML does manage to have . (Their team is aware of the issue, and I’ve seen similar such problems with Astro-generated HTML over the last few months. They seem to come and go.)
I’ve had no such problem with Hugo, where the HTML is always correct.
Haven’t tried Pagefind with Eleventy yet but, in two-and-a-half years of off-and-on use of Eleventy, I never saw it produce malformed HTML, so am guessing Pagefind would be fine with it, too.

Good FYI. Pagefind should be generally alright with malformed HTML (within the bounds of Cloudflare's lol-html parser). The missing html element is a current frailty, though, as this is the default selector Pagefind bases all indexing on.
I believe if you configure the Pagefind root selector option on your Astro site to be, say, body, you'll see your pages index correctly. (Though you won't be able to get meta/filters from your )
I can look at adding some warning logs if Pagefind encounters pages without an html element as a stop-gap.


combine_by_coords fails with DataArrays

MCVE Code Sample

da1 = xr.DataArray([1, 2, 3], dims='x', coords={'x': [0, 1, 2]})
da2 = xr.DataArray([3, 4, 5], dims='x', coords={'x': [2, 3, 4]})
xr.combine_by_coords([da1, da2])

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-133-d27216ba5688> in <module>
      1 da1 = xr.DataArray([1, 2, 3], dims='x', coords={'x': [0, 1, 2]})
      2 da2 = xr.DataArray([3, 4, 5], dims='x', coords={'x': [2, 3, 4]})
----> 3 xr.combine_by_coords([da1, da2])

~/work/python/xarray/xarray/core/combine.py in combine_by_coords(datasets, compat, data_vars, coords, fill_value, join)
    619         compat=compat,
    620         fill_value=fill_value,
--> 621         join=join,
    622     )
    623

~/work/python/xarray/xarray/core/merge.py in merge(objects, compat, join, fill_value)
    588             )
    589
--> 590         obj = obj.to_dataset() if isinstance(obj, DataArray) else obj
    591         dict_like_objects.append(obj)
    592

~/work/python/xarray/xarray/core/dataarray.py in to_dataset(self, dim, name)
    478             return self._to_dataset_split(dim)
    479         else:
--> 480             return self._to_dataset_whole(name)
    481
    482     @property

~/work/python/xarray/xarray/core/dataarray.py in _to_dataset_whole(self, name, shallow_copy)
    426         if name is None:
    427             raise ValueError(
--> 428                 "unable to convert unnamed DataArray to a "
    429                 "Dataset without providing an explicit name"
    430             )

ValueError: unable to convert unnamed DataArray to a Dataset without providing an explicit name

To get what I want, I need
xr.combine_by_coords([da1.to_dataset(name='a'), da2.to_dataset(name='a')]).a
I think the issue is that the code uses to_dataset instead of _to_temp_dataset

+1 we should make this work!

@dcherian is this a merge problem, or a combine_by_coords problem?

What do you think of:

If combine receives a list of unnamed DataArrays, we convert them to temp datasets and then pass datasets down to merge.

If combine receives a list of  named DataArrays, then merge will do the right thing.

If combine receives a list containing both Datasets and unnamed DataArrays then merge will raise the right error.

So really it's just (1) that needs a special case in the combine functions?

Some additional information on the topic:
Combining named 1D data arrays works.
da1 = xr.DataArray(name='foo', data=np.random.randn(3), coords=[('x', [1, 2, 3])])
da2 = xr.DataArray(name='foo', data=np.random.randn(3), coords=[('x', [5, 6, 7])])
xr.combine_by_coords([da1, da2])

<xarray.Dataset>
Dimensions:  (x: 6)
Coordinates:
  * x        (x) int64 1 2 3 5 6 7
Data variables:
    foo      (x) float64 1.443 0.4889 0.9233 0.1946 -1.639 -1.455

However, when combining 2D gridded data...
da1 = xr.DataArray(name='foo',
                  data=np.random.rand(3,3),
                  coords=[('x', [1, 2, 3]),
                          ('y', [1, 2, 3])])

da2 = xr.DataArray(name='foo',
                  data=np.random.rand(3,3),
                  coords=[('x', [5, 6, 7]),
                          ('y', [5, 6, 7])])

xr.combine_by_coords([da1, da2])

...the method fails, despite passing a data variable name.
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-145-77ae89136c1f> in <module>
      9                           ('y', [5, 6, 7])])
     10
---> 11 xr.combine_by_coords([da1, da2])

~/xarray/xarray/core/combine.py in combine_by_coords(datasets, compat, data_vars, coords, fill_value, join)
    580
    581     # Group by data vars
--> 582     sorted_datasets = sorted(datasets, key=vars_as_keys)
    583     grouped_by_vars = itertools.groupby(sorted_datasets, key=vars_as_keys)
    584

~/xarray/xarray/core/combine.py in vars_as_keys(ds)
    465
    466 def vars_as_keys(ds):
--> 467     return tuple(sorted(ds))
    468
    469

~/xarray/xarray/core/common.py in __bool__(self)
    119
    120     def __bool__(self: Any) -> bool:
--> 121         return bool(self.values)
    122
    123     def __float__(self: Any) -> float:

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Again, converting to a dataset bypasses the issue.
ds1 = da1.to_dataset()
ds2 = da2.to_dataset()
xr.combine_by_coords([ds1, ds2])

<xarray.Dataset>
Dimensions:  (x: 6, y: 6)
Coordinates:
  * x        (x) int64 1 2 3 5 6 7
  * y        (y) int64 1 2 3 5 6 7
Data variables:
    foo      (x, y) float64 0.5078 0.8981 0.8707 nan ... 0.4172 0.7259 0.8431

Thanks @friedrichknuth .
It looks like all the combine functions expect lists of Datasets, not DataArrays (see docstrings).
It should be relatively easily to make this work like merge which can take a list of Datasets or DataArrays. See this code in merge:
to_dataset will fail for unnamed DataArrays, but _to_temp_dataset() will succeed.
Can you send in a PR?

Hello,
I'm new to open source development and xarray. I would like to help with this issue, however it appears that nothing has been done for over a year. Is this issue stale or does it still need to be addressed?

Hi @aijams — this issue is still current! There are some notes from @TomNicholas on this PR: https://github.com/pydata/xarray/pull/3312. Though it looks like there may be an outstanding question on @shoyer there.
@TomNicholas any thoughts on whether this is ready for a contribution?

Hi @max-sixty good question, and it would be nice to fix this!
I think that if we go with the scheme suggested by @dcherian for handling this issue then it answers the question I posed in #3312 - the answer being that we care more about combine_by_coords happily accepting two unnamed DataArrays than we do about it being consistent with merge by throwing an error. If we're happy with that then I think it shouldn't be too difficult to finish off the PR in #3312?
(I think that this bug mentioned in #3312 is separate, and possibly deserves its own small issue.)

My comprehension of the combine_by_coords function is as follows:
Given a set of DataArrays (possibly obtained by splitting apart data sets), group them by name and paste the arrays from each group onto an array of nans with the same dimension set as each member of that group.
The result for each group will be a DataArray with an entry for each element of the Cartesian product of that group's coordinates.
I'm assuming the main issue here is to have combine_by_coords put a set of unnamed DataArrays into a single group and paste them together.
@TomNicholas, is this an accurate description of this issue?

@aijams while that isn't quite how I think about it, I think that is an accurate description of what combine_by_coords does :blush:

I'm assuming the main issue here is to have combine_by_coords put a set of unnamed DataArrays into a single group and paste them together.

Yes - which involves making the assumption that these different unnamed DataArrays are actually the same physical variable, and so can be meaningfully combined into a group.

It looks like this issue has been neglected for a while.
@TomNicholas, can you take a look at this PR?


Text Input with Label on the top and Icon

I try show the input text with icon and text label on top, but is not possible, and the demo not show any example.
Is possible?
Only show the label inside the input
<lx-text-field label="Phone number" fixed-label="true" icon="phone">
      <input type="text" ng-model="textFields.fixedLastName">
</lx-text-field>

Show the label on the top but don't show the icon (obviously)
<lx-text-field label="Phone number">
      <input type="text" ng-model="textFields.fixedLastName">
</lx-text-field>

Thanks in advance.

As described in Google guidelines (https://www.google.com/design/spec/components/text-fields.html#text-fields-single-line-text-field), it's not possible, so it's not possible with LumX too :-)


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_e2xyh4av_4/clone/recipe/meta.yaml:15: pip_install_args: pip install should be run with --no-deps.
ERROR: /tmp/abs_e2xyh4av_4/clone/recipe/meta.yaml:20: missing_wheel: For pypi packages, wheel should be present in the host section
ERROR: /tmp/abs_e2xyh4av_4/clone/recipe/meta.yaml:27: missing_pip_check: For pypi packages, pip check should be present in the test commands
Errors were found


Drawer content not recognizing custom font

The drawer is not able to recognize the local fonts I set up. Within my nextjs project, I setup local fonts using this article from the nextjs documentation. However, the vaul drawer isn't able to recognize the --font-sans and --font-mono css vars and all the text within the drawer is being rendered in Times. Any help is appreciated!

Vaul doesn't set any font related styles, this is likely a bug in your setup.

I have the same issue... it's not a bug in my setup


com.example change to com.leastauthority

Change com.example to com.leatauthority and description correction (1 part)
Not sure about pubsec.lock if it should be committed at all:
https://dart.dev/guides/libraries/private-files

Code Review Checklist (to be filled out by reviewer)

[ ] Description accurately reflects what changes are being made.
[ ] Description explains why the changes are being made (or references an issue containing one).
[ ] The PR appropriately sized.
[ ] New code has enough tests.
[ ] New code has enough documentation to answer "how do I use it?" and "what does it do?".
[ ] Existing documentation is up-to-date if impacted.

@shareef-dweikat or @ewanas please merge as I don't have this option.


Manage Azure SQL Database long-term backup retention

Describe the solution you'd like
I would like to be able to manage Azure SQL Database long-term backup retention from the az cli. I currently switch to powershell and utilize Az.Sql/AzureRM.Sql to accomplish this from a script.
Additional context
This documentation describes what I'd like to accomplish, but with az cli.
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-long-term-backup-retention-configure

Relevant request in the Feedback system: https://feedback.azure.com/forums/217321-sql-database/suggestions/40378918-support-backup-retention-configuration-through-azu

For anyone else facing this, I found the az rest command to be almost as good as a dedicated command.
It directly invokes the Azure API, and you can use it for to create or update Backup Long Term Retention Policies.
Credit: https://medium.com/@mauridb/calling-azure-rest-api-via-curl-eb10a06127 (see Update 2 at the bottom)


SVG Image in iOS-TabbedPage blurry

I'm trying to add a SVG image to a TabbedPage. It comes up very blurry though. If I try to compensate the size for the screen scale, it comes out way too big and get's larger then the TabBar itself.
I tried rendering it in a higher resolution and then downscale it using UIImage.Scale but it get's even worse with that.
Here is my minified TabbedRenderer code:
protected override async Task<Tuple<UIImage, UIImage>> GetIcon(Page page)
{
    int height = TabBar.Frame.Height - TabBar.SafeAreaInsets.Bottom;
    int size = (int)(height / 2d);

    var params = ImageService.Instance.LoadEmbeddedResource(((UriImageSource)page.IconImageSource).File)
        .WithCustomDataResolver(new SvgDataResolver(0, size, false));
    var image = await params.AsUIImageAsync();

    return Tuple.Create(image, (UIImage)null);
}

Possible related to #1305.
I had a similar problem when using SvgImageSource (might also be valid for other sources):
The problem is that scale is ignored in the IImageSourceHandler for iOS. This property should be passed when instantiating the UIImage. I did a quick test and registered my own IImageSourceHandler and everything worked:
public class ScaleAwareImageSourceHandler : IImageSourceHandler
{
	public ScaleAwareImageSourceHandler()
	{
		WrappedImageSourceHandler = new FFImageLoadingImageSourceHandler();
	}

	public IImageSourceHandler WrappedImageSourceHandler { get; }

	public Task<UIImage> LoadImageAsync(ImageSource imageSource, CancellationToken cancellationToken = default, float scale = 1)
	{
		return WrappedImageSourceHandler.LoadImageAsync(imageSource, cancellationToken, scale)
			.ContinueWith(async (task) =>
			{
				UIImage uiImage = await task;

				if (uiImage != null && scale != 1.0)
				{
					return new UIImage(uiImage.CGImage, scale, uiImage.Orientation);
				}

				return uiImage;
			}, cancellationToken)
			.Unwrap();
	}
}

@daniel-luberda I would go for a PR, but I'm not sure where this parameter should be added and passed down to the SvgDataResolver.

@daniel-luberda Would you be able to look into this?

can someone has an example on how to write TabbedRenderer for iOS to support svg files?
I did not find any examples online.

I'm really interested in this too. Because this blur problems also applies to ShellItem Icons and ToolbarIcons.
ex with shell item icons :
 <FlyoutItem        Route="tabRoute">       <ShellContent               Route="MyPage"              Icon="{extensions:SvgImageResource 'assignment-24px.svg', Width=32, Height=32}"               /></FlyoutItem>
ex with ToolbarItems :
<ToolbarItem  IconImageSource="{extensions:SvgImageResource 'assignment-24px.svg', Width=32, Height=32}" />
where extensions:SvgImageResource calls SvgImageSource.FromResource(resource, vectorWidth, vectorHeight) in the end.
@Dresel I saw your post but I can't figure how to use your sample, and give it the the SvgDataResolver. Any ideas ?

@Dresel I saw your post but I can't figure how to use your sample, and give it the the SvgDataResolver. Any ideas ?

You need to register it, like FFImageLoading is doing it, something like this.

Thanks for the detailed answer @BaltoAF. I'm trying to implement this in my custom tabbed page renderer in step 4 but I'm not sure how to do this. Could you provide the code for this part?

Hello !
I'm afraid I can't help you regarding the custom tab renderer, because I don't use one.
Instead, I use an AppShell Flyout in Xamarin Forms.
This is what i've done in detail for step 4. It might help you.
4a) Define your tabs in AppShell.xaml. Here is an exemple with two tabs.
What is important is the "Icon" value.
<Shell xmlns="http://xamarin.com/schemas/2014/forms"
       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
	   xmlns:view="clr-namespace:MyApp.App.Views"
           x:Name="shell"
           x:Class="Balto.App.AppShell">

	<FlyoutItem Route="tabRoute"
                FlyoutDisplayOptions="AsMultipleItems">

        <ShellContent Route="PlanningPage"
                      Title="Planning"
                      Icon="{extensions:SvgImageResource 'event_black_24dp.svg', Width=16, Height=16}"
                      ContentTemplate="{DataTemplate view:PlanningPage}" />
	<ShellContent Route="ExercicesPage"
                      Title="Exercices"
                      Icon="{extensions:SvgImageResource 'assignment-24px.svg', Width=16, Height=16}"
                      ContentTemplate="{DataTemplate view:ExercicesPage}"/>
	</FlyoutItem>

</Shell>

4b) To support the Xaml markup extensions:SvgImageResource, I use the following Extension :
/// <summary>
/// Enable to use markup in xaml like this:
/// <Image .... Source="{extensions:SvgImageResource Images.SeatedMonkey.svg}" />
/// https://docs.microsoft.com/fr-fr/xamarin/xamarin-forms/xaml/markup-extensions/creating
/// </summary>
[ContentProperty("Source")]
public class SvgImageResourceExtension : IMarkupExtension<SvgImageSource>
{
	public string Source { set; get; }

	public int Width { set; get; }

	public int Height { set; get; }

	public SvgImageSource ProvideValue(IServiceProvider serviceProvider)
	{
		if (String.IsNullOrEmpty(Source))
		{
			IXmlLineInfoProvider lineInfoProvider = serviceProvider.GetService(typeof(IXmlLineInfoProvider)) as IXmlLineInfoProvider;
			IXmlLineInfo lineInfo = (lineInfoProvider != null) ? lineInfoProvider.XmlLineInfo : new XmlLineInfo();
			throw new XamlParseException("ImageResourceExtension requires Source property to be set", lineInfo);
		}

		return ResourceHelper.GetSvgImageSource(Source, Width, Height);
	}

	object IMarkupExtension.ProvideValue(IServiceProvider serviceProvider)
	{
		return (this as IMarkupExtension<SvgImageSource>).ProvideValue(serviceProvider);
	}
}

4c) Last : This is a simplified version of the ResourceHelper i'm using. This is where the Scale is used.
public static class ResourceHelper
{
	private static float Scale = 1;
	public static SvgImageSource GetSvgImageSource(string fileName, int width = 0, int height = 0)
	{
		string assemblyName = typeof(ResourceHelper).GetTypeInfo().Assembly.GetName().Name;
		return SvgImageSource.FromResource(assemblyName + ".Resources." + fileName, typeof(ResourceHelper).GetTypeInfo().Assembly, vectorWidth: (int)(width * Scale), vectorHeight: (int)(height * Scale));
	}
}


WIP: Add CNP and K8s NP equalness and missing func

Read per commit basis.
Stop triggering unnecessary policy regenerations for every Kubernetes watch event.

Depends on https://github.com/cilium/cilium/pull/5449

This change is

test-me-please

test-missed-k8s

test-upstream-k8s

@aanm no tests have ran for this PR, as you are merging it into another branch, which I guess the CI infrastructure doesn't support. I will leave this to you to merge based off of approvals of relevant CODEOWNERs into your PR.

test-me-please


[release-1.12] Only inject metadata exchange filters when proxy version is GE 1.12.

manual cherry pick of ##36797

@bianpengyuan: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

unit-tests_istio_release-1.12
1b4075705c8de3f5f3c074e304158045be2ae05a
link
true
/test unit-tests_istio_release-1.12

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest


Not compatible with latest React version.

Not working with react 18

The issue with react-google-login peer dependencies version
Uninstall it or install with --force flag

worked


[BUG] Playwright Errors swallowed, FFMPEG not found

System info

Playwright Version: 1.33.0
Operating System: Windows 10 Enterprise
Browser: [All, Chromium, Firefox, WebKit]
Other info: Similar issue #782

Source code
Test file (self-contained)
import com.microsoft.playwright.*;

public class ExampleReproducible {
  public static void main(String[] args) {
    try (Playwright playwright = Playwright.create()) {
      Browser browser = playwright.chromium().launch();
      BrowserContext context = browser.newContext(new Browser.NewContextOptions()
                    .setRecordVideoDir(Paths.get("videos"));
      Page page = context.newPage();
      page.navigate("https://example.com");
      // ...
    }
  }
}

Steps

Set Environment Variable PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD to true
Run above code with and without setRecordVideoDir

Expected
Both work or if ffmpeg is not found, show error in logs.
Actual
Video Recording fails and exception is swallowed.
Similar error to #782 is shown
>       this._firstNonInitialNavigationCommittedReject(new Error('Page closed'));
>                                                     ^
>
> Error: Page closed
>Exception in thread "main" com.microsoft.playwright.PlaywrightException: Playwright connection closed
>	at com.microsoft.playwright.impl.PipeTransport.send(PipeTransport.java:50)
>	at com.microsoft.playwright.impl.Connection.internalSendMessage(Connection.java:164)
>	at com.microsoft.playwright.impl.Connection.sendMessageAsync(Connection.java:130)
>	at com.microsoft.playwright.impl.Connection.sendMessage(Connection.java:126)
>	at com.microsoft.playwright.impl.ChannelOwner.sendMessage(ChannelOwner.java:102)
>	at com.microsoft.playwright.impl.ChannelOwner.sendMessage(ChannelOwner.java:98)
>	at com.microsoft.playwright.impl.BrowserImpl.closeImpl(BrowserImpl.java:84)
>	at com.microsoft.playwright.impl.BrowserImpl.lambda$close$0(BrowserImpl.java:71)
>	at com.microsoft.playwright.impl.LoggingSupport.lambda$withLogging$0(LoggingSupport.java:36)
>	at com.microsoft.playwright.impl.LoggingSupport.withLogging(LoggingSupport.java:47)
>	at com.microsoft.playwright.impl.ChannelOwner.withLogging(ChannelOwner.java:87)
>	at com.microsoft.playwright.impl.LoggingSupport.withLogging(LoggingSupport.java:35)
>	at com.microsoft.playwright.impl.BrowserImpl.close(BrowserImpl.java:71)

Using a debugger you can see that a proper exception is thrown, but is swallowed:
> com.microsoft.playwright.impl.DriverException: Error {
>   message='Executable doesn't exist at %appdata%\Local\ms-playwright\ffmpeg-1008\ffmpeg-win64.exe
> ╔════════════════════════════════════════════════════════════════════════════════════════════╗
> ║ Looks like Playwright was just installed or updated.                                       ║
> ║ Please run the following command to download new browsers:                                 ║
> ║                                                                                ║
> ║     mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install" ║
> ║                                                                                ║
> ║ <3 Playwright Team                                                                         ║
> ╚════════════════════════════════════════════════════════════════════════════════════════════╝
>   name='Error
>   stack='Error: Executable doesn't exist at %appdata%\Local\ms-playwright\ffmpeg-1008\ffmpeg-win64.exe
> ╔════════════════════════════════════════════════════════════════════════════════════════════╗
> ║ Looks like Playwright was just installed or updated.                                       ║
> ║ Please run the following command to download new browsers:                                 ║
> ║                                                                                ║
> ║     mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install" ║
> ║                                                                                ║
> ║ <3 Playwright Team                                                                         ║
> ╚════════════════════════════════════════════════════════════════════════════════════════════╝
>     at executablePathOrDie (%appdata%\Local\Temp\playwright-java-2145463888745029214\package\lib\server\registry\index.js:305:15)
>     at Object.executablePathOrDie (%appdata%\Local\Temp\playwright-java-2145463888745029214\package\lib\server\registry\index.js:481:43)
>     at FrameSession._createVideoRecorder (%appdata%\Local\Temp\playwright-java-2145463888745029214\package\lib\server\chromium\crPage.js:793:68)
>     at FrameSession._initialize (%appdata%\Local\Temp\playwright-java-2145463888745029214\package\lib\server\chromium\crPage.js:410:18)
>     at async CRBrowserContext.newPage (%appdata%\Local\Temp\playwright-java-2145463888745029214\package\lib\server\browserContext.js:356:25)
>     at async BrowserContextDispatcher.newPage (%appdata%\Local\Temp\playwright-java-2145463888745029214\package\lib\server\dispatchers\browserContextDispatcher.js:182:55)
>     at async DispatcherConnection.dispatch (%appdata%\Local\Temp\playwright-java-2145463888745029214\package\lib\server\dispatchers\dispatcher.js:312:22)
> }

Sorry this is the error I get when running in terminal, it contains java stack trace as well as instruction on how to fix it, where is the exception swallowed?
$ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 mvn -e exec:java -Dexec.mainClass=org.example.PrintTitle
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< org.example:examples >------------------------
[INFO] Building Playwright Client Examples 1.34.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:3.1.0:java (default-cli) @ examples ---
Skipping browsers download because `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD` env variable is set
/private/var/folders/t3/_mbh6z155sz1cr7prkpn9lsh0000gn/T/playwright-java-6001006418829335858/package/lib/server/chromium/crPage.js:377
      this._firstNonInitialNavigationCommittedReject(new Error('Page closed'));
                                                     ^

Error: Page closed
    at CRSession.<anonymous> (/private/var/folders/t3/_mbh6z155sz1cr7prkpn9lsh0000gn/T/playwright-java-6001006418829335858/package/lib/server/chromium/crPage.js:377:54)
    at Object.onceWrapper (node:events:627:28)
    at CRSession.emit (node:events:525:35)
    at /private/var/folders/t3/_mbh6z155sz1cr7prkpn9lsh0000gn/T/playwright-java-6001006418829335858/package/lib/server/chromium/crConnection.js:211:39

Node.js v18.16.0
[WARNING]
com.microsoft.playwright.PlaywrightException: Error {
  message='Executable doesn't exist at /Users/yurys/Library/Caches/ms-playwright/ffmpeg-1009/ffmpeg-mac
╔════════════════════════════════════════════════════════════════════════════════════════════╗
║ Looks like Playwright was just installed or updated.                                       ║
║ Please run the following command to download new browsers:                                 ║
║                                                                                ║
║     mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install" ║
║                                                                                ║
║ <3 Playwright Team                                                                         ║
╚════════════════════════════════════════════════════════════════════════════════════════════╝
  name='Error
  stack='Error: Executable doesn't exist at /Users/yurys/Library/Caches/ms-playwright/ffmpeg-1009/ffmpeg-mac
╔════════════════════════════════════════════════════════════════════════════════════════════╗
║ Looks like Playwright was just installed or updated.                                       ║
║ Please run the following command to download new browsers:                                 ║
║                                                                                ║
║     mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install" ║
║                                                                                ║
║ <3 Playwright Team                                                                         ║
╚════════════════════════════════════════════════════════════════════════════════════════════╝
    at executablePathOrDie (/private/var/folders/t3/_mbh6z155sz1cr7prkpn9lsh0000gn/T/playwright-java-6001006418829335858/package/lib/server/registry/index.js:305:15)
    at Object.executablePathOrDie (/private/var/folders/t3/_mbh6z155sz1cr7prkpn9lsh0000gn/T/playwright-java-6001006418829335858/package/lib/server/registry/index.js:481:43)
    at FrameSession._createVideoRecorder (/private/var/folders/t3/_mbh6z155sz1cr7prkpn9lsh0000gn/T/playwright-java-6001006418829335858/package/lib/server/chromium/crPage.js:792:68)
    at FrameSession._initialize (/private/var/folders/t3/_mbh6z155sz1cr7prkpn9lsh0000gn/T/playwright-java-6001006418829335858/package/lib/server/chromium/crPage.js:409:18)
    at async CRBrowserContext.newPage (/private/var/folders/t3/_mbh6z155sz1cr7prkpn9lsh0000gn/T/playwright-java-6001006418829335858/package/lib/server/browserContext.js:356:25)
    at async BrowserContextDispatcher.newPage (/private/var/folders/t3/_mbh6z155sz1cr7prkpn9lsh0000gn/T/playwright-java-6001006418829335858/package/lib/server/dispatchers/browserContextDispatcher.js:199:55)
    at async DispatcherConnection.dispatch (/private/var/folders/t3/_mbh6z155sz1cr7prkpn9lsh0000gn/T/playwright-java-6001006418829335858/package/lib/server/dispatchers/dispatcher.js:312:22)
}
    at com.microsoft.playwright.impl.WaitableResult.get (WaitableResult.java:54)
    at com.microsoft.playwright.impl.ChannelOwner.runUntil (ChannelOwner.java:111)
    at com.microsoft.playwright.impl.Connection.sendMessage (Connection.java:126)
    at com.microsoft.playwright.impl.ChannelOwner.sendMessage (ChannelOwner.java:102)
    at com.microsoft.playwright.impl.ChannelOwner.sendMessage (ChannelOwner.java:98)
    at com.microsoft.playwright.impl.BrowserContextImpl.newPageImpl (BrowserContextImpl.java:375)
    at com.microsoft.playwright.impl.BrowserContextImpl.lambda$newPage$13 (BrowserContextImpl.java:368)
    at com.microsoft.playwright.impl.LoggingSupport.withLogging (LoggingSupport.java:47)
    at com.microsoft.playwright.impl.ChannelOwner.withLogging (ChannelOwner.java:87)
    at com.microsoft.playwright.impl.BrowserContextImpl.newPage (BrowserContextImpl.java:368)
    at com.microsoft.playwright.impl.BrowserContextImpl.newPage (BrowserContextImpl.java:44)
    at org.example.PrintTitle.main (PrintTitle.java:29)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:279)
    at java.lang.Thread.run (Thread.java:1623)
Caused by: com.microsoft.playwright.impl.DriverException: Error {
  message='Executable doesn't exist at /Users/yurys/Library/Caches/ms-playwright/ffmpeg-1009/ffmpeg-mac
...

I'm unable to reproduce the exact Error Message from above. I narrowed down my Issue to a weird conflict between Lombok's @Cleanup Annotation and Playwright. In particular i would expect the following Code to all work equally:
With Lombok
        // Does not work
        try (Playwright playwright = Playwright.create()) {
            @Cleanup Browser browser = playwright.chromium().launch(new BrowserType.LaunchOptions().setChannel("msedge"));
            BrowserContext context = browser.newContext(new Browser.NewContextOptions()
                .setRecordVideoDir(Paths.get("target", "videos")));
            Page page = context.newPage();
            page.navigate("https://example.com");
            // ...
        }

Which basically compiles to
        // Does not work
        try (Playwright playwright = Playwright.create()) {
            Browser browser = playwright.chromium().launch(new BrowserType.LaunchOptions().setChannel("msedge"));
            try {
                BrowserContext context = browser.newContext(new Browser.NewContextOptions()
                    .setRecordVideoDir(Paths.get("target", "videos")));
                Page page = context.newPage();
                page.navigate("https://example.com");
            } finally {
                if (browser != null) browser.close();
            }
            // ...
        }

While using the equivalent Java 8 constructs do work:
       //  Works
        try (Playwright playwright = Playwright.create()) {
            try (Browser browser = playwright.chromium().launch(new BrowserType.LaunchOptions().setChannel("msedge"))) {
                BrowserContext context = browser.newContext(new Browser.NewContextOptions()
                    .setRecordVideoDir(Paths.get("target", "videos")));
                Page page = context.newPage();
                page.navigate("https://example.com");
            }
            // ...
        }

Unsure why my Test Case above no longer works identically for me, but i guess that's to be expected if one does not isolate Test Cases for further studying.
<path>package\lib\server\chromium\crPage.js:378
      this._firstNonInitialNavigationCommittedReject(new Error('Page closed'));
                                                     ^

Error: Page closed
    at CRSession.<anonymous> (<path>package\lib\server\chromium\crPage.js:378:54)
    at Object.onceWrapper (node:events:627:28)
    at CRSession.emit (node:events:525:35)
    at <path>package\lib\server\chromium\crConnection.js:211:39

Node.js v18.16.0
[WARNING]
com.microsoft.playwright.PlaywrightException: Failed to read message from driver, pipe closed.
    at com.microsoft.playwright.impl.PipeTransport.poll (PipeTransport.java:75)
    at com.microsoft.playwright.impl.Connection.processOneMessage (Connection.java:200)
    at com.microsoft.playwright.impl.ChannelOwner.runUntil (ChannelOwner.java:109)
    at com.microsoft.playwright.impl.Connection.sendMessage (Connection.java:126)
    at com.microsoft.playwright.impl.ChannelOwner.sendMessage (ChannelOwner.java:102)
    at com.microsoft.playwright.impl.ChannelOwner.sendMessage (ChannelOwner.java:98)
    at com.microsoft.playwright.impl.BrowserImpl.closeImpl (BrowserImpl.java:84)
    at com.microsoft.playwright.impl.BrowserImpl.lambda$close$0 (BrowserImpl.java:71)
    at com.microsoft.playwright.impl.LoggingSupport.lambda$withLogging$0 (LoggingSupport.java:36)
    at com.microsoft.playwright.impl.LoggingSupport.withLogging (LoggingSupport.java:47)
    at com.microsoft.playwright.impl.ChannelOwner.withLogging (ChannelOwner.java:87)
    at com.microsoft.playwright.impl.LoggingSupport.withLogging (LoggingSupport.java:35)
    at com.microsoft.playwright.impl.BrowserImpl.close (BrowserImpl.java:71)
    at org.example.ExampleReproducible.main (ExampleReproducible.java:31)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:279)
    at java.lang.Thread.run (Thread.java:833)
Caused by: java.io.EOFException
    at com.microsoft.playwright.impl.ReaderThread.readIntLE (PipeTransport.java:110)
    at com.microsoft.playwright.impl.ReaderThread.readMessage (PipeTransport.java:139)
    at com.microsoft.playwright.impl.ReaderThread.run (PipeTransport.java:125)

With Lombok

Looking at the description of the project I would not be surprised if it tampers with the playwright exceptions.
Here is the repro project I use: https://github.com/yury-s/java-issue-1280. If you deem this is a Playwright bug, please provide a complete self-contained repro like that with vanilla Playwright. Make sure you run it against latest Playwright version.

If you deem this is a Playwright bug, please provide a complete self-contained repro like that with vanilla Playwright. Make sure you run it against latest Playwright version.

Quite Simple to add it to your Repository. I've forked it here using a new Code Space. It uses a newer Version of maven than you did in your example output.
Just for completeness sake, I'll include the output of mvn -v :
Maven Version:
Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8)
Maven home: /usr/local/sdkman/candidates/maven/current
Java version: <IP_ADDRESS>, vendor: Microsoft, runtime: /opt/java/11.0.14
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-1106-azure", arch: "amd64", family: "unix"
I did not change the Version of Playwright, the SHA-1 is:
435c8720277acc9a4640fb91d67b3601f1b94d27 and only Version 1.33 is installed on the codespace.
As i easily reproduced that on Windows too, i don't think this is a "Lombok" or "Environment" bug, but rather that closing the Browser environment in a finally block is unsupported. Which is okay-ish, as that is easily worked around (see my original Example) with try-with-resources.
For readability purposes i do prefer using @Cleanup though and using try-with-resources with the browser object directly is not always an option.
For the fork see: https://github.com/NoonRightsWarriorBehindHovering/mre-playwright-1
I renamed it, to fit with my other repository naming conventions.
Just to be clear again: It is definitely not a "lombok" issue, but a playwright issue. Alternatively it is a "Java" issue, but i don't believe that to be the case.

I would not call it working as intended, given that the try-with-resources block does work.
Though i'm happy with the Solution i found. Hopefully this issue helps others.


WebdriverIO@8 compatibility

When trying to launch tests after WebdriverIO upgrade from v7 to v8, I get this error:
[error] TypeError: Launcher is not a constructor     at C:\XXXX\node_modules\@migalons\angular-wdio-builder\lib\test.js:32:18     at Generator.next (<anonymous>)     at fulfilled (C:\XXXX\node_modules\@migalons\angular-wdio-builder\lib\test.js:5:58)
I'm on Angular: 14.2.12.

Sorry, wrong repo.


No sounds.

Hi, I'm with the last version of Obsidian entered the token from Syrinscape with an empty test vault with only obsidian-syrinscape, Token had been reset and reimplemented in Obsidian.
When in reading mode I can push the button but no sound.
I do have sound from obsidian when playing recordings, but nothing plays from pushing the play button from the plugin.
Am I missing something?

This plugin controls the online Syrinscape player. You need to have the Syrinscape online player running either as a standalone app or the web browser. I prefer the standalone personally.
https://syrinscape.com/download/

@Superelmanu I’ve updated the README file to make the requirements more explicit. Let me know if that helps.
I’m also going to log a feature request to embed the online player in the plugin. I’m not sure if that’s possible, but it sure is an interesting idea. Thank you!

Thank you for the help, it's now working.
Only found a small limitation. If you are using a laser (as an example) you can queue the sound one after the other, but you can't click the play button to have multiple laser shooting at once as you can using the player (online or installed).
Embedding the player may solve this?

I can see that the API requests to the online player are going out just as fast as you can click them. You can open the console to view this with Cmd-Option-I if you want.
What I noticed is it depends on the sound. E.g. this sound, even though it's an "element" plays on a loop and shows up with a "SFX" icon in the web UI syrinscape:element:1163531:Heavy lasers (eob In the marrow). So each call to "play" just tells the UI "yes, please start this loop". Since the loop is already started, you don't get much.
This sound, on the other hand, will go "pew" just as fast as you can click in either Obsidian or the Web UI:
syrinscape:element:3089:Laser
It's one of the global one-shots.
I may need to do some digging and display the "stop" button for more than just "mood". It looks like some "elements" need a stop button too. And a stop button would give a clear indication that a noise isn't right for multi-clicking play.

@Superelmanu  - I'm not sure that the element id's translate from user to user, but if you give me the whole macro you used (everything between the backticks) I'll see if I can confirm you had a SFX instead of a one-shot element.

@Superelmanu - I think that the version I just released last night will help you out significantly. I've re-vamped the autocomplete and I've also changed it so instead of "element", you specify if the element is a oneshot, music, or sfx. Both music and sfx (as well as mood) will get a stop button. It will make it clear if you can click multiple of an effect or not.
You can still specify "element" - for backwards compatibility - but element will be interpreted as synonymous to oneshot. And won't get a stop button.

resolved with version 1.4.0. The plugin now includes an embedded player


Tests for saving embedded Ecto models

This covers behavior added in 080498ee4c3a5a70b69f478c7877d2979e879e01
Also updated mix.exs so that a migration could be generated during development without prefixing with MIX_ENV=test.

This is good to go. Just one comment about the second test

Thanks for tackling this. I think we're good to publish after this is in :D

@paulcsmith happy to help! NRR


HiveD Reconfiguration

Support for reconfigurations.

Physical cell of a pod cannot be found: ignore the pod (won't add it to the internal view).
Virtual cell of a pod cannot be found, i.e., usage exceeds quota: downgrade the affinity group to opportunistic.
Physical and virtual cells cannot be bound, i.e., cell hierarchies don't match: downgrade the affinity group to opportunistic.

This PR also has several minor bug fixes.

  	"[%v]: group %v not exists when deleting pod", internal.Key(pod), s.AffinityGroup.Name))

Do we really need to panic here?

Refers to: subprojects/GOPATH/src/github.com/microsoft/hivedscheduler/pkg/algorithm/hived_algorithm.go:216 in 97feb09. [](commit_id = 97feb0902378f75e5b74684347c8960cbf2a5387, deletion_comment = False)

  } else {

Do we really need to panic here?

Refers to: subprojects/GOPATH/src/github.com/microsoft/hivedscheduler/pkg/algorithm/hived_algorithm.go:228 in 97feb09. [](commit_id = 97feb0902378f75e5b74684347c8960cbf2a5387, deletion_comment = False)

  	"[%v]: group %v not exists when deleting pod", internal.Key(pod), s.AffinityGroup.Name))

this case should be impossible by design

In reply to: 547351186 [](ancestors = 547351186)

Refers to: subprojects/GOPATH/src/github.com/microsoft/hivedscheduler/pkg/algorithm/hived_algorithm.go:216 in 97feb09. [](commit_id = 97feb0902378f75e5b74684347c8960cbf2a5387, deletion_comment = False)


SearchTweets methods are ignoring maxResults parameter.

Describe the bug
SearchTweets ( in RecentSearch service ) methods ignores maxResults parameter.
To Reproduce
List<RecentSearchResultsModel> result = _searchService.SearchTweets(query, 10, 5); return result;
Expected behavior
Should return 10 tweets by default. Or if given maxResults parameter is let's say 20, api should return 20 etc.
According to docs, default is 10, not 100;
"The max_results request parameter enables you to configure the number of Tweets returned per response. This defaults to 10 Tweets and has a maximum of 100. " -> https://developer.twitter.com/en/docs/twitter-api/tweets/search/integrate/paginate
Screenshots

Additional context
https://github.com/jamiemaguiredotnet/SocialOpinion-Public/blob/5f8e0a28abfa6f52631c0c567c2b09f422154fd4/SocialOpinionAPI/Services/RecentSearch/RecentSearchService.cs#L24
https://github.com/jamiemaguiredotnet/SocialOpinion-Public/blob/5f8e0a28abfa6f52631c0c567c2b09f422154fd4/SocialOpinionAPI/Services/RecentSearch/RecentSearchService.cs#L103
https://github.com/jamiemaguiredotnet/SocialOpinion-Public/blob/5f8e0a28abfa6f52631c0c567c2b09f422154fd4/SocialOpinionAPI/Services/RecentSearch/RecentSearchService.cs#L153

Thanks for the feedback. I will resolve this.


Pass -insecure to «go get» if asked to

Closes #47.

@AlekSi Thank you for the PR!
Can you rebase? (I've merged some PRs and messed the base revision for this one, sorry!)

Rebased. Also, please not #61.

@imikushin poke


• Is not being recognised as character

When I use
pyautogui.typewrite("• ")

It doesnt type • in the place where I have my text cursor and only types a space in the place

There are many issues with unicode, so to get around this just copy the unicode and paste it with hotkey.


Pressing enter does not blur the input

When you press enter while typing in the input, the suggests are hidden, but the input remains focused. Then when you continue typing, the suggests remain hidden and you can't select anything. You can only return to the original behavior by manually blurring and coming back to the field.
I'm getting around this in my code by explicitly blurring the input at the end of my onSuggestSelect hook callback.

I can do this, although I'm wondering about the expected behavior.
Should the input blur no matter what at the end of selectSuggest or should we keep it when suggest is undefined i.e. no autocompleted suggest was selected?

I have the same issue with a project of ours.
For my use-case I like to leave the focus on the input and be able to type and get new suggestions.
@ro-ka Whats your opinion?

I have no special preference here.

That also would work for my use case.

I have fixed your bug in this pull request: https://github.com/ubilabs/react-geosuggest/pull/340


Cannot uninstall

Using Windows Vista, I cannot use the extension manager to remove, it just gives a generic error and says brackets will reload. I tried to manually uninstall via Help > show extension folder and deleting the folder itself and I was getting a permissions error. I came to give you this info and realized I had two copies of brackets open at the same time. I closed them both down reopened it and it was able to uninstall the extension. Sorry that it was your extension. This seems to me to be a bug. I was getting another error on another extension I was trying to remove as well. It seems to be ok now, but just letting you know since it looks like you work for adobe. Just passing along the two open app error problem.
Happy Coding

Seems this has returned.
Having the same problem as stated above.

There are 2 potential workarounds for this uninstall problem:

Restart Brackets (make sure you don't have a .sass/.scss file open at startup), then uninstall via the Extension Manager (thanks @rgfx)
Quit Brackets, then manually delete the extension at C:/Users/<your user name>/AppData/Roaming/Brackets/extensions/user/jasonsanjose.brackets-sass/

I'll close this bug and use #81 to track the actual fix. I'll make sure to update the README too.


[BUG]: Type Error in MySqlTransaction - Missing $client Property After Upgrading to<EMAIL_ADDRESS>

What version of drizzle-orm are you using?
0.35.2
What version of drizzle-kit are you using?
0.26.3
Describe the Bug
I'm encountering a TypeScript type error after upgrading to<EMAIL_ADDRESS>that appears to be related to the $client property when using transactions with MySqlTransaction.
This is almost the same error as this: https://github.com/drizzle-team/drizzle-orm/issues/3140, but for MySQL. The release notes for 0.35.2 says that this issue was fixed, but it is still happening for me.
  Property '$client' is missing in type 'MySqlTransaction<MySql2QueryResultHKT, MySql2PreparedQueryHKT, typeof import("/home/gabriel/Documents/Github/kodix-turbo/packages/db/dist/schema/index"), ExtractTablesWithRelations<...>>' but required in type '{ $client: Pool; }'.ts(2322)

Expected behavior
I should be able to pass a drizzle transaction to a type of drizzle (typeof db) when using mysql or postgresql.
Environment & setup
I am using a transaction and attempting to pass it to a function that needs a "typeof db". The types do not match and it is not allowing me to fit one type into the other.

Closing in favor of #3175.


SDP: heuristic to know when to do automatic dualization + flag to enable/disable the dualization

Is your feature request related to a problem? Please describe.
The problem is as follows: when I give CVXPY an SDP in primal form to solve with Mosek, it automatically dualizes it and it solves it fast (~0.3s). When I give it the problem dualized by hand, it dualizes the dual going to the primal, which is solved by an order of magnitude slower (~20s).
Note: I am aware of the following note in the documentation:

In CVXPY 1.1.6 we did a complete rewrite of the MOSEK interface. The main takeaway is that we now dualize all continuous problems. The dualization is automatic because this eliminates the previous need for a large number of slack variables, and never results in larger problems compared to our old MOSEK interface. If you notice MOSEK solve times are slower for some of your problems under CVXPY 1.1.6 or higher, be sure to use the MOSEK solver options to tell MOSEK that it should solve the dual; this can be accomplished by adding the (key, value) pair (mosek.iparam.intpnt_solve_form, mosek.solveform.dual) to the mosek_params argument.
https://www.cvxpy.org/tutorial/advanced/index.html#solveropts

Describe the solution you'd like
It would be nice if there was a way to estimate from the number of constraints and variables what formulation is best to send to the solver.
Also, it is not apparent without going into the documentation that the problem is always dualized, so more transparency in the CVXPY log/printed info would be appreciated.
Additional context and code to reproduce
I provide codes to solve a specific problem in primal and dual forms in the PICOS fix280 branch, YALMIP (needs MATLAB) and CVXPY with MOSEK:
SDP_comparison.zip
Good behaviour in PICOS fix280 branch using the Mosek solver:

Give primal formulation to PICOS with dualize=False: solves the primal in ~20s.
Give primal formulation to PICOS with dualize=True: solves the dual in ~0.2-0.3s.
Give dual formulation to PICOS with dualize=False: solves the problem in ~0.2-0.3s.

Troublesome behaviour in CVXPY:

Give primal formulation to CVXPY: dualizes the problem and solves it in ~0.2-0.3s.
Give the dual formulation to CVXPY: dualizes the problem solving the primal (?) in ~20s.
Give the dual formulation to CVXPY with the option mosek_params={mosek.iparam.intpnt_solve_form: mosek.solveform.dual}: raises MOSEK warning 950: No automatic dualizer is available for the specified problem.: solves it in ~20s. (unexpected)
Give the dual formulation to CVXPY with the option mosek_params={mosek.iparam.intpnt_solve_form: mosek.solveform.primal}: solves it in ~20s. (expected)

If I started out with the dual formulation, I feel CVXPY leaves you no option but to calculate the primal form by hand in order to solve the problem quickly, because of this MOSEK warning 950. It would be good to have a flag which tells you whether to dualize the SDP problem or not from CVXPY itself and not from MOSEK, in order to avoid that this issue.
If relevant, I found this related comment in a past pull request:

There will be some models where Dualize() will lead to a less efficient Mosek model unless the user explicitly specifies mosek.iparam.intpnt_solve_form : mosek.solveform.dual in the mosek_params to internally dualize (thus undo the cvxpy  dualization). I saw this for example when I tested on the example from https://nbviewer.jupyter.org/github/MOSEK/Tutorials/blob/master/wasserstein/wasserstein-bary-reg.ipynb So that might be worth pointing out for the users to be aware of.
Originally posted by @aszekMosek in https://github.com/cvxpy/cvxpy/issues/1103#issuecomment-683630075

This was discovered in this issue in PICOS.

Thanks for filing this detailed issue, @ecboghiu.
It will take a lot of work to get proper support for automatic (or intelligent) dualization in cvxpy. The reason is that cvxpy currently has only a single standard form for cone programs: { x : A @ x + b \in K }. MOSEK's standard form is "the opposite" of cvxpy's: {y : G @ y == h, y \in K }. In order to convert between these problems we have to take an all-or-nothing approach: either dualize the entire problem or add slack variables for all nonlinear cone constraints. We used to add slack variables, but that was no good because it fundamentally made the problem harder (in the sense that a solver like MOSEK wouldn't think do "undo" that transformation). Dualizing the problem can in principle be undone by a solver. The trouble is that MOSEK doesn't have full dualization support for SDP (to my understanding).
One solution is to add back in the original code path, where we allow adding slack variables. I'm not a fan of this directly since it makes it harder to maintain and I don't see good ways where we could make the decision of whether to dualize or add slacks. The longer-term solution (in my opinion) is to adopt a different standard form for cone programs that "interpolates" between {x : A @ x + b \in K } and {y : G @ y == h, y \in K }. Once we do that it becomes worth it to think about when to dualize versus when to add slack variables.
A short-term solution is to print that we're dualizing the problem when using MOSEK on a continuous problem. We only recently added logging where that kind of message would make sense, so now is a good time to add to that logging.

To clarify, we do now have both "code paths": Trivial LMIs of the form X \succeq 0 are loaded directly using MOSEK bar vars while all other LMIs are loaded using slack vars. (We have a similar though entrywise approach for conic quadratic constraints.) This means that both normal/extreme forms can be solved quickly although the user has to make the "correct" decision with respect to dualization. We don't provide automatic decision making at this point though a previous iteration of PICOS had a heuristic for this.
Indeed this double approach makes the MOSEK interface significantly harder to understand and maintain and we're doubling up on SDP test cases just now to make up for it. I suggested this report assuming that you did it the same way, in which case you could save a lot by just not dualizing or by allowing the user to disable it.
Congratulations on having the slightly faster dualization, by the way. :wink:

@Viech in our case duplicating the code isn't as big of a problem. The bigger issue is that our standard form doesn't isolate trivial LMI's from nontrivial LMI's, so in the old interface, even trivial LMI's were getting slack variables!
If we change our standard form so that direct conic constraints are isolated from affine conic constraints, then I think it's worth considering offering both code paths. As long as we don't try anything fancy in terms of automatically selecting one form over another, then it wouldn't be that much harder to maintain. Our testing framework would let us test that code path with just one more line of code.
Separately, it's good to hear the dualization doesn't have much overhead!

This is maybe a good place to say MOSEK 10 (release date yet unknown) will have an interface for A @ x + b \in K where K is a cone, including the semidefinite cone. In the long future this interface will replace the current one with conic variables.


Fix typo in README

reguirements → requirements

@googlebot I signed it!

I filed this quickly, before noticing that there was already an open issue (#18).

Thanks


Feature request: Basic resource usage metrics

It would make sense to show some minimal performance stats, e.g. the output of kubectl top node / pod.

hi, there's news? I think it's a very important feature

hi, there's news? I think it's a very important feature