Optimization on MATCH LIMIT

Is your feature request related to a problem? Please describe.
There is no limit push down for MATCH, for a query like match (v: people) return v limit 5; cannot be done in an accepted performance
Describe the solution you'd like
Support push down of limit in this query pattern.
Describe alternatives you've considered
n/a
Additional context

https://discuss.nebula-graph.com.cn/t/topic/4050
https://discuss.nebula-graph.com.cn/t/topic/4347

Update:
Not sure if this case(limit in a string matching MATCH condition) could be covered in this optimization attempt, I put it here all together :-)
MATCH (v:vertexCall) WHERE v.CallNumber STARTS WITH "10000106" RETURN v.CallNumber as number | limit 2


awesome-productivity

Hi,
I started a list on productivity (methods, tools, books...). But before going further, is that something that already exists and that I might have missed? If not, do you think it is a good idea and would fit the awesome framework?

I don't know any awesome productivity list, but would be great to have one and take a look. And I think it would fit

I don't know of any such list, but I would love to find one!
Thanks for creating it. I hope you'll manage to attract more contributors to it.

I have started https://github.com/jyguyomarch/awesome-productivity
I'll add it to the awesome repo once we have enough resources in there.


DSB etc. PMID:12628934

1 normal frequency of double-strand break repair via homologous recombination
(cf fypo:4437, fypo:3912)
2 abolished double-strand break repair via homologous recombination
3 abnormal mitotic cell cycle regulation during cellular response to DNA double-strand break
(no xp)

normal frequency of double-strand break repair via homologous recombination FYPO:0005398
abolished double-strand break repair via homologous recombination FYPO:0005399
abnormal mitotic cell cycle regulation during cellular response to DNA double-strand break FYPO:0005400

edit file: 53392dc6fb01d6e738b705279acd16fc5f87d341
release: e38d2ae281f1089faead8e3f729d8abc1756e5c3


#524 Check for null when calling functions that return a pointer (WIP)

Modify the templates so functions that return values store the result in a temporary local var. This is then checked for null so a C# null can be returned instead of a wrapped null (which would cause a hard crash if dereferenced).

This PR changes the output for functions that returns pointers (like GetParentEntity()) from:
        public Csp.Multiplayer.SpaceEntity GetParentEntity()
        {
            var _result = new Csp.Multiplayer.SpaceEntity(
                csp_multiplayer_SpaceEntity_GetParentEntityC_SpaceEntityP(_ptr)
            );

            return _result;
        }

to
        public Csp.Multiplayer.SpaceEntity GetParentEntity()
        {
            var _value = csp_multiplayer_SpaceEntity_GetParentEntityC_SpaceEntityP(_ptr);

            if (_value.Equals(NativePointer.Zero))
                return null;

            var _result = new Csp.Multiplayer.SpaceEntity(_value);

            return _result;
        }

Firstly, this change is awesome. Secondly, it looks like this change may have brought some of your other recent changes along for the ride (it has changes to the commit message template and chevron module removal). Can we get rid of those for this PR?

Firstly, this change is awesome. Secondly, it looks like this change may have brought some of your other recent changes along for the ride (it has changes to the commit message template and chevron module removal). Can we get rid of those for this PR?

Those will get diffed out once those changes are merged in. Unfortunately there isn't a nice way to build on top of other in-progress work with Github.

Do we need to put any methods that could return a null value inside a try-catch block now, with the usage of the helper CheckNativePointer(pointer)? (I only sort-of understand the mustache syntax)

Do we need to put any methods that could return a null value inside a try-catch block now, with the usage of the helper CheckNativePointer(pointer)? (I only sort-of understand the mustache syntax)

No - if null is a valid return (e.g. in the case of GetParentEntity()) then the C# wrapper will also just return null (rather than an invalid object wrapping a null).
If a method has a return type that's a reference, e.g. const SpaceTransform& GetTransform() const then the CheckNativePointer will ensure that a non-null pointer is returned (it shouldn't ever do so) and will always return a valid object.

Methods returning a reference will check the reference for non-nullness (only in Debug builds):
e.g. SpaceEntity.GetTransform() calling const SpaceTransform& GetTransform() const:
        public Csp.Multiplayer.SpaceTransform GetTransform()
        {
            var _value = csp_multiplayer_SpaceEntity_GetTransformC_SpaceTransformRC(_ptr);

            WrapperHelper.CheckNativePointer(_value);

            var _result = new Csp.Multiplayer.SpaceTransform(_value);

            return _result;
        }

Methods where null is a valid return will also return null on the C# side, e.g. GetParentEntity().


System: A lot of dropdowns look like single actions

Fixed by https://github.com/inventree/InvenTree/pull/8005


⚠ Bofrost.at has degraded performance

In 5b4c4c8, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1587 ms

Resolved: Bofrost.at performance has improved in dc00b3b after 32 minutes.


Plan to register as a homebrew formula?

Does tea has a plan to register on homebrew formulae in the future? It would be nice to install it with brew install.

Yes, I should be submitting it shortly

https://github.com/Homebrew/homebrew-core/pull/116323/files

Note that this is stalled because we cannot figure out why CI is failing for the completed formula.

You said that you were going to make a tap for tea? Have you already done this?

Don't you mention brew install teaxyz/pkgs/tea-cli in README?

I have a version coming soon (today perhaps) that adds this yes.


How to address EOL for runtime.win-x86.runtime.native.System.Data.SQLClient.sni

Using System.Data.SQLClient(4.8.3), which in turn pulls in runtime.native.System.Data.SQLClient.sni(4.7.0), which includes runtime.win-x86.native.System.Data.SQLClient.sni(4.4.0) which Blackduck identifies as End of Life.  We don't use or need the x86 version so how do we remove or get rid of it without errors?

@wherberg,
System.Data.SqlClient supports running on x86, x64, and arm64. In order to support that, SqlClient requires some native binaries that are platform-specific. Unfortunately, there's no way to tell the NuGet dependency chain that "this dependency is only required for this runtime target". If your application doesn't need to support running on x86, you are free to manually delete those dependencies from your output folder after building/publishing.

@wherberg is you question answered? If yes, please feel free to close the issue.

@JRahnama there is a way to do that, have in the nuget package to SqlClient to:

Add build/.props

add the native nuget package depending on the value of $(RuntimeIdentifier).

Then on restore on the user the nuget package would add the reference to the native dependency that they need to their project for the.


hello it crashes on startup

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
crashed on startup and I don't know how to fix it.

Hey!
Could you describe the problem more, i cannot help you without more information. Feel free to also send a screenshot.
Thanks casper.

Hey!
Did you follow the instructions on how to install the CAD? Make sure to run npm install in the client and server folder aswell.
If you see an error while running those scripts, try reinstalling the CAD on your desktop or documents folder.
Thanks, Casper.

literally reinstalled it and followed everything and it still crashing

Can you try to move the CAD to your desktop or documents folder then run npm install in the server folder.

reinstalled it to the desktop and still am getting that same issue

Try running npm install bcrypt in the server folder

Run the CAD on a different port, the port you chose was already in use.

ok but i cant figure out how to change the pots of the dbs

I got it I think there is no error in the npm but I cannot connect tot he system
'

You'll have to add something in the code for the CAD to connect to the db if you changed the port of the database.

Goto server/utils/ and open db.js
Look for the options, you'll see host, user etc
Add the following line in the options:

port: your_port,

The options should now look like this:
const options = {
    port: your_port,
    host: host,
    user: databaseUser,
    password: databasePassword,
    database: database,
    multipleStatements: true,
    timeout: 0
}

Save and restart the CAD

now what

Make sure to run yarn global add serve in the client folder, if you don't have yarn installed: https://classic.yarnpkg.com/en/docs/install/#windows-stable

ok the only problem i have rn is when I try to go to the localhost thing it doesn't work. i will do that

its saying refused to connect

Can you send me screenshot of the error?

Make sure to run yarn global add serve in the client folder, if you don't have yarn installed: https://classic.yarnpkg.com/en/docs/install/#windows-stable

i did 5 min ago but I will again

if it happens again, send me a bigger screenshot, there's more above and might be helpful for me to debug this.

its saying 404 now when i try and connect

on the internet for some reason

try: Run npm run build in the client folder again, then restart the CAD.

You miss spelled build, npm run build not biuld

when i start it now it looks good in the npm but it still says 404

While moving the CAD earlier, did you move the CAD or completely reinstalled in on your desktop?

reinstalled to desktop

What version of NodeJS and npm are installed on your PC? check by doing, node -v and npm -v

I downloaded the file I didn't do git commands because whenever I try to do them they don't work

12.18.1 node and 6.14.5 of npm

In client/package.json, is there this:
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ], ```

yes

So I've been searching the error, didn't find anything too helpful yet but this is not an issue with the CAD so I cannot help too much either, something you can try todo is yarn add browserslist in the client folder or delete the node_modules folder and running yarn in the client folder.

Closing issue due to inactivity. If there's anything else needed, please re-open this issue or open a new one.

i got it workng but can only acess it in my vps


Add Ignore annotation for class parameters

I would like to use my location classes to store additional descriptive data that can be referenced from the routing lambda function.  This additional data should not be part of the model.  To accomplish this, I've created an Ignore annotation which allows the class to have a property that is not included in the model.
Sample location:
@Group(ENDPOINT_GROUP)
@io.ktor.locations.KtorExperimentalLocationsAPI
@Location("/v1/sample")
class GetSample(@Description("UUID of sample to return") val uuid: String) {
    companion object: RouteMetadata {
        override val somethingThatAllRoutesCanDo = "Something"
    }
    @Ignore
    val companion = Companion
}

Sample route:
@io.ktor.locations.KtorExperimentalLocationsAPI
internal fun Routing.getSample() {
    get<GetSample>(metadata) { location ->
        location.companion.somethingThatAllRoutesCanDo
        // respond
    }
}

Resulting model for GetSample includes uuid but does not attempt to include companion.

Would you be willing to try out using JitPack to build this release for you?
I don't really have the cycles to get a release out to people right now unfortunately.
If it doesn't work, I'll see what I can do later this week.

I'd be happy to try it out, but it'll probably be in a few days.  I am going to need to make one more PR before I can fully utilize this in my project - adding support for responding with lists of Models (https://github.com/nielsfalk/ktor-swagger/issues/24)- so I'm also fine with waiting until I've had time to make that PR before creating a release.

Cool!


Finish refining all primitive types brought in by Transaction data.

Following from https://github.com/ZcashFoundation/zebra/pull/105#issue-342371155:

Many of the types in the structures that make up a Transaction need to be refined to assign them semantic meaning.  The complete list can be found by running rg 'XXX refine' -A 2 in zebra/zebra-chain/src.  Fleshing out many of these types will require further work – for instance, the Zcash-flavored Ed25519 pubkey in the JoinSplit data requires #109.

This issue should be closed when there are no more refinements left to do.  Once #105 is merged, I will replace this description with a checklist of types to refine.

[ ] an Amount type (#126)

zebra-chain/src/transaction.rs
81:        // XXX refine this to an Amount type.
82-        value_balance: i64,
zebra-chain/src/transaction/joinsplit.rs
54:    /// XXX refine to an Amount
55-    vpub_old: u64,
--
59:    /// XXX refine to an Amount
60-    vpub_new: u64,
zebra-chain/src/transaction/transparent.rs
51:    // XXX refine to Amount ?
52-    pub value: u64,
53-

[ ] a (Sprout?) (Sapling?) nullifier type

zebra-chain/src/transaction/joinsplit.rs
16:    /// XXX refine type
17-    pub nullifier: [u8; 32],
zebra-chain/src/transaction/shielded_data.rs
17:    /// XXX refine to a specific type.
18-    pub nullifier: [u8; 32],

One of these is a nullifier for Sprout, while the other is for Sapling – should these be the same type or different types?

[ ] a MAC type

zebra-chain/src/transaction/joinsplit.rs
20:    /// XXX refine type
21-    pub vmac: [u8; 32],

[ ] note commitment type (sprout) (#36)

zebra-chain/src/transaction/joinsplit.rs
37:    /// XXX refine type
38-    pub commitment: [u8; 32],

[x] types related to note encryption (sprout):

zebra-chain/src/transaction/joinsplit.rs
41:    /// XXX refine type
42-    /// XXX this should be a [u8; 601] but we need trait impls.
43-    pub enc_ciphertext: Vec<u8>,

[ ] a sprout commitment tree root (#36)

zebra-chain/src/transaction/joinsplit.rs
65:    /// XXX refine type
66-    anchor: [u8; 32],

[ ] an X25519 key:

zebra-chain/src/transaction/joinsplit.rs
69:    /// XXX refine to an x25519-dalek type?
70-    ephemeral_key: [u8; 32],

[x] an Ed25519 key (#109)

zebra-chain/src/transaction/joinsplit.rs
88:    // XXX refine to a Zcash-flavored Ed25519 pubkey.
89-    pub pub_key: [u8; 32],
90-    /// The JoinSplit signature.
91:    // XXX refine to a Zcash-flavored Ed25519 signature.
92-    // for now it's [u64; 8] rather than [u8; 64] to get trait impls
93-    pub sig: [u64; 8],

[ ] a sapling value commitment type:

zebra-chain/src/transaction/shielded_data.rs
11:    /// XXX refine to a specific type.
12-    pub cv: [u8; 32],

[x] RedJubjub types (#125)

--
21:    /// XXX refine to a specific type.
22-    pub rk: [u8; 32],
23-    /// The ZK spend proof.
--
30:    /// XXX refine to a specific type: redjubjub signature?
31-    /// XXX for now it's [u64; 8] instead of [u8; 64] to get trait impls
32-    pub spend_auth_sig: [u64; 8],
--
77:    // XXX refine this type to a RedJubjub signature.
78-    // for now it's [u64; 8] rather than [u8; 64] to get trait impls
79-    pub binding_sig: [u64; 8],

[ ] Jubjub key agreement types:

zebra-chain/src/transaction/shielded_data.rs
50:    /// XXX refine to a specific type.
51-    pub ephemeral_key: [u8; 32],

[ ] note commitment type (sapling) (#36)

zebra-chain/src/transaction/shielded_data.rs
46:    /// XXX refine to a specific type.
47-    pub cmu: [u8; 32],

[x] note encryption (sapling):

zebra-chain/src/transaction/shielded_data.rs
54:    /// XXX refine to a specific type.
55-    /// XXX this is a Vec<u8> rather than a [u8; 580] to get trait impls
56-    pub enc_ciphertext: Vec<u8>,
--
59:    /// XXX refine to a specific type.
60-    /// XXX this is a [u64; 10] rather than a [u8; 80] to get trait impls
61-    pub out_ciphertext: [u64; 10],
--

Requires #125.

Requires #126.

Updated the issue description to include a full list of types.

Ticked the Ed25519 box; I think that the key agreement types should probably be part of the note encryption implementation.

As  part of our Sprout key/address work, we're bringing in x25519_dalek and using *Secret and PublicKey types; the joinsplit ephemeral key type here should probably  a x25519_dalek::PublicKey

Also taking over the rest of this issue @dconnolly


improve performance of Signal.RenderLowDensity

Hi Scott,
This is PR to solve the issue of #3229
Issue
at the Signal.LowRenderDensity,
Very slow on SignalSourceDouble and SignalSourceGenericArray with large size data.
Because that all of SignalSource are uses GetYs() from RenderLowDensity, and it copy all the data,
and that two sources convert all data by NumericConversion.GenericToDoubleArray, it reduced performance.
Solution
I refer to the TODO of ISignalSource that you written,
I added IEnumerable GetYs function, have arguments of index range.
(I used IEnumerable instead of IReadOnlyList,
You just decide what you think is better.)
And, SignalSource used it in the following way:
public IEnumerable<double> GetYs(int i1, int i2)
{
    for (int i = i1; i <= i2; i++)
    {
        yield return NumericConversion.GenericToDouble(ref Ys[i]);
    }
}

Signal.RenderLowDensity changed it to have Pixel:
IEnumerable<double> Ys = Data.GetYs(i1, i2);
int i = i1;
foreach (double yValue in Ys)
{
    float x = Axes.GetPixelX(Data.GetX(i));
    float y = Axes.GetPixelY(yValue + Data.YOffset);
    Pixel px = new(x, y);
    points.Add(px);
    i++;
}

I checked that the performance imporved from LowDensity with like this:
| RenderLowDensity avg FPS| |
-- | -- | --
Source  | Before | After
SignalSource | 242 | 243
SignalSourceDouble | 3 | 248
SignalSourceGenericArray | 3 | 246
(50M 0-500 random data, display only 50 data)
Thanks!

Thank you for this fantastic improvement @minjjKang!
Your IEnumerable solution was elegant, but I extended the ISignalSource to add a GetY() which allows me to iterate across a range using a for loop which I think is a little more predictable. I didn't benchmark this solution though, so it may be a good idea to run your existing benchmark test one more time to ensure the performance is still high as expected.
Let me know if you have any hesitations about my solution! We can revert to using the range if it's better, and track progress in a new PR 👍


Fix accumulation of synthetic locks

Closes: #XXX
Description

For contributor use:

[ ] Targeted PR against correct branch (see CONTRIBUTING.md)
[ ] Updated relevant documentation (docs/) or specification (x/<module>/spec/)
[ ] Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
[ ] Re-reviewed Files changed in the Github PR explorer

Thanks for the fix!


set relativenumber

https://github.com/amix/vimrc/pull/577#issuecomment-656978016

Not having line numbers is more a feature than a bug 😊


Suggestion

Hi,
This software looks great. Just wanted to give one suggestion:
In the picture below, result on right shows output of '4 steps'. As, in this case, output has used red color a lot, is it possible to tell it that when it fills the image with red color, it should use some gradients of red color too, instead of using the same red color everywhere. It will help the software in enrichening the image better without deciding/thinking about adding a new color(fifth color) and finding the places where to use it.

regards,

Hey, thank you for the suggestion!
I'm planning a nice color editor/mixer as an addition on the output, based on https://github.com/btk/svg-color-editor

Thanks

Hi,
I want to work on this project further. Can you suggest me some research papers references, or anything related to the algorithms, around this topic?
Any help would be appreciated.
Thanks,


with bcp14 option, it crashes instead of giving useful output

When running rfclint -n --bcp14 --no-spell --no-xml --no-abnf --no-dup-detection (as a script called checkbcp14), it crashes when <bcp14> tags are missing, rather than giving output to point out the missing element.
Looks like a similar crash, whether the input contains a "MUST", "MUST NOT", "MAY" (or other keyword from BCP 14) that is missing the <bcp14>. Previously, it gave output such as:

file.xml:886: bcp14 text 'MAY' found without bcp14 tag around it

Sample input: https://www.rfc-editor.org/v3test/test9229.xml
(missing tags around "MUST" on line 289)
% rfclint -n --bcp14 --no-spell --no-xml --no-abnf --no-dup-detection test9229.xml
Traceback (most recent call last):
  File "/usr/bin/rfclint", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3.6/site-packages/rfclint/run.py", line 355, in main
    lang2119.processTree(xmlrfc.tree.getroot())
  File "/usr/lib/python3.6/site-packages/rfclint/must.py", line 71, in processTree
    self.processTree(node)
  File "/usr/lib/python3.6/site-packages/rfclint/must.py", line 71, in processTree
    self.processTree(node)
  File "/usr/lib/python3.6/site-packages/rfclint/must.py", line 71, in processTree
    self.processTree(node)
  [Previous line repeated 2 more times]
  File "/usr/lib/python3.6/site-packages/rfclint/must.py", line 69, in processTree
    self.checkTree(tree)
  File "/usr/lib/python3.6/site-packages/rfclint/must.py", line 117, in checkTree
    self.checkTree(node)
  File "/usr/lib/python3.6/site-packages/rfclint/must.py", line 111, in checkTree
    xx = self.bcp14_re.finditer(tree.text)
TypeError: expected string or bytes-like object

Sample input: https://www.rfc-editor.org/v3test/test9143.xml
(missing tags around "MUST NOT" on line 1720)
yields same Traceback.

Another input file with the same issue (Traceback exactly as above):
https://www.rfc-editor.org/v3test/test9200.xml

Another sample input (Traceback exactly as above):
https://www.rfc-editor.org/v3test/test9484.xml
(Useful output would be about the missing tags around "MUST NOT" on line 1553.)


Setup infrastructure for dockerizing standardization script

@manasaV3 this was pointed as a 3, could you help confirm?


Allow list types for xlim,ylim tuples

Addresses https://github.com/pyviz/datashader/issues/766 . @philippjfr , not sure if you'd want to allow only list types, or any sequence as here.  An alternative to this PR would be to change param.Tuple to coerce inputs to tuples in general, but that does cut down on some genuine error conditions, so I made this more conservative PR instead.

I'm +1 on this fix.


Simplify meteo model configuration in tiled layers

Now the configuration is different for wind or mesh layers leading to specific cases to manage like this or this.
Since having a different model for U and V wind component does not make sense we should only have a root meteo model for tiled wind layers similarly to mesh layers.

Fixed with https://github.com/kalisio/kdk/commit/355b026a3f87e3ef11424d9874df6b27c3ab578f


add zh_CN translation

Hi, i'm studying django-shop, and add the zh_CN translation.

Thanks a lot!


File included to test is not compiled if similar name included before

When newhello.h is before hello.h than hello.c is not compiled and I get link error.
When hello.h is before newhello.h all works.
#include "unity.h"

#if 1
/* Error - hello.с is not compiled */
#include "newhello.h"
#include "hello.h"

#else
/* Ok - both files are compiled */
#include "hello.h"
#include "newhello.h"

#endif

void setUp(void)
{
}

void tearDown(void)
{
}

void test_app(void)
{
    new_hello_fn();
    hello_fn();
}

My project archive:
ceedling_prj.zip
I've run next command for Ok and Error and attached Logs
$ ceedling verbosity[4] clobber test:all
error_log.txt
ok_log.txt

/mnt/d/Work/LL/ceedling_prj$ ceedling version
/var/lib/gems/2.5.0/gems/ceedling-0.30.0/lib/ceedling/system_wrapper.rb:25: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
   Ceedling:: 0.30.0
      Unity:: 2.5.1
      CMock:: 2.5.2
 CException:: 1.3.2

/mnt/d/Work/LL/ceedling_prj$ ruby -v
.ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]

Issue fixed and is not reproducible in current Ceedling
$ ceedling version
Ceedling:: 0.31.0
CMock:: 2.5.3
Unity:: 2.5.2
CException:: 1.3.3


Adding Russian translation

I think everything will be fine now. :innocent:

Thank you :)
For future reference, if contributing to a repo, it is best to setup a feature branch for each contribution. That lets you work on more than one at a time, and if any of them are not accepted that does not affect the others.


Support reading injection scripts from files

Allow processors to read scripts specified in the 'file' field rather than specifying script content only through the 'content' field.

Suspended for now. If needed, you can use 'require' to import external JS, or use 'fs' to read external files and then eval them.


val broken on OpenJDK 1.8.0_40b04-2

Migrated from Google Code (issue 740)

No updates or bug reports received.


Failed assertion for "Set Render Pipeline State Validation"

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce

Download Xcode 15 beta 5 and iOS 17 simulator
Run sudo xcode-select --switch /path/to/beta/5/Xcode.app
flutter create a new app, cd into new app directory
Run flutter build ios
Open /path/to/app/ios/Runner.xcodeproj in Xcode
Run app through Xcode on a iOS 17 simulator
Check Xcode for crash

For some reason, this doesn't happen every time for me, though. I'm not sure how to reliably make it happen
Actual results
The app will crash with the following error:
MTLDebugRenderCommandEncoder setRenderPipelineState:]:1615: failed assertion `Set Render Pipeline State Validation
For color attachment 0, the render pipeline's pixelFormat (MTLPixelFormatInvalid) does not match the framebuffer's pixelFormat (MTLPixelFormatBGRA8Unorm).

Logs

Logs

<!-- Paste your logs here -->

Flutter Doctor output

Doctor output

[!] Flutter (Channel master, 3.13.0-11.0.pre.28, on macOS 13.4.1 22F770820d darwin-arm64, locale en)
    • Flutter version 3.13.0-11.0.pre.28 on channel master at xxx
    • Framework revision 058f1660e7 (10 minutes ago), 2023-07-28 18:28:11 +0300
    • Engine revision e97014c710
    • Dart version 3.2.0 (build 3.2.0-11.0.dev)
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at xxx
    • Platform android-33, build-tools 33.0.0
    • ANDROID_SDK_ROOT = xxx
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Beta/beta_5/Xcode.app/Contents/Developer
    • Build 15A5209g
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] VS Code (version 1.80.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.68.0

[✓] Connected device (3 available)
    xxx

[✓] Network resources
    • All expected network resources are available.

@stuartmorgan Do you think this issue would belong to team-ios or team-engine? And if team-engine, we may want to escalate since Xcode release is coming up. This doesn't happen for me consistently but it does happen pretty often in the past couple days I've been on beta 5

Oh jk, looks like this is dupe of https://github.com/flutter/flutter/issues/130997 which was fixed a few days ago. My branch is probably just out of date. Nvm.


Text fields of text encoders are messed up in exported workflow images

The text input fields for CLIP_G and CLIP_L of CLIPTextEncode and CLIPTextEncodeSDXL usually get messed up in various ways when exporting workflow images. They can appear below the node box or overlayed on top of node inputs. This happens for both png and svg exports, although in slightly different ways. They also appear to remember their previous in-widget values after being changed to an external string primitive.
Below are some simple examples. In image 1 the three text fields contain aaaa, bbbb and cccc. Then I switch to external inputs and put dddd, eeee and ffff in the text inputs.

I'm also dealing with problems where the textboxes and textareas end up in the wrong spots when I drag or zoom the viewport. Usually, shifting the viewport around helps fix it, but honestly, it's still pretty annoying.
I never associated this error to the Custom Scripts plugin, I assumed it was an error from Comfy itself.

Yes, it's quite possible that the root cause is in vanilla ComfyUI, which seems to place scaled and translated HTML textarea nodes on top of the drawn canvas in a hacky way. That is definitely not the fault of Custom Scripts. This issue just concerns the export workflow image functionality of Custom Scripts (which may need some additional hacky overrides of its own).

@artyfacialintelagent I've (hopefully) fixed the positioning of textareas in PNG exports, and stopped rendering hidden ones.
I wasnt able to reproduce any positioning issues with SVG (only the rendering hidden textareas)
@andreszs This script shouldnt impact normal use of the text areas, it only should only do something for a single frame after you do an export, if you can provide any more info on that let me know an I can look into it.

@pythongosssss Exports looking great now, thanks for the quick fix!


Add test coverage for apis scaffolding components

After spending several hours trying to figure out how to exclude specific go files in a way that it not too granular nor excludes (erroneously) files that should not be excluded, I decided to take another look at the specific issue brought up by @negz in #399. Specifically, this issue deals with the code coverage of files that we deem should not have any coverage. However, to avoid the failing sonar PR checks, we decided to drop the overall coverage requirements %-age on all new code to 55%.
I took another look a that PR #399, more specifically at the offending file: workload.go

After the slack conversation w/ @negz we "reached" the tentative agreement that files under pkg/apis that don't have "ant real functional code", should not be included in the coverage, thus should not drive the overall PR coverage %-age down. However, after taking another look, I don't think I agree with that approach. I remember tripping specifically over this issue in my other PR's, but first the details:
Workload.go is a tiny file at the operator group level with the main purpose to register schema types for a given operator group:
package workload

import (
	"k8s.io/apimachinery/pkg/runtime"

	"github.com/crossplaneio/crossplane/pkg/apis/workload/v1alpha1"
)

func init() {
	// Register the types with the Scheme so the resources can map objects to GroupVersionKinds and back
	AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme)
}

// AddToSchemes may be used to add all resources defined in the project to a Scheme
var AddToSchemes runtime.SchemeBuilder

// AddToScheme adds all Resources to the Scheme
func AddToScheme(s *runtime.Scheme) error {
	return AddToSchemes.AddToScheme(s)
}

Since the workload group does not contain any subgroups, all types are located in workload/v1alpha1, hence the very one-liner init() and one-liner AddToScheme(...) function.
One can claim that neither of those functions has "real functionality" that should be covered by a unit-test.  And while at first glance it makes sense, let's take a look at what would happen if we didn't have init() function, or if init() function did not register v1alpha1 types. The project would build successfully. The project tests even would pass successfully. However, at runtime when we would try to reconcile the Workload type we most likely get an error: "no kind is registered for the type ..."!
While workload.go is a simple case, we do have "more involved" type groups/sub-groups:
//...
func init() {
	// Register the types with the Scheme so the components can map objects to GroupVersionKinds and back
	AddToSchemes = append(AddToSchemes,
		cache.SchemeBuilder.AddToScheme,
		compute.SchemeBuilder.AddToScheme,
		database.SchemeBuilder.AddToScheme,
		awsv1alpha1.SchemeBuilder.AddToScheme,
		storage.SchemeBuilder.AddToScheme,
	)
}

// AddToSchemes may be used to add all resources defined in the project to a Scheme
var AddToSchemes runtime.SchemeBuilder

// AddToScheme adds all Resources to the Scheme
func AddToScheme(s *runtime.Scheme) error {
	return AddToSchemes.AddToScheme(s)
}

While I agree that wokload.go and similar are mostly "scaffolding" code, nevertheless, it has simple, yet important functionality, which should be tested. The test for this type of functions is equally simple and uninvolved:

call AddToScheme
assert that all schema GroupVersions are registered

aws_test.go
//...
func TestAddToScheme(t *testing.T) {
	s := runtime.NewScheme()
	if err := AddToScheme(s); err != nil {
		t.Errorf("AddToScheme() error = %v", err)
	}
	gvs := []schema.GroupVersion{
		v1alpha1.SchemeGroupVersion,
		cache.SchemeGroupVersion,
		compute.SchemeGroupVersion,
		database.SchemeGroupVersion,
		storage.SchemeGroupVersion,
	}
	for _, gv := range gvs {
		if !s.IsVersionRegistered(gv) {
			t.Errorf("AddToScheme() %v should be registered", gv)
		}
	}
}

Change
Add tests for all apis/* scaffolding files.

Resolves #
Checklist:

[ ] Documentation has been updated, if necessary.
[ ] Pending release notes updated with breaking and/or notable changes, if necessary.
[ ] Upgrade from previous release is tested and upgrade user guide is updated, if necessary.
[ ] Code generation (make generate) has been run to update object specifications, if necessary.
[ ] CRD manifests generation (make manifests) has been run to update CRD manifests yaml file specifications, if necessary.
[ ] Update dependencies (make vendor) has been run to update Gopkg.lock file, if necessary
[ ] RBAC permissions in clusterrole.yaml have been updated to include new types, if necessary
[ ] All related commits have been squashed to improve readability.
[ ] Comments have been added or updated based on the standards set in CONTRIBUTING.md

Quick note on this PR code coverage (or lack thereof):

This PR contains only **/*_test.go files which are excluded from the inspection by our global rule.

I think we have a philosophical rather than a technical misalignment.
In my opinion there are diminishing returns chasing this level of test coverage. Most of our AddToScheme functions are thin, mostly autogenerated, wrappers around controller-runtime logic. To my mind these tests are effectively asserting controller-runtime, not Crossplane, code does the correct thing when called.
I agree that there is some value in testing that we did call the controller-runtime code with the correct arguments and that the kinds we wanted to register did get registered. That said, I personally would not be too concerned about testing this code for the same reason I would not strive for 100% code coverage.
More broadly, I think we are completely aligned on the goal of increasing Crossplane's unit test coverage. I changed the Sonar PR coverage target from "80% coverage of the diff" to "55% coverage of the diff and 55% coverage of the project overall" because I noticed we were merging PRs with less than 80% coverage. My concern with selectively requiring coverage is:

There's no one coverage target that is correct for every PR, so there will always be exceptions to the rule. This leads to cases like this PR where, in my opinion, we're mostly adding tests to satisfy the coverage rule rather than because there's significant business value in the tests.
Github marks PRs with a green tick when they pass all tests, and a red cross if one or more tests fail. It's possible for a PR to fail a test but still be mergeable. When I browse the list of open PRs I would prefer to be able to assume that a red cross means there is more work to be done on a PR before it needs review. Instead a red cross currently means a PR may or may not be ready for review.

I like the way gometalinter and golangci-lint address this for linter warnings. Normally a linter warning would cause PR tests to fail, resulting in a red cross against the PR. The PR author can "correct" this by adding a //nolint comment, indicating in code that they acknowledge that there was a linter warning but that they have chosen to disregard it for now. This shows a green tick on the PR, communicating to reviewers that the PR is ready for review. I'd be happy to require 80% coverage on all PR diffs if there were some way for the PR author to to explicitly override the requirement when it does not make sense.

Codecov Report

Merging #417 into master will increase coverage by 0.35%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #417      +/-   ##
==========================================
+ Coverage   60.26%   60.62%   +0.35%
==========================================
  Files         102      110       +8
  Lines        5497     5547      +50
==========================================
+ Hits         3313     3363      +50
  Misses       2050     2050
  Partials      134      134

We discussed this in today's community meeting. The key takeaways were:

It's actually more often Codecov than Sonar that results in misleading "little red crosses".
We'll disable the Codecov check so there's one "source of truth" for our coverage requirements.
We'll make the Sonar check mandatory with an 80% coverage target and monitor to see whether this works for us.
We should merge this PR since the work has been done and more tests are not a bad thing.

In my opinion there are diminishing returns chasing this level of test coverage.

I'd like to attempt to clarify my "philosophy" here, for posterity. :) When I write unit tests I aim to, roughly in order of how important I think they are:

Get a feel for the API of the code I'm testing. If it's super awkward to test, it could probably be better designed.
Ensure my logic does what I expect it to. Typically this means "given this input under controlled conditions (i.e. mocked dependencies) I expect this output".
Avoid "testing through" to the dependencies of the unit under test, especially if these dependencies are provided by third party libraries.

When choosing what to test my criteria is usually "how complicated is this thing", though I will admit I often get sucked into testing really really simple code.
In this scenario these AddToScheme functions are boilerplate used to register our CRDs with our controller-manager's "scheme" registry of known Kubernetes resource kinds. They're pretty much a big chain of AddToScheme calls all the way from our main() through to each individual API types.

Each leaf API package - i.e. the packages that actually define CRDs - declares a scheme.SchemeBuilder and should register its supported CRDs as part of its init() function.
Each parent API package declares an AddToScheme() function that calls all of its children's SchemeBuilder.AddToScheme() functions, all the way up the API hierarchy to main()

So this feels more to me like we're not testing "does Crossplane's logic work as expected?", but rather three things:

Does controller-runtime's logic work as we expect it to?
Did we remember to register our resource structs?
Are our resource structs valid, according to controller-runtime? (i.e. will AddToScheme return an error.)

I don't think we should test the first thing.
I don't think unit tests do a very good job of the second thing. Partly because I could just as easily forget to test that I registered a thing as I could forget to register the thing in the first place, and partly because we still appear to have 100% unit test coverage when I register more types if I don't update the tests. For example I believe the following test would pass with 100% coverage:
func init() {
	AddToSchemes = append(AddToSchemes,
          cache.SchemeBuilder.AddToScheme,
          compute.SchemeGroupVersion,
        )
}

var AddToSchemes runtime.SchemeBuilder

func AddToScheme(s *runtime.Scheme) error { return AddToSchemes.AddToScheme(s) }

func TestAddToScheme(t *testing.T) {
	s := runtime.NewScheme()
	if err := AddToScheme(s); err != nil {
		t.Errorf("AddToScheme() error = %v", err)
	}
	gvs := []schema.GroupVersion{
		cache.SchemeGroupVersion,
	}
	for _, gv := range gvs {
		if !s.IsVersionRegistered(gv) {
			t.Errorf("AddToScheme() %v should be registered", gv)
		}
	}
}

The third thing I do think is worth testing, but I'd probably personally let the second and third things be covered by integration tests rather than aiming to write unit tests for them.
Obviously we don't actually have any integration tests right now, so these unit tests are better than nothing!


WV-480 [TEAM REVIEW]

Add space between “Show Statistics” and drop down menu.

Thank you @ilonagog! 👍


Add files via upload

Official Website: https://www.hs-esslingen.de
Websites with multiple Courses including Programming and computer science:
https://www.hs-esslingen.de/wirtschaftsinformatik-bachelor/
https://www.hs-esslingen.de/technische-informatik-bachelor/
https://www.hs-esslingen.de/automatisierungstechnik-produktionsinformatik-bachelor/
Official Mailserverdomain: https://webmail.hs-esslingen.de

@JohannesNiebel I have to close this request without merging, because you requested to add a non-existent domain to this repository: Host hs-essslingen.de not found: 3(NXDOMAIN) Please ensure that you are familiar with this repository rules located at the bottom of this page and submit a new request with the correct information. Thank you for your understanding!


Strange behaviour

Hello.
Please explain, why no suggests for:

Object in class as variable

Why function with @inheritdoc return void:

Return View object, but i'm not see suggests for properties of View class

But if i will add doc, then

In fact, I saw yii code, and it should work.


support database qualifiers

we don't support database qualifiers in table names right now

Just as a hint, this might prove a little bit troublesome due to the day we do the resolution of columns (aka have a Source in column)

This was already implemented.


Another patch for stable diffusion when using neuronx-cc >= 2.7

The unet attn score patch will not work for neuronx-cc compiler version higher than 2.7, thus this patch.

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


(virtualbox) GH-423

https://github.com/chocolatey/chocolatey-coreteampackages/issues/423

I'm still getting errors when trying to run the beforemodify script.
Something regarding that it cannot bind argument to parameter 'Path' because it is null.
Not sure where it fails yet.
I think it is because it can't locate my virtualbox installation (don't have it at a default location),
and Test-Path can't handle nulls?

ARGH... another typo, had to add ( ... sorry about this, was doing that part in a hurry.
Tested it up now, definitelly should work.

the before modify scripts runs successfully (well without error at least).
the script as is will probably only work for users that have virtualbox installed in the default location.
would it perhaps be possible to fall back on one of the following keys:
[HKEY_CLASSES_ROOT\progId_VirtualBox.Shell.hdd\DefaultIcon]
@="\"D:\\ChocoProgs\\VirtualBox\\VBoxRes.dll\",-306"
[HKEY_CLASSES_ROOT\progId_VirtualBox.Shell.ova\DefaultIcon]
@="\"D:\\ChocoProgs\\VirtualBox\\VBoxRes.dll\",-302"
[HKEY_CLASSES_ROOT\progId_VirtualBox.Shell.ova\shell\open\command]
@="\"D:\\ChocoProgs\\VirtualBox\\VirtualBox.exe\" \"%1\""
[HKEY_CLASSES_ROOT\progId_VirtualBox.Shell.vbox\DefaultIcon]
@="\"D:\\ChocoProgs\\VirtualBox\\VBoxRes.dll\",-201"
[HKEY_CLASSES_ROOT\progId_VirtualBox.Shell.vbox\shell\open\command]
@="\"D:\\ChocoProgs\\VirtualBox\\VirtualBox.exe\" \"%1\""
[HKEY_CLASSES_ROOT\TypeLib\{D7569351-1750-46F0-936E-BD127D5BC264}\1.3\HELPDIR]
@="D:\\ChocoProgs\\VirtualBox\\"
[HKEY_CLASSES_ROOT\WOW6432Node\TypeLib\{D7569351-1750-46F0-936E-BD127D5BC264}\1.3\HELPDIR]
@="D:\\ChocoProgs\\VirtualBox\\"

so it will work for users who changed directory (like me)

The script as is will probably only work for users that have virtualbox installed in the default location.

No, it should ll be found by application registration (virtualbox.exe is registred by the installer). I am generally hesistant to add anything here that is app specific and can't be added to Get-AppInstallLocation.
Abstracting above probably is doable only using full registry search whcih is similar to full file system search.  Both could be done with tools quickly tho.

The before modify scripts runs successfully (well without error at least).

It should do nothing if vbox is not found. It should show output only if machine is running.

I would add option /InstallExtensionPack but will not do that until choco can rebember the passed parameters.
So I will add now /NoExtensionPack to do the oposite.

sound good

Extension pack with this is great!

Thanks @majkinetor !!

One thing tho confuses me:
Successfully installed "Oracle VM VirtualBox Extension Pack".
Adding to PATH if needed
virtualbox installed to 'C:\Program Files\Oracle\VirtualBox'
virtualbox registered as vbox
Only an exit code of non-zero will fail the package by default. Set
 `--failonstderr` if you want error messages to also fail a script. See
 `choco -h` for details.
 The install of virtualbox was successful.
  Software installed as 'EXE', install location is likely default.

Message 'Only an exit code of non-zero will fail ....'

Last comment deleted?
Non-zero exit codes message - just means that something in the install wrote to stderr. Chocolatey won't fail because of that. Because there are crappy tools like reg.exe that always write to stderr instead of stdout.

@majkinetor I just tried to test this package, but got an error almost directly after the installation of virtualbox itself:
Relevant parts of the log:
2016-11-28 23:52:26,221 [DEBUG] - Finishing 'Start-ChocolateyProcessAsAdmin'
2016-11-28 23:52:26,226 [INFO ] - virtualbox has been installed.
2016-11-28 23:52:26,242 [INFO ] - VERBOSE: Trying local and machine (x32 & x64) Uninstall keys
2016-11-28 23:52:26,248 [DEBUG] - Running 'Get-UninstallRegistryKey' for 'virtualbox' with SoftwareName:'virtualbox'
2016-11-28 23:52:26,251 [INFO ] - VERBOSE: Retrieving all uninstall registry keys
2016-11-28 23:52:26,842 [DEBUG] - Registry uninstall keys on system: 638
2016-11-28 23:52:26,845 [DEBUG] - Error handling check: 'Get-ItemProperty' fails if a registry key is encoded incorrectly.
2016-11-28 23:52:27,245 [DEBUG] - Found 0 uninstall registry key(s) with SoftwareName:'virtualbox'
2016-11-28 23:52:27,249 [INFO ] - VERBOSE: Found 0 keys, aborting this method
2016-11-28 23:52:27,254 [DEBUG] - Running Get-ProcessorBits -compare '64'
2016-11-28 23:52:27,257 [INFO ] - VERBOSE: Trying Program Files with 2 levels depth: C:\Program Files C:\Program Files\*\* C:\Program Files (x86) C:\Program Files (x86)\*\*
2016-11-28 23:52:27,481 [INFO ] - VERBOSE: Trying native commands on PATH
2016-11-28 23:52:27,897 [INFO ] - VERBOSE: Trying Registry: \SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
2016-11-28 23:52:27,929 [INFO ] - VERBOSE: No location found
2016-11-28 23:52:28,125 [ERROR] - ERROR: Cannot bind argument to parameter 'Path' because it is null.

Fixed that worm, thx.
Judging from VERBOSE: No location found you installed to custom folder ?

yeah, that's correct.
whenever it's possible I install programs to a separate partition.

OK, I got the idea.
Get-AppInstallLocation can't find it in that case as MSI registry record doesn't contain the path. To get it, I would have to use MSI API function.
I will try to update the core.extension so that above mentioned function can handle this.

Have you tried it with running virtualbox and 1 of its machines prior to update ?

If you installed it to custom location I think it didn't install extension for you ...

Have you tried it with running virtualbox and 1 of its machines prior to update ?

yeah, I tried upgrading it with 1 vm running. and it closes it, or rather aborts it.

If you installed it to custom location I think it didn't install extension for you ...

Before testing it, I removed virtualbox and installed it to the default.
But now that you mention it, I checked under extensions on virtualbox and nothing is showing up!

yeah, I tried upgrading it with 1 vm running. and it closes it, or rather aborts it.

Mhm... it should list running machines. It looks like vboxmanage list runningvms doesn't work there too. I kill virtualbox only after I do this.

But now that you mention it, I checked under extensions on virtualbox and nothing is showing up!

The installation output should include virtualbox-extension section. This is my output:
## virtualbox~> Test-Package -Vagrant $null

Package info
  Path:         C:\work\_chocolatey\chocolatey-coreteampackages\automatic\virtualbox\virtualbox.5.1.10.nupkg
  Name:         virtualbox
  Version:      5.1.10

Testing package install
Installing the following packages:
virtualbox
By installing you accept licenses for the packages.

virtualbox v5.1.10 (forced)
virtualbox package files install completed. Performing other installation steps.
Downloading virtualbox 64 bit
  from 'http://download.virtualbox.org/virtualbox/5.1.10/VirtualBox-5.1.10-112026-Win.exe'
Download of VirtualBox-5.1.10-112026-Win.exe (117.32 MB) completed.
Hashes match.
Installing virtualbox...
virtualbox has been installed.

Installing extension pack
Downloading virtualbox-extensionpack 64 bit
  from 'http://download.virtualbox.org/virtualbox/5.1.10/Oracle_VM_VirtualBox_Extension_Pack-5.1.10.vbox-extpack'
WARNING: C:\Users\majkinetor\AppData\Local\Temp\chocolatey\virtualbox\5.1.10\Oracle_VM_VirtualBox_Extension_Pack-5.1.10.vbox-extpack is of content type text/plain
Download of Oracle_VM_VirtualBox_Extension_Pack-5.1.10.vbox-extpack (18.57 MB) completed.
Hashes match.
C:\Users\majkinetor\AppData\Local\Temp\chocolatey\virtualbox\5.1.10\Oracle_VM_VirtualBox_Extension_Pack-5.1.10.vbox-extpack
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully installed "Oracle VM VirtualBox Extension Pack".
Adding to PATH if needed
virtualbox installed to 'C:\Program Files\Oracle\VirtualBox'
virtualbox registered as vbox
 The install of virtualbox was successful.
  Software installed as 'EXE', install location is likely default.

Next run with cup virtualbox -source . --force and 1 running machine also has this one:
virtualbox v5.1.10 is the latest version available based on your source(s).
Virtualbox is running, killing it prior to update

however, extension fails when vbox is killed:
WARNING: C:\Users\majkinetor\AppData\Local\Temp\chocolatey\virtualbox\5.1.10\Oracle_VM_VirtualBox_Extension_Pack-5.1.10.vbox-extpack is of content type text/plain
Progress: 100% - Completed download of C:\Users\majkinetor\AppData\Local\Temp\chocolatey\virtualbox\5.1.10\Oracle_VM_VirtualBox_Extension_Pack-5.1.10.vbox-extpack (18.57 MB).
Download of Oracle_VM_VirtualBox_Extension_Pack-5.1.10.vbox-extpack (18.57 MB) completed.
Hashes match.
C:\Users\majkinetor\AppData\Local\Temp\chocolatey\virtualbox\5.1.10\Oracle_VM_VirtualBox_Extension_Pack-5.1.10.vbox-extpack
0%...
Progress state: E_FAIL

VBoxManage.exe: error: Failed to install "C:\Users\majkinetor\AppData\Local\Temp\chocolatey\virtualbox\5.1.10\Oracle_VM_VirtualBox_Extension_Pack-5.1.10.vbox-extpack"
VBoxManage.exe: error: The installer failed with exit code 1: VBoxExtPackHelperApp.exe: error: Failed to delete the extension pack directory: VERR_ACCESS_DENIED ('C:\Program Files\Oracle\VirtualBox\ExtensionPacks\Oracle_VM_VirtualBox_Extension_Pack-_-uninst')
VBoxManage.exe: error: rcExit=1
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ExtPackManagerWrap, interface IExtPackManager
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleExtPack(struct HandlerArg *)" at line 1158 of file VBoxManageMisc.cpp

so it doesn't list machines

The directory remains locked. Nothing locks it based on LockHunter and I must restart computer for installation to work again.

This doesn't help too:
## virtualbox~> VBoxManage extpack cleanup
VBoxManage.exe: error: The installer failed with exit code 1: VBoxExtPackHelperApp.exe: error: Failed to delete the temporary extension pack directory: VERR_ACCESS_DENIED ('C:\Program Files\Oracle\VirtualBox\ExtensionPacks\Oracle_VM_VirtualBox_Extension_Pack-_-uninst')
VBoxManage.exe: error: rcExit=1
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ExtPackManagerWrap, interface IExtPackManager, callee IUnknown
VBoxManage.exe: error: Context: "Cleanup()" at line 1208 of file VBoxManageMisc.cpp

regarding the vboxmanage list
it looks like it must be run as the current user, not in a elevated prompt.
Can't say I really noticed the error, but it could be it just escaped my attention

it looks like it must be run as the current user, not in a elevated prompt.

Good find !!!

Can't say I really noticed the error, but it could be it just escaped my attention

Its intentional that package passes without ext becuase its not big enough failure to cause entire vbox package to fail.

@ferventcoder @gep13
Is there any well known method for situations like this ? We need to execute non-elevated code from elevated session.

I posted the question on stackoverflow.

I created function Start-ProcessNonEleveated.ps1 that looks like working and its using Task Scheduler.
It returns HashTable having err and out object.
Start-ProcessNonElevated 'vboxmanage list runningvms' -UsePowerShell
Name                           Value
----                           -----
err
out                            "chocolatey-test-environment_default_1480354084003_60014" {31409fff-c195-4a83-ab12-96bba020e051}

PS> Start-ProcessNonElevated 'vboxmanage dummy' -UsePowerShell | % err
vboxmanage : Oracle VM VirtualBox Command Line Management Interface Version 5.1.10
At C:\Users\majkinetor\AppData\Local\Temp\tmp76D0.ps1:2 char:1
+ vboxmanage dummy >"$r.out.log" 2>"$r.err.log"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Oracle VM Virtu... Version 5.1.10:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

(C) 2005-2016 Oracle Corporation
All rights reserved.

Usage:

  VBoxManage [<general option>] <command>

I finished non elevated code for shutdown of machines. It looks like its working OK up to the point where some machines do not respond to acpipowerbutton - windows server has it disabled by default and on the internet everybody mentions GPO setting
I tried this on chocolatey test environment without success.
#For acpipowerbutton to work on Windows server see: http://ethertubes.com/unattended-acpi-shutdown-of-windows-server/
Write-Host 'Enable acpi shutdown'
sp HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system shutdownwithoutlogon 1
gpupdate /force

Using the gpedit.msc and rebooting doesn't make the differece either. The function doesn't work using the VirtualBox GUI (Machine->Close ->ACPI Shutdown or CTRL+H).
For this reason I added this hardcoded option to BeforeModify.
$shutdown_type = 'acpipowerbutton'  # 'acpipowerbutton', 'poweroff', 'savestate'

Poweroff works always but machine may enter recovery mode after it
savestate works always but requires a lot of memory

It turns out that this request is more problematic then originally anticipated @ferventcoder. Hower, I think that this code wont harm to stay. I test it with:
cpack; choco install virtualbox -source . --skip-scripts --force; cup virtualbox -source . --force

from within virtualbox package directory.

I think we should use savestate.
This is the output from my system with choco test env working:
By upgrading you accept licenses for the packages.
virtualbox v5.1.10 is the latest version available based on your source(s).
virtualbox is running, trying to gracefully shutdown any running machines
Number of machines running: 1
Machine "chocolatey-test-environment_default_1480354084003_60014" powered down prior to installation using 'savestate' method

virtualbox v5.1.10 (forced)
virtualbox package files upgrade completed. Performing other installation steps.
Downloading virtualbox 64 bit
  from 'http://download.virtualbox.org/virtualbox/5.1.10/VirtualBox-5.1.10-112026-Win.exe'
Progress: 100% - Completed download of C:\Users\majkinetor\AppData\Local\Temp\chocolatey\virtualbox\5.1.10\VirtualBox-5.1.10-112026-Win.exe (117.32 MB).
Download of VirtualBox-5.1.10-112026-Win.exe (117.32 MB) completed.
Hashes match.
Installing virtualbox...
virtualbox has been installed.

Installing extension pack
Downloading virtualbox-extensionpack 64 bit
  from 'http://download.virtualbox.org/virtualbox/5.1.10/Oracle_VM_VirtualBox_Extension_Pack-5.1.10.vbox-extpack'
WARNING: C:\Users\majkinetor\AppData\Local\Temp\chocolatey\virtualbox\5.1.10\Oracle_VM_VirtualBox_Extension_Pack-5.1.10.vbox-extpack is of content type text/plain
Progress: 100% - Completed download of C:\Users\majkinetor\AppData\Local\Temp\chocolatey\virtualbox\5.1.10\Oracle_VM_VirtualBox_Extension_Pack-5.1.10.vbox-extpack (18.57 MB).
Download of Oracle_VM_VirtualBox_Extension_Pack-5.1.10.vbox-extpack (18.57 MB) completed.
Hashes match.
C:\Users\majkinetor\AppData\Local\Temp\chocolatey\virtualbox\5.1.10\Oracle_VM_VirtualBox_Extension_Pack-5.1.10.vbox-extpack
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully installed "Oracle VM VirtualBox Extension Pack".
Adding to PATH if needed
virtualbox installed to 'C:\Program Files\Oracle\VirtualBox'
virtualbox registered as vbox
 The upgrade of virtualbox was successful.
  Software installed as 'EXE', install location is likely default.

I think now it behaves correctly in all scenarios. Take a final look.
@ferventcoder plase, take a look too.


port openssl fix from V4 to V2

V4 PR: https://github.com/Azure/azure-sdk-for-java/pull/14748/files

Closing this PR since the duplicate PR is already merged - https://github.com/Azure/azure-cosmosdb-java/pull/373

Closing this PR since the duplicate PR is already merged - https://github.com/Azure/azure-cosmosdb-java/pull/373


feat: implement api models (#4)

Codecov Report
Base: 100.00% // Head: 100.00% // No change to project coverage :thumbsup:

Coverage data is based on head (fd418a4) compared to base (f253c24).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##              main        #5   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            4         5    +1
  Lines           82       153   +71
=========================================
+ Hits            82       153   +71

Impacted Files
Coverage Δ

clinvar_api/api_models.py
100.00% <100.00%> (ø)

clinvar_api/api_msg.py
100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Update robostack.yaml

update micromamba to last version. -> Fix repoquery subcommand for Python 3.11/3.12

Description
Add your description here
Checklist

[ ] If you are addressing rendering issues, please provide:

[ ] Images of both, broken and fixed renderings.
[ ] Source code to reproduce the issue, e.g. a YAML or rosbag file with a MarkerArray msg.

[ ] If you are changing GUI, please include screenshots showing how things looked before and after.
[ ] Choose the proper target branch: latest release branch, for non-ABI-breaking changes, future release branch otherwise.
Due to the lack of active maintainers, we cannot provide support for older release branches anymore.
[ ] Did you change how RViz works? Added new functionality? Do not forget to update the tutorials and/or documentation on the ROS wiki
[ ] While waiting for someone to review your request, please consider reviewing another open pull request to support the maintainers of RViz. Refer to the RViz Wiki for reviewing guidelines.

I leave updates to the RobotStack workflow to the corresponding maintainers.


Can't generate images

import tensorwatch as tw
import torchvision.models
alexnet_model = torchvision.models.alexnet()
tw.draw_model(alexnet_model, [1, 3, 224, 224])
error:
ModuleNotFoundError                       Traceback (most recent call last)
~/anaconda2/envs/pytorch1.0/lib/python3.6/site-packages/IPython/core/formatters.py in call(self, obj)
343             method = get_real_method(obj, self.print_method)
344             if method is not None:
--> 345                 return method()
346             return None
347         else:
~/anaconda2/envs/pytorch1.0/lib/python3.6/site-packages/tensorwatch/model_graph/hiddenlayer/graph.py in repr_svg(self)
391     def repr_svg(self):
392         """Allows Jupyter notebook to render the graph automatically."""
--> 393         return self.build_dot(self.orientation).repr_svg()
394
395     def save(self, path, format="pdf"):
~/anaconda2/envs/pytorch1.0/lib/python3.6/site-packages/tensorwatch/model_graph/hiddenlayer/graph.py in build_dot(self, orientation)
333         Returns a GraphViz Digraph object.
334         """
--> 335         from graphviz import Digraph
336
337         # Build GraphViz Digraph
ModuleNotFoundError: No module named 'graphviz'
<tensorwatch.model_graph.hiddenlayer.graph.Graph at 0x7fe7ce046898>
Write it as follows, without error, but without image
import tensorwatch as tw
import torchvision.models
alexnet_model = torchvision.models.alexnet()
dd = tw.draw_model(alexnet_model, [1, 3, 224, 224])
print(dd)
<tensorwatch.model_graph.hiddenlayer.graph.Graph object at 0x7fe7cdfc5c88>

@chl916185
Try to install graphviz.
pip install graphviz
In addition, I encountered runtime error after executing pip install.
Please check this page to solve that problem.


View as day Backend

View the taskbook as a particular day

My understanding of how we would do this would be along these lines:
When viewing a day, tasks that would classify as missed would not be shown
Everything from that day would be shown in today column
Everything past that would show in tomorrow (or if we do the week thing, in that area sorted based on current day)

Think of a way of doing the upcoming tasks, we need to come up with a good way to increment the date for collecting the next tasks


Fix FS vet errors

Fixes #35

LGTM
That was all that it was complaining about?  I found the message quite confusing.


Scaling plumber instances to run long-running scripts on Kubernetes

Hi @MarkEdmondson1234 ,
I have scripts that run mathematical models that usually take a long time to run. At first I used seven physical machines to split the work, but since R is single thread it takes a while, some of these codes take hours to execute.
The solution I found was with Docker and Google Cloud Platform, and through its repository: https://github.com/MarkEdmondson1234/serverless-R-API-appengine, I was successful in creating my Dockers, but if I wanted to Scaling this horizontally I believe the best way is through Kubernetes, paralleling these containers and taking charge loads. I followed the walkthrough of this tutorial: https://code.markedmondson.me/r-on-kubernetes-serverless-shiny-r-apis-and-scheduled-scripts/, however at the time of setting the plumber in place of opencpu did not succeed.  Here is the example I tried to upload using an endpoint that shows me a simple Sys.Date ().
API Kubernetes.zip

I need a reproduceable example to help, I can't walk through code on my own.  Pretty much the only info I have is that plumber did not succeed. Help me help you :)

Mark I saw that you added a tutorial with plumber and kubernetes in you page. I will try to replicate this example and next that I come  to tell you if worked. Thanks!

@MarkEdmondson1234 everything worked!
I was able to access my endpoints.
Thank you very much for your attention!

Great, glad it got sorted :)


Sequence names containing spaces are truncated after the first space

Hi! I have been using the tool, and it has been very useful, but just wanted to bring this up, as it led to a surprising bug in the pipeline I am running.
Here is an example:
echo ">name with spaces\naaccggtt" > test.fasta
cat test.fasta

# >name with spaces
# aaccggtt

./rotate -x 0 test.fasta > test_output.fasta
cat test_output.fasta

# >name
# aaccggtt

Hello Mir
Thanks for your email.
From my perspective this is more a feature than a bug.  Traditionally the identifier or “name” in a FASTA file can not include spaces.  Rather, everything after the first whitespace is the “description”.  So

XH2831A protein phosphatase A mRNA from Magicus unicornis
atgactgaggactagcatcgcgcggactac….

Has “XH2831A” as the identifier and “protein phosphatase A mRNA from Magicus unicornis” as the description.
It looks like I only pass on the identifier, not the description.  If you change line
  seqIOwrite (siOut, sqioId(si), 0, len, t, 0) ;

to
seqIOwrite (siOut, sqioId(si), sqioDesc(si), len, t, 0) ;
that should fix your problem.  Maybe I should make that change also in the main code.
Richard
From: Mir Henglin @.>
Date: Thursday, 10 October 2024 at 14:42
To: richarddurbin/rotate @.>
Cc: Subscribed @.***>
Subject: [richarddurbin/rotate] Sequence names containing spaces are truncated after the first space (Issue #4)
Hi! I have been using the tool, and it has been very useful, but just wanted to bring this up, as it led to a surprising bug in the pipeline I am running.
Here is an example:
echo ">name with spaces\naaccggtt" > test.fasta
cat test.fasta
>name with spaces
aaccggtt
./rotate -x 0 test.fasta > test_output.fasta
cat test_output.fasta
>name
aaccggtt
—
Reply to this email directly, view it on GitHubhttps://github.com/richarddurbin/rotate/issues/4, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA2FXZVHON3XIAFUVOH55SDZ2Z755AVCNFSM6AAAAABPW2POM6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGU3TQOJQGY2TSMQ.
You are receiving this because you are subscribed to this thread.Message ID: @.***>


Thumbnails Not created due to outdated Pillow

Good Day,
First of all, I really like this package. Good job.
I had found that the sized avatars are not being created. Diving deeper into the issue, the error being ignored was:

OSError: cannot write mode RGBA as JPEG

From https://github.com/python-pillow/Pillow/issues/2609, I found the simple solution was to uninstall Pillow==5.4.1 and install Pillow==4.1.1.
Please may the package be updated to support new versions of Pillow.
Thank you.

I also found this. Unfortunately this only shows if one lifts the thumbnail creation out of this try-except block: https://github.com/grantmcconnaughey/django-avatar/blob/master/avatar/models.py#L163-L185.
The solution seems to be to put this into the settings.py:
AVATAR_THUMB_FORMAT = "PNG"

Is there an update for this? Would it be possible to update the Pillow dependency? Thanks in advance.

@lggwettmann it sounds like users are installing a later version of pillow (v5) which needs to use the png format. So there is only a problem if you want to use a modern pillow and NOT use png. What is your issue?

Solved in https://github.com/jazzband/django-avatar/commit/2fb30345058df5976c044f4e72fe4d671b399b38 which makes the modes configurable.


impl Clone for rusqlite::Connection?

So long as SQLite is not running in single-threaded mode (and the default is that it's not), it should be safe to offer a .clone() implementation that would re-open the same database file with same settings/configuration, in lieu of the missing Sync.

This seems difficult if the database was in-memory, and probably requires tracking which pragmas were executed.

If the in-memory mode is specified using URI filenames/also, it seems feasible.

Right, that's what I meant by 'a named in-memory database'. There's not really any guarantee that's true.

If Connection.path.is_some() and if we keep the open flags, we can clone.
But we can't use the standard trait because clone cannot fail.
Why not use r2d2 ?
Or this if you need open flags.

Circling back, this is doable if you add a phantom generic type indicating whether or not the connection has a path, since that's explicitly a function of which API call was used to create the connection. (You can then actually move path  to a specialized function of the pathed connection, and get rid of the Option entirely. ) Then Clone can be implemented just for the specialized type with an explicit path.
However, I'm not sure if it should be implemented since this can result in multiple DatabaseLocked errors if multiple threads (or processes) simultaneously try merging their changes from a journal back to the database.

Hey, looking back to it: It's still a nice idea.

@mqudsi thank you very much for the commit !
How long do you think it will take until this feature is stable ?

So, it hasn't been submitted as a PR, but I took a peek. Here's a preliminary review, assuming @mqudsi intends for a PR. Caveat: I'm somewhat against this, but not to the point where it's wontfix or anything.

So, first off, I think using Clone here is not the way we want to go. This should probably be pub fn reopen(&self) -> Result<Connection>. This will be correctly fallible, and while it won't allow people to #[derive(Clone)] or conn.clone(), it provides functionally the same thing. It also gives the right idea around what's happening — we're reopening the same connection.

I think we should outright forbid doing this for the Connection::from_handle connection. I'm worried that there's a decent amount of (unsafe) code that assumes this isn't possible, and while in principal we can audit it and change the safety requirement for from_handle to make this work... It seems quite tricky and error-prone (I don't really know everything that could cause problems, and without going over the SQLite docs closely at the same time as the unsafe code... It's hard for me to be sure).
As the most obvious (to me) example of what I mean, Connection is Send, so cloning a Connection::from_handle, and sending one to another thread would allow concurrent access to a Connection, which is UB, unless we configure SQLite in serialized mode (which we can't really rely on, and and even then, not all of SQLite's APIs are thread-safe in that mode).
That said, I expect in practice this isn't a problem — I doubt that anybody who does Connection::from_handle would even want this behavior, and if they do they can do Connection::from_handle twice (or use the API we have for getting the handle and do it that way), this would be unsafe, but that's reality.

There are two issues for the non-disc path connections:

In general, part of why apis like std::fs::File can't be cloned/reopened (and if they were, it would presumably be based on dup*/DuplicateHandle) is that the file you open might not be the same you initially opened. This does seem unlikely for a SQLite database, admittedly, but is a concern.

It's pretty likely to cause people to hit SQLITE_BUSY errors if they open multiple connections and write to more than one of them. This is a really hard to fix error, and plagues many applications that use SQLite in significant ways — the only real workaround I know is to only ever have one connection doing writes, and many doing reads, which I worry this encourages too much.

That said, naming the API reopen and documenting this it might be sufficient for the first of these not to be an issue, and the second I guess I could be convinced I'm being too opinionated, and shouldn't restrict valid uses because I think they're dubious and error-prone, unless the issues were well documented which they aren't, even in the official docs (and I'm no longer as familiar with why these things happen as I was when I worked on firefox's SQLite code...)

Finally, for in-memory DBs... I actually think this is nice. The concerns you mention are valid around SQLITE_LOCKED, although unlike SQLITE_BUSY (which IIRC shared-cache dbs don't get — they get SQLITE_LOCKED), it's largely fixed by unlock_notify. I'm not sure if unlock_notify should be on by default, but if we put this behind a feature, we could make that feature depend on unlock_notify.
Admittedly, it's a bit small to put behind a feature, so maybe that's dubious.

Wow, you guys are fast. I didn't intend to share that with anyone but was pushing the code to my fork for posterity. I'll address some of the feedback in all cases:

There was never an intention to open a PR with this implemented as Clone due to the obvious fallibility issues. There is one way, but it would be involve delaying either the actual opening of the connection or the reporting of errors encountered in opening the connection to the first fallible operation post-clone, but that's just messy and not worth it to enable composite types to be able to derive Clone automatically. The commit uses Clone just as an initial PoC (mainly because I didn't have a better name) but I like the reopen() suggestion name and syntax.
Once you accept that the operation may/must be fallible, then forbidding an unpathed connection opened via from_handle() to be reopened makes perfect sense. I agree that if you used the unsafe approach to get a db connection once, you're more than capable of doing it yourself again and don't need any help from the library.
Regarding :memory: - I played around with a redesigned Connection::path (which would ideally be renamed) trying to get the semantics right. Right now, Connection::path is an Option<PathBuf> but the semantics of that aren't right since it's actually a connection string and not a file path, but it does make the 99% of the time when the connection string and the path are one and the same simpler. Technically, it should probably be something like enum { Path(PathBuf), ConnectionString(String/OsString), Handle } and we can validate that a Path passed into the Connection constructor is actually a path and exists on disk then reject a reopen() if the connection wasn't opened with a real path, but I think the fact that the API already offers a function to create a new in-memory database (which would support reopening) makes it fair to just document the reopen() behavior as "btw, if you use :memory: it'll open a distinct db altogether - use the open_in_memory(...) api instead" and call it a day.

Now regarding SQLITE_BUSY and SQLITE_LOCKED - this is the real meat and potatoes. Enabling WAL makes a huge difference here (readers are no longer blocked by writers), and I would say there's definitely an argument to be made that without either WAL or read uncommitted, there's no point in a reopen() API, but I'm not sure how much leeway we have in terms of defaulting to WAL journaling? It's arguably an implementation detail of the db-access abstraction (rusqlite) and we could make it opt-out either by having users issue their desired journal mode as a pragma (opposite of what we do today to enable WAL) or by adding it as a flag when opening the database. After WAL, the obvious thing is to avoid any long-running write transactions that could lock out other readers/writers, but SQLite is pretty fast so if you have all the data you want to insert already/mostly prepared, the default 5s busy handler is more than enough (obviously some workloads differ) - but as you hinted, we don't have to settle there.
What I wanted to do is ideally gate the entire reopen() api behind unlock_notify and default to opening+reopening connections (in-memory or on-disk) with shared cache enabled (which only changes the locking semantics and reduces memory usage, but should not affect ACID in any way) unless SQLITE_OPEN_PRIVATE_CACHE was specified. Assuming process-exclusive access, that converts all SQLITE_BUSY situations to SQLITE_LOCKED because all connections behind a shared cache are treated as a single (multithreaded) connection, and then the SQLite unlock notification api would handle that better than the busy wait handler, and iirc, it does its own deadlock detection so we don't even need to worry about a timeout in the default case.

Wow, you guys are fast. I didn't intend to share that with anyone but was pushing the code to my fork for posterity

Ah, sorry. I would have ignored it except for someone asking about it. In the past there have been a lot of people using forks of rusqlite via git (largely because I've been slow merging stuff 😞... Still an issue) and I'd like to stay ahead of that where possible.

but I'm not sure how much leeway we have in terms of defaulting to WAL journaling? It's arguably an implementation detail of the db-access abstraction (rusqlite)

I don't really think this is true... rusqlite isn't a generic data storage abstraction, it's a SQLite abstraction. We explicitly are not an ORM.
That is, we try relatively hard to do nothing more than do what direct SQLite usage should do, beyond providing safety, idiomatic abstractions, etc.
Many users are coming from other langs, or connecting to DBs which are not exclusively managed by rusqlite.... And more broadly, I tend to think it's not rusqlite's place to choose different defaults than SQLite has chosen much [^most] of the time (and if we do, our choice should not cause problems for people, nor be too opinionated).
[^most]: There are, of course, a few exceptions, such as turning on multithreading support, and tweaks needed on certain platforms...
I have plans/goals here, but I've moved them to the end of this comment, since they're kind of off-topic. See the "Rambling about docs" section.

default to opening+reopening connections (in-memory or on-disk) with shared cache enabled

I don't think this is a good idea. SQLite's official documentation explicitly discourages the use of shared cache: https://sqlite.org/c3ref/enable_shared_cache.html (emphasis mine)

Shared cache is disabled by default. It is recommended that it stay that way. In other words, do not use this routine. This interface continues to be provided for historical compatibility, but its use is discouraged. Any use of shared cache is discouraged. If shared cache must be used, it is recommended that shared cache only be enabled for individual database connections using the sqlite3_open_v2() interface with the SQLITE_OPEN_SHAREDCACHE flag.

While we wouldn't be using that API, the emphasized text seems to be talking about the entire feature rather than that API in particular.
This actually means I'm a little concerned about doing it by default for in-memory connections too, but I think it's probably fine for us to make for them, so long as we document the behavior and the change.

Rambling About Docs
(This is basically off topic so I've moved it to the end — it also has an absurd density of long footnotes...)
Anyway, I'm aware that this isn't ideal for many users, who have no familiarity with SQLite, nor interest in reading its docs, which are very large and refer to the C interface (and not all Rust programmers can read C).
My ideal solution here is better docs, probably a mdbook containing a guide to using rusqlite that discusses "best practices", tradeoffs, etc. I've intended to do this for a while, as I see people asking a lot of the same questions on discord, gitter, etc; stuff like:

How should I set up my database? (Shortish answer[^setup])
How should I use rusqlite across multiple threads? (Short answer[^threads])
How do I insert several records at once for bulk inserts/updates? (Short answer[^batch])
How do I use rusqlite in async code. (Shortish answer[^async])
...

A lot of this stuff would also be nice to have example code for too. That said, my desire for more docs is not really related to this issue... but should help explain my philosophy for rusqlite — I'd prefer documenting the behavior rather than doing anything that would surprise people or cause issues for them that they wouldn't have if they had not used rusqlite.
[^setup]: There are a handful of PRAGMAs that people probably want to set — WAL mode is one of them (and if you do WAL mode, you should also set PRAGMA synchronous to NORMAL).
That said, these are not good for *all* applications, just many, and use of WAL mode has some minor caveats (checkpointing, multiple files, etc) which generally don't cause problems but are worth mentioning, and can cause issues in some cases.

So I don't think it's rusqlite's job to do it by default, and better handled by explaining the tradeoffs to the user, and letting them decide.

[^threads]: First: You should almost certainly turn on WAL mode. Then, the basic idea is that you want at most one writer connection (shared across all threads, if needed) and several reader connections. If you have multiple writer connections (even just two!), you'll probably get queries occasionally failing with SQLITE_BUSY 😞...
While this sounds a bit like RwLock, it has better concurrency — in WAL mode, readers do not block writers and a writer does not block readers. (That said, readers can block checkpointing, so the `-wal` file can get large if you have very long-lived read transactions, which caused some issues in https://gitlab.com/famedly/conduit that I helped them with on Discord, and seems worth noting in docs).

Anyway, there are a lot of ways to achieve this. A connection pool library can probably help (I'm not familiar with any of them though). Even just keeping a thread-local connection might be appropriate if you don't have a very large number of threads.

[^async]: Multiple options, none are great (at the end of the day, SQLite is a synchronous API, so there's not much we can do here without adding large overheads). Probably the best is spawn_blocking, or proxing messages back and forth to a worker thread (or pool), etc — the code to do this isn't too complex.
`sqlx` is also a fine library and if you require async support and don't need some of the advanced SQLite features that it doesn't support, but note that it has meaningfully worse perf compared to synchronous usage (this isn't a dig — it's a good library but it just has to do more because SQLite is fundamentally synchronous).

Given that `async` is a performance feature (which is unlike JS/Python/etc — for Rust, writing async code is substantially more complex than synchronous code, even if that synch. code has multiple threads), if SQLite is a core part of the application, it's worth questioning if use of `async` is right.

[^batch]: Actually there's no single short answer, specifics depend on the case.
Most applications will be fine with beginning a transaction, preparing a statement that inserts/updates one row, executing it in a loop, and committing the transaction. In some cases building a query on the fly, or using the `array` feature are also options (although our `array` feature has some performance issues 😞). In rare cases, inserting into an in-memory connection that gets attached can be appropriate too...

That said, the choice here doesn't matter as much as you might think in practice, but people get hung up on it a lot.

defaulting to WAL journaling

https://www.sqlite.org/wal.html
WAL does not work over a network filesystem
So, AFAIK, rusqlite cannot set it by default...

Yeah, there are other reasons too. WAL is not always better, just usually.

It might be worth asking on https://sqlite.org/forum/forum about shared cache mode? I agree it's a bit confusing that some docs say it's bad and others only talk about the benefits.
I wonder if its an idea that just didn't pan out well in practice...

Async rusqlite built on top of rusqlite.
https://github.com/programatik29/tokio-rusqlite

I wonder if its an idea that just didn't pan out well in practice...

Your gut was right on this one. I finally got around to asking on the SQLite forums for clarification on why the docs seem split over shared cache mode. I didn't receive any technical reasons for why we shouldn't use shared cache mode, but did get an official (loud and clear) answer that use of shared cache mode is discouraged. The SQLite docs have also been updated in response to my query.
This doesn't necessarily put the kibosh on implementing Clone but it does change the calculus and it means that we'll have to lean heavily into documenting the best practices for using SQLite from multiple threads rather than merely working around those limitations with shared cache mode and unlock-notify.

@thomcc can you clarify what do you mean here?

You should almost certainly turn on WAL mode. Then, the basic idea is that you want at most one writer connection (shared across all threads, if needed) and several reader connections. If you have multiple writer connections (even just two!), you'll probably get queries occasionally failing with SQLITE_BUSY disappointed...

I'm thinking on a good way to integrate rusqlite into a modern async webserver and here is my current understanding:

spawn_blocking is too verbose and ignoring an async runtime is probably not a big deal, I expect it to behave like a thread pool based webserver where one of the threads should block till it handles a request. There might be some overhead in treating an async runtime as a dumb thread pool but I didn't find any data on that so far.
WAL mode is must have since it allows for better concurrency.
Giving each thread a separate db connection should improve read performance.
Write performance doesn't improve with the number of threads and/or CPUs.

That led me to consider giving each thread a separate SQLite connection and allowing those connections to perform both reads and writes, letting SQLite to manage locking. I don't really expect to encounter SQLITE_BUSY, except for the edge cases listed in the doc:

If another database connection has the database mode open in exclusive locking mode then all queries against the database will return SQLITE_BUSY. Both Chrome and Firefox open their database files in exclusive locking mode, so attempts to read Chrome or Firefox databases while the applications are running will run into this problem, for example.

When the last connection to a particular database is closing, that connection will acquire an exclusive lock for a short time while it cleans up the WAL and shared-memory files. If a second database tries to open and query the database while the first connection is still in the middle of its cleanup process, the second connection might get an SQLITE_BUSY error.

If the last connection to a database crashed, then the first new connection to open the database will start a recovery process. An exclusive lock is held during recovery. So if a third database connection tries to jump in and query while the second connection is running recovery, the third connection will get an SQLITE_BUSY error.

Regarding the first warning, the default locking mode is NORMAL, so I don't think that concurrent writes should trigger SQLITE_BUSY.
Am I missing something?


ionTextReader is missing a number of its interface functions

Currently Reader get value functions for ION ints(+/-), Decimal, timestamp, symbol(token?), and String are either not implemented or nonfunctional.
These need to be implemented for testing to proceed.

Added the missing functionality.


refactor: Submodule.toLinearPMap use junk values

the file is not completely ported, but since I wrote the relevant parts not too long ago I am very confident that it is not used in the unported files. I am also fine with waiting until all downstream dependencies are ported.

The title of the PR is not very clear. refactor: use junk values in Submodule.toLinearPMap, maybe? Can you also expand the PR description?

bors merge


How do I implement a "bothmethod" decorator with correct type annotations and docstring?

Context
I am a user of holoviz/param. I would like it to VS Code to be able to provide useful tooltips for this library. One issue is described in https://github.com/holoviz/param/issues/646#issuecomment-1206720384.
Basically one of its classes ParameterizedFunction has a method instance that can be used both as a class and and instance method. Its defined using a custom @bothmethod decorator. For examples of using this function check out this link.
The ParameterizedFunction class and the instance method is used in various places across the HoloViz ecosystem and unfortunately VS Code cannot provide useful tooltips for this method. This makes it hard to use HoloViz and VS code together.
Below I've tried to provide a minimum, reproducible example of what I would like working.
I've tried to google search and experiment to find a solution without luck.
Code
from functools import wraps, partial

class bothmethod(object): # pylint: disable-msg=R0903
    """
    'optional @classmethod'

    A decorator that allows a method to receive either the class
    object (if called on the class) or the instance object
    (if called on the instance) as its first argument.

    Code (but not documentation) copied from:
    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/523033.
    """
    # pylint: disable-msg=R0903

    def __init__(self, func):
        self.func = func

    # i.e. this is also a non-data descriptor
    def __get__(self, obj, type_=None):
        if obj is None:
            return wraps(self.func)(partial(self.func, type_))
        else:
            return wraps(self.func)(partial(self.func, obj))

class MyClass():
    a=0

    @bothmethod
    def instance(self_or_cls)->'MyClass':
        """Instance docstring"""
        if isinstance(self_or_cls,type):
            cls = self_or_cls
            obj = cls()
            obj.a = 1
        else:
            cls = self_or_cls.__class__
            obj = cls()
            obj.a = 2

        return obj

obj = MyClass.instance()
assert obj.a==1
obj = obj.instance()
assert obj.a==2
print("done")

$ python script.py
done

Incomplete Intellisense
I would like the docstring and correct types to be understood by pyright/ pylance/ vs code such that tab completion and tooltips work.

It would also be nice to be able to avoid reported issues like the one below.

Question
How do I solve this problem?
If I can solve the problem I would contribute the solution to Param.

What you're trying to do here is highly unusual, and the Python static type system doesn't have a great answer for hybrid class/instance methods.
The best solution I can offer is the following, which I think gets you most of what you want. It preserves the parameter signature, return type, and docstring of the decorated method.
_P = ParamSpec("_P")
_R = TypeVar("_R")

class bothmethod(Generic[_P, _R]):
    def __init__(self, func: Callable[Concatenate[Any, _P], _R]) -> None:
        self.func = func

    def __get__(
        self, obj: object | None, type_: type | None = None
    ) -> Callable[_P, _R]:
        if obj is None:
            return wraps(self.func)(partial(self.func, type_))
        else:
            return wraps(self.func)(partial(self.func, obj))

Thanks.
I've tried to use with Python 3.9 and typing_extensions=4.3.0 but neither will let me import it.

Is this only available in Python 3.10? (Param currently supports 3.7+).

A specific solution instead of a general one would also be helpful because the next version of Param only uses the @bothmethod decorator in this one place.

ParamSpec and Concatenate were added to typing in Python 3.10. To use them in Python 3.7, you need to use typing_extensions. Version 4.3.0 should work fine, so I'm not sure why you're having trouble with the imports. Make sure you have the correct Python interpreter selected and that you installed typing_extensions into that environment.


AttributeError: 'V1ConfigMap' object has no attribute 'status'

When using the current the most current version of the apb-base container
docker.io/ansibleplaybookbundle/apb-base   latest              70252c2680a6        7 days ago          444.9 MB

I get a failure when using the k8s_v1_config_map module.  Even though it fails the object is created along with the appropriate data.  If I try to create a configmap without data it will succeed.
(venv) > $ oc get configmap orgfolder
NAME        DATA      AGE
orgfolder   5         5m

This is error also is occurring in k8s_v1_secret.
Ansible Version
bash-4.2$ ansible-playbook --version
ansible-playbook <IP_ADDRESS>
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.5 (default, Nov  6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]

OpenShift Version
(venv) > $ oc version
oc v1.5.0-rc.0+49a4a7a
kubernetes v1.5.2+43a9be4
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://openshift.virtomation.com:8443
openshift v<IP_ADDRESS>
kubernetes v1.5.2+43a9be4

Playbook
- name: Create ConfigMap
  k8s_v1_config_map:
    debug: False
    name: orgfolder
    namespace: '{{ namespace }}'
    data:
      name: "{{ jenkins_org_folder_name }}"
      displayName: "{{ jenkins_org_folder_name }}"
      repoOwner: "{{ jenkins_github_owner }}"
      pattern: "{{ jenkins_github_repo }}"
      credentialsId: "{{ jenkins_github_cred_id }}"

Task Failure
TASK [provision-openshift-pipeline : Create ConfigMap] ***********************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "module_stderr": "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised.
See: https://urllib3.readthedocs.org/en/latest/security.html\n  InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised.
See: https://urllib3.readthedocs.org/en/latest/security.html\n  InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised.
See: https://urllib3.readthedocs.org/en/latest/security.html\n  InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised.
See: https://urllib3.readthedocs.org/en/latest/security.html\n  InsecureRequestWarning)\n

Traceback (most recent call last):\n  File \"/tmp/ansible_sKHT8x/ansible_module_k8s_v1_config_map.py\", line 316, in <module>\n    main()\n  File \"/tmp/ansible_sKHT8x/ansible_module_k8s_v1_config_map.py\", line 310, in main\n    module.execute_module()\n  File \"/tmp/ansible_sKHT8x/ansible_modlib.zip/ansible/module_utils/k8s_common.py\", line 183, in execute_module\n  File \"/tmp/ansible_sKHT8x/ansible_modlib.zip/ansible/module_utils/k8s_common.py\", line 235, in _create\n  File \"/usr/lib/python2.7/site-packages/openshift/helper/base.py\", line 242, in create_object\n    return_obj = self._wait_for_response(name, namespace, 'create')\n  File \"/usr/lib/python2.7/site-packages/openshift/helper/base.py\", line 493, in _wait_for_response\n    elif obj and obj.status and hasattr(obj.status, 'phase'):\nAttributeError: 'V1ConfigMap' object has no attribute 'status'\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0}

Should be resolved with https://github.com/openshift/openshift-restclient-python/pull/61


Can't connect to the server from abroad

Hi,
I set up the server in my office and connect to it from my apartment. Everything works fine.
But when I tested with my friends from Nigeria and China, both cannot connect to my server. I have attached the screenshots from the client side when connected from China. I forget to save the screenshot of the server side. I will test it again tomorrow.

Any idea?
Thanks,
Lu

So, I've made a bunch of changes to how the direct connections work, and how the domains are parsed. Hopefully this all works now, feel free to re-open if it's still broken and you're still trying to do this. :)


Inconsistency between documentation and OpenAPI spec for Gifting Packages

Description:
I'm encountering an issue when attempting to gift a package to another player using Headless API
Expected Behavior:
According to both the official docs and the Postman collection, gifting should be possible by including the target_username_id field in the request body.
Actual Behavior:
However, the latest version of your OpenAPI spec has no mention of gifting, or the "target_username_id" field. Despite this, attempting to send a request with said field still results in a The provided username that should receive the gift is invalid error message:

Additional Info:

This username is valid (NameMC)
My webstore is set to Minecraft (Offline/Geyser)
Gifting works on the Tebex-hosted frontend

Could you clarify if gifting is currently supported?

This should definitely be working - to me it is strange that we're seeing "User not found" in the error detail yet this is a valid username. I will follow up with our API team to see why this is happening.

This is due to target_username_id expecting a UUID for the user.
We have recently updated Headless API to allow for a target_username instead, which should achieve what you're trying to do:
{
    "package_id": "6366436",
    "target_username": "YukiKawaii"
}

As this is a bit of a special case when using the add packages endpoints, this may not necessarily be present in the OpenAPI documentation. We always recommend reviewing our full documentation here for and special actions or otherwise that can be performed with the API: https://docs.tebex.io/developers/headless-api/overview