Add the ability to filter tests by tag using an envvar.

This PR is a follow-on to #77. It adds the ability to filter tests to just the ones that contain a given tag using an environment variable. As before, swift test --filter is unaware of swift-testing, so we need a temporary solution until such time as swift test is taught about us.
To try it out:
SWT_SELECTED_TAGS='trait' swift test

Will run only those tests with the "trait" tag.
If both "SWT_SELECTED_TAGS"" and "SWT_SELECTED_TEST_IDS" are specified, a test must have (at least one of) the given tags and be selected by ID. Whether or not this is the right way to combine these environment variables is, to be polite, probably uninteresting since this is not meant to be a permanent solution.
This change also implements == and hash(into:) on Tag as they were previously synthesized which would cause them to consider the internal sourceCode property, which was not intentional.

@swift-ci please test


Building .NET Framework projects with "dotnet build" does not work

While trying to build a project that uses StrongNamer with we found the following error:
D:\Packages\strongnamer\0.2.5\build\StrongNamer.targets(21,5): error : StrongNamer requires at least the .NET Core SDK v2.1 to run with 'dotnet build'

This was a bit weird, since we are on NET Core 3.1.100 sdk. So, I did some digging on the strongnamer.targets file, I found out what might be the culprit:
https://github.com/dsplaisted/strongnamer/blob/5c3e0dcce6fb51f849d1f616a3b2fcaadeddff90/src/StrongNamer/StrongNamer.targets#L10-L11
The variable BundledNETCoreAppTargetFrameworkVersion is used to determine the value of StrongNamerNetCoreAppVersion. If it can't be resolved, the value 1.0 will be used instead. This makes the following validation fail:
https://github.com/dsplaisted/strongnamer/blob/5c3e0dcce6fb51f849d1f616a3b2fcaadeddff90/src/StrongNamer/StrongNamer.targets#L21-L24
Should this variable reference be replaced?
EDIT: Removed reference to a pull request from dotnet/sdk repository, since it wasn't actually related.

Ok, so I did even more digging:
The problem actually is that one of my solutions has only a .NET 4.7.2 project, with the old project style.
I am building the solution with the dotnet build command, which should work.
When the compilation reaches the target:

The BundledNETCoreAppTargetFrameworkVersion tagets has no value. It has not been imported since the dotnet core sdk wasn't either. StrongNamerMinCoreVersionRequired is assigned the value 1.0.
Since I'm using dotnet build instead of msbuild directly, MSBuildRuntimeType has the value Core.
Since both conditions are true, the error condition is triggered.

What could be a way to allow .NET full projects to be built with dotnet build?

@onovotny I saw that this error condition was added in #41. Do you have any suggestion on how could it be changed to support .Net framework projects through dotnet build?

Well, it seems the issue was on our side. Sorry about that 😅
In case anyone stumbles on a similar problem, for reference: The issue is that one of the projects was on the old .NET Framework SDK style. Which is not supported by dotnet CLI.
Regarding the missing variable, BundledNETCoreAppTargetFrameworkVersion: it comes from (a few nested imports inside) the Microsoft.NET.Sdk. This reference was not present on the old-style projects, so it could not be resolved. Leading to the error described in the first comment.
So... to solve it: we are going to migrate those projects to the new style. Someday.
Closing this issue. Sorry again!


GET MANY REFERENCE

This makes the reference id to be passed to the api as parameter.

I do not see the CI telling me if the tests are passing. Is it still active ? Test are passing on my local branch.

I also see that this PR contains 3 commits instead of 1 commit of my changes. You may squash and merge to have only one on master.

my bad, i have turn on Build forked pull requests on circleci.

@fonzarely please can you squash the 3 commits in this PR, so i just click on "Merge pull request"

I dont think I can do it. I may have to reset my git to do so.
You should have this button in place of merge button.

Let me know.

Sorry for this.

no problem! thanks you for the PR


tavis cleanup

Clean up and update travis setup for new project layout / ensure it works and can publish new releases.

and I’m not sure what we need to do to configure the publishing
[8:23]
I’d like to have a pattern we follow for all the plugins in yakworks
[8:23]
https://github.com/grails/gorm-graphql has some good ideas
GitHub
grails/gorm-graphql
gorm-graphql - An automatic GraphQL schema generator for GORM
snimavat [8:23 PM]
publishing to bintray right?
[8:23]
yeah i did configure travis for all plugins
joshua [8:24 PM]
and it uses https://github.com/grails/grails-common-build
GitHub
grails/grails-common-build
grails-common-build - Common Gradle Build Scripts for Publishing Grails Core Projects
[8:24]
and this has good examples on a base setup https://github.com/grails-guides/grails-multi-project-build/tree/master/complete
GitHub
grails-guides/grails-multi-project-build
Contribute to grails-multi-project-build development by creating an account on GitHub.
snimavat [8:25 PM]
thanks, will check it out
joshua
[8:37 PM]
Lets use view-tools as the base. get it cleaned up and working and then we can use it as the template for how to setup the rest of the plugins
[8:37]
or libraries
snimavat [8:37 PM]
ok
joshua [8:38 PM]
we can setup a grails-common-build like they did too if it makes sense

Done


Unhandled method frame Bunny\Protocol\MethodConnectionCloseFrame

I faced with an Exception sometimes

'Bunny\Exception\ClientException' with message 'Unhandled method frame Bunny\Protocol\MethodConnectionCloseFrame.' in ~/.composer/vendor/bunny/bunny/src/Bunny/AbstractClient.php:410

What does it mean and how can I avoid it?

Can you provide context what you were doing (opening connection, creating channel, declaring queue/exchange, consuming/publishing messages, ...) - some code that could replicate the issue? I suppose RabbitMQ did not like something you did and therefore tried to close the whole connection with all channels.
If you open up a pull request with AbstractClient throwing more descriptive ClientException for MethodConnectCloseFrame using its $replyCode & $replyText, I'll be happy to merge it.

I can't provide more context, because the issue somewhere inside event loop... I will try to give more info.
The issue reproduced when RabbitMQ server located far from client and message rate is about 20 per seconds. In my case, server located in Canada, client in Russia, Novosibirsk.
Everything Ok when server and client on the same machine even message rate more than 500/per seconds.
May be it helps
exception 'Bunny\Exception\ClientException' with message 'Unhandled method frame Bunny\Protocol\MethodConnectionCloseFrame.' in ~/.composer/vendor/bunny/bunny/src/Bunny/AbstractClient.php:410 Stack trace: #0 ~/.composer/vendor/bunny/bunny/src/Bunny/Async/Client.php(303): Bunny\AbstractClient->onFrameReceived(Object(Bunny\Protocol\MethodConnectionCloseFrame)) #1 [internal function]: Bunny\Async\Client->onDataAvailable(Resource id #812, Object(React\EventLoop\StreamSelectLoop)) #2 ~/.composer/vendor/react/event-loop/StreamSelectLoop.php(227): call_user_func(Array, Resource id #812, Object(React\EventLoop\StreamSelectLoop)) #3 ~/.composer/vendor/react/event-loop/StreamSelectLoop.php(201): React\EventLoop\StreamSelectLoop->waitForStreamActivity(1261205.9116364) #4 worker.php(52): React\EventLoop\StreamSelectLoop->run()

Is it possible server close connection by some reasons?

I've committed change that when connection.close frame is received, thrown exception has more descriptive message. It should give us clue why is server closing connection, please try dev-master.

It's great, thank you.
Now I faced with an Exception.
exception 'Bunny\Exception\ClientException' with message 'Broken pipe or closed connection.' in ~/.composer/vendor/bunny/bunny/src/Bunny/AbstractClient.php:280
It looks like network issue. Can you recommend some tuning of bunny config? But probably I need to tune something on server-side.
In any case, thanks you for your helpful and for the great library. By the way, we use it in production in our startup https://wodby.com/

Try to look at this: https://www.rabbitmq.com/networking.html
Also, make sure that Bunny is sending the Heartbeat frame according to the
"heartbeat" parameter setting. RabbitMQ can still drop the connection
because sometimes the consumer is performing an expensive operation that
takes longer than the heartbeat interval and RabbitMQ  considers the
connection as dead.
After you perform the maximum amount of tuning you're able to do, I
recommend catching ClientException and restarting the consumer when it
occurs.
On Thursday, February 18, 2016, Pavel Prischepa<EMAIL_ADDRESS>wrote:

It's great, thank you.
Now I faced with an Exception.
exception 'Bunny\Exception\ClientException' with message 'Broken pipe or
closed connection.' in
~/.composer/vendor/bunny/bunny/src/Bunny/AbstractClient.php:280
It looks like network issue. Can you recommend some tuning of bunny
config? But probably I need to tune something on server-side.
In any case, thanks you for your helpful and for the great library. By the
way, we use it in production in our startup https://wodby.com/
—
Reply to this email directly or view it on GitHub
https://github.com/jakubkulhan/bunny/issues/20#issuecomment-185586442.

--
Ondřej Mirtes

As pointed out by @ondrejmirtes, the most common problem is that heartbeat frame does not get a chance to be sent. You can change heartbeat like this:
$client = new \Bunny\Client([..., "heartbeat" => 180.0 /* 3 minutes */, ...]); //

Heartbeat timeout must be long enough that any blocking operation in consume callback finishes within the specified timeout.

@jakubkulhan and @ondrejmirtes many thanks for your recomendations, I'll check both server and client side.
Also I've catched an Exception by using patch. It looks like we catch a strange issue :). Is it possible FRAME_ERROR relates to network error too?
'Bunny\Exception\ClientException' with message 'Connection closed by server: FRAME_ERROR - type 3, first 16 octets = <<"{\"type\":\"result\"">>: {invalid_frame_end_marker,                                                        13}' in ~/.composer/vendor/bunny/bunny/src/Bunny/AbstractClient.php:412

I think it's possible that packets get broken, AMQP does not have any built-in checksumming mechanism, however, this should be handled on TCP layer.

I got this situation when by mistake i tried to send to exchange that did not exist, i think is good to add more meaningfull error


use Newest vue-cli build project can't loader the css style from the .vue file

the App.vue  can loader .but I write components and import the component into App.vue.
Visit the website the  is blank . But the App.vue  have style content !
why?

Hello!
Please, open the issue on the relevant template repo (I think you're using the webpack one) and provide some steps to reproduce the problem.
Thanks!


upload_magic

creates a line at the bottom of the file with >>>>>
this is throwing an error on upload.

fixed in 94671a693f7f8879d73b43229447df113b45f0e3


Flutter reloads the widget when using routes in MaterialApp

Steps to Reproduce

Create a new project
Add a TextField to the _MyHomePageState
Remove home: MyHomePage() from MaterialApp
Define the routes routes: { '/': (context) => MyHomePage()},
Everytime you click on TextField, it reloads the widget.

Note: It works fine when you remove routes and use home instead.
Sample Project
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
//      home: MyHomePage(),
      routes: {
        '/': (context) => MyHomePage(),
      },
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key}) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    print("REBUILDING WIDGET");
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            TextField(
              obscureText: true,
              decoration: InputDecoration(
                  hintText: 'Enter your name:'),
            ),
          ],
        ),
      ),
    );
  }
}

Logs
I/flutter: REBUILDING WIDGET
I/flutter: REBUILDING WIDGET
I/flutter: REBUILDING WIDGET
...

flutter analyze
❯ flutter analyze
Analyzing flutter_app...
No issues found! (ran in 1.4s)

flutter doctor -v
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.4 18E226, locale en-US)
    • Flutter version 1.2.1 at /Users/saeed/Library/Flutter/flutter
    • Framework revision 8661d8aecd (8 weeks ago), 2019-02-14 19:19:53 -0800
    • Engine revision 3757390fa4
    • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/saeed/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/saeed/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.3

[!] Android Studio
    • Android Studio at /Applications/Android Studio 3.2 Preview.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 34.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] IntelliJ IDEA Ultimate Edition (version 2018.2.7)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 34.0.1
    • Dart plugin version 182.5215

[!] VS Code (version 1.33.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (1 available)
    • SM N950F • 988a5b43524938593230 • android-arm64 • Android 9 (API 28)

I can't reproduce this using the latest beta version v1.4.9-hotfix.1

@kpsroka Are you sure? I switched to the beta channel and face this issue again

I have same problem:
with the routes defined into MaterialApp when tap the TextField and keyboard is showed, all the widget tree is rebuilded. Without routes the problem there isn't.

@SaeedMasoumi I assume that showing/disappearance of keyboard is the key here, right? Because regular tap on a text field doesn't seem to trigger the problem without keyboard collapse/expansion.

@SaeedMasoumi You can work around this by assigning MyHomePage to a variable, and using it in the code:
  final MyHomePage myHomePage = MyHomePage();

  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      routes: {
        '/': (context) => myHomePage,
      },
    );
  }

Naturally, the difference here is that you don't re-initialize the MyHomePage() widget on every call of routes['/'], which seems to trigger the rebuild().
I do believe that this is actually working as intended, but possibly the examples should note that this is about to happen when constructing new widget instances in routes.

I had same issue and I fixed it by defining const constructor for MyHomePage and using it in routes builder.

That's not a bug.
The size of the screen change, therefore MaterialApp calls the builder again.
The only reason home: Foo() don't get rebuilt is that the widget instance doesn't change.

@rrousselGit Thank for the clarification.

Why this behavior there isn't without route?

MaterialApp(
  home: Foo()
)

is an alias for:
Widget home = Foo();

MaterialApp(
  routes: {
    '/' : (_) => home,
  }
)

which is different from:
MaterialApp(
  routes: {
    '/' : (_) => Foo(),
  }
)

Because the function passed to routes can be called more than once.
Keyboard appearance is one of those situations.
Overall this shouldn't change anything for you. Widgets being rebuilt or not is purely an optimization factor. It should never have an impact on your application.

I have a similar problem with this issue and solve it by passing context to route page

I'm facing the same issue, what is the solution for it?
TextInputField inside Stream widget tree, when I try to type something on textfield..
Sreambuilder is rebuilding. I think when softkeyboard is appear, the state full widget is rebuild.
Anyone please Help Me... :'(


Crash when the app is force killed

I'm trying out this library and it is often raising this exception when the app gets force killed:
FATAL EXCEPTION: main
Process: com.tattva.app, PID: 9136
java.lang.RuntimeException: java.lang.IllegalStateException: You need to call create() at least once to create the singleton
    at android.app.job.JobService$JobHandler.handleMessage(JobService.java:130)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5443)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
 Caused by: java.lang.IllegalStateException: You need to call create() at least once to create the singleton
    at com.evernote.android.job.JobManager.instance(JobManager.java:156)
    at com.evernote.android.job.JobProxy$Common.getPendingRequest(JobProxy.java:84)
    at com.evernote.android.job.v21.PlatformJobService.onStartJob(PlatformJobService.java:62)
    at android.app.job.JobService$JobHandler.handleMessage(JobService.java:126)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5443)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)

The job gets scheduled inside my Application class so that it runs every time the app starts (after checking that the job isn't already scheduled).
Update:
I'm also seeing a constant stream of errors after killing the app:
E/JobServiceContext: Time-out while trying to bind com.tattva.app/com.evernote.android.job.v21.PlatformJobService jId=6, u0, dropping.

The first is clear. You need to call create() before using the JobManager. If your app gets force killed, then you need to call create() again. It's best to do this in onCreate() of your Application class.
I've never seen the other crash. It could help if you provide a sample, otherwise I'm not sure what to do with it.

The Application class is exactly where I'm setting up JobManager, but inside a separate thread so that it does not slow down the app startup.
I only initialize the important components in the UI thread to avoid polluting the startup time.
I will try calling JobManager.create() on the UI thread and see if this is solved.

You need to call JobManager.create() asap in the onCreate() method. The reason is that your app may be launched because of a scheduled job. This job needs to be initialized and for that purpose it needs the have access to the JobManager. In your case the manager isn't created, yet, because you do this asynchronously.

Sorry for my late reply. Moving the create part outside of the thread inside onCreate() solved the issue :)

Thanks, @Saketme

I am facing the same issue. But, I don't have Application class hence using this link. Any solution?


Windows Defender causing slowdown on contents of .cargo\bin folder

Hi,
a recently I noticed that running rustfmt is much slower than it used to be. Digging into it, I found out the slowdown is caused by Windows Defender (specifically MsMpEng.exe, Antimalware Service Executable), but is not limited to rustfmt. In fact, rustfmt in toolchain runs fast on its own, it's rustfmt binary in .cargo\bin directory that is causing large CPU usage spikes in scanning process. Setting Windows Defender to ignore rust-related directories or changing PATH environment variable to search directly in toolchain directory instead of taking the roundabout way through .cargo/bin dispatch binaries fixes the problem.
Since this affects all binaries, it also drags build performance down. I did some measurements on my test project (relatively small) with/without exception in Windows Defender and with direct path to toolchain and indirect path via .cargo:
full rebuild:
no exception, indirect path : 143s
exception, indirect path : 92s
no exception, direct path: 84s
exception, direct path: 83s
incremental build (single changed file):
no exception, indirect path: 4.6s (11.6s from button press)
exception, direct path: 2.8s (3.8s from button press)
Incremental build times are combination of cargo output value (shorter) and ETW trace measurement from pressing build button until link.exe is finished. Incremental build also includes running rustfmt (since the file gets saved).
edit: I tried signing rust binaries in both directories (toolchain and .cargo) with trusted certificate, but it didn't seem to help. However, it was my first time doing this, so I might have made a mistake somewhere.

I have noticed this, too.  The rustup wrapper itself adds a significant amount of time to execution.

Exe
With Defender
Without Defender

rustc -V
0.7s
0.09s

~/.rustup/toolchains/stable-x86_64-pc-windows-msvc/bin/rustc.exe -V
0.1s
0.08s

cl.exe
0.08s
0.056s

MinGW gcc --version
0.2s
0.11s

This may not be a cargo-specific issue.  It would be nice if the rustup wrapper didn't add a nearly 8x slowdown.
I typically just turn it off while doing development.  I don't know if there is a realistic workaround.

I thought this was a cargo thing, given ".cargo" folder name.

Oh dear this seems bad! Is there a known way to fix this though? I just realized that I ended up disabling Windows Defender for the .cargo/.rustup directories presumably long ago...

I just heard from some people this happens even for nvidia gl dll, which is definitely signed.
I don't know of any way to convince Windows Defender to trust those binaries (short of contacting Microsoft). Workaround I am using is I just added path to toolchain directly into PATH variable, ahead of .cargo\bin, but I'm not sure why those dispatching binaries are there, so maybe this is not acceptable in general. Switching toolchains in rustup would then be just changing PATH variable. Cleaner way to do that might be to introduce another variable (eg. RUST_TOOLCHAIN) and just reference that from PATH using.
But, like I said, I'm not sure what is being solved by those dispatch binaries, so this might not be the right way.

@krolli
Is this related to the referenced rustup issue?
Try replacing your rustc.exe, rustup.exe or whatever slow rust binary you're using with https://win.rustup.rs/x86_64.

@steffengy
It is indeed faster. While adding exception to Defender and directly invoking rust tools still shaves off some time, it is not nearly as pronounced as before. I did a quick trace and it appears that scanning still occurs. It seems to take up about quarter of the original time, which is somewhat better improvement than I'd expect if the slowdown was linear in size of scanned binaries. Still, I think speedup is largely due to their smaller size.

@krolli

Still, I think speedup is largely due to their smaller size.

It actually isn't.
i686-msvc is still slow, even though it's only 5MB.
x86-64-gnu (13 MB) is fast, even though the file size is even bigger.
So it's likely related to some architectural differences (and special treatment from windows defender).
Anyways those fixes landed in rustup.

@steffengy
I haven't tried i686-msvc, but I though I had x86-64-gnu installed before when it was really slow. I'll play around with it later to find out more.

@steffengy
You are right. Both gnu and msvc 32-bit binaries are taking way longer to scan.

Is this still relevant?

Yes.

If so, what is blocking it?

The lack of a developer willing to put in the time and effort to get this fixed.

Is it known what could be done to help move this forward?

Someone could use a tool like procmon to compare how slow various syscalls are with and without Defender. A side by side comparison should make it clear which syscalls are impacted most by Defender and then the code can be adjusted to avoid those syscalls.

FWIW, https://github.com/rust-lang/cargo/pull/11917 might speed up this a bit with https://github.com/rust-lang/rustup/pull/3178 enabled.
@rustbot label +S-needs-design


New version: OpenLibm_jll v0.8.0+0

Autogenerated JLL package registration

Registering JLL package OpenLibm_jll.jl
Repository: https://github.com/JuliaBinaryWrappers/OpenLibm_jll.jl
Version: v0.8.0+0
Commit: fc151cfdaaa0973e0239c84384d7ba870072bffb
Revision on Yggdrasil: https://github.com/JuliaPackaging/Yggdrasil/commit/d1eb537a6f3fc3c02360ca9ec356f8d25c78156c
Created by: @ViralBShah

I think this one needs to be merged manually. I don't see any real problem. @DilumAluthge Thoughts?

This is kind of concerning. I can't figure out why it's not actually able to install the package.

@ericphanson @gunnarfarneback Any idea what's going on here? Is this a RegistryCI.jl bug?

I think it’s a stdlib (https://github.com/JuliaLang/julia/tree/master/stdlib/OpenLibm_jll) so maybe we can’t load a different version- same as https://github.com/JuliaRegistries/General/pull/43868, right?

Oh, it's a standard library! I didn't realize that.
I can usually recognize the non-JLL stdlibs. But I haven't yet memorized the list of JLL stdlibs 😂.
Yeah I think this is the same as https://github.com/JuliaRegistries/General/pull/43868.

I just always check that list now whenever there’s something odd with a JLL 😄. For example someone asked why Zlib doesn’t show its version number in Pkg.status- it’s because it’s a stdlib, as I found once I checked the list aha.

Thanks guys. I should have said that before.


Add support for solc 0.8.25

See here: https://github.com/ethereum/solidity/releases/tag/v0.8.25
Cc: @Evalir @mattsse

thanks, on it

For reference: https://github.com/alloy-rs/svm-rs/pull/118


Mixture protocol should be able to return unitary operations instead of numpy arrays

This is significantly more efficient in cases where the unitaries are large, or when we have an operation that can apply that unitary more efficiently.

Duplicate of https://github.com/quantumlib/Cirq/issues/1657


Gfycat links no longer working.

Whenever ripme now comes across a gfycat link it spits out this error: "Could not find source#mp4source at http://gfycat.com/"(insert final part of link here). This happens on all gfycat links and has happened since the gfycat 'update'. Also, if you are downloading from a subreddit that contains gfycat links now, it simply skips them entirely. I just would like to know if anyone else is experiencing similar issues and if this will get fixed in the future.

Having the same issue over here as well.

Gfycat doc element was altered.
In
src/main/java/com/rarchives/ripme/ripper/rippers/video/GfycatRipper.java
@line 68
alter mp4source to mp4Source
or you may replace it with webmSource if you'd prefer to download that format instead.
Rebuild binary. Gfycat works again.

Build binary..
Oh my. What do you need? JRE? JDK? Eclipse? Or just Maven?

Follow build directions using Maven on front page or in README.
Darren W. Henderson
Database Administrator
University of Kentucky
Center for Clinical and Translational Science
182 Bio-Pharmacy Complex
789 S Limestone
Lexington, KY 40536
W:(859) 323-7146
<EMAIL_ADDRESS>-----Original Message-----
From: FGS<EMAIL_ADDRESS>Sent: Wednesday, December 16, 2015 1:15 PM
To: 4pr0n/ripme<EMAIL_ADDRESS>Cc: Henderson, Darren W<EMAIL_ADDRESS>Subject: Re: [ripme] Gfycat links no longer working. (#269)
Build binary..
Oh my. What do you need? JRE? JDK? Eclipse? Or just Maven?

BTW, you replied via mail and with full signature showing, just wanted to let you know..

Thanks for looking out.

Thank you so much dwhenderson, just did what you said and it works perfectly. Thanks again man.

BTW, what are the differences here between the .mp4 and .webm format? Did someone check?
Can't do it myself right now, I'm at a 'work' laptop.
Isn't .webm better now? AFAIK, YouTube uses the .webm container for their highest quality DASH streaming formats.


Add explicit nullable types

This is a requirement to be deprecation free in PHP 8.4, related to https://github.com/symfony/symfony/issues/54180

Thanks!


prevent user from adding more chars to reportback after 60th

References this comment on #681.
We're telling the user that reportbacks over 60 characters aren't valid, and displaying an error message. But ultimately, desired behavior is to prevent the user from inputting text over that limit and not displaying an error message.

Without a live character counter, I think we still want to display the message once they enter a 61st character (although it wouldn't update in the text field).


How to rebuild when enter background.

When app enter background, User can see content through Recent Tasks in Android or MultiTasks in iOS. There is a feature request that application content need be rebuilt when enter background. Through WidgetsBindingObserver, I can achieve this on Android, but on iOS, widget does not be rebuilt.
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver {
  String _state = 'init';

  @override
  void initState() {
    WidgetsBinding.instance.addObserver(this);
    super.initState();
  }

  @override
  void dispose() {
    WidgetsBinding.instance.removeObserver(this);
    super.dispose();
  }

  @override
  void didChangeAppLifecycleState(AppLifecycleState state) {
    switch (state) {
      case AppLifecycleState.resumed:
        setState(() {
          _state = 'resumed';
          print(_state);
        });
        break;
      case AppLifecycleState.inactive:
        setState(() {
          _state = 'inactive';
          print(_state);
        });
        break;
      case AppLifecycleState.paused:
        setState(() {
          _state = 'paused';
          print(_state);
        });
        break;
      case AppLifecycleState.suspending:
        setState(() {
          _state = 'suspending';
          print(_state);
        });
        break;
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Text(
          '$_state',
          style: Theme.of(context).textTheme.display1,
        ),
      ),
      // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

App shows inactive in Android's Recent Tasks, which is desired, but shows resumed in iOS's MultiTasks, which is not desired. The print shows all executing paths are same.
Maybe the rendering pipeline is stoped before inactive event on iOS and before paused event on Android?

Seems to be a duplicate of #33236
At this time there are no frames rendered from the moment the WidgetsBindingObserver callback fires. An example of using iOS platform code to work around the issue (for certain use cases) is also posted in #33236

Thank you @danspano ! I think it's safe to close the issue. It will stay as referenced in the mentioned one. @loongliu If you disagree, feel free to comment and I will re-open it.


ENH: plotting numerical expressions

Passing the y argument of a plot to DataFrame.eval allows plotting a numerical expression.
Makes numerical data exploration much easier. E.g. graphically finding the norm of two curves.
See example here:
example notebook
No support for multicolumn plotting, e.g. for ["a","4*b"]
Should be very easy to apply the same on the index.
Could be very useful for data exploration, without modifying the original DataFrame

My initial reaction is "too much magic"... but I could be biased. When eval/query was introduced there was concern that this was opening up a can of worms (a pandas DSL, distinct from python) Thoughts from others?
Also I think that if you have a DataFrame like
df = pd.DataFrame({"a": [1, 2], "b": [3, 4], "a + b": [0, 1]})

Then under your change df.plot('a + b') will evaluate df.a + df.b shadowing the column named 'a + b', which would probably make this a non-starter.

@TomAugspurger Good points.
I still have to dig into eval internals and find a way to do this, but my intention is to apply few checks before running the y (and x) argument through eval:

Is numexpr installed - to avoid the build fail
Is this a valid expression that eval can handle
Is there a column name with the same label
Deal with multicolumn selection (["a","b"])

In case these checks fail, it will fall back to the default non-expr plot.
I personally use query and eval a lot in my routine analysis and I find it to be one of the best parts of pandas. Combine this with plotting and you'll get something very powerful.
E.g. this oneliner:
df.plot(y=["a+2*b","a+3*b"])
replace the following code:
df["d"] = df["a"] + 2*df["b"] df["e"] = df["a"] + 3*df["b"] df.plot(y=["d","e"])
TMHO, the one liner is more clear and natural, and more importantly, it leaves the original df unchanged. No need to stack unnecessary columns just for plotting reasons.

This looks really useful. If not accepted can you put it into a separate package?
I think pydata should pursue more focused local DSL stuff. If I get that we're trying to avoid unfamiliar magic, but there's also a code complexity tradeoff trying to do acrobatics and shoehorn mathy stuff with normal python syntax.
This is a common refrain I hear and agree with.

I guess the current syntax is a bit akward
In [17]: df = pd.DataFrame({"a": [1, 2],"b": [4,5]})

In [18]: df.assign(**{'a+b':df.eval('a+b')}).plot('a','a+b')
Out[18]: <matplotlib.axes._subplots.AxesSubplot at 0x112da0790>

This also came up in the discussion around labeled-data support in matplotlib.  We elected to not support it (at least to start) for exactly the reasons that @TomAugspurger listed above.

OK, I've used the assign method @jreback has suggested so now it supports list of mixed numerical expressions and existing columns.
See updated example notebook here
In case there is a conflict between an existing column name and a given numerical expression, the existing column is shown in the plot.
It might worth to think of opting a new option in df.plot, e.g. eval = True which enable evaluating numerical expressions.
Another enhancement I would like to addinsome point, is to support query via expressions like a > 0 which currently only plots True or False values from eval.
I understand your concerns, and I want to believe that in this case the applicability and simplisity of this feature would help to make it happen.

@TsvikiHirsh so I would be ok with this as an example in the cookbook. will repurpose to that. pls re-open if you'd like to update.

We had a second request for this. From https://github.com/pydata/pandas/issues/13537#issuecomment-229863248

I am coming from ROOT where this feature is very common with TTree::Draw. In physics this is very common. Suppose I have a three columns with the position of a point ('x', 'y', 'z') and one with the the time, I want to plot the distance from the origin:

df.plot.scatter(x='time', y='sqrt(x**2 + y**2 + z**2)')

I'm coming around on this a bit, it could be very convenient for interactive work.
@TsvikiHirsh did you post your implementation anywhere? How much work was it to add?

No unfortunately I couldn't find time for this.
It is not hard since the mechanisms already exist in eval and co.
The only problems were to make it work for all plot kinds and to make sure to fall back to default when the expression equals one of the column names.
See my second implementation above.
I will be happy to help with this in my time limitations


Add modifiable settings and options form

Updated Idea:

[ ] Savefile specific properties accessible via an option in the file menu
[ ] Global options accessible via an option in the options menu

Options to add:

[x] #22
[x] #56

Not really in need at the moment


feat(thirdweb): enhance wallet-related TypeScript support (#123)

Problem solved
Short description of the bug fixed or feature added
Changes made

[ ] Public API changes: list the public API changes made if any
[ ] Internal API changes: explain the internal logic changes

How to test

[ ] Automated tests: link to unit test file
[ ] Manual tests: step by step instructions on how to test

Contributor NFT
Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.
Address:

PR-Codex overview
This PR focuses on enhancing wallet creation and connection options in the thirdweb package.
Detailed summary

Exported more wallet creation and connection types
Added detailed comments and usage examples for ecosystem wallets
Provided information on creating different types of wallets and connecting them
Updated smart wallet creation options and benefits

The following files were skipped due to too many changes: packages/thirdweb/src/wallets/smart/smart-wallet.ts, packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx, packages/thirdweb/src/wallets/in-app/web/in-app.ts, packages/thirdweb/src/react/web/ui/ConnectWallet/ConnectButton.tsx

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

#3869  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @joaquim-verges and the rest of your teammates on  Graphite


NFS Ports?

I see on the SMB volume's that there are required ports listed there.
What are the port requirements for NFS?

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

ID: 0137f22d-29a2-f8f6-2dcb-5b44ac11f516
Version Independent ID: d7d5a7a0-4e24-15bb-2cdc-293510994f69
Content: Create an NFS volume for Azure NetApp Files
Content Source: articles/azure-netapp-files/azure-netapp-files-create-volumes.md
Service: azure-netapp-files
GitHub Login: @b-juche
Microsoft Alias: b-juche

Looping in Will (@ntap512) and Lichun (@lichunli-ms).
Will, could you answer this question?  Thanks.

@MrRitt  You can find the NFS ports required in the "Mount Instructions" for the Volume properties blade:

https://docs.microsoft.com/en-us/azure/azure-netapp-files/azure-netapp-files-mount-unmount-volumes-for-virtual-machines

@ntap512 -- Will, thanks for responding.
#please-close


Wiki page "Page Navigation Binding" needs to be updated...

Hi.
The wiki page, Page Navigation Binding has some issues:

It references Watin instead of Selenium:

For Watin this is WatiN.Core.Page

There's a hyperlink for the "Linking Navigation section", but the link is incorrect.

More on this in the Linking Navigation section.

Instead of
https://github.com/dpiessens/specbind/wiki/#Linking-Navigation#Linking-Navigation
It should be
https://github.com/dpiessens/specbind/wiki/Page-Navigation-Binding#linking-navigation
(Also, it's case sensitive)
Thank you.

Fixed, thanks for finding these


feat(custom-media): add --forcedColors to the custom media queries list

Oh, I missed the timing to slide this one in the previous PR, so here it is in a new one.
Adds @custom-media --forcedColors  (forced-colors: active); to the custom MQ list.

My pleasure


"Invariant Failed" on npm run start

Have you experienced this bug with the latest version of the template?
yes
Steps to Reproduce
I am getting this error on npm run start. I am not so sure why I am getting this error. The dev server works fine. But with npm start I am getting this error.
hotel-rental/node_modules/tiny-invariant/dist/tiny-invariant.cjs.js:10
        throw new Error(prefix);
              ^
Error: Invariant failed
    at invariant (myapp/node_modules/tiny-invariant/dist/tiny-invariant.cjs.js:10:15)
    at init (myapp/build/index.js:43:39)
    at Object.<anonymous> (myapp/build/index.js:48:1)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous>

Expected Behavior
I was trying to run cypress test with GitHub action. I did everything as per the documentation. But while adding the --record --key the script fails with the error.
The consoled message was Database URL is required
But I don't know where I didn't put my database URL.
Actual Behavior
App should also run just like in dev it is running.

It sounds like you didn't setup environment variables on you production server

I had to change my start:mocks script in package.json file to make it work.
It was:
"start:mocks": "binode --require ./mocks -- @remix-run/serve:remix-serve build",

Changed to:
"start:mocks": "binode --require ./mocks --require ./node_modules/dotenv/config -- @remix-run/serve:remix-serve build",

I have this issue on start:mocks as well, but only on the Cypress step of GitHub actions.
Locally, I can get this to work, either by having the environment variables required for the project on my .zshrc, and .envrc or loading them with dotenv dev dependency as suggested above. When I drop any of these approaches, the start:mock command fails, as expected!
However, I can't figure out how to make this work on the pipeline on job step name: ⚫ Cypress; I already added all of my environment variables to GitHub secrets. :)
My fly.io deployments are also working fine. :ok_hand:


handle connection error issues in pipeline to address issue #120

@72squared I will trust you on this one :)
One thing tho, is this a fixer for the entire issue #120 or just a sub part of it?

@Grokzen I did my best in this patch to follow the same behavior that the Redis Client does on pipelining. It raises an exception if it is a connection or timeout error regardless of whether or not the raise_error flag is passed, but all other exception types (ResponseErrors) respect the flag. This should bring us in line with that behavior.

@72squared Sounds good. Many thanks for that patch :)


CSL files

CSL.zip
Good day once again,
Uploading the files that I have made for CSL package
This includes major Baltic states airlines and aircrafts:
B733 airBaltic "BTI"
B738 airBaltic "BTI"
A320 airBaltic liveries (BTI is the main livery, and 3 special flag liveries - BTIK BTIJ BTIL)
A320 GetJet "GJT"
A330 GetJet "GJT"
B757 airBaltic "BTI"
B757 FlyLAL "LIL"
Thank You very much

Let me know if You will need script extracts from aircraft.cfg

done


Cannot use in unity 2020.3.14

Hello,
I have cloned the repo, imported the folder to unity project assets, ran profiler and paused it to run data exporter. I get the following error and the data exporter tab is empty:
InvalidCastException: Specified cast is not valid.
ProfilerDataExporter.SplitterState..ctor (System.Single[] relativeSizes, System.Int32[] minSizes, System.Int32[] maxSizes) (at Assets/unity-profiler-data-exporter/UnityWrappers/SplitterState.cs:31)
Any clue?
Thank you!

Hi, how did you solve this issue?

I did not use this profile exporter in the end, I used the Unity package called ProfilerAnalyzer, which allows to export CSV data files from the profiler.

Thanks for your answer. I took a look at it and I can’t seem to find a way
to export the Memory data. For example, textures, size ecc.
On Fri, 1 Jul 2022 at 18:11, Roger Creus @.***> wrote:

I did not use this profile exporter in the end, I used the Unity package
called ProfilerAnalyzer, which allows to export CSV data files from the
profiler.
—
Reply to this email directly, view it on GitHub
https://github.com/steve3003/unity-profiler-data-exporter/issues/11#issuecomment-1172500608,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACGG45TDYL5QKXC73LZ4HDTVR4KCNANCNFSM5BYHO5MA
.
You are receiving this because you commented.Message ID:
@.***>


LXD invalid memory address or nil pointer dereference within DQLite library

Required information

Distribution: Arch Linux
Distribution version: Rolling at 12.02.2022 ( DD.MM.YYYY)
The output of "lxc info" or if that fails:

Kernel version: 5.15.16-1-aufs https://aur.archlinux.org/packages/linux-aufs
LXC version: 4.0.12, ABI: 1.7.0
LXD version: Client Version: 4.22
Storage backend in use: Directory?

Issue description
lxd -dv results in a crash with internal error:
DBUG[02-12|11:11:31] Connecting to a local LXD over a Unix socket
DBUG[02-12|11:11:31] Sending request to LXD                   method=GET url=http://unix.socket/1.0 etag=
INFO[02-12|11:11:31] LXD is starting                          version=4.22 mode=normal path=/var/lib/lxd
DBUG[02-12|11:11:31] Unknown backing filesystem type: 0x61756673
INFO[02-12|11:11:31] Kernel uid/gid map:
INFO[02-12|11:11:31]  - u 0 0<PHONE_NUMBER>
INFO[02-12|11:11:31]  - g 0 0<PHONE_NUMBER>
INFO[02-12|11:11:31] Configured LXD uid/gid map:
INFO[02-12|11:11:31]  - u 0 1000000<PHONE_NUMBER>
INFO[02-12|11:11:31]  - g 0 1000000<PHONE_NUMBER>
WARN[02-12|11:11:31] AppArmor support has been disabled because of lack of kernel support
INFO[02-12|11:11:31] Kernel features:
INFO[02-12|11:11:31]  - closing multiple file descriptors efficiently: yes
INFO[02-12|11:11:31]  - netnsid-based network retrieval: yes
INFO[02-12|11:11:31]  - pidfds: yes
INFO[02-12|11:11:31]  - core scheduling: yes
INFO[02-12|11:11:31]  - uevent injection: yes
INFO[02-12|11:11:31]  - seccomp listener: yes
INFO[02-12|11:11:31]  - seccomp listener continue syscalls: yes
INFO[02-12|11:11:31]  - seccomp listener add file descriptors: yes
INFO[02-12|11:11:31]  - attach to namespaces via pidfds: yes
INFO[02-12|11:11:31]  - safe native terminal allocation : yes
INFO[02-12|11:11:31]  - unprivileged file capabilities: yes
INFO[02-12|11:11:31]  - cgroup layout: hybrid
WARN[02-12|11:11:31]  - AppArmor support has been disabled, Disabled because of lack of kernel support
WARN[02-12|11:11:31]  - Couldn't find the CGroup blkio.weight, disk priority will be ignored
INFO[02-12|11:11:31]  - shiftfs support: no
INFO[02-12|11:11:31]  - idmapped mounts kernel support: yes
INFO[02-12|11:11:31] Initializing local database
DBUG[02-12|11:11:31] Refreshing local trusted certificate cache
INFO[02-12|11:11:31] Set client certificate to server certificate fingerprint=cdfdcab6239bd6969e1998d4ac9a011468e9da0eac5e1ccc4fefcbc9eba6eae5
DBUG[02-12|11:11:31] Initializing database gateway
INFO[02-12|11:11:31] Starting database node                   id=1 local=1 role=voter
INFO[02-12|11:11:31] Daemon stopped
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xd08 pc=0x5565af5f7a4e]

goroutine 1 [running]:
github.com/canonical/go-dqlite/internal/bindings._Cfunc_GoString(...)
	_cgo_gotypes.go:102
github.com/canonical/go-dqlite/internal/bindings.NewNode(0x5565af65f707, {0x5565b09d5198, 0x1}, {0xc000124b40, 0x1c})
	github.com/canonical/go-dqlite@v1.10.3-0.20220104182624-3491db06d32b/internal/bindings/server.go:127 +0x105
github.com/canonical/go-dqlite.New(0x1, {0x5565b09d5198, 0xc000040140}, {0xc000124b40, 0x1c}, {0xc000687090, 0x1, 0xc000687068})
	github.com/canonical/go-dqlite@v1.10.3-0.20220104182624-3491db06d32b/node.go:70 +0xb5
github.com/lxc/lxd/lxd/cluster.(*Gateway).init(0xc00029c380, 0x0)
	github.com/lxc/lxd/lxd/cluster/gateway.go:764 +0x6ca
github.com/lxc/lxd/lxd/cluster.NewGateway({0x5565b0de3bc0, 0xc00040ffc0}, 0xc000318078, 0xc0000f4000, 0xc000401aa0, {0xc000687638, 0x2, 0xc00050f4b0})
	github.com/lxc/lxd/lxd/cluster/gateway.go:65 +0x277
main.(*Daemon).init(0xc00016a000)
	github.com/lxc/lxd/lxd/daemon.go:1020 +0x1a9b
main.(*Daemon).Init(0xc00016a000)
	github.com/lxc/lxd/lxd/daemon.go:745 +0x5f
main.(*cmdDaemon).Run(0xc00040cd98, 0xc00050fc58, {0xc000401a30, 0x0, 0x0})
	github.com/lxc/lxd/lxd/main_daemon.go:78 +0x5b0
github.com/spf13/cobra.(*Command).execute(0xc00044aa00, {0xc00003c070, 0x1, 0x1})
	github.com/spf13/cobra@v1.3.0/command.go:856 +0x60e
github.com/spf13/cobra.(*Command).ExecuteC(0xc00044aa00)
	github.com/spf13/cobra@v1.3.0/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.3.0/command.go:902
main.main()
	github.com/lxc/lxd/lxd/main.go:226 +0x1acd

Steps to reproduce
Unknown, on my system it appears to always crash.
Information to attach

No apparent relevant dmesg output
No container as daemon failed to launch
My root filesystem is rebind mounted ( i.e. has filesystem == none )

Output of df -h
Filesystem                          Size  Used Avail Use% Mounted on
dev                                 5.8G     0  5.8G   0% /dev
run                                 5.8G  1.7M  5.8G   1% /run
none                                196G  324M  186G   1% /
/dev/mapper/ssdgroup-pkg            147G   52G   88G  38% /aufs/layers/pkg
/dev/mapper/ssdgroup-config         9.8G   43M  9.3G   1% /aufs/layers/config
/dev/mapper/ssdgroup-runtime        196G  324M  186G   1% /aufs/layers/runtime
/dev/mapper/ssdgroup-games_pkg       98G   32K   93G   1% /aufs/layers/gpkg
/dev/mapper/ssdgroup-games_runtime   98G  1.2G   92G   2% /aufs/layers/gruntime
none                                9.8G   43M  9.3G   1% /aufs/stacks/config
none                                 98G  1.2G   92G   2% /aufs/stacks/gaming
tmpfs                               5.8G     0  5.8G   0% /dev/shm
tmpfs                               4.0M     0  4.0M   0% /sys/fs/cgroup
tmpfs                               5.8G   28K  5.8G   1% /tmp
/dev/sda1                            16G  156M   16G   1% /boot
/dev/mapper/ssdgroup-home           167G  131G   28G  83% /home
tmpfs                               1.2G   40K  1.2G   1% /run/user/1000

Output of various package information
➜  ~ pacman -Q  | grep lx
lxc 1:4.0.12-1
lxcfs 4.0.12-1
lxd 4.22-1
python-lxml 4.7.1-1

➜  ~ pacman -Q | grep ql
dqlite 1.9.1-1
postgresql 13.4-6
postgresql-libs 13.4-6
sqlite 3.37.2-1

Possibly related to #9189, unfortunately I do not know how to check whether this kernel supports AIO and Google has failed me.

Unfortunately we can't move issues across organizations, would you mind filing this one again at https://github.com/canonical/go-dqlite?

(Closing as not a LXD bug)


Register Octo: 0.2.2

Registering: Octo
Repository: https://github.com/wookay/Octo.jl
Version: v0.2.2
Commit: 5e6e34494e17a6b1e1a1bf4f55bba8612b60b472
Proposed by: @wookay
Reviewed by: @wookay
Reference: https://github.com/wookay/Octo.jl/issues/9

Would be good to add some compatibility constraints, if nothing else on Julia itself, e.g.
[compat]
julia = "0.7, 1"

if this package works on Julia 0.7 and 1.X.

Consider enabling TagBot to make sure the release is persistent in your repo, see https://discourse.julialang.org/t/ann-tagbot-creates-tags-and-releases-for-your-julia-packages-when-theyre-registered/23084


Update the actual Codelab website.

This is in reference with the issue #212 and #218 . According to which, Dark Sky API is currently not available for new signups and we have to move to Open Weather API instead to get data for our PWA. But the current Codelab page(website) at this address has directions to implement with the older Dark Sky API. We need to update the page with new instructions so that the users are able to use the new API without any problem.
@brendankenny  @domesticmouse

Hey @samthor can you find the owner of the codelab?

Maybe one of
https://github.com/orgs/googlecodelabs/people

@KTibow  , Both @domesticmouse and @brendankenny are listed there.

@PraneetDixit try another one?

Can I know who maintains the Codelabs site? I will contact him/her for this issue.

I don't know, but you can join https://groups.google.com/g/codelab-authors.

Perhaps we can use something like Vercel's serverless function or other method to simulate this API.
But I don't know what Dark Sky API's reponses data looks like.

Just switch to #212

@petele is the owner of this.

I'm sorry, is there any work around about this? ..was about to start to learn about PWA and got this issue api issue.

Switch to https://github.com/elmorg/your-first-pwapp


pwd not getting updated correctly

I have now setup the powerline-shell and at first it looks like it works (at least it changed the design of my bash prompt).
Unfortunately it does not seem to change the path in the prompt for me. If I start in my home-dir it wil show the path to be "~" at all times - even after moving to other directory.
Any ideas as to what could be wrong here?
Ubuntu 16.04 + bash prompt.

turns out it was the test if[TERM != linux ] that gave me the problem. By removing that it started working. I tested with both gnome-terminal, terminator and the gnome-shell dropdown terminal. They all set it to linux it seems.

@kimusan do you mean that $TERM is linux on gnome-terminal, terminator, and gnome-shell? But the if statement was causing problems?

at least on my system it seemed that way (will test tomorrow when I am back at the office again)

ok this is strange.
If I just load my bash prompt in any of the before mentioned terminals, then it does not seem to work. If I then re-source the .bashrc file, then it suddenly works.
I cannot explain why this is.

I guess you got this working. There is a big backlog of issues and PRs so I'm going to close this. If you see any more oddities feel free to re-open.

I have the same problem, it just started out of the blue and everything was working just fine until today.
Following up on kumusan's comment, it looks like running the following command gets the path updated correctly again:
/usr/local/lib/python2.7/dist-packages/powerline/bindings/bash/powerline.sh
Something changed in my setup that is not causing this script to run at the right time. I'm using tmux so I could just add this in the config as part of the startup, but that seems like the wrong fix.

After a lot of digging I was able to fix it by adding PROMPT_COMMAND='' in the line before powerline.sh is called in my .bashrc file. This seems to be vaguely related to this bug here:
https://github.com/powerline/powerline/issues/727

@zangman, thank you. I was facing the same issue. And now it works.

After a lot of digging I was able to fix it by adding PROMPT_COMMAND='' in the line before powerline.sh is called in my .bashrc file. This seems to be vaguely related to this bug here:
powerline/powerline#727


Fix TOC wired positioning in more narrow screens

at least is not caused by the generated scss files, we already deleted them
convert to webp doesn't help either, consider creating an issue with the image file provided from us

created discussion on https://github.com/HEIGE-PCloud/DoIt/discussions/579

looks like the author is not gonna support the wide page width


fix iceGatheringState in onicecandidate(null)

and implement updating the iceGatheringState as described in the specification.
See individiual commits

Codecov Report

Merging #132 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master    #132      +/-   ##
=========================================
+ Coverage    99.8%   99.8%   +<.01%
=========================================
  Files           7       7
  Lines        1023    1024       +1
=========================================
+ Hits         1021    1022       +1
  Misses          2       2

Impacted Files
Coverage Δ

rtcpeerconnection.js
99.73% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


TypeError: Cannot read property 'gulp' of undefined

Node.js reported this error on my Windows 10.
I uploaded target project to https://github.com/mizunashi-mana/test-gulp-ts/tree/gulp-typescript-issue-398.
Is this a known bug and a general bug or my miss?
Expected behavior:
$ npm i
$ npm run build
semantic errors reported, but no program errors

Actual behavior:
$ npm i
$ npm run build

><EMAIL_ADDRESS>build ...\gulp-ts-test
> gulp build

[16:54:01] Requiring external module coffee-script/register
[16:54:02] Using gulpfile ~\gulp-ts-test\gulpfile.coffee
[16:54:02] Starting 'build'...
src\illegal.ts(17,7): error TS1005: ',' expected.
src\illegal.ts(18,7): error TS1005: ')' expected.
src\illegal.ts(8,18): error TS4055: Return type of public method from exported class has or is using private name 'util'.
src\illegal.ts(21,28): error TS4055: Return type of public method from exported class has or is using private name 'util'.
...\gulp-ts-test\node_modules\gulp-typescript\release\output.js:159
            base = path.resolve(file.original.gulp.cwd, this.project.options.outDir) + '/';
                                             ^

TypeError: Cannot read property 'gulp' of undefined
  at Output.emit (...\gulp-ts-test\node_modules\gulp-typescript\release\output.js:159:46)
  at sortedEmit_1 (...\gulp-ts-test\node_modules\gulp-typescript\release\output.js:205:23)
  at Output.finish (...\gulp-ts-test\node_modules\gulp-typescript\release\output.js:209:17)
  at ProjectCompiler.inputDone (...\gulp-ts-test\node_modules\gulp-typescript\release\compiler.js:81:29)
  at CompileStream.end (...\gulp-ts-test\node_modules\gulp-typescript\release\main.js:54:31)
  at DestroyableTransform.onend (...\gulp-ts-test\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:523:10)
  at DestroyableTransform.g (events.js:260:16)
  at emitNone (events.js:72:20)
  at DestroyableTransform.emit (events.js:166:7)
  at ...\gulp-ts-test\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:965:16
  at nextTickCallbackWith0Args (node.js:420:9)
  at process._tickCallback (node.js:349:13)

However, this is not caused by semantic errors simply, because that one is correct:
$ npm i
$ npm run build:correct

><EMAIL_ADDRESS>build:correct ...\gulp-ts-test
> gulp build:correct

[17:15:23] Requiring external module coffee-script/register
[17:15:23] Using gulpfile ~\gulp-ts-test\gulpfile.coffee
[17:15:23] Starting 'build:correct'...
src\illegal-but-correctgts.ts(1,22): error TS7006: Parameter 'e' implicitly has an 'any' type.
[17:15:24] TypeScript: 1 semantic error
[17:15:24] TypeScript: emit succeeded (with errors)
[17:15:24] Finished 'build:correct' after 934 ms

Your gulpfile:
https://github.com/mizunashi-mana/test-gulp-ts/blob/gulp-typescript-issue-398/gulpfile.coffee
My PC Status:

Windows 10
node: v4.4.3
npm: v2.15.1

$ npm ls --depth 0
<EMAIL_ADDRESS>~/gulp-ts-test
├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>└──<EMAIL_ADDRESS>

Can you upgrade to TypeScript 2.0? If so, you could give gulp-typescript 3.0 a try; the logic that produces your error has been completely revised. Let me know whether that works.

@ivogabe gulp-typescript 3.0 with typescript 2.0 works great for me.
Thanks for wonderful updates!


[logging.ps1] Add helpers to log a GitHub "notice"

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow


Is it possible to get all agent configures?

Hi.
I want to get all agent configurations by amazon-connect-stream API.
because of create agent manage dash board that can check all agent configuration.
Is it have method to get all agent configuration?
Best regards.

There's no way to get all agent configurations through the Streams API, it is only possible at present to get configurations for the agent who is currently authenticated.


[crypto] Set bits of candidate primes in RSA keygen.

FIPS 186-5 gives implementers a few new degrees of freedom when generating prime candidates in RSA key generation:

you can restrict prime candidates to any specific odd value mod 8
you can set the highest 2 bits arbitrarily

Using (1) to pick prime candidates that are 3 mod 4 makes constant-time Miller-Rabin a lot simplier; in general form, you have to check if the remainder of the bits of p - 1 are 0, and do different things depending on which case you're in. But if the prime candidate is 3 mod 4, then p-1 always has a 1 bit in it until the very last bit, and you can remove all that case analysis.
Using (2) to set the highest bits both to 1 allows one to ensure that candidate primes are always in range; one of the first checks a candidate prime needs to pass checks that the value is >= sqrt(2) * 2^(nlen/2 - 1), where nlen is the bit-length of the RSA modulus. Since sqrt(2) < 1.5, setting the top two bits means the candidate prime always passes this check, which saves time and entropy by discarding fewer values and not having to do the range-check. It also means we don't need to store a large constant relating to the square root of 2 to calculate the bound precisely.
These changes make RSA key generation significantly faster and smaller:

9% reduction in binary size

run_rsa_keygen.elf has 3884 bytes of IMEM and 2080 bytes of DMEM on master, and after the change it has 3632 bytes of IMEM and 1824 bytes of DMEM

16% speedup in primality testing

primality testing takes by far the majority of time in RSA key generation
speedup estimate from //sw/otbn/crypto/tests:primality_test, which runs the primality test against a true prime;   1940418  cycles on master and 1670938 cycles after the change

In my opinion, the binary size change is the biggest win, because RSA key generation is quite close to the IMEM size limit and I now have the space to implement much more impactful speed optimizations (such as checking if the candidate prime is a multiple of small primes, which detects the vast majority of composites without running a primality test).

This is an excellent optimisation.
My only concern is that perhaps it creates a risk of fault-attacks. Something like:

Witness is set to w mod 8 = 3, w = ...1000000011
A fault is injected just before the primality test, setting w = ...1000000001
Because step 4.5 of the primality test is skipped, we end up with a composite number that passes primality test.

This can be mitigated with a redundant check, but perhaps there is already a high-level reason why we don't need to worry about this scenario.

This can be mitigated with a redundant check, but perhaps there is already a high-level reason why we don't need to worry about this scenario.

I agree that for FI hardening it makes sense to have something ensure the candidate is 3 mod 4. Rather than a check, though, maybe we should just set those bits again in the primality test? That will consume less code size than a path that fails if they aren't set, and will still thwart the same class of attacks.

Rather than a check, though, maybe we should just set those bits again in the primality test? That will consume less code size than a path that fails if they aren't set, and will still thwart the same class of attacks.

Agreed. That is indeed a better solution.


Made CSS stylings to the homepage

@FrankApiyo @oluwatobim @KipSigei - Is this PR ready for review (once tests are fixed)?

going to delete this PR for now and create another PR to nutrition-compartments so that this branch can be compared to the nutrition-compartments branch as it is ahead of it.


[Windows] test.py errors

When I run test.py on the clean master branch in Windows, I get 4 failures.
Here's the failure summary:
passes: 223 failures: 4 duration: 19.00s

ipc module
remote.require
X should search module from the user app ‣
AssertionError: 'C:\\electron\\spec\\static\\main.js' == 'C:\\electron\\spec\\static\\main.js'
  at Context.<anonymous> (C:\electron\spec\api-ipc-spec.coffee:22:14)
  at callFn (C:\electron\spec\node_modules\mocha\lib\runnable.js:251:21)
  at Test.Runnable.run (C:\electron\spec\node_modules\mocha\lib\runnable.js:244:7)
  at Runner.runTest (C:\electron\spec\node_modules\mocha\lib\runner.js:374:10)
  at C:\electron\spec\node_modules\mocha\lib\runner.js:452:12
  at next (C:\electron\spec\node_modules\mocha\lib\runner.js:299:14)
  at C:\electron\spec\node_modules\mocha\lib\runner.js:309:7
  at next (C:\electron\spec\node_modules\mocha\lib\runner.js:248:23)
  at Immediate._onImmediate (C:\electron\spec\node_modules\mocha\lib\runner.js:276:5)
  at processImmediate [as _immediateCallback] (timers.js:371:17)

third-party module
runas
X can be required in renderer ‣
Error: The specified procedure could not be found.
C:\electron\spec\node_modules\runas\build\Release\runas.node
  at Error (native)
  at Object.module.(anonymous function) (ATOM_SHELL_ASAR.js:137:20)
  at Object.module.(anonymous function) (ATOM_SHELL_ASAR.js:137:20)
  at Object.module.(anonymous function) [as .node] (ATOM_SHELL_ASAR.js:137:20)
  at Module.load (C:\electron\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
  at Function.Module._load (module.js:310:12)
  at Module.require (module.js:365:17)
  at require (module.js:384:17)
  at Object.<anonymous> (C:\electron\spec\node_modules\runas\lib\runas.js:4:11)
  at Object.<anonymous> (C:\electron\spec\node_modules\runas\lib\runas.js:47:4)
  at Module._compile (module.js:430:26)
  at Object.Module._extensions..js (module.js:448:10)
  at Module.load (C:\electron\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
  at Function.Module._load (module.js:310:12)
  at Module.require (module.js:365:17)
  at require (module.js:384:17)
  at Context.<anonymous> (C:\electron\spec\modules-spec.coffee:12:7)
  at callFn (C:\electron\spec\node_modules\mocha\lib\runnable.js:251:21)
  at Test.Runnable.run (C:\electron\spec\node_modules\mocha\lib\runnable.js:244:7)
  at Runner.runTest (C:\electron\spec\node_modules\mocha\lib\runner.js:374:10)
  at C:\electron\spec\node_modules\mocha\lib\runner.js:452:12
  at next (C:\electron\spec\node_modules\mocha\lib\runner.js:299:14)
  at C:\electron\spec\node_modules\mocha\lib\runner.js:309:7
  at next (C:\electron\spec\node_modules\mocha\lib\runner.js:248:23)
  at Immediate._onImmediate (C:\electron\spec\node_modules\mocha\lib\runner.js:276:5)
  at processImmediate [as _immediateCallback] (timers.js:371:17)

X can be required in node binary ‣
AssertionError: 'The specified procedure could not be found.\r\nC:\\electron\\spec\\node_modules\\runas\\build == 'ok'
  at ChildProcess.<anonymous> (C:\electron\spec\modules-spec.coffee:18:16)
  at emitTwo (events.js:87:13)
  at ChildProcess.emit (events.js:172:7)
  at handleMessage (internal/child_process.js:632:10)
  at Pipe.channel.onread (internal/child_process.js:421:11)

<webview> tag
nodeintegration attribute
X loads native modules when navigation happens ‣
AssertionError: 'Uncaught Error: The specified procedure could not be found.\r\nC:\\electron\\spec\\node_modul == 'function'
  at webview.listener2 (C:\electron\spec\webview-spec.coffee:55:18)
  at WebViewImpl.dispatchEvent (C:\electron\out\D\resources\atom.asar\renderer\lib\web-view\web-view.js:143:31)
  at dispatchEvent (C:\electron\out\D\resources\atom.asar\renderer\lib\web-view\guest-view-internal.js:47:13)
  at EventEmitter.<anonymous> (C:\electron\out\D\resources\atom.asar\renderer\lib\web-view\guest-view-internal.js:58:30)
  at emitMany (events.js:108:13)
  at EventEmitter.emit (events.js:182:7)

Tested using Windows 8.1 64 bit with a 32 bit bootstrapped Electron.

#2559 fixes the first error.
The 3 other errors are all related to runas not working correctly.
I tried rebuilding runas cleanly by doing the following:

Cleared npm's cache.
Delete the node_modules folder under spec.
Running bootstrap.py which reinstalled the modules.

The build was successful (the log is available here), but the tests still fail.

For the 3 failing specs it is actually expected. With current build model V8 is statically linked with node.dll under Release build, while dynamically linked under Debug build, so the native modules built against Release build can not be used under Debug build.
To make the tests pass you can run the them with Release build:
$ ./script/test.py -R

Sorry I should have mentioned this in documents.

@zcbenz, does this happen on all platforms?
Is it possible to build modules with the debug build? If so then, can we make build.py -c D, build it like that automatically?
Can we make test.py, ignore these tests when using Electron from the debug target?
I think it's important, especially in a collaborative projects, that tests will fail only if something is actually broken. Otherwise, developers will either start ignoring them (since they are used to tests failing), or waste time trying to figure out if they accidentally broke something when they didn't.

It is only happening on Windows because of how Windows search for symbols.

Is it possible to build modules with the debug build? If so then, can we make build.py -c D, build it like that automatically?

It should be possible, but it is quite hard to do since node-gyp doesn't support specifying the location of node.lib.

Can we make test.py, ignore these tests when using Electron from the debug target?

I think we should ignore those tests in Debug build.


(allowedStartRules = true) should allow you to parse starting from any expression

Or else allowing any start rule should be the default if that property isn't specified.

Hmm, * as a special value has two unfortunate properties:

It needs to be escaped on the command-line.
It may lead to an impression that it is possible to specify allowed rules using globs.

A special string value (like allowedStartRules = "all" I proposed above) is fine in the API, but could be confusing in the CLI (does --allowed-start-rules all mean “all rules” or “the rule named all”?).
I’m not sure what the right solution is right now. I’m also starting to doubt this feature would be really that useful. The unit tests use case can be solved without this by parsing whole inputs, not just parts, in the tests — and this is probably the right way, because you generally don’t want to test pieces of a parser or a parser generated differently than the production one (where you would presumably not allow starting from any rule).
In any case, I don’t want to sped time on this now ⇒ moving to post-1.0.0. Comments describing real-world situations where this feature would enable/simplify something are welcome.

I’m also starting to doubt this feature would be really that useful. The unit tests use case can be solved without this by parsing whole inputs, not just parts, in the tests

I disagree. Testing an entire input makes it difficult to troubleshoot rules that are deeply nested, and moves you closer to integration tests vs unit tests.
I solved this slightly differently. I used a RegExp to parse my grammar for rule names, and added helper functions.
var ruleNames = extractAllRuleNames(grammarSource);
// returns an array of rule names: ["RULE1", "RULE2"];

var parser = PEG.buildParser(grammarSource, {allowedStartRules: ruleNames});

// for each rule in ruleNames, generate a helper function that matches the rule name
parser.RULE1 = function(input, options) {
  options = options || {};
  options.startRule = "RULE1";
  parser.parse(input, options);
};
parser.RULE2 = function(input, options) {
  options = options || {};
  options.startRule = "RULE2";
  parser.parse(input, options);
};
// ... etc

This has the advantage of allowing you to explicitly specify which rule you expect to be the start rule. I think that is a bit better than just allowing it to start with any rule.
The only downside to this approach is that the regular expression that backs extractAllRuleNames is fairly brittle (especially when trying to handle the initializer portion). It would be much nicer to have all this automatically exported. Perhaps just by using a --debug flag when generating the parser. None of this makes much sense to me outside of testing.

What's the status on this? As previously mentioned, this would come in really handy when it comes to testing my rules...


python310Packages.fastapi: 0.85.0 -> 0.85.1

Description of changes
https://fastapi.tiangolo.com/release-notes/#0851
Depends on #197420

Things done

Built on platform(s)

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

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

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

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

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

[x] Fits CONTRIBUTING.md.

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

2 packages marked as broken and skipped:

python310Packages.pytest-ansible
python39Packages.pytest-ansible

53 packages built:

ansible (ansible_2_12)
ansible-later (python310Packages.ansible-later)
ansible-lint (python310Packages.ansible-lint)
ansible_2_13 (python310Packages.ansible-core)
dyndnsc
etebase-server (python310Packages.etebase-server)
home-assistant-component-tests.bmw_connected_drive
parsedmarc (python310Packages.parsedmarc)
python310Packages.aiofile
python310Packages.aiomisc
python310Packages.ansible
python310Packages.ansible-compat
python310Packages.ansible-kernel
python310Packages.ansible-runner
python310Packages.bimmer-connected
python310Packages.caio
python310Packages.dependency-injector
python310Packages.fastapi
python310Packages.fastapi-mail
python310Packages.geoip2
python310Packages.json-logging
python310Packages.mocket
python310Packages.ormar
python310Packages.slowapi
python310Packages.sopel
python310Packages.strawberry-graphql
ttp (python310Packages.ttp)
python39Packages.aiofile
python39Packages.aiomisc
python39Packages.ansible
python39Packages.ansible-compat
python39Packages.ansible-core
python39Packages.ansible-kernel
python39Packages.ansible-later
python39Packages.ansible-lint
python39Packages.ansible-runner
python39Packages.bimmer-connected
python39Packages.caio
python39Packages.dependency-injector
python39Packages.etebase-server
python39Packages.fastapi
python39Packages.fastapi-mail
python39Packages.geoip2
python39Packages.json-logging
python39Packages.mocket
python39Packages.ormar
python39Packages.parsedmarc
python39Packages.slowapi
python39Packages.sopel
python39Packages.strawberry-graphql
python39Packages.ttp
soco-cli
theharvester


Feature Request: Add Free-Form Tags to Metadata Fields

Currently, metadata fields in Assemblyline do not support the addition of free-form tags. A feature that allows specific users to add tags after submission would prove beneficial.
These tags could be used for;

Case Tracking
Querying
Grouping of samples
Attributions

Example:

This will be done in the malware archive where the files + analysis will be kept forever. Did you need this on submission that will eventually expire as well?

Our retention on submissions is long enough that these tags would still prove useful, even on shorter retentions these tags will be useful for group, and track samples related to a particular case. Especially when considering there might be a high volume of submissions in between. Happy to discuss.

So just a list of editable labels on the submission itself would do the trick ?

That would be great, and would meet our usecase.

That would be great, and would meet our use case.


Bug: failing to change ownership of the NFS based PVC for PostgreSQL pod by using kube_pv_chown utility

Environment info

NooBaa Version: 4.9.10, 4.10.5 (NooBaa operator version)
Platform: OpenShift 4.10.22
Storage class from NetApp filer provided over Trident CSI (backendType: ontap-nas-economy)

Actual behavior

pod noobaa-db-pg-0 stuck in crash loop of the init container with following error message:

uid change has been identified - will change from uid: 99 to new uid: 10001
setting permissions of /var/lib/pgsql for user 10001
Error:got error when changing ownership of /var/lib/pgsql Error: Operation not permitted

real	0m0.005s
user	0m0.003s
sys	0m0.001s
Error from server (BadRequest): container "initialize-database" in pod "noobaa-db-pg-0" is waiting to start: PodInitializing

Expected behavior

Pod starts.

Steps to reproduce

Deploy ODF in standalone MCG mode (or noobaa operator) with postgres DB backend PVC from NFS storage.

More information - Screenshots / Logs / Other output
It might be because NFS storage is exported with root_squash option?

Thanks @maratsal
root squash could very much be the root cause, our db init containers are a mess of trying to fix pvc permissions using root group (gid 0) and hacks to overcome postgres hugepages issue.
I wonder if you manually went to that pvc filesystem as root (or as current owner uid 99) and did a chown -R 10001:0 <db-volume-path> - would the init container run ok?
@dannyzaken @jackyalbo and @baum would probably know how to fix this problem.

cannot change ownership with any ID (tried 99 and 10001), but have no problems with creating files and folder with any ID (please see Manual permissions change test below).
So maybe if PVC is from NFS storage we should not be running that permissions change in this code and having additional check like below:
prepare_postgres_pv() {
  local dir="/var/lib/pgsql"
  local dir_id=$(stat -c '%u' ${dir})
+  local dir_type=$(stat -f -c %T ${dir})
  local current_id=$(id -u)

  # change ownership and permissions of mongo db path
-  if [ "${dir_id}" != "${current_id}" ]
+  if [ "${dir_id}" != "${current_id}" ] && [ ${dir_type} != "nfs" ]
  then
    echo "uid change has been identified - will change from uid: ${dir_id} to new uid: ${current_id}"
    time ${KUBE_PV_CHOWN} postgres ${current_id}
  fi
}

Manual permissions change test:
[myuser@my-linux-host ~]$ oc rsh busybox-bbc4dc98-8gfnc # user id 99
~ $ id
uid=99(99) gid=0(root)
~ $ ls -la
total 20
dr-xr-xr-x    1 root     root            62 Aug  1 22:58 .
dr-xr-xr-x    1 root     root            62 Aug  1 22:58 ..
drwxr-xr-x    2 root     root         12288 Jul 29 01:32 bin
drwxr-xr-x    5 root     root           360 Aug  1 22:58 dev
drwxr-xr-x    1 root     root            66 Aug  1 22:58 etc
drwxr-xr-x    2 nobody   nobody           6 Jul 29 01:32 home
dr-xr-xr-x  309 root     root             0 Aug  1 22:58 proc
drwx------    2 root     root             6 Jul 29 01:32 root
drwxr-xr-x    3 root     root            42 Aug  1 22:58 run
dr-xr-xr-x   13 root     root             0 Jul 29 14:12 sys
drwxrwxrwx    2 99       99            4096 Aug  1 22:58 tmp
drwxr-xr-x    3 root     root            18 Jul 29 01:32 usr
drwxr-xr-x    1 root     root            17 Aug  1 22:58 var
~ $ df -h /tmp
Filesystem                Size      Used Available Use% Mounted on
<IP_ADDRESS>:/trident_qtree_pool_trident_GXYUPUKEEO/trident_pvc_bc950669_6230_400a_9c97_0150658c8450
                         50.0G         0     50.0G   0% /tmp
~ $ chown 10001 /tmp
chown: /tmp: Operation not permitted
~ $ mkdir /tmp/folder-id-99
~ $ ls -la /tmp/
total 8
drwxrwxrwx    3 99       99            4096 Aug  1 22:59 .
dr-xr-xr-x    1 root     root            62 Aug  1 22:58 ..
drwxr-xr-x    2 99       99            4096 Aug  1 22:59 folder-id-99
~ $ chown 10001 /tmp/folder-id-99/
chown: /tmp/folder-id-99/: Operation not permitted
~ $
command terminated with exit code 1
[myuser@my-linux-host ~]$ oc edit deploy busybox # change user id to 10001
deployment.apps/busybox edited
[myuser@my-linux-host ~]$ oc get pods | grep busybox
busybox-69fcd8b488-mpvsc                           1/1     Running       0          12s
busybox-bbc4dc98-8gfnc                             1/1     Terminating   0          2m2s
[myuser@my-linux-host ~]$ oc rsh busybox-69fcd8b488-mpvsc
~ $ id
uid=10001(10001) gid=0(root)
~ $ cd /tmp
/tmp $ ls -la
total 8
drwxrwxrwx    3 99       99            4096 Aug  1 22:59 .
dr-xr-xr-x    1 root     root            62 Aug  1 23:00 ..
drwxr-xr-x    2 99       99            4096 Aug  1 22:59 folder-id-99
/tmp $ mkdir folder-id-10001
/tmp $ touch file-id-10001
/tmp $ ls -la
total 12
drwxrwxrwx    4 99       99            4096 Aug  1 23:01 .
dr-xr-xr-x    1 root     root            62 Aug  1 23:00 ..
-rw-r--r--    1 10001    99               0 Aug  1 23:01 file-id-10001
drwxr-xr-x    2 10001    99            4096 Aug  1 23:01 folder-id-10001
drwxr-xr-x    2 99       99            4096 Aug  1 22:59 folder-id-99
/tmp $ rm -rf *
/tmp $ ls -la
total 4
drwxrwxrwx    2 99       99            4096 Aug  1 23:01 .
dr-xr-xr-x    1 root     root            62 Aug  1 23:00 ..
/tmp $
[myuser@my-linux-host ~]$

I am not sure if not running it will work, because we need to have permissions to write to all those files to run the database...
here is more context on this issue (notice answers 2 and 3 as well) -
https://stackoverflow.com/questions/43544370/kubernetes-how-to-set-volumemount-user-group-and-file-permissions

I just tested it and it could start with no issues with my suggested changes (mounted modified script from the configmap):
[myuser@my-linux-host ~]$ oc logs -f --all-containers noobaa-db-pg-0
+ set -x
+ export PGDATA=/var/lib/pgsql/data/userdata
+ PGDATA=/var/lib/pgsql/data/userdata
+ '[' -f /var/lib/pgsql/data/userdata/postgresql.conf ']'
+ p=/opt/rh/rh-postgresql12/root/usr/bin/postgres
+ '[' '!' -x /opt/rh/rh-postgresql12/root/usr/bin/postgres ']'
+ p=/usr/bin/postgres
+ mv /usr/bin/postgres /usr/bin/postgres.orig
+ echo exec /usr/bin/postgres.orig '"$@"' -c huge_pages=off
+ chmod 755 /usr/bin/postgres
+ sed -i -e 's/^\(postgres:[^:]\):[0-9]*:[0-9]*:/\1:10001:0:/' /etc/passwd
+ sed -i -e 's/^exec.*$/exit 0/' -e 's/^pg_ctl\sstart.*/pg_ctl start || true/' /usr/bin/run-postgresql
+ su postgres -c 'bash -x /usr/bin/run-postgresql'
+ export ENABLE_REPLICATION=false
+ ENABLE_REPLICATION=false
+ set -eu
++ cgroup-limits
+ export_vars='MAX_MEMORY_LIMIT_IN_BYTES=9223372036854775807
MEMORY_LIMIT_IN_BYTES=524288000
NUMBER_OF_CORES=4'
+ export MAX_MEMORY_LIMIT_IN_BYTES=9223372036854775807 MEMORY_LIMIT_IN_BYTES=524288000 NUMBER_OF_CORES=4
+ MAX_MEMORY_LIMIT_IN_BYTES=9223372036854775807
+ MEMORY_LIMIT_IN_BYTES=524288000
+ NUMBER_OF_CORES=4
+ source /usr/share/container-scripts/postgresql/common.sh
++ export POSTGRESQL_MAX_CONNECTIONS=100
++ POSTGRESQL_MAX_CONNECTIONS=100
++ export POSTGRESQL_MAX_PREPARED_TRANSACTIONS=0
++ POSTGRESQL_MAX_PREPARED_TRANSACTIONS=0
++ [[ '' == \t\r\u\e ]]
++ [[ -z 524288000 ]]
++ shared_buffers_computed=125MB
++ effective_cache=250MB
++ export POSTGRESQL_SHARED_BUFFERS=125MB
++ POSTGRESQL_SHARED_BUFFERS=125MB
++ export POSTGRESQL_EFFECTIVE_CACHE_SIZE=250MB
++ POSTGRESQL_EFFECTIVE_CACHE_SIZE=250MB
++ export POSTGRESQL_RECOVERY_FILE=/var/lib/pgsql/openshift-custom-recovery.conf
++ POSTGRESQL_RECOVERY_FILE=/var/lib/pgsql/openshift-custom-recovery.conf
++ export POSTGRESQL_CONFIG_FILE=/var/lib/pgsql/openshift-custom-postgresql.conf
++ POSTGRESQL_CONFIG_FILE=/var/lib/pgsql/openshift-custom-postgresql.conf
++ postinitdb_actions=
++ shopt -s dotglob
++ shopt -s extglob
+ set_pgdata
+ export PGDATA=/var/lib/pgsql/data/userdata
+ PGDATA=/var/lib/pgsql/data/userdata
+ mkdir -p /var/lib/pgsql/data/userdata
+ '[' -e /var/lib/pgsql/data/PG_VERSION ']'
+ chmod 700 /var/lib/pgsql/data/userdata
+ process_extending_files /opt/app-root/src/postgresql-pre-start /usr/share/container-scripts/postgresql/pre-start
+ local filename dir
++ get_matched_files '*.sh' /opt/app-root/src/postgresql-pre-start /usr/share/container-scripts/postgresql/pre-start
++ sort -u
++ local 'pattern=*.sh' dir
++ shift
++ for dir in "$@"
++ test -d /opt/app-root/src/postgresql-pre-start
++ continue
++ for dir in "$@"
++ test -d /usr/share/container-scripts/postgresql/pre-start
++ continue
+ read filename
+ for dir in "$@"
+ local file=/opt/app-root/src/postgresql-pre-start/
+ test -f /opt/app-root/src/postgresql-pre-start/
+ for dir in "$@"
+ local file=/usr/share/container-scripts/postgresql/pre-start/
+ test -f /usr/share/container-scripts/postgresql/pre-start/
+ read filename
+ check_env_vars
+ [[ -v POSTGRESQL_USER ]]
+ [[ -v POSTGRESQL_USER ]]
+ [[ -v POSTGRESQL_PASSWORD ]]
+ [[ -v POSTGRESQL_DATABASE ]]
+ '[' 6 -le 63 ']'
+ '[' 6 -le 63 ']'
+ postinitdb_actions+=,simple_db
+ '[' -v POSTGRESQL_ADMIN_PASSWORD ']'
+ '[' -v POSTGRESQL_MIGRATION_REMOTE_HOST -a -v POSTGRESQL_MIGRATION_ADMIN_PASSWORD ']'
+ case "$postinitdb_actions" in
+ generate_passwd_file
++ id -u
+ export USER_ID=10001
+ USER_ID=10001
++ id -g
+ export GROUP_ID=0
+ GROUP_ID=0
+ grep -v -e '^postgres' -e '^10001' /etc/passwd
+ echo 'postgres:x:10001:0:PostgreSQL Server:/var/lib/pgsql:/bin/bash'
+ export LD_PRELOAD=libnss_wrapper.so
+ LD_PRELOAD=libnss_wrapper.so
+ export NSS_WRAPPER_PASSWD=/var/lib/pgsql/passwd
+ NSS_WRAPPER_PASSWD=/var/lib/pgsql/passwd
+ export NSS_WRAPPER_GROUP=/etc/group
+ NSS_WRAPPER_GROUP=/etc/group
+ generate_postgresql_config
+ envsubst
+ '[' false == true ']'
+ should_hack_data_sync_retry
++ uname -p
+ '[' x86_64 == x86_64 ']'
+ return 1
+ shopt -s nullglob
+ PG_INITIALIZED=false
+ '[' '!' -f /var/lib/pgsql/data/userdata/postgresql.conf ']'
+ initialize_database
+ initdb_wrapper initdb
+ LANG=en_US.utf8
+ initdb
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locales
  COLLATE:  C
  CTYPE:    en_US.utf8
  MESSAGES: en_US.utf8
  MONETARY: en_US.utf8
  NUMERIC:  en_US.utf8
  TIME:     en_US.utf8
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/pgsql/data/userdata ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    pg_ctl -D /var/lib/pgsql/data/userdata -l logfile start

initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
+ cat
+ cat
+ PG_INITIALIZED=:
+ pg_ctl start
waiting for server to start....2022-08-02 14:18:52.849 UTC [39] LOG:  starting PostgreSQL 12.11 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit
2022-08-02 14:18:52.849 UTC [39] LOG:  listening on IPv4 address "<IP_ADDRESS>", port 5432
2022-08-02 14:18:52.849 UTC [39] LOG:  listening on IPv6 address "::", port 5432
2022-08-02 14:18:52.856 UTC [39] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-08-02 14:18:52.862 UTC [39] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2022-08-02 14:18:52.882 UTC [39] LOG:  redirecting log output to logging collector process
2022-08-02 14:18:52.882 UTC [39] HINT:  Future log output will appear in directory "log".
 done
server started
+ pg_isready
/var/run/postgresql:5432 - accepting connections
+ :
+ process_extending_files /opt/app-root/src/postgresql-init /usr/share/container-scripts/postgresql/init
+ local filename dir
++ get_matched_files '*.sh' /opt/app-root/src/postgresql-init /usr/share/container-scripts/postgresql/init
++ local 'pattern=*.sh' dir
++ shift
++ for dir in "$@"
++ test -d /opt/app-root/src/postgresql-init
++ continue
++ for dir in "$@"
++ test -d /usr/share/container-scripts/postgresql/init
++ continue
++ sort -u
+ read filename
+ for dir in "$@"
+ local file=/opt/app-root/src/postgresql-init/
+ test -f /opt/app-root/src/postgresql-init/
+ for dir in "$@"
+ local file=/usr/share/container-scripts/postgresql/init/
+ test -f /usr/share/container-scripts/postgresql/init/
+ read filename
+ migrate_db
+ test ,simple_db = ,migration
+ return 0
+ create_users
+ [[ ,,simple_db, = *,simple_db,* ]]
+ createuser noobaa
+ createdb --owner=noobaa nbcore
+ '[' -v POSTGRESQL_MASTER_USER ']'
+ process_extending_files /opt/app-root/src/postgresql-start /usr/share/container-scripts/postgresql/start
+ local filename dir
++ get_matched_files '*.sh' /opt/app-root/src/postgresql-start /usr/share/container-scripts/postgresql/start
++ local 'pattern=*.sh' dir
++ shift
++ for dir in "$@"
++ test -d /opt/app-root/src/postgresql-start
++ continue
waiting for server to start....2022-08-02 14:18:56.186 UTC [22] LOG:  starting PostgreSQL 12.11 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit
2022-08-02 14:18:56.189 UTC [22] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
++ for dir in "$@"
++ test -d /usr/share/container-scripts/postgresql/start
2022-08-02 14:18:56.196 UTC [22] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2022-08-02 14:18:56.282 UTC [22] LOG:  redirecting log output to logging collector process
2022-08-02 14:18:56.282 UTC [22] HINT:  Future log output will appear in directory "log".
 done
++ find -L /usr/share/container-scripts/postgresql/start -maxdepth 1 -type f -name '*.sh' -printf '%f\n'
++ sort -u
=> sourcing /usr/share/container-scripts/postgresql/start/set_passwords.sh ...
+ read filename
server started
/var/run/postgresql:5432 - accepting connections
+ for dir in "$@"
+ local file=/opt/app-root/src/postgresql-start/set_passwords.sh
+ test -f /opt/app-root/src/postgresql-start/set_passwords.sh
+ for dir in "$@"
=> sourcing /usr/share/container-scripts/postgresql/start/set_passwords.sh ...
+ local file=/usr/share/container-scripts/postgresql/start/set_passwords.sh
+ test -f /usr/share/container-scripts/postgresql/start/set_passwords.sh
+ echo '=> sourcing /usr/share/container-scripts/postgresql/start/set_passwords.sh ...'
+ source /usr/share/container-scripts/postgresql/start/set_passwords.sh
ALTER ROLE
++ [[ ,,simple_db, = *,simple_db,* ]]
waiting for server to shut down.... done
++ _psql --set=username=noobaa --set=password=SeX263+iGcHjJg==
++ psql --set ON_ERROR_STOP=1 --set=username=noobaa --set=password=SeX263+iGcHjJg==
server stopped
Starting server...
2022-08-02 14:18:56.553 UTC [1] LOG:  starting PostgreSQL 12.11 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit
2022-08-02 14:18:56.553 UTC [1] LOG:  listening on IPv4 address "<IP_ADDRESS>", port 5432
ALTER ROLE
++ '[' -v POSTGRESQL_MASTER_USER ']'
++ '[' -v POSTGRESQL_ADMIN_PASSWORD ']'
2022-08-02 14:18:56.553 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2022-08-02 14:18:56.558 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-08-02 14:18:56.562 UTC [1] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
+ set -e
+ break
+ read filename
+ pg_ctl stop
waiting for server to shut down.... done
2022-08-02 14:18:56.629 UTC [1] LOG:  redirecting log output to logging collector process
2022-08-02 14:18:56.629 UTC [1] HINT:  Future log output will appear in directory "log".
server stopped
Starting server...
+ unset_env_vars
+ unset POSTGRESQL_DATABASE POSTGRESQL_USER POSTGRESQL_PASSWORD POSTGRESQL_ADMIN_PASSWORD
+ echo 'Starting server...'
+ exit 0
^C
[myuser@my-linux-host ~]$ oc get pods
NAME                                               READY   STATUS    RESTARTS   AGE
noobaa-core-0                                      1/1     Running   0          18h
noobaa-db-pg-0                                     1/1     Running   0          56s
noobaa-operator-698c99d7fc-qjvj2                   1/1     Running   0          3d20h
ocs-metrics-exporter-5594fd8456-v6xvh              1/1     Running   0          3d23h
ocs-operator-74f7b6dcf-m7swl                       1/1     Running   0          3d23h
odf-console-dc88447b5-xnf4t                        1/1     Running   0          3d23h
odf-operator-controller-manager-5b66b7969f-kvfp8   2/2     Running   0          3d23h
rook-ceph-operator-5f68dc6b44-j2sf7                1/1     Running   0          3d23h
[myuser@my-linux-host ~]$

I now see the same problem on podman machine + kind clsuter.
$ kubectl logs noobaa-db-pg-0 -c init
uid change has been identified - will change from uid: 0 to new uid: 10001
setting permissions of /var/lib/pgsql for user 10001
Error:got error when changing ownership of /var/lib/pgsql Error: Operation not permitted

@dannyzaken what is our direction here??

I feel like my proposed code should work just fine, because we have permissions on group level and that's why we don't have problems with writing to the NFS share with any user as I posted above.
here is recommendations around it from Red Hat:

Adapting Containerfiles for OpenShift
When you write or change a Containerfile that builds an image to run on an OpenShift cluster, you need to address the following:

Directories and files that are read from or written to by processes in the container should be owned by the root group and have group read or group write permission.
Files that are executable should have group execute permissions.
The processes running in the container must not listen on privileged ports (that is, ports below 1024), because they are not running as privileged users.
Adding the following RUN instruction to your Containerfile sets the directory and file permissions to allow users in the root group to access them in the container:

RUN chgrp -R 0 directory && \
chmod -R g=u directory

The user account that runs the container is always a member of the root group, hence the container can read and write to this directory. The root group does not have any special permissions (unlike the root user) which minimizes security risks with this configuration.
The g=u argument from the chmod command makes the group permissions equal to the owner user permissions, which by default are read and write. You can use the g+rwX argument with the same results.

@dannyzaken will you assign this?

If I am not mistaken, I think we can get rid of all the init containers hacks and use fsGroup and fsGroupChangePolicy
https://kubernetes.io/blog/2020/12/14/kubernetes-release-1.20-fsgroupchangepolicy-fsgrouppolicy/

@dannyzaken, @guymguym I recently picked up this issue. I think we can replace our init container hacks with fsUser, fsGroup and fsGroupChangePolicy.
Kubernetes will also do exactly what we are doing (SetVolumeOwnership) which implies that it might not really help us in this particular scenario where NFS mount is exported with root_squash hence NFS is performing operations with nobody:nogroup (AFAIK) - resulting in operation getting denied.
Maybe, instead what we can do is check in our init container if we can read and write to the directory, if we can - skip any ownership changes or else change ownership as usual.


Update istio client library to 1.5.0

We tried that in serving and it blew up error rates across the board.
Why do we want it here?
/cc @tcnghia

@trshafer this update the Istio API client library, not Istio.  Can you please update the PR?
We are currently testing with Istio 1.5.0 starting https://github.com/knative/net-istio/pull/39 .  Is that what you are trying to achieve, or is there something in the API client library that you want to pull.
Anyway, this vendor client hasn't been used in this repo yet (we're still using the one vendored from serving).  It's only my plate to do that first before we change this.

@tcnghia updated the PR title and commit.
The original rationale to update istio was to address https://github.com/knative/net-istio/issues/47. The referenced istio PR isn't in 1.5.0, but I thought I would go ahead anyway and update the dep.
I don't have any direct need to update the dep right now.

I see, so let's hold on to this for now if you don't have immediate need.  We can revive after I switch net-istio to use its generated client instead of using Serving's.


Implement an HTTP/2 scheduler

The scheduler can do two things as far as Erlang is concerned:

By adding a limit to the number of concurrent processes for a connection (which may not be the same as the number of streams), we will want to start new processes for the highest priority streams.

When sending data for many streams, we need to prioritize what data to send first. We will probably need to use an asynchronous send function that tells us when it's OK to send more data.

Such a scheduler is not required for a conforming HTTP/2 implementation, and therefore does not need to be done before 2.0.
Also, different strategies may be used. The RFC provides a tree-based strategy which can be expensive to use. We may want to provide different strategies.

Everyone has been moving away from the HTTP/2 PRIORITY mechanism. It's widely seen as a failure and setting priorities is counter productive with regards to performance. I do not believe there is any need to implement this, but this ticket will remain open for the time being so that whatever Cowboy does with regard to PRIORITY is ignored and the code explains why.