chore: enable release-pyxis test again

Description
This test was disabled because of a bug
in release service that is being fixed in
https://github.com/redhat-appstudio/release-service/pull/232
This reverts commit de77bb5cbf22788597d55111ed7a04ed6ba20d2b.
Issue ticket number and link
https://issues.redhat.com/browse/RHTAPBUGS-560
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
A successful e2e run in https://github.com/redhat-appstudio/release-service/pull/232 will confirm this is fixed.
Checklist:

[ ] I have performed a self-review of my code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added meaningful description with JIRA/GitHub issue key(if applicable), for example HASSuiteDescribe("STONE-123456789 devfile source")
[ ] I have updated labels (if needed)

Here's where we're at with this:
The linked PR has been merged: https://github.com/redhat-appstudio/release-service/pull/232
But we still cannot enable the test ATM, because there's still this ongoing issue in Pyxis (which would still fail the test): https://issues.redhat.com/browse/ISV-3908 (In Progress)
So we're waiting for that to be fixed. Once fixed, we will rerun e2e here and if everything is ok, this can be finally merged.

Update:
We're almost ready to enable the tests again. We just need to merge this: https://github.com/redhat-appstudio/release-service-bundles/pull/178
But before merging, I want to run e2e with the changes - I pushed the updated bundles to my personal repo and added a second commit to use those. So the e2e run in this PR will use the updated pipelines. Once I'm happy with my testing, I will merge that PR and finally make this PR ready.

/retest

/retest

It turns out that I forgot to specify snapshotPath for the apply-mapping task. Fixed now. Trying again.

/retest

/retest

/test all

Update
https://github.com/redhat-appstudio/release-service-bundles/pull/178 is merged, so we are ready to enable the test again. This requires the newest version of the pipeline. I updated the other pipeline versions as well.

/retest

/lgtm


how can i create a write protect if i am create an image file with etcher?

Etcher version:
Operating system and architecture:
Image flashed:
Do you see any meaningful error information in the DevTools?

I'm afraid I don't understand your question. What does "create a write protect" mean?
Are you in fact asking for #266 ?

@skynetmedia Could you elaborate your question please? Otherwise we'll close this issue.

Closing – @skynetmedia please reopen once you come back to this


improved the blog schema

Changed the userID schema type from string to ObjectID
Changes for  #92
Checklist before requesting a review

[x] I have performed a self-review of my code.
[x] Starred the repository.
[x] Added My Name to the Contributor's List.
[x] Followed the repository's Contributing Guidelines.
[x] I ran the app and tested it locally to verify that it works as expected.

your .gitignore file has conflicts

done ...

great! thanks


applet.interface.jtag_openocd: Add SWD support

This adds handling of new command characters to make SWD work.
The command characters are as follows:
O - SWDIO drive 1
o - SWDIO drive 0
c - SWDIO read request
d - SWD write 0 0
e - SWD write 0 1
f - SWD write 1 0
g - SWD write 1 1
The new commands will be emitted by an updated version of openocd
(http://openocd.zylin.com/#/c/6044/)
It has been tested against an stm32f103 and an at91samd21 target
connected to a glasgow revC1.

I'm not sure whether the approach of adding TMS tristate into the generic JTAG code is the right one, so I can't merge this right away; this PR will have to wait until I have more time to consider it.

Sure, no need to rush anything. My newborn just arrived, so my free time is quite limited now as well ;-)
I wasn't too happy with putting the tristating into the JTAG bus as well, but it didn't seem too good to replicate everything in there for an JTAGSWDBus implementation. The same can be said for adding SWD into an applet that is called "jtag-openocd".

@mwick83 Hi Manuel! Would you like to get this patch to completion in both openocd and Glasgow? I have more bandwidth to spend on Glasgow these days, and I think this is a very nice feature and it would be wonderful to have it.

@whitequark Hi Cathrine, I would also love to see this feature integrated and I would love to work on it, but to be honest, time doesn't currently permit it. So, if you do have bandwidth to work on it, feel free to use the patches as a startingpoint.
On the openocd side, I think there is at least rebasing needed. As far as I can remember their bitbang implementation has been improved with regard to network performance.
Performance was also one of my main concerns initially. Communication with the target was pretty slow. But I wanted to get initial support out the door first.

Oh, when I'm back from holidays, I could defenitly spin up some real hardware tests, if needed.

Cool, thank you!

This should now be upstream in openocd.

Having carefully reviewed this, I think a separate swd-openocd applet probably makes the most sense.

I propose to replace this PR with https://github.com/GlasgowEmbedded/glasgow/pull/531.

I propose to replace this PR with #531.

Sure, sounds sensible. I guess it is a rather rare case to switch between JTAG and SWD on-the-fly. I can't think of a real use case.

Thanks for chiming in!


276 saas connector add the ability for request params to reference connector param values

Purpose
Adding functionality to reference connector param values from request params.
Changes

Updating generate_query and generate_update_stmt functions in saas_query_config.py to use connector_params
Updating tests accordingly

Checklist

[ ] Applicable documentation updated (guides, quickstart, postman collections, tutorial, fidesdemo, database diagram)
[ ] Good unit test/integration test coverage
[ ] This PR contains a DB migration. If checked, the reviewer should confirm with the author that the down_revision correctly references the previous migration before merging
[ ] The Run Unsafe PR Checks label has been applied, and checks have passed, if this PR touches any external services

Ticket
Fixes #276

Hey @galvana — we'll actually need to remove those log statements to get this passing again. It's not a false positive this time, because {path} may actually resolve to data from self.secrets


Add batch check to container stats lock

We should not try and take the container lock and sync when we are running as part of a batch job.

bot, retest this please

LGTM

bot, retest this please

Alright, this is good.
@rhatdan @TomSweeneyRedHat PTAL

@rh-atomic-bot r+


Pull the build scripts into the Makefile

... and add a clean target, and fix the Windows builds to include the
extension.
Signed-off-by: Stephen Kitt<EMAIL_ADDRESS>

If I print $GOOS and $GOARCH, this is what I get:
bin/subctl
v0.4

If I print $GOOS and $GOARCH, this is what I get:
bin/subctl
v0.4

Yes, it’s stripping everything after the last . instead of removing .exe if any... So the patch works as long as the version is “dev”, but not with a numeric version. Fixed in my latest push.

Sorry I tried to merge during the github outage after testing locally, let me see if I can resolve the conflict.


FIX-#2992: Improve groupby performance

What do these changes do?

[ ] commit message follows format outlined here
[ ] passes flake8 modin
[ ] passes black --check modin
[ ] signed commit with git commit -s
[ ] Resolves #?
[ ] tests added and passing
[ ] module layout described at docs/developer/architecture.rst is up-to-date

@devin-petersohn, what is the status here? We merged the changes on improving metadata management. What about finer-grained partitioning?

There is a new issue for tracking that #4018. We can close this.


global change

Where and how to make a global change across the whole project of _context.Student to _context.Students.?There are 8 occurrences.

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

ID: 7a54c97f-ddd4-b041-5e5f-a2df009ace50
Version Independent ID: fa488196-1f98-08ea-adcc-17d9dac86727
Content: Razor Pages with Entity Framework Core in ASP.NET Core - Tutorial 1 of 8
Content Source: aspnetcore/data/ef-rp/intro.md
Product: aspnet-core
Technology: aspnetcore-data
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

That was only necessary in a previous version. What version are you following. YOu make the change with any editor.

Thank you so much for your quick response. I use Visual Studio version3.1.0, the latest version. I have tried this tutorial for several times and all failed.

Where and how to make a global change across the whole project of _context.Student to _context.Students.?There are 8 occurrences.

Where does the 3.1 version say to do that?


Revert "Delete manifests/a/AList/AList/3.13.1 directory"

Reverts microsoft/winget-pkgs#189427
Microsoft Reviewers: Open in CodeFlow

URL: https://github.com/alist-org/alist/releases/download/v3.13.1/alist-windows-386.zip
Status Code: 200
(Automated message - build 897)

[Policy] Reset Feedback


Mislabeling of functions from bpnetlite.io in the example code for Python API

The below line of example code in the README.md lists
import torch

from bpnetlite.io import extract_loci
from bpnetlite.io import LocusGenerator
from bpnetlite import BPNet

However in bpnetlite.io there is no LocusGenerator function. There is only DataGenerator or PeakGenerator.
In addition, there is no extract_loci function in bpnetlite.io (but it does call one from tangermeme.io)
Should the code be instead like below?
import torch

from tangermeme.io import extract_loci
from bpnetlite.io import PeakGenerator
from bpnetlite import BPNet

That's weird -- I thought I had switched over to LocusGenerator. Must've not actually made it in. But, yes, the code should be as you show on the bottom there.


Review the CWL and Nextflow Workflows

[x] collect pros and cons for domain specific language (Nextflow) vs a descriptive yaml text format (CWL)
[x] compare the formats
[x] improve the list of required features

The example workflows are here: https://github.com/MehmedGIT/OPERANDI_TestRepo/tree/master/ExampleWorkflows

I think, this can be closed @MehmedGIT  ?

@lena-hinrichsen Yes.

decision: We use Nextflow


Failed DB Connection

Describe the bug
Not able to get Hortusfox started, using docker compose, in the app container it just repeats "Waiting for database to be available... Attempt 21"
and in the DB container the logs show "[Warning] Aborted connection 20 to db: 'unconnected' user: 'unauthenticated' host: '<IP_ADDRESS>' (This connection closed normally without authentication)"
To Reproduce
Steps to reproduce the behavior:

Configure docker compose, run it, no errors when running docker-compose

Expected behavior
Make a DB connection
Screenshots
If applicable, add screenshots to help explain your problem.
Software:

HortusFox version - Latest, 3.7
PHP Version
MySQL version : Latest
Changes to your docker-compose

`version: "3.8"
services:
app:
image: ghcr.io/danielbrendel/hortusfox-web:latest
ports:
- "9099:80"
volumes:
- app_images:/var/www/html/public/img
- app_logs:/var/www/html/app/logs
- app_backup:/var/www/html/public/backup
- app_themes:/var/www/html/public/themes
- app_migrate:/var/www/html/app/migrations
environment:
APP_ADMIN_EMAIL<EMAIL_ADDRESS>APP_ADMIN_PASSWORD: "password1"
APP_TIMEZONE: "EST"
DB_HOST: db
DB_PORT: 3306
DB_DATABASE: hortusfox
DB_USERNAME: username
DB_PASSWORD: password1
DB_CHARSET: "utf8mb4"
depends_on:
- db
db:
image: mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: password1
MYSQL_DATABASE: hortusfox
MYSQL_USER: username
MYSQL_PASSWORD: password1
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
volumes:
db_data:
app_images:
app_logs:
app_backup:
app_themes:
app_migrate:
`
Desktop (please complete the following information):

OS: Ubuntu Server 20.04.6

Additional context
I swear I'm not a docker newbie, I have a ton of other containers using mysql, or postgres... I just can't get this going and I'm sure its a simple thing I'm overlooking.

Hi, I'm sorry it's not working on your end.
This is very likely a configuration issue. I'd advise to join our Discord
or use the support form in order to get usage help.
Kind regards
Support contact form: https://www.hortusfox.com/support
Discord server: https://discord.gg/kc6xGmjzVS

Hi! I was having the exact same problem as you. I was actually able to fix this problem by manually running these commands on the mariaDB container:
Note: replace the <> with whatever values you used
// (from your system's shell
$ docker compose exec db mariadb -u root
// (in mariadb shell in the container)
$ use mysql;
// hortusfox is the username here before the @
$ CREATE USER '<mysql_user>'@'%' IDENTIFIED BY '<mysql_password>';
// Create the database
$ CREATE DATABASE <mysql_database>;
// We need to give the hortusfox user access to the hortusfox database
$ GRANT ALL ON <mysql_database>.* TO '<mysql_user>'@'%';
$ FLUSH PRIVILEGES

For whatever reason not sure why, the database itself wasn't being set up. These commands manually run the steps needed for the app to communicate properly with the database.

Solution provided by user.


Can trifleJS use Chakra instead of V8?

It seems a bit odd to use Chrome's JS engine instead of IE's one.
This one here claims to be able to embed Chakra:
https://github.com/Taritsyn/MsieJavaScriptEngine
MS itself seems to support officially Chakra only via IE11 :(
https://msdn.microsoft.com/en-us/library/dn249673(v=vs.94).aspx
http://www.panopticoncentral.net/2013/07/02/introducing-jsrt-embedding-javascript-on-windows/
IMHO it would be great to use Chakra to be able to have a real test run for the browser as the JS engine is a vital part of the ahem browsing experience.
Cheers,
Masi

I'm not sure if this answers your question, but trifleJS only uses V8 to run script files which talk to a web browser. Inside of the browser it will run that version of IE's native JS engine.

Yes, it does.
"A headless Internet Explorer browser using the .NET WebBrowser Class with a Javascript API running on the V8 JavaScript Engine."
This so prominently features V8 that I was mislead.

Hi @masi:
https://github.com/sdesalas/trifleJS/wiki#internet-explorer-has-a-different-javascript-engine-how-can-you-be-running-ie-with-the-v8-engine


[snowflake] MFA token not being cached?

Hello! Thank you very much for adding Snowflake support to arrow-adbc!
I'm running arrow-adbc in Python 3.11 on macOS.
I've got the connection working as follows, but I have to accept multi-factor-authentication (MFA) each time I make a request (even within the same python session), despite the documentation stating that cache_mfa_token is true on MacOS (search for adbc.snowflake.sql.client_option.cache_mfa_token):
from adbc_driver_snowflake import dbapi
user = password = account = database = schema = warehouse = role = "..."

uri = f"{user}:{password}@{account}/{database}/{schema}?warehouse={warehouse}&role={role}"
query = "select * from my_table limit 10"

with dbapi.connect(uri=uri) as conn:
    cursor = conn.cursor()
    cursor.execute(query)
    tbl = cursor.fetch_arrow_table()
    cursor.close()

print(tbl)

I've also tried passing db_kwargs={"cache_mfa_token":"true"} to connect, or adding &cache_mfa_token=true to the uri, both without success.
Does anyone have any ideas? I would quite like to replace usage of snowflake-connector-python with adbc, but it's a major hassle to accept MFA on each request.

@zeroshade any idea?

Hmm, just to confirm: @thomasaarholt are you setting "adbc.snowflake.sql.auth_type": "auth_mfa" in the db_kwargs? Looking at the underlying snowflake code, it looks like it will only cache the mfa token is the auth type is set appropriately.

Ah! I did not, and now it works! I had the following code (without the new, commented line):
with dbapi.connect(
    uri=uri,
    db_kwargs={
        "cache_mfa_token": "true", # this one is unnecessary on Mac
        # "adbc.snowflake.sql.auth_type": "auth_mfa",
    },
) as conn:
    cursor = conn.cursor()
    cursor.execute(query)
    tbl = cursor.fetch_arrow_table()
    cursor.close()

But I hadn't thought to set that one, since I was already getting MFA authentications on my phone!
This works great, thank you! But perhaps we can add to the docs that in order to cache MFA tokens, then  "adbc.snowflake.sql.auth_type": "auth_mfa" has to be explicitly passed to db_kwargs?

In my previous post I had written "cache_mfa_token": "true", # this one is unnecessary on Mac. That was complete nonsense 😅 .
Closing this with a final, working code example, using a double context manager to close the connection and cursor.
with dbapi.connect(
    uri=uri,
    db_kwargs={
        "adbc.snowflake.sql.client_option.cache_mfa_token": "true",
        "adbc.snowflake.sql.auth_type": "auth_mfa",
    },
) as conn:
    with conn.cursor() as cursor:
        cursor.execute(query)
        tbl = cursor.fetch_arrow_table()


Simple SkipHelperFunction Attribute for excluding logging helper functions from ${callsite}

NLog version: 4.0
(The recent master code is still affected.)

Why do we need it?
When writing custom logging helper function for logging, they usually should be excluded from callstite determination. This is currently only possible by using a distinct class and passing the wrapperType explicitly. But this is complicated, even more if the local helper method is not static.
Example for static helper method with work around:
    public class WorkManager
    {
        private static readonly Logger Logger = LogManager.GetCurrentClassLogger();

        public SomeMethod(OrmWorkItem item)
        {
            LogHelper.ConditionalTrace(item, "My message");
        }

        // ...

        private static class LogHelper
        {
            // The helper function
            [Conditional("DEBUG")]
            public static void ConditionalTrace(OrmWorkItem item, string message)
            {
                if (Logger.IsTraceEnabled)
                    Logger.Log(typeof(Log), LogEventInfo.Create(LogLevel.Trace, Logger.Name,
                        $"{message} '{item.Name?.Translate()}' {item.Oid}, inst {item.InstanceGuid}, state {EnumWorkItemState.GetValue(item.State)?.Text}, class {item.ItemClass}, modified {item.Modified}"));
            }
        }

Intended solution
    public class WorkManager
    {
        private readonly Logger Logger = LogManager.GetCurrentClassLogger();

        public SomeMethod(OrmWorkItem item)
        {
            ConditionalTraceHelper(item, "My message");
        }

        // ...

        // The helper function
        [Conditional("DEBUG")]
        [SkipHelperFunction]
        private void ConditionalTraceHelper(OrmWorkItem item, string message)
        {
            Logger.Trace($"{message} '{item.Name?.Translate()}' {item.Oid}, inst {item.InstanceGuid}, state {EnumWorkItemState.GetValue(item.State)?.Text}, class {item.ItemClass}, modified {item.Modified}");
        }

The SkipHelperFunctionAttribute should do the magic. It should exclude this stack frame from callsite determination.
This simplifies coding of helper methods significantly. First of all the convinient overloads for Error/Warning/Info etc. can be used. Furthermore it does also work if the custom helper function needs access to non-static members of the current class without passing the parent instance explicitly.
Possible implementation
AFAIK this cannot be implemented by custom code. For this to work the internal method FindCallingMethodOnStackTrace needs to be modified to skip stack frames with this attribute. The method was in class LoggerImpl previously. Now it is in class CallSiteInformation.
I am not really familiar with the NLog code but probably something like
        if (stackFrame.GetMethod().IsDefined(typeof(SkipHelperFunctionAttribute), false)
            continue;

should do the job. I am unsure whether it should be placed before or after if (IsLoggerType.

Right now there are two approaches for handling Logger-wrappes and callsite-scanning:

Inject the type of the logger-wrapper as input for NLog
Register the assembly of the logger-wrapper so NLog will ignore all methods from the assembly.. See LogManager.AddHiddenAssembly(yourAssembly).

Already now the stacktrace and callsite-scanning is very expensive. Not sure adding more wood to this fire would be any help.

Closing this as wont-fix as the suggested idea will give a performance overhead from everyone not making use of [SkipHelperFunction].
But you are welcome to open a new issue, with any new ideas for making it easier to create logger-wrappers with callsite-support.

The problem can be solved by a custom layout renderer as work-around. The solution is quite fast due to a cache. Unfortunately this will not prevent the standard, uncached callsite determination from running although the information is not needed.
And, of course, the dozens of options of the standard callsite renderer are not covered by this simple example. And the assembly filter is an opt-in filter here, because this better fits our needs. But this can be easily fixed, also with a cache. The primary benefit is a smaller ExludeRule cache.
But at least it proofs that an implementation is possible without any significant runtime overhead. In fact with the cache it might be even faster.
And tagging methods, classes and assemblies is much more convenient than dealing with the logger class when passing any individual event.
Example:
[LayoutRenderer("BAcallsite")]
public class NLogBACallsiteLayoutRenderer : LayoutRenderer, IUsesStackTrace
{
    private readonly Dictionary<MemberInfo, bool> ExcludeRule = new Dictionary<MemberInfo, bool>();
    private readonly Dictionary<Assembly, bool> AssemblyRule = new Dictionary<Assembly, bool>();

    public StackTraceUsage StackTraceUsage => StackTraceUsage.WithoutSource;

    protected override void Append(StringBuilder builder, LogEventInfo logEvent)
    {
        StackTrace stack = logEvent.StackTrace;
        StackFrame frame;
        MethodBase method;
        Type type;

        lock (this)
            for (int i = 2; i < stack.FrameCount; ++i)
            {
                frame = stack.GetFrame(i);

                method = frame.GetMethod();
                type = method.DeclaringType;
                if (type == null)
                    continue;

                if (!AssemblyRule.TryGetValue(type.Assembly, out bool ret))
                    AssemblyRule.Add(type.Assembly, ret = type.Assembly.IsDefined(typeof(AssemblyFrameworkAttribute)));
                if (!ret)
                    continue;

                if (!ExcludeRule.TryGetValue(type, out ret))
                    ExcludeRule.Add(type, ret = !type.IsDefined(typeof(NLogIgnoreInBACallsiteAttribute)));
                if (!ret)
                    continue;

                if (!ExcludeRule.TryGetValue(method, out ret))
                    ExcludeRule.Add(method, ret = !method.IsDefined(typeof(NLogIgnoreInBACallsiteAttribute)));
                if (ret)
                    goto match; // continue outside lock
            }

        builder.Append("<unknown>");
        return;

    match:
        builder.Append(type.FullName).Append('.').Append(method.Name);
    }
}

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
public class NLogIgnoreInBACallsiteAttribute : Attribute
{ }

@maazl My understanding was that you wanted to optimize performance by only doing capture of callsite when necessary.
But it just sounds like you want to exclude your own custom logger-wapper in the callsite-scan. I have already provided two solutions of how to do this in my previous comment: https://github.com/NLog/NLog/issues/4293#issuecomment-777024363

@snakefoot Indeed, the basic intent is to exclude some helper functions.
Unfortunately excluding assemblies or entire classes does not fit for the case when an abstract base class provides protected helper functions for its descendants. If I exclude the class this will apply the all sub classes as well, so effectively everything is excluded.
The only way to come around this is to move the helper functions into a nested class and pass this type as log helper class. In this case additional overhead is required to access instance members of the base class to enrich context information (that's the primary purpose of the helper functions). And, of course, the syntax to call the helper functions is no longer compatible. It needs to be prefixed with LogHeplerInstance. or something similar. In our case this is a breaking change of a public extension API.

@snakefoot Indeed, the basic intent is to exclude some helper functions.
Unfortunately excluding assemblies or entire classes does not fit for the case when an abstract base class provides protected helper functions for its descendants. If I exclude the class this will apply the all sub classes as well, so effectively everything is excluded.
The only way to come around this is to move the helper functions into a nested class and pass this type as log helper class. In this case additional overhead is required to access instance members of the base class to enrich context information (that's the primary purpose of the helper functions). And, of course, the syntax to call the helper functions is no longer compatible. It needs to be prefixed with LogHeplerInstance. or something similar. In our case this is a breaking change of a public extension API.

#5313 Adds support for excluding a single class-type when resolving CallSite, instead of having to exclude an entire assembly.


Add setting home dashboard with API token auth

This solves #10
There was a bug in grafana.api.put method: instead of JSON it was sending the request as application/x-www-form-urlencoded form data, so that's why it didn't work at all, basically resetting the home dashboard to 0.
Additionally I added Docker and Makefile and while at it I discovered that it doesn't build under Python 3.11, but didn't dig deeper into it.

@LawrenceWarren thank you for review. I've extracted non-.py changes to a separate branch. Will create a separate PR where we can discuss it separately.

Cheers @meetmatt, please link the PR when it's made.

Sorry mate, I'm not a maintainer. @chan-vince can approve & merge though.

PR for for Makefile/Dockerfile: https://github.com/Beam-Connectivity/grafana-dashboard-manager/pull/12


Revert "[device_tracker] Don't clear GPS coordinates when using two device trackers."

Reverts home-assistant/home-assistant#4848
This needs more thought, since it will break non-gps based tracker by not clearing gps for the update function
Refer to here: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/device_tracker/init.py#L458

@lwis some thoughts on how to fix this at the bottom of #4848 ...


Implement IDIR email validation in our API (instead of in the frontend)

We are currently authenticating with Azure AD in the front end. This is problematic as it requires a second login step via a pop-up that gets blocked occasionally.
Instead, we need to do this on the backend. This will involve:

Acquiring an API secret token
Moving the validation to the backend

We need admin approval from the Azure team. They have been contacted and we are awaiting approval

Olena has contacted them via email but we have not got a response. I have re-emailed them. The code for this is completed we just need the API permissions which we are waiting on


Add validation to prevent nil rules

Stumbled on this by accident but the add_recurrence_rule / add_exception_rule methods allow nil which later leads to errors like below when invoking various methods like occurrences_between:
NoMethodError: undefined methodreset' for nil:NilClass`
Simple example:
s = IceCube::Schedule.new(Time.now)
s.add_recurrence_rule(Random.new)
s.occurrences_between(Time.now, Time.now + 36000)

I was also thinking it could be a good idea to add a is_a?(Rule) validation as well since there are quite a few methods an object has to respond to in order to work as a Rule but I just left it at a simple nil check for now.

I like this, but it looks like we've changed it to ignore nil values in the meantime... we could still change it to raise the error instead (which seems to make more sense).
I think the same should apply to adding single times as well.


RFE: functionality to set version from scm automatically

The setuptools world has a module setuptools_scm which allows setting the version directly from the SCM in use for the project. For example, if a commit is tagged with a version identifier, that becomes the value of version, whereas if the commit is not tagged, the hash and the distance from the last tag may be used.
This is super useful, and often critical, functionality for automation. It would be great if flit had machinery for doing this kind of thing.

I fully agree, but flit’s author does not seem to. A previous similar request was turned down and also a PR implementing this (not because of how it was implemented, but purely the idea of it). :disappointed:

Wow, that's very sad indeed. But it's helpful to know while I'm evaluating flit and poetry.

I'm open to thinking about ways to make it easier to manage version numbers. But the sort of solutions people have proposed so far all involve extra complexity inside every package to look up its version number when it gets imported. That's what I object to. Any extra complexity needed should go in developer tooling, not in the packages' runtime code.

But the sort of solutions people have proposed so far all involve extra complexity inside every package to look up its version number when it gets imported.

I haven't had time to review the previous proposals. But, at least in the case of setuptools_scm, very little is required of the developer: (1) require setuptools_scm (wouldn't be needed if it was a capability directly in flit); (2) Optionally define a file for the version tag to be written to - this is only needed if you don't want to make use of the pkg_resources functionality for finding the package version at runtime.
So, I'd hope it was possible for flit to support this something like:
[build-system]
requires = ["flit"]
build-backend = "flit.buildapi"
version-backend = "flit.vcs_version"

author-email =<EMAIL_ADDRESS>home-page = "https://github.com/sirrobin/foobar"

Would you regard that as requiring too much of a packager?

I'm not concerned about what it involves for the developer. I'm concerned about what the package winds up doing at runtime. It needs some extra dependency installed, and then it goes hunting for its metadata to figure out it's version number. I consider this similar to an object using introspection to look up its variable name in the call stack: you can do it, but you shouldn't. It can also have performance issues, because it winds up having to scan every installed package to find the one that it is. And it definitely violates the principle of 'do as little as possible on import'.
I definitely want version numbers to be 'stamped' into the code of a package somehow so the package doesn't need to go looking for them. I tend to do that manually. I'm aware of tools like bumpversion to partially automate it, but so far I haven't really taken to any of them.

Just to add my voice that this is stopping me from using flit for my build tool chain. A pity really. versioneer (sadly no longer supported) installs a module into the package to do the parsing whereas setuptools-scm use pkg_resources (maybe a bit heavy). Ultimately, both write the version string at the time of distribution into PKG-INFO and parse it from there for installed packages.
Do you consider this behavior unacceptable? Especially the versioneer way of installing a module into the package?

Just to add my voice that this is stopping me from using flit for my build tool chain. A pity really. versioneer (sadly no longer supported) installs a module into the package to do the parsing whereas setuptools-scm use pkg_resources (maybe a bit heavy).

Just to note: setuptools_scm doesnt have to use pkg_resources. It can simply write the version to a file that is then included in the package.
Concerns about using pkg_resources are orthogonal to the issue here.

My bad, indeed setuptools-scm writes the version to PKG-INFO but the recommended way (from the README) for accessing the version is to use pkg_resources:
from pkg_resources import get_distribution, DistributionNotFound
try:
    __version__ = get_distribution(__name__).version
except DistributionNotFound:
    # package is not installed
    pass

Random idea by a passer-by: Would it be a good idea to have such a configuration:
# mypackage/__init__.py

__version__ = "__flit_scm_version__"

When flit builds the sdist and wheel, it would detect this special version token. If it is detected, parse __init__.py with ast and replaces sources in artifacts with the correct version. This would solve the ditribution workflow problem preferred by setuptools-scm user, but without compromising the version detection mechanism for end users.
Some downsides I can think of:

Users gets a nonsensical value if the package version is read without being installed. This is probably minor though. setuptools-scm’s suggested solution is only marginally better IMO. Or maybe we can go with __version__ = __flit_scm_version__ which would raise a NameError at runtime, but requires some extra configuration to keep linters happy.
This won’t work with flit install -s (while setuptools-scm works well with setup.py develop). Maybe pth wold work with some hacks though?

Some downsides I can think of:
* Users gets a nonsensical value if the package version is read without being installed. This is probably minor though. setuptools-scm’s suggested solution is only marginally better IMO. Or maybe we can go with `__version__ = __flit_scm_version__` which would raise a `NameError` at runtime, but requires some extra configuration to keep linters happy.

* This won’t work with `flit install -s` (while setuptools-scm works well with `setup.py develop`). Maybe pth wold work with some hacks though?

The __version__ could be made to be stamped at install time (either in __init__ or rather in a separate file) but looked at dynamically (e.g. calling git describe) at runtime. The package author would write:
# __flit_version__.py

import some_package_to_get_versions
__version__ = some_package_to_get_versions.get_version()

And
#__init__.py
from . __flit_version__ import __version__
...

At install time flit would rewrite __flit_version__.py to contain only whatever the value of __version__ (on import). It wouldn't have to know about how it works inside.
#__flit_version__.py (rewritten)
__version__  = "<String with the actual version>"

And the version would be resolved from SCM (or whatever) when the package is symlinked.
One workflow where it is not trivial to change versions manually every times is if one wants to publish to PyPI every time a change is made to the master branch, using some CI service. The packages are then rejected because they are duplicated.

i am using setuptools_scm and the way that works is basically this:
in setup.py:
setup(
    use_scm_version={'write_to': 'MODULE/_version.py'},
    # [...]
)

Then in the module's __init__.py:
try:
    from _version import version
except ImportError:
    try:
        from setuptools_scm import get_version
        version = get_version()
    except (ImportError, LookupError):
        version = '???'
__version__ = version

It seems to me flit could build a wheel the same way, by dropping a magic file at build time so that, at runtime, the version would be available.
The alternative is to load the version through the entrypoint. That has traditionally been slow (because of pkg_resources, see https://github.com/pypa/setuptools/issues/510) so maybe that should be avoided.
In general, this smells like PEP material to me: there should be a standard way for Python packages to fetch their own version, and a standard way for Python packaging tools to write that version somewhere.
In any case, it seems to me that having to maintain that version in two places is counter-intuitive and something I would like to avoid, because it's bound to create releases with the wrong version number metadata.
It is also the primary reason why I haven't used flit in this new project.
Thanks for your work!

FWIW, you can accomplish this rather trivially, without involving flit, by using an in-tree backend to pre-generate a version file with setuptools-scm.  One downside of this is that you'll have to forgo flit build.  I've put together a demo here.

Chiming in to say that a pluggable mechanism to obtain the version would be very welcome. Obtaining the version from SCM when building and publishing in CI is also core to my workflows.

@takluyver tools like setuptools_scm by default invoke the tools only at build time not runtime
im quite annoyed that flit seems to actively prevent inclusion of support for using setuptools_scm as source of version numbers, as its practically the only thing preventing me to migrate a lot of my own packages + a lot of pytest-dev to flit

I've been thinking again about how to incorporate something like setuptools_scm, and I'm afraid I still don't see a good option. I can see the attraction of getting the version from git, but I have a set of priorities which I consider more important, and which as far as I can see are (together) fundamentally incompatible with this model:

Packages should have a __version__ attribute accessible at runtime, containing their version number.
Neither importing the package nor accessing pkg.__version__ should involve running git commands, looking for metadata outside the package directory, or anything like that.
Importing the package from source should run precisely the same code as importing the installed package. No if i_am_installed:, no try/except. Just the same code, behaving the same way. I use development installs a lot, and I like that there are no special tricks involved in loading & running the code.
sdists are essentially just an archive of the source files, not a special halfway state. You can use the result of git archive like an sdist if you want.

I don't see a way to do something like setuptools_scm without compromising on at least one of those. I confess I haven't studied setuptools_scm closely, but I believe it's a logical incompatibility which no technical measure can get around.
You may say that I should allow people to choose different trade-offs to the ones I want. That's an entirely reasonable argument. But this goes pretty deep into the design of Flit - any way that I would address this means a build step, a difference between the code in the repository and the code that you install, even if it's a tiny difference. It's fairly central to the design of Flit that pure Python packages don't need a build step, that what is in the repo is precisely what gets installed. It's also a pretty important design goal to be simple, which means not having too many different ways to do things.
For me, the best answer to all this is something like bump2version, which deals with updating version numbers as a developer tool, so the changes it makes get committed. I know it's not so elegant to have multiple copies of the version number, and I know it's useful to have the extra information from git describe, but for my boring, old fashioned way of working, this works well enough, and doesn't compromise any of the points above. I am using this for Flit itself.

its practically the only thing preventing me to migrate a lot of my own packages + a lot of pytest-dev to flit

The outcome of making a simple tool, drawing a line around a subset of possible features is that there must be use cases just beyond the line, which would be supported if the simple tool just added a little bit more complexity. If you move that line, add the extra piece, then someone else's use case will be just beyond the new line. So at some point we either have to refuse to move the line, or let the simple thing become another complex thing with every feature anyone wants. For me, at the moment, this feels like the point to stop - I'm sorry that that leaves your use case just out of reach, but any point does that to someone.
I don't want to be a dictator and say 'never'. I'll keep thinking about how it might be doable. But at present, this idea feels like a really bad fit with Flit. Much more so than namespace packages, which I held out on for years but actually fitted in conceptually quite easily.

@takluyver with your argument from ignorance  right after i lined out that setuptools_scm by default is build time only, you just elevate the issue
the only time to ever invoke git would be a git hook to update metadata on editable installed packages using the hooks of the pep
how am i to trust your judgement if you make up an entirely different set of issues right after i line up one that would actually fit your narrative

For what's worth, I'd also like setuptools-scm like feature support for flit. I'm personally fine with differing on this one case from the code as source vs the code as installed. Though I gather @takluyver isn't keen on that. This is also the biggest gap from adopting flit widely across my projects. I consider bump2version two odd and awkward to use to be considered simple, so I'm back to manually editing stuff...

I'm in favor of flit's continued lack of support for setuptools_scm-style metadata, mainly for this reason that @takluyver mentioned:

any way that I would address this means... a difference between the code in the repository and the code that you install

Reproducibility hasn't been mentioned in this thread yet, likely because it's not something the wider Python packaging ecosystem  particularly cares about. However, I predict it will become more significant in the near future, and as that happens, projects that aren't built in a reproducible way are likely going to find that such features will become less desirable.
Right now, flit is the best tool to build reproducible Python packages because it was designed with that in mind, and I'd hate to see that change.

What makes setuptools-scm lack reproducibility?

I maintain a few packages using setuptools-scm and they're reproducible.
There's nothing specific about it that would make a released package non-reproducible. Only packages built from uncommitted source has a timestamp attached to it, but I don't think it's very common to publish a package with source that hasn't been committed -- quite the contrary, the usual thing is to create a tag first, then publish.

What makes setuptools-scm lack reproducibility?

I guess, you could argue that since you can change git tags, there is no guarantee of identical source code. Then again, PyPI does not allow you to replace a specific version so I also don't see it as problematic.

I'd like to pull this discussion away from what functionality setuptools-scm provides or how it is designed or how interacts with parts of the ecosystems.
And... with that, I'll highlight an important part from Thomas' post above:

this goes pretty deep into the design of Flit - any way that I would address this means a build step, a difference between the code in the repository and the code that you install, even if it's a tiny difference. It's fairly central to the design of Flit that pure Python packages don't need a build step, that what is in the repo is precisely what gets installed.

It's fairly central to the design of Flit that pure Python packages don't need a build step [...]

I understand not wanting to require a build steps for packages that don't require it, but does that also mean excluding any functionality for those that opt-into it too?
While avoiding a build step keeps flit itself simpler, it just pushes that complexity to every single project out there, requiring everyone has to write their own build script themselves to handle updating the version each time a release is made.

Flit doesn't support projects with build steps (see #119). Not even optionally, not even if you want to supply all the logic of the build step yourself. Flit is built just to package up static files and add the necessary metadata. The way to opt into a build step is to use another build backend that does support that. Thanks to PEP 621, most of the metadata you specify for Flit should be portable to other build backends, so it hopefully won't be a lot of work to move to another backend if you outgrow Flit.
(This is of limited use right now, since there aren't many viable backends to move to. setuptools doesn't support PEP 621 metadata, and I don't know if Poetry supports build steps either. But I believe that more build backends will emerge for projects with build steps - I know there are people interested in using Meson & CMake to build Python packages)
'No build steps' isn't absolutely set in stone, but in the wake of PEP 621 I closed issue #119 to indicate that it's as decided as it's likely to get for the foreseeable future.

This is of limited use right now, since there aren't many viable backends to move to.

Yea.
FWIW, there's a grant proposal submitted for https://github.com/scikit-build/scikit-build to work on making it a pyproject.toml-based backend. That should be viable for certain usecases. I also think that there's a reasonable case to be made for writing custom dedicated build backends for other use cases (like https://github.com/pradyunsg/sphinx-theme-builder).

No, Poetry doesn't support build steps nor does it support PEP 621.

For setuptools, the relevant issues are https://github.com/psf/fundable-packaging-improvements/issues/25 and https://github.com/pypa/setuptools/issues/1688. 🤷🏽

any way that I would address this means a build step, a difference between the code in the repository and the code that you install,

Why would the code change? Wouldn't the change be in how the Version in PKG-INFO is generated?
(Also, isn't the generation of PKG-INFO technically a "build step"?)
Version info is metadata, but flit is trying to treat it like program data... My mind keeps jumping back to the old RCS headers (that had to be in the files) before modern VCSes like git were a thing.
__version__ at the package root is just a convenience. Really, other packages that want to know the version should be looking for that info from the source of truth directly (e.g. via importlib.metadata). The package doesn't actually need to know its own version at all. That info is needed solely for other programs (e.g. pip/apt/downstreams/etc.) to deduce compatibility.

PDM supports PEP 621, and is usable as PEP 517 backend (it's also a poetry-like tool, but you don't need to even install it any more than you need to install flit to use it). There's also Trampolim and Whey, both smaller projects but still showing that PEP 621 works, and you should be able to transition quite easily based on what is important to you - one feature of PEP 621. Both PDM and Trampolim support Git versioning, by the way. Scikit-HEP/cookie supports all four via PEP 621: https://github.com/scikit-hep/cookie/blob/main/{{cookiecutter.project_name}}/pyproject-flit621%2Cpdm%2Ctrampolim%2Cwhey.toml

sdists are essentially just an archive of the source files, not a special halfway state. You can use the result of git archive like an sdist if you want.

Actually, you can use git archives. There's a a .gitattribute file that can be used to have git include the version in the archive - in a pretty recent Git version, there's actually enough information there to compute everything setuptools-scm needs, actually. I think the only reason it's not available directly in setuptools-scm now is due to @RonnyPfannschmidt needing some time to work on it. (External plugin https://pypi.org/project/setuptools-scm-git-archive/ )
No comment on build step vs. not, design of Flit, usefulness of using Git for versions, etc. Just pointing out these two things. I guess I will say I think using Git for versions is very useful, I love using setuptools-scm and would like to be able to use it setuptools-free for scikit-build eventually. But otherwise, understandable if that's not something in Flit's philosophy or design direction.

I made versioneer work with flit and it was only a minor hack https://github.com/pypa/flit/issues/271#issuecomment-575765013, and apparently, there are some changes that could be done to flit without compromising @takluyver philosophy to make it work even better https://github.com/pypa/flit/pull/382
Nowadays there is a non-vendored version https://github.com/python-versioneer/versioneer-518 and a new maintainer gave the repository some love.
I guess folks here might have opinions on setuptools-scm vs versioneer, but even if versioneer is certainly not super maintained, it gets the job done.
Side note: Neither solution, to my knowledge, supports trunk-based versioning.

The package doesn't actually need to know its own version at all.

Any package that provides a program with a --version flag (e.g.: a huge amount of cli tools) need to know their version.
Many networked applications also expose their current version.

importlib.metadata is rather slow (far slower than a string coded into __version__).
It seems to add about 150ms on my setup (i7-8650U), which starts to become noticeable in a cli tool (150ms isn't much, but when something already takes 400ms, jumping to 550ms feels noticeably more sluggish).

Any package that provides a program with a --version flag (e.g.: a huge amount of cli tools) need to know their version.

The approach that versioneer and most tools take is to package the version when you create your sdist or wheel. So an installed package will always have it at the ready. I don't think that's an issue .

Any package that provides a program with a --version flag (e.g.: a huge amount of cli tools) need to know their version.

Again... that's a convenience feature. Any situation someone could run that, they can most likely run python -m pip show thepkg (or apt/yum/dnf/etc.) instead. Don't get me wrong; I'm all for convenience for the user, but that's not the point...
The point is we could get rid of __version__, but we definitely cannot get rid of version metadata.

Many networked applications also expose their current version.

I absolutely don't deny there are situations where it's useful for the program to know its own version...
People find it weird that a program wouldn't already have this information about itself, but it's much more natural when thinking about it from the perspective of other programs (where it matters most). That's the perspective I'm trying to highlight.

importlib.metadata is rather slow (far slower than a string coded into __version__).

I would agree that being able to pull the version from Git shouldn't preclude someone from hard-coding if they are that concerned about performance. I, for example, still use lists sometimes even when tuples would technically be more performant, so... that person is not me :sweat_smile:

Structurally the main cost there seems to be finding the dist info, which is getting more performant
As multi version installation is no longer the cases, i believe that this can be speed up way more but that's ot here

@henryiii starting with git 2.24 all Metadata setuptools_scm needs woll be available given the correct setup of a archival file,
The feature is still in development

I just finished the initial migration of one of my projects to flit and kept admiring every design decision, level of maturity, and simplicity of the build tool (very different from a previous experience with poetry!). But then, came the issue of versioning, currently handled by setuptools_scm, and reading this thread and related issues, and now I wonder if I should roll back to setuptools. The case against this functionality does not sound convincing to me, but I guess ultimately it's a decision to be made by the project's developers and contributors.
Very disappointing, but apparently flit won't be the tools I can use for my projects, despite everything else about it being just perfect 😞

Im going to migrate to hatch, it already has setuptools_scm integration and after Easter it will be first class

As @anarcat said,

In general, this smells like PEP material to me: there should be a standard way for Python packages to fetch their own version, and a standard way for Python packaging tools to write that version somewhere.

I think this is correct.  Also on point, @dmtucker said:

isn't the generation of PKG-INFO technically a "build step"?

I guess it is because it falls under the onus of a build backend, but would argue that it shouldn't be considered a build step.

We have static metadata, which is hard-coded in pyproject.toml according to PEP 621 and in Python Packaging Guide
We have specific metadata that cannot be defined as dynamic in core metadata spec, but it isn't technically called static.
We have dynamic metadata as defined in the core metadata spec as metadata that a tool will later provide (i.e. after the author hard-codes values in pyproject.toml).
Conflictingly,  PEP643 says that “dynamic means that the value has not been fixed at the time that the source distribution was generated."
That obviously leaves a gap - "the time that the source distribution was generated" =/= the time pyproject.toml was written.  We dont have the concept of semi-static metadata or "snapshot" metadata (to borrow a PEP517 analogy for sdists) that depends upon the original source tree in a way that precludes hard-coding in pyproject.toml but can be known prior to build time.

Although this is a PEP aside, I mention it here because the concept of a "snapshot" step as distinct from build steps could allow flit to set __version__ from scm without opening the door to more complex build steps.
These are all just ideas from a packaging layman, but here's my thoughts on how to fit a "snapshot" step into PEP 517 compliance:

PEP517 allows the option to build a wheel from either the original source tree or from an sdist
PEP517 offers the prepare_metadata_for_build_wheel hook from
Snapshot steps could go into a prepare_metadata_for_sdist hook, which could be called by prepare_metadata_for_build_wheel if building from original source tree.
PEP 517 says

A build back-end MUST raise an error if the metadata specifies the name in dynamic.

which would allow a build backend to be PEP-517 compliant but still allow version in dyanmic

Also conflicting with the Core Metadata spec, the python packaging guide says that version can be assigned dynamically in pyproject.toml, whereas Core Metadata says it cannot.

Very late to the party, but after going through this discussion and after a quick search around, I think I found the ideal solution that would satisfy many of the prospective-flit-users while maintaining Flit's philosophy: write your own backend by extending flit_core with setuptools_scm. Here is a minimal example of accomplishing exactly this: https://github.com/LukasGelbmann/adventkit/blob/main/packaging/adventkit_backend.py
A motivated person could make this into a separate backend package that depends on flit_core and setuptools_scm, which would be easily maintainable since this "extension" would be tiny. From Flit's side, I think providing an explicit extension/hooking mechanism would make it easy for others to extend Flit with more bells and whistles. But that's a discussion for another thread.
Anyway, I do believe brutally sticking to the minimalist philosophy that Flit originally started with is a great idea! This would also enable people to easily and confidently extend its functionality without fear of upstream API changing drastically. And just to highlight to future TLDR-readers, here is Thomas' comment about why this in particular is not compatible with Flit's design philosophy:

this goes pretty deep into the design of Flit - any way that I would address this means a build step, a difference between the code in the repository and the code that you install, even if it's a tiny difference. It's fairly central to the design of Flit that pure Python packages don't need a build step, that what is in the repo is precisely what gets installed.

I'm currently working on the successor off setuptools-scm that won't depend on setuptools
I still hope to find some common ground to allow scm metadata to be considered a source of truth


[swift-4.0-branch] Switch Int/Float inits + join to be on StringProtocol

Explanation: Implement SE-0183 (https://github.com/apple/swift-evolution/blob/master/proposals/0183-substring-affordances.md)
Scope of Issue: Non-breaking changes that expand String APIs to Substring
Risk: Minimal
Reviewed By: Max Moiseev
Testing: Automated test suite + compatibility test suite
Directions for QA: N/A
Radar: rdar://problem/33576302

(cherry picked from commit 92bc5b7829d6dfacedc8f85af80bb0813564fd64)

@swift-ci Please test

Similar to https://github.com/apple/swift/pull/11157


Allow use with jellyfin

Is your feature request related to a problem? Please describe.
Currently limited usage to plex
Describe the solution you'd like
Allow to either set PLEX_USER/PLEX_TOKEN... or a JELLYFIN_APIKEY and JELLYFIN_ADDRESS

I put this in zurg, works fine:
on_library_update: |
  for arg in "$@"
  do
      curl -v -X POST -H "X-MediaBrowser-Token: censored" https://domain.tld/library/refresh
  done

this is what breaks it, it tries connecting to plex, because your way of manipulating the config file adds this empty bracket, which is what triggers plex_debrid to start connecting to plex.

Possibly fixable by editing this:

Exception in thread Thread-1 (threaded):
pd_zurg  | Traceback (most recent call last):
pd_zurg  |   File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
pd_zurg  |     self.run()
pd_zurg  |   File "/usr/lib/python3.11/threading.py", line 982, in run
pd_zurg  |     self._target(*self._args, **self._kwargs)
pd_zurg  |   File "/plex_debrid/ui/__init__.py", line 408, in threaded
pd_zurg  |     library = content.classes.library()[0]()
pd_zurg  |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pd_zurg  |   File "/plex_debrid/content/services/trakt.py", line 616, in __new__
pd_zurg  |     ui_print('[trakt] getting ' + current_user[0] + "'s" + ' entire trakt collection ...')
pd_zurg  |                                   ~~~~~~~~~~~~^^^
pd_zurg  | IndexError: list index out of range

Still getting the error above, even when a trakt user is set + authorized via the UI.

Still getting the error above. Even with added and authorized trakt user via the plex_debrid UI


Azure Storage File Shares client library for .NET: Upload failing to azure file share

I am trying to upload .msg file to azure file share. I followed the Azure Storage File Shares client library for .NET
My code
var connection = "DefaultEndpointsProtocol=https;AccountName=xxxx;EndpointSuffix=core.windows.net";
var shareName = "myfileshare";
var fileName = "Test details.msg";
var localFilePath = @"C:\Users\xxxx\Desktop\sample\Test details.msg";

var brand = "ABC";
var year = "2021";
var month = "January";
var emailDirection = "Inbound";

ShareClient share = new ShareClient(connection, shareName);

ShareDirectoryClient brandDirectoryClient = share.GetDirectoryClient(brand);

var yearDirectoryClient = brandDirectoryClient.GetSubdirectoryClient(year);
yearDirectoryClient.CreateIfNotExists();

var monthDirectoyClinet = yearDirectoryClient.GetSubdirectoryClient(month);
monthDirectoyClinet.CreateIfNotExists();

var mailDirectoryClient = monthDirectoyClinet.GetSubdirectoryClient(emailDirection);
mailDirectoryClient.CreateIfNotExists();

// Get a reference to a file and upload it
ShareFileClient file = mailDirectoryClient.GetFileClient(fileName);
using (FileStream stream = File.OpenWrite(localFilePath))

{
    file.Create(stream.Length);
    var result  = file.UploadRange(new HttpRange(0, stream.Length), stream);
}

I am using Azure.Storage.Files.Shares version 12.8.0 But I get following exception
Message : The request was aborted: The request was canceled. Retry failed after 6 tries. Retry settings can be adjusted in ClientOptions.Retry.
Stack trace
at Azure.Core.Pipeline.RetryPolicy.<ProcessAsync>d__11.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azure.Core.Pipeline.RetryPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipeline.Send(HttpMessage message, CancellationToken cancellationToken)
   at Azure.Storage.Files.Shares.FileRestClient.UploadRange(String range, ShareFileRangeWriteType fileRangeWrite, Int64 contentLength, Nullable`1 timeout, Byte[] contentMD5, Stream optionalbody, ShareFileRequestConditions leaseAccessConditions, CancellationToken cancellationToken)
   at Azure.Storage.Files.Shares.ShareFileClient.<UploadRangeInternal>d__95.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azure.Storage.Files.Shares.ShareFileClient.UploadRange(HttpRange range, Stream content, Byte[] transactionalContentHash, IProgress`1 progressHandler, ShareFileRequestConditions conditions, CancellationToken cancellationToken)
   at xxx.UploadFileToShare(String connection, String shareName, String dirName, String fileName, String localFilePath) in C:\GitRepository\xxxx 100

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

ID: a3700ae6-6561-51cc-607b-eca5d00c1266
Version Independent ID: 1a907e55-5f7a-adb0-6fb0-9b534309049d
Content: Azure Storage File Shares client library for .NET - Azure for .NET Developers
Content Source: api/overview/azure/storage.files.shares-readme.md
Service: storage
Product: azure
Technology: azure
GitHub Login: @maggiepint
Microsoft Alias: magpint

@andrewr95 Thanks for your comment. We will review the issue and get back to you shortly.

changing to File.OpenWrite(localFilePath) fixed the issue


Small text changes to clarify

@lindydonna - Please review the proposed changes.  Thanks

#sign-off


Volumes from "parent" problem.

Hello!
I have error while deploy with centurion.
Could not apply volumes of non-existent container "parent"
So I comment this line (https://github.com/newrelic/centurion/blob/master/lib/centurion/service.rb#L95) and problem resolved.
I'm wondering why "VolumesFrom" option has default value "parent".
Is it OK? If I remove VolumesFrom default option?

docker version - 1.6.2

Hi @subicura, this seems like a backward-incompatible change in docker, at least that's what relistan suggests here https://github.com/newrelic/centurion/pull/108#issuecomment-98514185.
We hit this problem too, on docker 1.6 and removed the VolumesFrom directive and nothing bad happened yet. I can't find any information on what that is and why (and if) it has been deprecated though.

@kremso Thank you for your comment! It seems 1.6 problem.

Thanks @subicura @kremso. Looks like we need to figure out what's wrong with 1.6 in this area. They broke the versioned API again it seems.

Merged from @MarkBorcherding's fix-docker-1.6 branch. Tested against 1.5 as well and it's fine. Further back than that might experience an issue.


Inconsistent Signer Behavior

Hi there,
I'm trying to implement a Horcrux POC that would mimic my Production architecture with Quicksilver Testnet + Cosmovisor. I have three Sentry nodes up and synced and I'm on Horcrux v3. Processes are all running in plain Kubernetes, no RBAC, no network policies, TCP connectivity has all been tested with telnet and the processes can all talk to each other just fine.
Scenario 1
When I plug each individual Signer into a dedicated Sentry, nothing happens.
Signer configs, chainNodes.privValAddr changes depending on the node:
signMode: threshold
thresholdMode:
  threshold: 2
  cosigners:
    - shardID: 1
      p2pAddr: tcp://quicksilver-testnet-signer-0.quicksilver.svc.cluster.local:2222
    - shardID: 2
      p2pAddr: tcp://quicksilver-testnet-signer-1.quicksilver.svc.cluster.local:2222
    - shardID: 3
      p2pAddr: tcp://quicksilver-testnet-signer-2.quicksilver.svc.cluster.local:2222
  grpcTimeout: 1000ms
  raftTimeout: 1000ms
chainNodes:
  - privValAddr: tcp://quicksilver-testnet-sentry-[0,1,2].quicksilver.svc.cluster.local:1234
debugAddr: ''

Sentry logs:
quicksilver-testnet-sentry-0 2:26AM INF running app args=["start","--home","/.quicksilverd","--moniker","FooBar-0"] module=cosmovisor path=/.quicksilverd/cosmovisor/genesis/bin/quicksilverd
quicksilver-testnet-sentry-0 2:27AM INF starting node with ABCI Tendermint in-process
quicksilver-testnet-sentry-0 2:27AM INF service start impl=multiAppConn module=proxy msg={}
quicksilver-testnet-sentry-0 2:27AM INF service start connection=query impl=localClient module=abci-client msg={}
quicksilver-testnet-sentry-0 2:27AM INF service start connection=snapshot impl=localClient module=abci-client msg={}
quicksilver-testnet-sentry-0 2:27AM INF service start connection=mempool impl=localClient module=abci-client msg={}
quicksilver-testnet-sentry-0 2:27AM INF service start connection=consensus impl=localClient module=abci-client msg={}
quicksilver-testnet-sentry-0 2:27AM INF service start impl=EventBus module=events msg={}
quicksilver-testnet-sentry-0 2:27AM INF service start impl=PubSub module=pubsub msg={}
quicksilver-testnet-sentry-0 2:27AM INF service start impl=IndexerService module=txindex msg={}
quicksilver-testnet-sentry-0 2:27AM INF service start impl=SignerListenerEndpoint module=privval msg={}
quicksilver-testnet-sentry-0 2:27AM INF SignerListener: Listening for new connection module=privval
quicksilver-testnet-sentry-0 2:27AM INF SignerListener: Blocking for connection module=privval
quicksilver-testnet-sentry-0 2:27AM INF SignerListener: Connected module=privval

It appears to be acting like none of the signing requests are going through to the signers. The behavior appears to be expected when signing isn't happening at all based on what I've managed to sift out of Tendermint issues like this one but ultimately I'm not sure.
Signer logs all look the same, the target address of course changes depending on which Signer is pointed at which Sentry:
horcrux-quicksilver-testnet-signer-2 I[2023-06-09|15:12:01.188] Horcrux Validator                            module=validator mode=threshold priv-state-dir=/.horcrux/state
horcrux-quicksilver-testnet-signer-2 I[2023-06-09|15:12:01.196] service start                                module=validator msg="Starting CosignerRaftStore service" impl=CosignerRaftStore
horcrux-quicksilver-testnet-signer-2 I[2023-06-09|15:12:01.196] Local Raft Listening                         module=validator port=2222
horcrux-quicksilver-testnet-signer-2 I[2023-06-09|15:12:01.199] debug-addr not defined; debug server disabled module=debugserver
horcrux-quicksilver-testnet-signer-2 I[2023-06-09|15:12:01.200] service start                                module=validator msg="Starting RemoteSigner service" impl=RemoteSigner
horcrux-quicksilver-testnet-signer-2 I[2023-06-09|15:12:01.219] Connected to Sentry                          module=validator address=tcp://quicksilver-testnet-sentry-2.quicksilver.svc.cluster.local:1234

Scenario 2
If I hand off this config to all the Signers, with all of the Sentries included in the chainNodes list:
signMode: threshold
thresholdMode:
  threshold: 2
  cosigners:
    - shardID: 1
      p2pAddr: tcp://quicksilver-testnet-signer-0.quicksilver.svc.cluster.local:2222
    - shardID: 2
      p2pAddr: tcp://quicksilver-testnet-signer-1.quicksilver.svc.cluster.local:2222
    - shardID: 3
      p2pAddr: tcp://quicksilver-testnet-signer-2.quicksilver.svc.cluster.local:2222
  grpcTimeout: 1000ms
  raftTimeout: 1000ms
chainNodes:
  - privValAddr: tcp://quicksilver-testnet-sentry-0.quicksilver.svc.cluster.local:1234
  - privValAddr: tcp://quicksilver-testnet-sentry-1.quicksilver.svc.cluster.local:1234
  - privValAddr: tcp://quicksilver-testnet-sentry-2.quicksilver.svc.cluster.local:1234
debugAddr: ''

The Signer cluster connects to one Sentry. The Sentry pulls blocks, the Signer cluster signs blocks. Everything appears to work, except the other Sentries sit there waiting for remote validators to connect and they don't sync at all, which is not ideal.
The Signer cluster always picks the last Sentry in the list, even when I kill all the Signer nodes at the same time, multiple times in a row. I would expect to see the cluster pick a different Sentry on restart, and/or I would expect the individual Signers to each pick a different Sentry (potentially unfounded expectation informed by years of working with cluster-y softwares).
Killing the Sentry causes the Signer cluster to stop signing until the Sentry comes back. The Signer cluster does not try to connect to a different Sentry when the connection is lost.

What am I doing wrong? Any help would be super appreciated. If I've missed a glaringly obvious thing in the docs about how this is all supposed to work, feel free to just drop the link on my face. Ideally I'd like to have a full mesh or 1:1 arrangement between Sentries and Signer processes for maximum fault tolerance.
Thanks in advance.

Are you seeing the This node is a validator log when your sentry nodes start up? Are the sentry nodes in sync with the chain? It looks like horcrux is properly configured, but it is not receiving any sign requests from the sentries.

The Signer cluster always picks the last Sentry in the list, even when I kill all the Signer nodes at the same time, multiple times in a row.

The signers do not pick a sentry. The cosigners connect to all of the configured sentries. The sentries pick a remote signer. This is standard tendermint behavior, it will only send sign requests to one of the connected remote signer.

Thanks so much for your response!

Are you seeing the This node is a validator log when your sentry nodes start up? Are the sentry nodes in sync with the chain? It looks like horcrux is properly configured, but it is not receiving any sign requests from the sentries.

I am not finding the phrase This node is a validator in the logs on any of the sentries.
The sentries are fully synced and reporting catching_up: false via the /status RPC endpoint before I try to plug in the signers.
Your assertion about not receiving signing requests matches expectations I've had regarding these symptoms based on other Github issues I've unearthed in the Tendermint SDK Github repo, unfortunately the trail of breadcrumbs goes a bit dry from there and I'm not sure how to triage further. Would definitely appreciate any counsel you might have to offer.

The signers do not pick a sentry. The cosigners connect to all of the configured sentries. The sentries pick a remote signer. This is standard tendermint behavior, it will only send sign requests to one of the connected remote signer.

Ok, so all of my sentries are log_level=debug at the moment, and right now I have 2/3 sentries that most recently logged SignerListener: Connected module=privval from when I first plugged in the signer cluster a few days ago and that's it. The RPC port on these sentries is not open/listening so I can't query the node status in any fashion -- I'm guessing there's a handshake that's failed here that gatekeeps whether the RPC port is opened. Meanwhile, the last Sentry is logging aggressively and clearly syncing and blocks are being signed by the signer cluster and the RPC port is open. Not sure how to interpret this behavior, and also not sure how to triage from here.
When I restart one of the of the sentries that isn't spewing logs, the Horcrux cluster does gripe until the sentry comes back into service. Horcrux says it's connected, but the sentry continues to loop a connection timeout:
quicksilver-testnet-sentry-0 2:36PM INF SignerListener: Listening for new connection module=privval
quicksilver-testnet-sentry-0 2:36PM INF SignerListener: Blocking for connection module=privval
quicksilver-testnet-sentry-0 2:36PM ERR SignerListener: Ping timeout module=privval

This does not appear to disrupt signing activity. The sentry does not log SignerListener: Connected until I restart the Horcrux cluster.

Is your key registered as a validator on the chain?

Yes. I originally spun up a testnet sentry node and used its keys to register as a validator, then migrated the keys to Horcrux. I still have the old infrastructure laying around, the node is just stopped there from when I migrated it. On the testnet explorer I can see that the validator is registered, active and signing.
https://testnet.quicksilver.explorers.guru/validator/quickvaloper16r00sgkv6uqaf358nvawexul7cuwmx52ca86rd

Can you confirm that your key shards have the correct id for all cosigners? Check both rsa_keys.json and "regen-redwood-1_chain.json on each.

I have isolated Secret objects populated for each of the signers, and the id values on both rsa_keys.json and rhye-1_shard.json are consistent across all nodes. Signer 0 has id: 1, signer 1 has id: 2, signer 2 has id: 3`.

~50ms when traversing Availability Zones, ~5ms when inside the same AZ.

Did you change the cosigner configuration in config.yaml on any of the cosigners? Deleting the raft dir on all cosigners is necessary when doing this.

They were all initialized with the same config.yaml at roughly the same time in both scenarios.


Update the quickstart of Java JDBC with MySQL to include credential-free connection

As title.

@hui1110

Microsoft authors and contributors need to make content contributions through the private repository so the content can be staged and validated by the current validation rules.
After you make your changes in the private repo, review the articles on staging, and fix any validation issues, you can add the sign-off comment to let PR reviewers know that the updates are ready to be merged.
Read about authors working in the public repo for more information.
If you need help getting set up to work in the private repo, see Set up Git repository locally for documentation.

@hui1110 - please resubmit your PR via the private repo 'azure-docs-pr' . thanks.


IntelliJ reports old version of Kotlin

Whenever I open my project that has MapDB IntelliJ reports that the MapDB version of Kotlin is old (something like 1.x) and suggests I update.  However, since Kotlin is pulled in as part of the maven object, the update can't happen.
Perhaps the version of Kotlin included/referenced with the maven object can be updated

See also https://github.com/jankotek/mapdb/issues/995


Automatically highlights the first row option after typing parameter?

Is there a way how to make the first row option highlighted after typing parameter?  So I can just press tab right after the option shows on first row, (with selectOnTab option set on true in selectpicker option)
It think this is default on selectpicker without ajax
Btw.. this plugin in is wonderfull.. great job..

This really falls outside the scope of this project. There are already events and callback functions you can utilize to customize something like this to your liking.


Add 1 passenger

Remove the option to add more than one passenger in a single drive.
One drive = one passenger.

Change backend to allow only one passenger per drive.
Migrate existing data
Update frontend selectors

@jacol12345 @juliaanholcer Bierzemy to!


TODO: Offline Analysis

[x] Main Offline Gui can call CNMF and MCorr Guis respectively
[x] pd dataframe creation and management
[x] Adding cnmf and mcorr items to dataframe (and in list widget ui)
[x] Extracting parameters from cnmf and mcorr guis, saving to respective item in dataframe
[x] Removal of items (in dataframe and in list widget ui)
[x] Run motion correction with input parameters
[x] Run cnmf with input parameters (refit is also possible)
[x] Display results of cnmf in napari
[x] Selecting item in listwidget displays parameters in param_textbox
[x] stdout shown in stdout_textbox on main gui
[x] Read F order memmaps in napari to display mcorr results
[x] show mcorr mean projection
[x] Load associated CNMF video upon double click
[x] Visualize correlation image as a layer
[ ] napari1d multi line for CNMF traces
[ ] Component evaluation GUI to filter components
[x] Find out best way to visualize ROIs, possible to show a mask or just outline? For showing ROIs without filled color, just set face_color with alpha=0.0
[ ] Click on a list of ROIs, highlight the ROI and trace
[x] Add CNMFE
[ ] Extract framerate from video file
[ ] See how napari can do random access scrolling of tif files etc.

Nice to have's:

[ ] Show reconstructed movie (denoised, deconvolved etc.)
[x] View raw and mcorr movie side by side
[ ] Option to run MC along with CNMF in CNMF(E) guis

Need to make that Abort button work and also block both Start buttons when a batch is running. It is currently possible to start the batch tons of times and flood the system with processes.


verify x-remote-extra headers are passed through KONK

X-Remote-User/Group headers are being passed through but the X-Remote-Extra-OBO is missing.
The client (kubectl, ingress, bulk) will be passing additional headers X-Remote-[User/Group/Extra-OBO]. These headers are configured in KONK to be passed along to the backend apiservice here: https://github.com/infobloxopen/konk/blob/main/helm-charts/konk/values.yaml#L29-L31
We need to verify these headers are present in the example-apiserver. It should be in a way that tests can verify it. My suspicion is that an auth plugin is the way to verify and check for these headers. https://github.com/kubernetes/sample-apiserver#authentication-plugins Anything that can intercept headers to the API Server endpoints will due here. An easy way to turn this into a test is to intercept headers and write them to log. A command line test could issue client calls and check the k8s pod logs for specific strings.
Kubectl can not be extended with custom headers. Use cURL to send custom headers and authenticate to k8s with client certificates.
k get secrets runner-konk-ingress-client -o yaml
# nginx certs can be used by cURL comand below

curl -k --cacert ca.crt -vvv -XGET  -H "User-Agent: kubectl/v1.18.8 (linux/amd64) kubernetes/9f2892a"
-H "Accept: application/json, */*"
-H "X-Remote-User: user-test-passed" # {unique token easy to find in logs}
'https://localhost:6443/api?timeout=32s' 2>&1

Current State
A sample auth plugin has been introduced to example-apiserver, but it does not currently receive any traffic when example-apiserver is contacted. https://github.com/infobloxopen/konk/blob/main/test/apiserver/pkg/auth/remoteheader/remoteheader.go This is one approach to intercept incoming traffic and look for headers
A/C

PR test that verifies headers sent by a client appear in the server.

v1 task created https://www10.v1host.com/InfobloxNewV1/story.mvc/Summary?oidToken=Story%3A282242&RoomContext=TeamRoom%3A7327


DNM : Troubleshoot 1 : PR 2379

Troubleshooting PR https://github.com/opensrp/fhircore/pull/2379

Fix found : To closed by https://github.com/opensrp/fhircore/pull/2379


Nanoc: Fix capitalisation + config filename

Reasons for making this change:

Fix capitalisation of Nanoc (Nanoc, not nanoc)
Use nanoc.yaml rather than config.yaml (the former is the default filename, while the latter is deprecated)

Links to documentation supporting these rule changes:

The Nanoc web site

@ddfreyne thanks!


In vscode 1.85.0 version ,  explorer does not display any files and directories

Describe the bug
In the VSCode 1.85.0 version, the explorer does not display any files and directories when "explorer.fileNesting.enabled": true is set.

However, when this setting is changed to "explorer.fileNesting.enabled": false, the files and directories are shown.

Is there any rule that affects this behavior?
vscode version info
Version: 1.85.0 (system setup)
Commit: af28b32d7e553898b2a91af498b1fb666fdebe0c
Date: 2023-12-06T20:48:09.019Z
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.18363

Reproduction
In window10 and then download vscode 1.85.0
System Info
System:
    OS: Windows 10 10.0.18363
    CPU: (8) x64 Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
    Memory: 7.67 GB / 15.74 GB
  Binaries:
    Node: 18.16.0 - ~\AppData\Local\fnm_multishells\16564_1702006014106\node.EXE
    npm: 9.5.1 - ~\AppData\Local\fnm_multishells\16564_1702006014106\npm.CMD
  Browsers:
    Chrome: 120.0.6099.71
    Edge: Spartan (44.18362.449.0)
    Internet Explorer: 11.0.18362.1

Used Package Manager
pnpm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guide.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
[X] The provided reproduction is a minimal reproducible of the bug.

Reason：Unexpected star in SufTrie key: .knip.
Temporary workaround： settings.json
"package.json": "*.knip.*, .browserslist*, ..."
"rush.json": "*.knip.*, .browserslist*, ..."
// delete *.knip.*,
"package.json": ".browserslist*, ..."
"rush.json": ".browserslist*, ..."

thank u, this works for me

Same Question. It took me a whole morning to find out what went wrong, even if I reinstalled Vscode.
Until I look at the "settings.json" change log, I just realized 'vscode-file-nesting-config' is the culprit.

It should already be fixed, it might be some network cache issue. You can manually copy the settings from README to override, disable the auto-update, or wait for a while longer until the cache get updated.


ML: mobile - can't scroll to bottom of the filter menu

The 'invalid' filter is getting cut off, tested on safari on ios and chrome on mac OS:

Still not working for me on iOS mobile

Filter menu is now scrolling off the screen. It should be fixed.


Added Swedish Translation

Added Swedish translation for all of the translatable strings.

Hi @Snicon,
I just updated our lang files, could you update your pull request accordingly?

@CorwinDev That should be it, please let me know if I missed something! :)


Remove Older Versions of the Application After Update on Windows

Expected Behavior
Older Version of the Program Should Be Removed
Actual Behavior
The Older Versions Coexist with the Update
Reproduction Steps

Update
Check AppData

Is there an existing issue for this?

[X] I have searched the issue tracker for this problem.

Additional Information

Insomnia Version
9.3.3
What operating system are you using?
Windows
Operating System Version
Windows 11
Installation method
download from official website
Last Known Working Insomnia version
9.3.3.

@filfreire since he is working on Windows improvements already


Added ft = { <haskell_files> } so it lazy loads only when entering a Haskell file.
Also formatted the file

Thanks!


Rewrite null check variants to requireNonNull

Follow up of this issue.
Suggested commit message:
Extend `RequireNonNull{,WithMessage}` and Is{,Not}Null Refaster rules (#523)

Fixes #437.

Rebased and tweaked suggested commit message.

One open question is how to address the "Statement" part of the Refaster rules in the suggested commit message. I'm not sure if it adds value to put it there. Any suggestions @Stephan202 ?


Fix file command in determine_mime_type plugin

The file utility's option parser is greedy and interprets every
argument that begins with a hyphen as an option. This means pathnames
that start with a hyphen cause the command to fail, either by invalid
options or never passing it required input. For example,
file -image.jpg looks like combined options and is parsed as -i, -m,
-a (invalid), etc.
To prevent this, -- is appended to the command to signify the end of
options and allows subsequent arguments to be excluded from option
parsing.

Here's a standalone script that shows the incorrect behavior.
$ wget -O -image.jpg http://i.imgur.com/aDNltvP.jpg
$ wget https://gist.githubusercontent.com/zaeleus/5784e0b966555c5d008ec534ad7b1501/raw/c311f5b098e91eecbe6dc814df57c5bfc839121f/shrine_61.rb
$ ruby shrine_61.rb
Usage: file [-bchikLNnprsvz0] [-e test] [-f namefile] [-F separator] [-m magicfiles] [-M magicfiles] file...
       file -C -m magicfiles
Try `file --help' for more information.
["isn't of allowed type: [\"image/jpeg\"]"]

This is perhaps another issue and seeing https://travis-ci.org/janko-m/shrine/builds/128177438 fail, the current file command differs in behavior following symlinks on Linux (does not follow) and OS X (follows). In the context of shrine, it may be more intuitive to follow symlinks using the --dereference option.

Thank you for the patch! I'm curious to why your file is a symlink in this case, while the other text/fixtures/image.jpg isn't. Probably has something to do with changing the directory.
I would probably makes sense to follow symlinks in general. I'm not seeing a use case for it at the moment, but not seeing any downside either. I will add it to my TODO list, to evaluate if this is secure, and will see about adding it.
Do you think that instead of changing the directory, you could just copy spec/fixtures/image.jpg into project root (with the filename of -image.jpg), and then simply delete it after the test has finished?

I'm curious to why your file is a symlink in this case, while the other text/fixtures/image.jpg isn't.

My first patch had a symlink named -image.jpg that pointed to image.jpg, but after seeing it fail on Travis, I pushed a new one that used a copy instead, which confirmed my suspicion that file on Linux doesn't follow symlinks by default like on OS X.

Do you think that instead of changing the directory, you could just copy spec/fixtures/image.jpg into project root (with the filename of -image.jpg), and then simply delete it after the test has finished?

I updated the test to do this.


error with disabled _source field

Hello,
Because of larger fields in the log entry I have disabled the _source field. Now, logtrail shows the following error and I cannot see the data in logtrail:

Error while executing search TypeError: Cannot read property 'USER_DATA' of undefined
at convertToClientFormat (/logserver/applications/kibana-6.5.4-linux-x86_64/plugins/logtrail/server/routes/server.js:72:19)
at /logserver/applications/kibana-6.5.4-linux-x86_64/plugins/logtrail/server/routes/server.js:209:17
at bound (domain.js:301:14)
at runBound (domain.js:314:12)
at tryCatcher (/logserver/applications/kibana-6.5.4-linux-x86_64/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/logserver/applications/kibana-6.5.4-linux-x86_64/node_modules/bluebird/js/main/promise.js:503:31)
at Promise._settlePromiseAt (/logserver/applications/kibana-6.5.4-linux-x86_64/node_modules/bluebird/js/main/promise.js:577:18)
at Promise._settlePromises (/logserver/applications/kibana-6.5.4-linux-x86_64/node_modules/bluebird/js/main/promise.js:693:14)
at Async._drainQueue (/logserver/applications/kibana-6.5.4-linux-x86_64/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/logserver/applications/kibana-6.5.4-linux-x86_64/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues (/logserver/applications/kibana-6.5.4-linux-x86_64/node_modules/bluebird/js/main/async.js:15:14)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)

The field exists and can be queried in Kibana. I use Version 6.5.4 of Kibana/Elasticsearch and v0.1.30 of LogTrail.

@wolframhaussig logtrail assumes the fields are present inside _source. I will check how Kibana handles the docs when the source field is not present. Meanwhile, you edit this https://github.com/sivasamyk/logtrail/blob/master/server/routes/server.js#L49 line to remove _source and directly query the response.

@sivasamyk Thanks a lot! I will use the workaround for now.

closed as we do not use logtrail any longer


User groups

Simple feature of user groups.
Maybe in the User table, with a new "Type: User/Group", so to many places we can link to a specific user or to a group

Already in py-userbase and go-userbase. Version 0.5


APT whitelist request for libaugeas0

Ran tests and found setuid bits. See https://travis-ci.org/travis-ci/apt-whitelist-checker/builds/72229196.

I think that occurences of setuid and setgid are somethink like "schema" definitions for external configuration files.

Ran tests and found setuid bits. See https://travis-ci.org/travis-ci/apt-whitelist-checker/builds/72284726.

OK. I'll re-run the test, so that I can get the list of packages.

Ran tests and found setuid bits by purely textual search. Further analysis is required.
If these are found to be benign, add:
augeas-tools libaugeas-dev libaugeas0 augeas-dbg augeas-lenses augeas-doc
See https://travis-ci.org/travis-ci/apt-whitelist-checker/builds/72404957.


Upgrade to selenium4 beta 3

I was trying to help here, so I ran the tests in my machine.
May I suggest to add a user.language for tests to the main build.gradle to avoid failing tests due to different number format expected?
tasks.withType(Test).configureEach {   systemProperties = [     'user.language': 'EN'   ] }

@cocorossello Hi. Thank you for your help. Yes, we need help with upgrading to Selenium 4.0.0.beta1.
P.S. I added a comment in https://github.com/selenide/selenide/pull/1408

Now only 5 test are red. 4 of them are test for unused com.codeborne.selenide.webdriver.MergeableCapabilities


Programming addition https://github.com/wereket/lambda-emacs/blob/main/.local/lambda-library/lambda-setup/lem-setup-programming.el

Sorry for the confusion
https://github.com/wereket/lambda-emacs/blob/main/.local/lambda-library/lambda-setup/lem-setup-programming.el

Cool -- I'll take a look later today. Thanks.

I pushed a few changes -- let me know what you think or if you have any questions.

Hi @wereket -- just checking in on the status of this. Let me know if you have any questions about the changes I pushed.


Fix Bitfinex Liquidate error with AccountType.Cash

Description

Moved updating of cashbook for fees from SecurityPortfolioModel to OrderFee
Updated BitfinexBrokerage to handle fees in base currency (subtracted from the fill quantity)

Related Issue
Closes #4851
Motivation and Context

Incorrect portfolio holding after buying an asset in Bitfinex with AccountType.Cash

Requires Documentation Change
No.
How Has This Been Tested?

Manually tested the example in #4851 with Bitfinex

Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[x] Refactor (non-breaking change which improves implementation)
[ ] Performance (non-breaking change which improves performance. Please add associated performance test and results)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Non-functional change (xml comments/documentation/etc)

Checklist:

[x] My code follows the code style of this project.
[x] I have read the CONTRIBUTING document.
[x] All new and existing tests passed.
[x] My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

@StefanoRaggi  Warmup function on Bitfinex seems was also broken. Could you have a look on #5119 too?

@StefanoRaggi  Warmup function on Bitfinex seems was also broken. Could you have a look on #5119 too?

@StefanoRaggi  Warmup function on Bitfinex seems was also broken. Could you have a look on #5119 too?

@StefanoRaggi  Warmup function on Bitfinex seems was also broken. Could you have a look on #5119 too?


spring-kafka-test scala transitive vulnerability

I am using spring-kafka-test<EMAIL_ADDRESS>together with latest spring boot 2.7.4.
I know that it is a test dependency but snyk detected vulnerability in following path:
<EMAIL_ADDRESS>›<EMAIL_ADDRESS>›<EMAIL_ADDRESS>https://security.snyk.io/vuln/SNYK-JAVA-ORGSCALALANG-3032987
I know that I can pin other version of broker or even scala, but can transitive itself be fixed?

cc/ @wilkinsona Thoughts? If we override here, will Boot need to do so too?

Boot doesn't have a managed version for Scala and we wouldn't want to add one. If I were you I wouldn't do anything in Spring Kafka either. IMO, this should be fixed at source with a new Kafka 3.1.x release that upgrades to Scala 2.13.9.

That’s what I thought. @nikoncode please raise the issue with the Kafka folks.


fix: Correct spelling of GitHub

It is correct to capitalize the H in GitHub's brand name.

Hello! Thank you for your contribution. As of now we do not accept typo fixing PRs. Especially when they fix only one typo. We do not want repo to be flooded with one line PRs as this as impact on PRs readability.


Create a custom markdown/latex editor

Considering to create a custom markdown/latex editor with the help of markdown/latex parsing packages
Parsing packages:

marked (Markdown parsing and rendering package)
katex (Latex parsing and rendering package)

Editor's proposal functions:

Supports Title, Subtitle, Body, Caption text types
Basic text formats (bold, italic, underline)
Quote
Code block
Link
Ordered/Unordered list
Checkbox
Create table
Support upload and render images
Auto format when typing

This issue should be split to smaller issues


object-fit setting for slider

Ability to change object-fit css style by a setting.

Sorry for long response... good idea👍🏻 today new release i`m merge this staff 👍🏼

Thanks, great lib btw :) (I'll post another small tweak today)


watermark_clickable_fix

Fixes #249
The clickable area was hidden under the simulation area.Setting the z-index solved the problem

Thanks!


Installation and basic Connection

I want to kick the tires of this package, as this is exactly what I was looking for, but I ran into a few issues.
For context, I am running on Colab.  Notebook and output here: https://colab.research.google.com/drive/1Y8Le95TLcVu3GR3IsiySa8l-MOJ7nNyj

pip3 and pip install didn't work, so I had to clone the repo to install
gmail = Gmail() failed

Just wanted to share, but admit it could be related to using the Colab environment, though I generally haven't had issues in the past.

To address the first issue, the package is certainly on PyPi, so pip3 install simplegmail should work in all environments you would expect it to.
Second, the first time you create a new instance of the Gmail class, (gmail = Gmail()), a browser window is opened to confirm permissions for your Google account.
I suspect that both of these issues are related to the Colab environment. I will try to look into what can be done with regard to that. If you have any suggestions, feel free to post them here.


DFS for Competitive Programming and the Gold Mine Problem

Depth First Search or DFS for a Graph
Depth First Traversal (or Search) for a graph is similar to Depth First Traversal of a tree. The only catch here is, unlike trees, graphs may contain cycles, a node may be visited twice. To avoid processing a node more than once, use a boolean visited array.
Depth-first search is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible along each branch before backtracking. So the basic idea is to start from the root or any arbitrary node and mark the node and move to the adjacent unmarked node and continue this loop until there is no unmarked adjacent node. Then backtrack and check for other unmarked nodes and traverse them. Finally print the nodes in the path.
Algorithm:
Create a recursive function that takes the index of node and a visited array.
Mark the current node as visited and print the node.
Traverse all the adjacent and unmarked nodes and call the recursive function with index of adjacent node.
I made an easy and efficient DFS code in cplusplus, for competitive programming.
Gold Mine Problem
Given a gold mine of n*m dimensions. Each field in this mine contains a positive integer which is the amount of gold in tons. Initially the miner is at first column but can be at any row. He can move only (right->,right up /,right down) that is from a given cell, the miner can move to the cell diagonally up towards the right or right or diagonally down towards the right. Find out maximum amount of gold he can collect.
Examples:
Input : mat[][] = {{1, 3, 3},
{2, 1, 4},
{0, 6, 4}};
Output : 12
{(1,0)->(2,1)->(2,2)}
Input: mat[][] = { {1, 3, 1, 5},
{2, 2, 4, 1},
{5, 0, 2, 3},
{0, 6, 1, 2}};
Output : 16
(2,0) -> (1,1) -> (1,2) -> (0,3) OR
(2,0) -> (3,1) -> (2,2) -> (2,3)
Input : mat[][] = {{10, 33, 13, 15},
{22, 21, 04, 1},
{5, 0, 2, 3},
{0, 6, 14, 2}};
Output : 83
Algorithm:
Create a 2-D matrix goldTable[][]) of the same as given matrix mat[][]. If we observe the question closely, we can notice following.
Amount of gold is positive, so we would like to cover maximum cells of maximum values under given constraints.
In every move, we move one step toward right side. So we always end up in last column. If we are at the last column, then we are unable to move right
If we are at the first row or last column, then we are unable to move right-up so just assign 0 otherwise assign the value of goldTable[row-1][col+1] to right_up. If we are at the last row or last column, then we are unable to move right down so just assign 0 otherwise assign the value of goldTable[row+1][col+1] to right up.
Now find the maximum of right, right_up, and right_down and then add it with that mat[row][col]. At last, find the maximum of all rows and first column and return it.

Why did you close bro? My PR was in mature time in hacktoberfest :(