add worker only controller with operator for machine health check

Which issue this PR addresses:
Work item: 10747624
What this PR does / why we need it:
Reduce the number of node ready alerts by utilizing the machine health check controller
Test plan for issue:
manual testing on a dev cluster, unit tests
Is there any documentation that needs to be updated for this PR?
Docs updated in PR

@s-amann Thank you so much for working on this, this will fix a huge pain point during oncall. The code looks good to me in general, but when i tried to create a cluster, i ran into some issues with the manifest not being applied correctly.
Am i missing something?

Am i missing something?
Not that I know of, I will try the same and see if I need to make any additional changes.

Since this updates a manifest, it should belong on the master -- the manifest will cause things to be deployed on the workers. The controller would only run on the worker if it was doing something that had to be done on a worker (e.g. internet checking), and as a consequence runs with lower permissions than the operator on the master.

Regarding rolling this out in a few clusters first / having the flag set to false by default, in the past we have rolled out stuff like this everywhere assuming we agree on the design, so I'm not sure if there are other plans.

Yes, we are now deploying different behavior off by default where possible. This will, in future, be paired with things that allow us to update the defaults for new clusters without an RP release. See https://docs.google.com/document/d/1NQrG3LmcdpwSzP_UfShfr9dawganlEKbRbeOhUiewj8/edit for the rationale.

Unit test coverage is looking good, but I'd add a few extra test cases (maybe "resource is not present, operator should create it", or "resource is present but modified, operator should correct it"), if possible.

I believe that by using DynamicHelper.Ensure, these test cases are redundant, since Ensure should create or update. A unit test for "not present -> operator creates" is valid though (since it makes sure that the DH stuff is called), the tests in https://github.com/Azure/ARO-RP/pull/1845 may be a good model for this.

@hawkowl / @cadenmarchese  I've updated the tests to cover a variety of cases. @karanmagdani there shouldn't be anything special for this operator to work locally. I was able to follow our docs on how to run an operator locally and see the mhc get created/reconciled on a dev cluster.

/azp run e2e

/azp run e2e

/hold
Found when aro.machinehealthcheck.managed is false and aro.machinehealthcheck.enabled is true and the EnsureDelete fails the controller will continuously try to delete the resource until it gets throttled. I will implement a wait between deletion attempts and update this PR.

/azp run e2e


Automated Package Upgrade

:tada: This PR is included in version 12.2.8 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Create figs

PR Type
other

Description

Added a new file figs to the project directory src/cobots2024/book/projects/202021038/.

Changes walkthrough 📝
Relevant filesMiscellaneous

figsAdded new file `figs` to the project directory

src/cobots2024/book/projects/202021038/figs

Created a new file named figs.

+1/-0

💡 PR-Agent usage:
Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

PR Type
other
Description

Added a new file figs to the project directory src/cobots2024/book/projects/202021038/.

Changes walkthrough 📝
Relevant files
**Miscellaneous **
figs
Added new file `figs` to the project directory
+1/-0

💡 PR-Agent usage:
Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions


ValueError at [...] invalid literal for int() with base 10: 'test78'

Hi,
When trying to create a new item, but leaving another mandatory field empty, the following error appears:
ValueError at /admin/select2_one_to_one/testmodel/51/change/
invalid literal for int() with base 10: 'test78'
This is easily reproductible on the demo site:

Let the field "Name" empty
Enter a non existing item in test field and select: Create "whatEverDoNotExit"
Click on the Save button

It looks like this bug was previously solved, but it occurs again in current version.
Best

Very interresting indeed, I think the best solution here is to move the
logic inside CreateModelField* clean() methods inside WidgetMixin's
value_from_datadict(), what do you think ?

Could you try with PR #609 please ?
Note that it's not compatible, but fixes the issue for sure.

Closing in favor of #609


Make better use of Hail Features

Current (re-) annotation process involves

converting MT to a VCF
also converting MT to a sites-only VCF
fragmenting sites-only VCF to annotate with VEP in parallel
annotating with VEP
collating annotations into a single Hail Table
re-ingesting the VCF into a MT
applying annotations HT to the MT

This has been done to emulate the annotation cycle in the CPG pipeline, which starts from a VCF, fragments, annotates, and builds the complete dataset.
Whoa whoa whoa, that's a terrible idea.... Possible improvements:

Don't generate a regular VCF, just skip that completely. Instead, generate a sites-only and then apply annotations directly back into the MT
Don't generate a whole-genome VCF then fragment by genome region. Instead use the Hail parallel export to generate a set number of VCFs. This parallel export should be MUCH faster
Implement region filtering prior to export (this has been done)
Splitting a genome by regions results in unbalanced partitions. A MT repartition -> parallel export would result in equal sized fragments

Complications:

Hail's parallel export uses unpredictable names - there is a file written that serves as a manifest. The simplest version of this becomes a 2-step process:

A small method/pythonJob to parse the manifest txt file, find the Nth entry (depending on the job), and copy into the batch as a local file
Annotate that fragment

It's a lot of re-writing for functionality we will rarely use, is it worth it?

relevant https://github.com/populationgenomics/production-pipelines/pull/629

Ehh, I don't think this is important any more. We're in a post-Hail exclusivity period, and if anything we should be supporting more VCF-based analysis


Don't use the Date constructor

Sometimes strange values like 'Foo 100' are being parsed as valid dates in JavaScript, so in return, this module is returning true for scenarios like this:
const date = new Date('Foo 100');
console.log(date.toString());
//=> 'Fri Jan 01  100 00:00:00 GMT+0000 (WET)'

According to Mozilla:

Note: parsing of date strings with the Date constructor (and Date.parse, they are equivalent) is strongly discouraged due to browser differences and inconsistencies. Support for RFC 2822 format strings is by convention only. Support for ISO 8601 formats differs in that date-only strings (e.g. "1970-01-01") are treated as UTC, not local.

http://stackoverflow.com/questions/42209366/why-is-javascript-parsing-non-datetime-strings-into-date-objects?noredirect=1#comment71580407_42209366


HTTP

There has been some valuable proposal work and prototyping on HTTP support for script, notably in #3, #73 , and #72. However, I haven't yet seen a design that looks obvious, and that's how I want it to be: so simple that when you see it, you think "Of course! That's the only way it could work."
Opening this yet-another-issue to track a new approach to HTTP support: not "what could we reasonably include?", but "what could we not reasonably leave out?"

What if the API were func HTTP(baseurl string, options ...HTTPOptions) *Pipe? HTTPOptions could default to GET, reject non-2XX, no special headers, no body, but let users provide those by passing in options. For things like users wanting to get the status code there could be a generic callback options like func HTTPHandler(func (*http.Response, *http.Request) error) HTTPOption to let users do whatever post-processing before the pipe that they want.

That's nice, but the addition of options makes it extremely complicated. In general, script is designed to help you quickly write concise programs that do fairly simple things. It's assumed that in the complicated case you won't mind writing normal Go code, which is very good at that kind of thing.
I'd like to try out a few ideas for HTTP support and kick the tyres on them a bit, to see how much of the common use cases they cover without options.

Hey @bitfield @carlmjohnson, I submitted PR-136 and wanted to see if this should do. This currently supports GET requests but I can extend it to support all other HTTP Verbs, authentication, etc.
Here's an example request -
statusCode, body, err := script.Http("https://postman-echo.com/get?foo1=bar1&foo2=bar2").Get()
Looking forward to your feedback.

Thanks, @M3talM0nk3y! How do you see this integrating with the other pipe-based operations in script? For example, how would you pipe the HTTP response into a JQ query?

Done (at last!) in #139, and thanks to everyone here for their valuable input in hashing out this design.


[Question] how to convert UBIGINT[] to Vec

I'm writting a little demo with a UBIGINT[] type column in my table.
While trying to query the table, the rustc told me that the trait bound `Vec<u64>: FromSql` is not satisfied:
  let mut stmt = conn
        .prepare("SELECT * FROM users WHERE id = ?")
        .map_err(internal_error)?;

    stmt.query_row(params![id.0], |row| {
        Ok(Response::User(UserResponse {
            arr: row.get(1)?,
        }))
    })
    .map_err(|err| match err {
        duckdb::Error::QueryReturnedNoRows => (
            StatusCode::NOT_FOUND,
            ErrorResponse {
                code: -1,
                reason: "User not found".to_string(),
            },
        ),
        _ => internal_error(err),
    })

Here is UserResponse definition:
#[derive(Debug, Serialize, Deserialize)]
pub struct UserResponse {
    pub arr: Vec<u64>,
}

Here is my table DDL:
    CREATE SEQUENCE IF NOT EXISTS seq_user_id START 0;

    CREATE TABLE IF NOT EXISTS users (
        id UBIGINT PRIMARY KEY DEFAULT nextval('seq_user_id'),
        arr UBIGINT[]
    );

After browsing the source code, I found that only Vec<u8> type are implementated with FromSql trait

Any advice are appreciated!

If I'm not mistaken, it's not yet implemented:
https://github.com/duckdb/duckdb-rs/blob/main/src/row.rs#L545-L580

Hi @dvic , thanks for your reference. I would close this issue and keep an eye on this.


add Cienna to Landscape. #101

Build failed because of:
No cached entry, and Cienna has issues with logo: https://drive.google.com/open?id=1afFEriDqtYHOGcjoqPgwdbhCjkzv12GR, Error in parsing SVG: Invalid character in tag name
Line: 28
Column: 108
Char: ?

need to go and get a new Cienna image


Getting rid of test script + Adding TRAP

Making hack/ dir DRY-er
@soltysh updating this as promised :)

Other than nasty ruby, LGTM.

@soltysh updated :) thanks

lgtm.


scx: 1.0.5 -> 1.0.6

Changelog: https://github.com/sched-ext/scx/releases/tag/v1.0.6
Diff: https://github.com/sched-ext/scx/compare/v1.0.5...v1.0.6

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review

x86_64-linux

:white_check_mark: 8 packages built:

scx.bpfland
scx.cscheds
scx.full
scx.lavd
scx.layered
scx.rlfifo
scx.rustland
scx.rusty

Managed to fix the bug, PR #358154

Let's close this then.


BDB meta version log check bug

https://github.com/apache/incubator-doris/blob/master/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java#L515
Version check using MetaContext seems meaningless. Code should be
         if (version > FeConstants.meta_version) {
                LOG.error("meta data version is out of date, image: {}. meta: {}."
                     + "please update FeConstants.meta_version and restart.",
                     MetaContext.get().getMetaVersion(), FeConstants.meta_version);
                System.exit(-1);
         }

Yes, you are right. Could you please make a PR to fix this?

OK


Make vpc_id optional

what

Make vpc_id optional

why

Since we have a boolean flag to enable/disable the creation of Flow Log, if that flag is set to false, we don't need to provide a VPC ID

/test all

/test all


Ensure webpack wrapper statement existence checks

As a follow-up to https://github.com/vercel/node-file-trace/pull/147 I just realised these statement checks can in theory cause undefined errors (like some previous bug cases).
This updates those checks to always ensure existence so they don't fail.

@styfle I actually just looked into this and it turns out that we have already guarded this case fine! Better to check these things though at least. Closing.


Update clion to 1.2.1

Thank you for the contribution. It was merged directly as 578ab749a78d57b594177d26c14e75f7705a7854 to keep commit history cleaner. Your contribution is still credited to you.


Add Flow Access API (only Header endpoints for now) (#256)

Goal of this PR
Fixes #171 and retrofits all unit tests throughout the project to use the recently added improvements:

Generic mock values for most frequently used rosetta and flow types
Baseline mock implementations in the mocks package

Most of the changed lines are because of the test retrofit, so I'm afraid the indexing changes might get lost in the mess. Please try to thoroughly review the specific parts that are additions for the transaction result index.
The retrofit has been pretty effective in reducing the amount of LoC while producing higher quality tests, so I'm pretty happy with it. Despite adding a new feature, its documentation, baseline mocks and a ton of generic values, this PR removes 600 more lines than it adds.
Checklist

[x] Is on the right branch
[x] Documentation is up-to-date
[x] Tests are up-to-date

As discussed, I will update the PR to no longer use a variable seed and put back the global variables. This is basically going to be a rollback of most of 1e303c7. Once that is done, the PR should be ready for a merge 🎉

I reverted what was discussed, tests are passing, formatting is correct, seems like all is go 👍 Merging it right now 🚀


Update TOOLKIT.md

Rewrote the documentation to create a more detailed and organized toolkit. (Me and Max talked about this in the slack).
Not completely sure about modifying paths, noise so I didn't add a lot of details!

Thank you this does look clearer.


argo wire store to json error

hello~ i'd like to use erlang-argo in iex shell.
I can success use :argo_wire_type_store.from reader(binary_data) to create a store.
but when I use to_json function it only print the error message below. doesn't show anything.
(argo 1.0.10) src/wire/argo_wire_type_store.erl:108: :argo_wire_type_store.to_json/1
iex:14: (file)

do I need to do something to set up my environment or some else?
sorry for my poor english and i am a newcomer to erlang. hope for help thanks.

sorry about that ,fix it.


Bugsnag reporting unreproducible errors only in Windows Chrome.

Describe the bug
Ever since in our project we upgraded our babel so that we only transpile stuff that should be transpiled, bugsnag has been reporting non-stop errors like: SyntaxError: Unexpected token 'const' or SyntaxError: Use of reserved word 'class'. Interestingly enough all of these errors only show for chrome windows.
But I can not reproduce a single one of these errors in any Windows Chrome I use and the app is working just as expected. Our users are using Chrome 79 and higher so both const and class is available to them.
Steps to reproduce
Not sure how this can be reproduced for other people, I assume this can't be reproduced in a normal setting otherwise this bug would have been addressed. But may be test by targeting Chrome: 79 or higher in babel and then test in windows chrome.
Environment

Bugsnag version: 7.1
Browser version (e.g. chrome, safari): Only Chrome
Device (e.g. iphonex): Only for windows

Error messages:
Error SyntaxError: Unexpected token 'const'

Hi @hasan-wajahat - What do you mean when you say you upgraded your babel? Which version did you upgrade to?
These are not errors that we have seen in the past. Would you be able to write into<EMAIL_ADDRESS>with a full code example which reproduces the issue?

@phillipsam I had:
babel-preset-env: "^1.7.0"
which I upgraded to:
@babel/core: "^7.11.1",
@babel/preset-env: "^7.11.0",
I actually have contacted support but they were unable to help me. That's why I opened the issue for the community.

@hasan-wajahat we have not been able to reproduce this issue, if you can send a repro case as mentioned above, we'll be happy to reopen and investigate further.


docs: update readme screenshot and emojis

:tada: This PR is included in version 1.0.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Invalidate Invite Link

Add mutation which allows a given invite link to be invalidated, disallowing any further use.

 User Management


vit_base_patch32_224 instead of vit_base_patch16_384

Hi,
Instead of vit_base_patch16_384, I'm trying to use vit_base_patch32_224 in the segmentation branch.
I did change
"patch_size":32 and
"transforms":{
"resize":224,
"p_flip":0.5,
"p_crop":0.3,
"p_rot":0.2
},
But its crashing for some reason. Do you know what else need to be changed in the config?

My bad, I think the paper didn't implement other patch sizes


Cleanup impersonation

This cleans up impersonation by replacing the convoluted "logout and then try to log back in as the use and if you fail try logging back in as the admin" workflow for impersonation with a much more streamlined one, which first acquires the user token (and persists it to cookies), and upon success destroys the admin token and reloads the UI .
One side benefit is that we never make any request with the user's token before we destroy the admin token, which is arguably a little safer.
cc @sandersonet @gib

Love the refactor, thanks! :+1:


crash on ssh

the lib is causing segfaults in ssh tunnels
 ulimit  -c unlimited
ssh -L27017:dbhostname:27017 user@otherhose
Segmentation fault (core dumped)

gdb --core core.10262 `which ssh`
Core was generated by `ssh -L27017:db:27017 other'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __strcmp_ssse3 () at ../sysdeps/x86_64/strcmp.S:983
983		movdqa	(%rdi), %xmm2
Missing separate debuginfos, use: debuginfo-install cyrus-sasl-lib-2.1.26-14.fc20.x86_64 keyutils-libs-1.5.9-1.fc20.x86_64 nspr-4.10.7-1.fc20.x86_64 nss-3.17.2-1.fc20.x86_64 nss-mdns-0.10-13.fc20.x86_64 nss-softokn-freebl-3.17.2-1.fc20.x86_64 nss-util-3.17.2-1.fc20.x86_64 openssl-libs-1.0.1e-40.fc20.x86_64 pcre-8.33-7.fc20.x86_64 xz-libs-5.1.2-12alpha.fc20.x86_64
(gdb) bt
#0  __strcmp_ssse3 () at ../sysdeps/x86_64/strcmp.S:983
#1  0x00007fb1247b9bb9 in find_alias_in_line () from /home/mdupont/.local/lib/libhostspriv.so
#2  0x00007fb1247b9cf0 in lookup_alias () from /home/mdupont/.local/lib/libhostspriv.so
#3  0x00007fb1247b9d9b in getaddrinfo () from /home/mdupont/.local/lib/libhostspriv.so
#4  0x00007fb124c07c3f in channel_setup_fwd_listener (type=type@entry=2, listen_addr=0x0, listen_port=27017,
    allocated_listen_port=allocated_listen_port@entry=0x0, host_to_connect=<optimized out>, port_to_connect=27017, gateway_ports=0) at channels.c:2767
#5  0x00007fb124c0b453 in channel_setup_local_fwd_listener (listen_host=<optimized out>, listen_port=<optimized out>, host_to_connect=<optimized out>,
    port_to_connect=<optimized out>, gateway_ports=<optimized out>) at channels.c:2933
#6  0x00007fb124beac73 in ssh_init_forwarding () at ssh.c:1145
#7  0x00007fb124be98bc in ssh_session2 () at ssh.c:1470
#8  main (ac=<optimized out>, av=<optimized out>) at ssh.c:993

static char *find_alias_in_line(char *hosts_line, const char *alias)
{
char *strtok_saveptr, *ret, *hash, *token = NULL;
if (alias == NULL)
	return NULL;
...

@neutronscott Could you fork & request a pull?


InvalidParameterValue: Capacity value 1 is not valid.

Initial terraform apply works great. Then making no changes just running a plan immediately says the min_capacity is going to be changed from 2 -> 1.
 ~ scaling_configuration {
   ~ min_capacity             = 2 -> 1
}

Running the terraform apply then gives this back
╷
│ Error: Failed to modify RDS Cluster (custodianmdr): InvalidParameterValue: Capacity value 1 is not valid. The valid scaling range for this cluster is 2 to 384. To change the clusters scaling range use the ModifyDBCluster call.
│       status code: 400, request id: 24b329d3-26a0-454b-a35e-c2ac75812be8
│
│   with module.aurora_pg_db.aws_rds_cluster.this[0],
│   on modules/terraform-aws-rds-aurora/main.tf line 45, in resource "aws_rds_cluster" "this":
│   45: resource "aws_rds_cluster" "this" {

I have run  terraform destroy, rm -rf .terraform and reapplied but I get the same issue.
I am calling the module with this
module "aurora_pg_db" {
  source = "./modules/terraform-aws-rds-aurora"

  name           = var.aurora_database_name
  engine         = "aurora-postgresql"
  engine_mode  = "serverless"
  autoscaling_enabled    = false
  create_random_password = false
  master_username        = local.db_creds.username
  master_password        = local.db_creds.password
  deletion_protection    = false
  skip_final_snapshot    = true
  vpc_id                 = var.aurora_vpc_id
  subnets                = flatten(var.aurora_subnet_ids)
  allowed_cidr_blocks    = ["<IP_ADDRESS>/0"]
}

Provider plugins
aws v4.0.0
random v3.1.0
I suspect user error, but can't see how.

FWIW, this is still an issue with serverless Aurora.


Request: example actions

Hey there, this plugin looks fantastic. I was just wondering if you possibly have in your roadmap some basic examples of media actions? Only asking due to being somewhat of a novice and the docs are bit confusing thus far.
Not sure if it would be simple but possible a metadata media action?

Hello @artemartemov,
This plugin is still in its beta state, hence the 0.x version.  We tried to encapsulate the hacks required to add actions by putting the logic inside this plugin.
Have you looked at the 2 plugins that actually use this one?  They provide a good working example of the usage.
https://github.com/Flamenco/grav-admin-media-replace
https://github.com/Flamenco/grav-admin-media-move
Make sure you add the runtime dependency checks, as Grav does not do that internally (yet); your plugin could crash the client if the dependency is disabled before the dependents.  See https://github.com/Flamenco/grav-admin-media-actions/issues/1.
I will leave this issue open for a bit;  After you take a look at those 2 examples, please post any specific questions you have here.


Raise explicit error if location property is specified for snapshot

Raise explicit error if location property is specified for snapshot

why skip changelog?

why skip changelog?

I thought that that it is not worth as we don't add or modify behaviour. I added changie now.


Incompatible with Beta22

Describe the bug
Due to the changes to DocItem this is no longer compatible with Docusaurus Beta22
Expected behavior
Plugin works
Current behavior
Plugin errors because DocItemFooter no longer exists.
Possible solution

Steps to reproduce
Install Beta22 and attempt to build or serve.

Thank you for brining this to our attention! It turns out that the latest upgrade to Docusaurus beta.22 moved the DocItemFooter component into a new directory. Although, there may be some additional minor fixes needed to get the plugin up and running with beta.22, will keep you posted! 👍
Reference: https://github.com/facebook/docusaurus/pull/7644

It seems that you did not bump the version of the lib. I have tried the 1.0.6 on my project but I still get the error
Module not found: Error: Can't resolve '@theme/DocItemFooter' in '/Users/xxx-doc/node_modules/docusaurus-theme-openapi-docs/lib-next/theme/ApiItem'
client (webpack 5.73.0) compiled with 1 error

I have started to use docusaurus-openapi-docs this morning, when I saw that you fixed this current issue. Never tried to install it before.
Or maybe I have another problem @sserrata ?


Guide update needed

Issue Overview
Guide states:
Add this configuration to arquillian.xml:

wildfly:8.0.0.Final:managed
standalone-full.xml

The implementation that I get requires to specify "target" as the property instead.
Expected Behaviour
Documentation update needed
Current Behaviour
Configuration exception when using "chameleonTarget"
Steps To Reproduce

Configure target as in example
Run arquillian test

Additional Information
None

Thanks for reporting. Would you be interested in contributing the fix?


Update log4j-1.2-api, log4j-api, log4j-core, ... to 2.15.0

Updates

org.apache.logging.log4j:log4j-1.2-api
org.apache.logging.log4j:log4j-api
org.apache.logging.log4j:log4j-core
org.apache.logging.log4j:log4j-slf4j-impl

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

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.apache.logging.log4j" } ]

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

Superseded by #763.


cmd/vet: report strings.Trim/TrimLeft/TrimRight with duplicate runes in cutset

go vet should ideally report likely misuses of standard library functions especially when it comes to providing constant(-ish) string arguments, e.g. (note: the following list is absolutely not exhaustive)

strings.(Trim|TrimLeft|TrimRight) with a cutset containing duplicated runes
net/http.NewRequest with an invalid HTTP method or a non-HTTP url
net/http.(Do|Get|Post) with a non-HTTP url
regexp.(Must)?Compile with an invalid regexp
(text|html)/template.Template.Parse with an invalid template text
(and so on, for all functions/structs where it makes sense; not all of them need to be added right away, coverage will likely improve over time)

I especially like the regexp.MustCompile example, consider it panics. And I see people using this function in places that may or may not be observed in testing. Code reviews help guard against this; but the reviewers are unfortunately human.

Would this qualify for the "frequency" factor of vet checks? How often do these issues occur?
It's also worth noting that @dominikh's staticcheck has had some of these for a while, like https://staticcheck.io/docs/checks#SA1000.

net/http.NewRequest with an invalid HTTP method

I believe there's nothing stopping a server from offering non-standard methods, so this could cause false positives.

or a non-HTTP url

With custom transports that could also lead to false positives.

One question is whether we should use one checker to check all these cases or one checker for each API.
StaticCheck has some related or similar checks, e.g.

A string cutset contains duplicate characters
Invalid format in time.Parse
Invalid URL in net/url.Parse
Invalid argument in call to a strconv function
Invalid first argument to exec.Command

Vet mostly stays away from the standard library. It does check Printf (in fact that's what vet was created for).
But Printf is far more core to the use of Go than, say, templates, or even regular expressions.
It also seems weird to put more of these library-specific checks in that are not really available to third-party libraries.
(Again, Printf is an exception, but we may not want to add more.)

If this is the direction of the vet tool, then sure. Just a few notes though:

The vet tool description should really be clarified. As it is right now, it makes it sound like vet is exactly the correct place for this kind of checks, because it uses an example to describe what the tool does, and that example is validating Printf arguments: "Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string." (https://github.com/golang/go/blob/460900a7b51f917888cb17608367979243178fe1/src/cmd/vet/doc.go) and "Vet is a tool that checks correctness of Go programs. It runs a suite of tests,
each tailored to check for a particular class of errors. Examples include incorrect
Printf format verbs and malformed build tags." (https://github.com/golang/go/blob/460900a7b51f917888cb17608367979243178fe1/src/cmd/vet/README#L1-L3)
The README contains helpful criteria for inclusions, but they do not mention those you mentioned (not really supposed to cover the standard library, checks should be available to third-party libraries). Maybe the criteria would benefit from an update?
Specifically about the checks not being available to third-party libraries... isn't this an implementation detail? (in that it would seem to be enough to have the analysis live in https://pkg.go.dev/golang.org/x/tools/go/analysis, where again it sounds like it would belong)

Just as personal opinion though, let me share though that I do not really follow the rationale for not considering vet the correct place for checks involving uses of the standard library. It is definitely not intuitive why that would be the case, given that the standard library can not be really considered "not being part of go" (from the point of view of the spec, maybe, but I would argue that the fraction of Go programs and developers that rely exclusively on the spec and not on the standard library is rather small).
Indeed, this criterion is somewhat undermined by the impression that a significant number of checks are actually about various types of standard library misuse (atomic, copylocks, httpresponse, lostcancel, printf, stdmethods, structtag, tests, unmarshal, unsafeptr). While it's undoubtedly true that the nature of each one of these tests may differ, AFAICT they definitely share in their nature of being about some semantic aspect of the standard library.

Indeed, this criterion is somewhat undermined by the impression that a significant number of the existing vet checks (almost half?) are actually about various types of standard library misuse (atomic, copylocks, httpresponse, lostcancel, printf, stdmethods, structtag, tests, unmarshal, unsafeptr).

You can also included atomicalign, deepequalerrors , errorsas, and sortslice .

Vet mostly stays away from the standard library.

I am not following this claim either given the precedent for including checks against the standard library within vet.

But Printf is far more core to the use of Go than, say, templates, or even regular expressions.

Does "core"-ness come down to just the "frequency" requirement of vet?
Anyhow my preference would be to have 4 discussions: duplicates in string cutsets, regexg.MustCompile, non-http urls, and invalid template text. I think combining these 4 cases is distracting. Each case will have a different frequency concern. @dominikh brought up false positives for one of the cases that does not apply to the others. I also not sure if constant-ish is interesting for all of these cases (or what constant-ish means). For example, it is not clear whether we should check regexp.MustCompile for invalid constant prefixes with variable suffices. (That seems complicated for not much gain compared to an inferred constant value.) There might be enough underlying similarities that grouping them would help justify creating a new checker? Say in aggregate they are frequent enough, but not individually?

It's hard to tell exactly where the line is, but http.Do/Get/Post, regexp.Compile, text/template.Parse all return errors that users are expected to check. It doesn't seem like vet needs to repeat these, and it really doesn't seem like vet should link in the template parser.
The http.NewRequest example is an incorrect check, since non-HTTP methods are permitted (and it returns an error anyway).
The strings.Trim examples may be worth adding. They are clear errors, and it comes up more often than we'd like because people confuse Trim/TrimLeft for TrimPrefix and TrimRight for TrimSuffix. The check wouldn't catch all such cases, but it could catch some. If someone has any data on how often that happens, we could narrow the issue to that check.

Based on the discussion, retitled to be only about strings.Trim/TrimLeft/TrimRight, detecting something like strings.TrimLeft(s, "http://") that really wants strings.TrimPrefix.

In case @rsc's example is not obvious enough, strings.TrimLeft(s, "http://") has a cutset with duplicate runes {"t", "/"}. So a duplicate rune detector would catch this. I find this example fairly persuasive.

No change in consensus, so accepted. 🎉
This issue now tracks the work of implementing the proposal.
— rsc for the proposal review group

Could the implemented analysis extended by suggesting the 2 possible fixes (remove the duplicate rune or replace the TrimLeft/TrimRight with TrimPrefix/TrimSuffix?
Complaining is cheap, but offering solutions is better 😉

@nightlyone this bug strongly implies a misunderstanding of what TrimLeft/TrimRight do, so suggesting a "fix" where we remove the duplicate runes seems like a mistake.

@nightlyone We first need to decide that we want to. @cespare's point is a good one and I am not confident about if/when we should be suggesting a fixes in this case. The proposal is for this checker to make it to cmd/vet which has cautious "Precision" requirements.
IMO extending the Analyzer to propose these fixes in the future given the current CL would not be that big of a deal.
FWIW there also seems to be some controversy about suggesting multiple fixes: https://cs.opensource.google/go/x/tools/+/refs/tags/v0.1.5:go/analysis/diagnostic.go;l=23-28 . But this discussion is probably better in a different venue (such as a new bug).

I'm not comfortable with this one. It's a lucky accident that a duplicated rune catches a string where TrimPrefix was the right thing to call. I'd rather put this on hold until a more predictable method is discovered.
According to the vet README, this one fails the "precision" rule.

I ran the Go checker in the CL across a large % of the Google monorepo Go code.
I took a look at the reports. IMO there were not rally any false positives. Each report indicated some confusion about what Trim, TrimLeft, or TrimRight does and were . Here is roughly the breakdown:

The bulk of these were url processing examples that I think are clearly mistaking TrimLeft/TrimRight for TrimPrefix/TrimSuffix, e.g. "/var/", "http://", "__foo_bar", "git::", etc. This was about ~80% of the reports in this experiment.
"strings.Trim(s, \n\t)" - this is because of the '`'. This is quite likely to be a bug as they are not capturing the runes they intended.
strings.Trim(s, "//") - given the context these were probably also just variants of url processing, but I am less confident.
Using strings.Trim(s, "''") to transform strings like "'GET'" into "GET". There might be enough domain in this case that they were doing the right thing.

That final case was maybe a style issue. The duplicate does suggest that they are probably confused about the API though.

According to the vet README, this one fails the "precision" rule.

@robpike I am not sure I understand what part of the precision rule this fails. Can you elaborate?

@timothy-king The existence of multiple characters does not necessarily mean that TrimPrefix is needed. It may be a mistake, but it may be harmless.
The original idea to check ordering would be more precise, although still not perfect. I feel what you have proposed feels good primarily because it catches "http". But it won't catch other things that are just as incorrect, such as "such as".
The goal is imprecise, the suggested fix imprecise. This is not a top-level change to vet.

The concern here seems to be not as much about precision (too many false positives) as recall (too many false negatives): perhaps  Talked to @taking and he is going to try to get some data about false negative rate. This also has a bearing on #47822. It may be that duplicates have too high a false negative rate but that 'duplicates or limited unsorted' is OK, where 'limited unsorted' means checking just that ABC..Z, abc..z, and 123..9 appear sorted, and not worry about whether " \t\r\n" is sorted, whatever that means.


Various font fixes

This seems to, at least on my end, fix #11.
However, some references to text elements I was not able to locate in the app, so I could not fully test.
Regardless, the result is more consistent overall.
Before:

After:

(pay attention to the Playlist minuet text under AAAAAAAAA... as well as Songs, the g is no longer clipped.)

While the before/after may look like only one or two clips and overflows were fixed, the actual end result is much more consistent across the UI. For one, all overflow specifications were removed entirely and instead text clips were fixed properly via a line-height specification.
This makes all text across the board correct, but its positioning may now be ever so slightly altered. If you compare the before/after pics closely, you can see text everywhere has changed ever so slightly in position in relatively unpredictable ways, but it does look correct on my end.

Looks good to me.
Thanks a lot for all of your work and fixes, I appreciate it.


32bit / armv7 for iOS platforms

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
Currently the Speech SDK only supports 64bit iOS platforms. Any plan to support 32bit iOS platforms?
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Currently the SDK does not support 32bit iOS platform. There is no short-term plan to support it. Sorry for inconvenience.

Too bad :(


validateEmail incorrectly tests results of std.net.isemail.isEmail()

vibe.utils.validation.validateEmail tests the results of std.net.isemail.isEmail like this:
return isEmail(str) != EmailStatusCode.valid;

However, isEmail returns EmailStatus, not EmailStatusCode. Incidentally, EmailStatus aliases self to a bool property valid(), which allows the code above to compile. But the logic is reversed, since EmailStatusCode.valid == 0, although isEmail(str) == false when the e-mail is invalid.
Paired with Phobos fixes between versions, this leads to further inconsistencies at run time.
For example, with dmd 2.071.1 (when there was an issue in Phobos):
auto result = isEmail("a@b.c");
/*
result == EmailStatus
{
	valid: false
	localPart: a
	domainPart: b.c
	statusCode: error
}
*/
auto err = appender!string();
auto vibeResult = validateEmail(err, "a@b.c");
/*
vibeResult == true
*/

Even though isEmail() (incorrectly) returned an invalid status, vibe treats it as valid.
And with current dmd nightly:
auto result = isEmail("a@b.c");
/*
result == EmailStatus
{
	valid: true
	localPart: a
	domainPart: b.c
	statusCode: valid
}
*/
auto err = appender!string();
auto vibeResult = validateEmail(err, "a@b.c");
/*
vibeResult == false
err.data == "The email address is invalid."
*/

Vice-versa, isEmail() now correctly returns a valid status, but vibe treats it as invalid.

Note: Phobos issue mentioned above holds for Phobos included with dmd 2.071.2 as well. The proposed fix would effectively break validateEmail() for anyone not using nightly dmd/Phobos builds.

Fixed by #1582.


Don't query language server for completions in strings / comments?

I think that is a safe bet, yes.

LSP will no longer handle completion requests in strings and comments (see bf26384b09e5737a01bec225f5331fe077697129). Should fix slowdowns when eg. entering relative paths in strings.
If sublime completions in strings are totally undesired, the trigger characters must also be restricted, e.g.:
"auto_complete_triggers": [ {"selector": "source.python - comment - string", "characters": "."} ],


one question about train.py

I really appreciate your work. When I read the code, I found a few puzzles.
Firstly, what do those 2 lines of code mean? (About 70 lines in train.py)
train_labels[count, 0] = (np.where(identities == i[0]))[0][0]
train_labels[count, 1] = (np.where(identities == i[2]))[0][0]
Secondly, I can't find this file untied_softmax_weighted_error_33_33_33_lagmul_0.2_aug.h5(about 215 lines in train.py)

What do train_labels's first two fields mean?

Hi. Thanks for your interest.

train_labels is in the following format : <visual_image>, <caricature>, <label>,  where <label> is 0 is visual image and caricature are of different identities and is 1 when they belong to the same person.
Lines 214-215 are for testing a model, you can currently uncomment it to train the model.

Hope this answers your query.

Hi. Thanks for your interest.

train_labels is in the following format : <visual_image>, <caricature>, <label>,  where <label> is 0 is visual image and caricature are of different identities and is 1 when they belong to the same person.
Lines 214-215 are for testing a model, you can currently uncomment it to train the model.

Hope this answers your query.

Thank you for your reply.

Hi. Thanks for your interest.

train_labels is in the following format : <visual_image>, <caricature>, <label>,  where <label> is 0 is visual image and caricature are of different identities and is 1 when they belong to the same person.
Lines 214-215 are for testing a model, you can currently uncomment it to train the model.

Hope this answers your query.
Thank you for your reply.
My friend and I tried to duplicate your network, but couldn't find the missing files. So we are restoring files based on your code.
Will the train-test-files/training_11.txt file be small? Because I saw you load all the images in one go.
train_data = np.zeros((size, 224, 224, 6), dtype=np.float32) (about 43 lines in train.py)

The data was able to fit on 12 GPU TitanX. I'll soon share the txt files for you to run. Thanks for your patience.

The data was able to fit on 12 GPU TitanX. I'll soon share the txt files for you to run. Thanks for your patience.

I replaced ../data_instances2/train/training_5.txt with train-test-files/training_11.txt and quickly ran out of RAM. Maybe it's because my computer has too little memory. I made A rough calculation that the memory requirement is 60GB when using train-test-files/training_11.txt.
49059(lines) * 224 * 224 * 6(image size) * 4B(numpy.float32) = 56.3GB

You can write a small wrapper to load the files in small chunks (batch wise). I was working on a 32 GB Machine for this project.


BL and Normal Coordinate Transformation : Confusion in Names!

🐞 Problem
There is lot of confusion in coordinates transformation!
bl_coord_transforms and coord_transforms are not good names as in the coord_transforms does not specify the type of coordinates it works on while bl_coord_transforms clearly tells user what the module does! There is a need to make the coord transforms more intuitive.
🎯 Goal
Make coordinate transformations more intuitive in EinsteinPy

💡 Possible solutions

Rename coord_transforms.py
Merge both files into one
Think of some other solution?

📋  Steps to solve the problem

Comment below about what you've started working on.
Add, commit, push your changes
Submit a pull request and add this in comments - Addresses #115
Ask for a review in comments section of pull request
Celebrate your contribution to this project 🎉

How about we create a separate module called coords in Einsteinpy.
We can have sph_crt.py for Spherical<->Cartesian conversions, bl_crt.py for Boyer-Lindquist<->Cartesian conversions & maybe sph_bl.py for spherical<->Boyer-Lindquist conversions.
Still the names feel weird. Any suggestions?

It may possibly be too heavy handed, but what about subclassing numpy.array to make a vector class that knows what its current coordinate system is and how to convert itself to any other given coordinate system?

It may possibly be too heavy handed, but what about subclassing numpy.array to make a vector class that knows what its current coordinate system is and how to convert itself to any other given coordinate system?

Maybe, it's a long shot. But we'll keep it in tabs. Open an issue wherever necessary.


Homebrew v<IP_ADDRESS> binaries broken

$ meet [emails]
meet: /private/tmp/meet-20240710-39031-vili7o/.brew_home/.local/state/cabal/store/ghc-9.4.8/tzdt-0.2.20240201.0-36c401bd/share/Europe/London.zone: openBinaryFile: does not exist (No such file or directory)

https://github.com/alan-turing-institute/meet/pull/13 includes a dependency on the tzdata package, which ships with a database of time zones. Apparently, when Homebrew compiles the codebase during the bottle building process, it uses a sandboxed home directory (see above) and this database gets saved there. The path to this database is then baked into this binary and once Homebrew cleans up, the path is no longer valid.
Not sure how to get around it. We could modify the Homebrew build process to copy the files to the real home directory, but the binary would still have the wrong paths encoded inside. A solution that might work might be to fork/modify the tzdata package to use data hosted on the Internet (and self host the data, specifically the London file).
Even instructing Homebrew to install from source doesn't work.

Eventual solution was to replace loadTZFromDB with loadTZFromFile; then instead of reading from a named file I inlined the contents of the London.zone file which it needs. (I obtained the relevant file via cloning https://github.com/ysangkok/haskell-tzdata/ and then USE_CABAL=yes ./build-tzdata.sh inside there.)
Now the London data is included into the binary itself!

Some questions for future pondering:

Can we realistically prevent this sort of bug from being deployed? Is there a way to test a Homebrew release without changing the actual formula itself?
Is this the most computationally efficient way of inlining a ByteString? I'll ask this on /r/haskell or something

Is myBs = BS.pack [...] the most computationally efficient way of creating a constant ByteString? I'll ask this on /r/haskell or something

I found this: https://www.reddit.com/r/haskell/comments/m4t9xm/distributing_a_binary_that_imports_a_library_that/ and the corresponding file-embed package, which does the same thing via Template Haskell.

Presumably we can do something like:
import Data.Time.Zones.Files (timeZonePathFromDB)

-- might need unsafePerformIO here to get this
londonTZFilePath <- timeZonePathFromDB

myFile :: Data.ByteString.ByteString
myFile = $(embedFile londonTZFilePath)

https://hackage.haskell.org/package/tzdata-0.2.20240201.0/docs/Data-Time-Zones-Files.html#v:timeZonePathFromDB


[New feature] Upload speed limit

It would be nice to have possibility to limit speed of upload in addon Settings, as it is possible to set only allowed hours for uploads.

Yes I looked into this before but it's not trivial to add as currently the MS graph SDK doesn't have support for any kind of bandwidth throttling so it would likely require me to rewrite that layer without using their SDK at all.


Make DSL methods chainable

Context parameter of all DSL methods should be the last one to enable chaining

switched back to pipe style for DSL


chore: Delete core-sample-app/apk directory

version control shouldnot have binary files, apk can be added as release or make pipeline generate it

Thanks for the suggestion, but it's easier to have it in version control. It allows to share links easily.


Keep calendar visible all the time

Hello, thanks for the library, it looks pretty nice.
I have a requirement where the calendar is part of a wizard, so I want to keep it open at all times, and make it use all of it's flexbox container, rather than being a popup. Is this currently possible with a property? Or maybe it's hard to implement, due to how the change of focus works?
Sorry that I had to open a ticket to ask a question, but I couldn't find any other forms of communication on the repository :)

It works fine with ThemeProvider. Thanks for the example. I'm having an issue when passing a function to the reducer. The function is setFieldValue of the library Formik. When I do that, the calendar closes when I select the endDate. I will keep investigating what causes it to close.
I'm not sure I can help you much with implementing the additional property. I've only been using TS for a few days. But if you are not in a hurry I can give it a try next week.

I'm not in a hurry, so you can try.


ec in trait Security of type play.libs.concurrent.HttpExecutionContext is not defined

@entropicdrifter It seems that since this commit: https://github.com/pac4j/play-pac4j/commit/194d85f341ec01274304367262735a690afaf6d1, the play-pac4j-scala-demo demo returns the following error:
[info] Compiling 22 Scala sources and 2 Java sources to /Users/jleleu/sources/play-pac4j-scala-demo/target/scala-2.11/classes...
[error] /Users/jleleu/sources/play-pac4j-scala-demo/app/controllers/Application.scala:20: class Application needs to be abstract, since value ec in trait Security of type play.libs.concurrent.HttpExecutionContext is not defined
[error] class Application @Inject() (val config: Config, val playSessionStore: PlaySessionStore) extends Controller with Security[CommonProfile] {
[error]       ^
[error] /Users/jleleu/sources/play-pac4j-scala-demo/app/controllers/ApplicationWithFilter.scala:18: class ApplicationWithFilter needs to be abstract, since value ec in trait Security of type play.libs.concurrent.HttpExecutionContext is not defined
[error] class ApplicationWithFilter @Inject() (val config: Config, val playSessionStore: PlaySessionStore) extends Controller with Security[CommonProfile] {
[error]       ^
[error] two errors found
[info] Compiling 22 Scala sources and 2 Java sources to /Users/jleleu/sources/play-pac4j-scala-demo/target/scala-2.11/classes...
[error] /Users/jleleu/sources/play-pac4j-scala-demo/app/controllers/Application.scala:20: class Application needs to be abstract, since value ec in trait Security of type play.libs.concurrent.HttpExecutionContext is not defined
[error] class Application @Inject() (val config: Config, val playSessionStore: PlaySessionStore) extends Controller with Security[CommonProfile] {
[error]       ^
[error] /Users/jleleu/sources/play-pac4j-scala-demo/app/controllers/ApplicationWithFilter.scala:18: class ApplicationWithFilter needs to be abstract, since value ec in trait Security of type play.libs.concurrent.HttpExecutionContext is not defined
[error] class ApplicationWithFilter @Inject() (val config: Config, val playSessionStore: PlaySessionStore) extends Controller with Security[CommonProfile] {
[error]       ^
[error] two errors found
[error] application -
[info]
[info] ! @719anl7j2 - Internal server error, for (GET) [/] ->
[info]
[info] play.forkrun.protocol.Serializers$playExceptionPickler$$anon$1: Compilation error[class Application needs to be abstract, since value ec in trait Security of type play.libs.concurrent.HttpExecutionContext is not defined]
[info] 	at play.forkrun.protocol.Serializers$playExceptionPickler$.unpickle(Serializers.scala:159)
[info] 	at play.forkrun.protocol.Serializers$PlayRunsupportReloaderCompileFailureUnpickler$macro$56$2$.unpickle(Serializers.scala:175)
[info] 	at play.forkrun.protocol.Serializers$PlayRunsupportReloaderCompileResultUnpickler$macro$66$2$.unpickle(Serializers.scala:181)
[info] 	at scala.pickling.Unpickler$class.unpickleEntry(Pickler.scala:79)
[info] 	at play.forkrun.protocol.Serializers$PlayRunsupportReloaderCompileResultUnpickler$macro$66$2$.unpickleEntry(Serializers.scala:181)
[info] 	at scala.pickling.functions$.unpickle(functions.scala:11)
[info] 	at sbt.serialization.JsonValue$$anonfun$parse$1.apply(SerializedValue.scala:104)
[info] 	at scala.util.Try$.apply(Try.scala:192)
[info] 	at sbt.serialization.JsonValue.parse(SerializedValue.scala:104)
[info] 	at sbt.protocol.BuildValue.value(Values.scala:11)

Can you investigate please?

Okay. Is this in the 2.4.x branch, or master?

In master for sure. I didn't test it on 2.4.x, but as both are based on Play 2.5, I assume the problem occurs also.

I think I fixed it. I'll need to make a PR for both the play-pac4j plugin and the play-pac4j-scala-demo.
That's for the master branch, I'll get to the 2.4.x branch next.

Thanks

I tested 2.4.x, but it seems that it already works!
I think the difference might be because in 2.5.x the Injection scheme is different due to the PlaySessionStore.
The current play-pac4j-scala-demo 2.4.x branch pulls in the 2.4.0 release (I assume it is supposed to until the release of 2.4.1), but I deleted that line from build.sbt and pulled in the current play-pac4j 2.4.x and it still worked perfectly, from what I can tell.

It works now in version 2.5.x. I upgraded the demos for the 2.4.x branch to use the 2.4.1-SNAPSHOT version (as well as pac4j v1.9.1). Same for the 2.3.x branch.
I'll re-test everything next week before the releases.
Thanks for your help.


How to make the output image into a binary image？

I want my output to be a binary image, how do I do that？？Like this:
**

**

Hi @BibibNanana, thanks for your interest in SparseInst!
Maybe, you can convert your images from RGB to L (grayscale) images and then apply thresholding to obtain the binary images.

Hi @BibibNanana, thanks for your interest in SparseInst! Maybe, you can convert your images from RGB to L (grayscale) images and then apply thresholding to obtain the binary images.

Thank you for your reply, I've already done that

This issue will be closed, you can open a new issue if you have other problems or reopen it. Thanks for your interest in SparseInst 😊 . If you find it useful in your work or research, could you give us a star 🌟 or help us recommend SparseInst to your friends?


upgrading from previous developers 0.9.4 settings don't transfer

Hi friends.
I installed the new version 0.9.10 but I could not transfer my settings across including the styling + spotify API keys
I realise there are 2 files in the roaming folder, one is the app toolbar style & the other is the spotify API keys.
I tried "import settings" but this did not work.
I tried manually overwriting the config files but this also did not work.
Any advice how to do an upgrade & bring my settings?

You came from v0.9.4, right? Because nothing has changed regarding to the settings from his latest version.
In the %appdata%/AudioBand folder you should only have one file called audioband.settings which contains everything

Though I might add soon, as in, the next or second next update I roll out, will be a big change to how settings are stored. So if we cant resolve this automatically, you might have to wait for that update

Anyway back to your issue, can you check the log file and see if anything throws any errors in there?
%temp%/audioband.log

@samsong any updates?
I've also finished the settings rewrite and its in testing, will probably release tomorrow.

Hey brother sorry late reply. Let's do something I will get your new release when it comes tomorrow or next day & then install that.
Then I will export my Audioband settings  + style config & try to reimport them there.
After that we can diagnose further.
On the current version I could not get the Style or the spotify API to import itself even by restoring the audioband.settings + audioband files (there were 2. one had the visual style one had API keys)
I wait for your release & will update you again here

@samsong I released it yesterday evening, you wont be able to import old settings once you're on this version though;
what it will do when you install it is it will try to read your settings from your current audioband.settings and convert them to the new json settings.
If anything fails it should say so in the %temp%/audioband.log file
https://github.com/svr333/audio-band/releases

Installed & start toolbar. Not visible. See an explorer item on taskbar labelled "deskband host for wpf"
I see in log file it looked for a file/user named "vanro" which is not me. Maybe its from your default settings?
2021-09-11 14:34:05.9917|INFO|AudioBand|Starting AudioBand. Version: "0.10.0", OS: Microsoft Windows NT 10.0.19043.0
2021-09-11 14:34:06.4933|DEBUG|AudioBand.Settings.Migrations.SettingsMigration|Found old settings v"3". Migrating settings using "AudioBand.Settings.Migrations.V3ToV4"
2021-09-11 14:34:06.7563|ERROR|AudioBand.Settings.Persistence.PersistentSettings|Failed to read old settings file:
Unmapped members were found. Review the types and members below.
Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type
For no matching constructor, add a no-arg ctor, add optional arguments, or map all of the constructor parameters
SettingsV3 -> SettingsV4 (Destination member list)
AudioBand.Settings.Models.V3.SettingsV3 -> AudioBand.Settings.Models.V4.SettingsV4 (Destination member list)
Unmapped properties:
AudioBandSettings
2021-09-11 14:34:06.8765|ERROR|AudioBand|System.InvalidOperationException: The configuration is invalid. Creating the instance for type IAppSettings failed. Value cannot be null.
Parameter name: source ---> SimpleInjector.ActivationException: Value cannot be null.
Parameter name: source ---> System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)    at AudioBand.Settings.Persistence.PersistentSettings.WriteProfiles(IEnumerable1 userProfiles) in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\Persistence\PersistentSettings.cs:line 157
at AudioBand.Settings.Persistence.PersistentSettings.CheckAndConvertOldSettings() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\Persistence\PersistentSettings.cs:line 64
at AudioBand.Settings.AppSettings..ctor(IPersistentSettings persistSettings) in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\AppSettings.cs:line 26
at lambda_method(Closure )
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.CreateInstance(Func1 instanceCreator)
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.CreateInstanceWithNullCheck()    at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.GetInterceptedInstance()
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.BuildExpression()    at SimpleInjector.InstanceProducer.BuildExpressionInternal()    at System.Lazy1.CreateValue()
at System.Lazy`1.LazyInitValue()
at SimpleInjector.InstanceProducer.BuildExpression()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.BuildExpression()
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt(InstanceProducer[] producersToVerify)
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt()
at SimpleInjector.Container.VerifyInternal(Boolean suppressLifestyleMismatchVerification)
at SimpleInjector.Container.Verify(VerificationOption option)
at AudioBand.Deskband.ConfigureDependencies() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Deskband.cs:line 135
---START OF EXCEPTION---
---END OF EXCEPTION---
---ORIGINAL EXCEPTION---
System.InvalidOperationException: The configuration is invalid. Creating the instance for type IAppSettings failed. Value cannot be null.
Parameter name: source ---> SimpleInjector.ActivationException: Value cannot be null.
Parameter name: source ---> System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)    at AudioBand.Settings.Persistence.PersistentSettings.WriteProfiles(IEnumerable1 userProfiles) in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\Persistence\PersistentSettings.cs:line 157
at AudioBand.Settings.Persistence.PersistentSettings.CheckAndConvertOldSettings() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\Persistence\PersistentSettings.cs:line 64
at AudioBand.Settings.AppSettings..ctor(IPersistentSettings persistSettings) in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\AppSettings.cs:line 26
at lambda_method(Closure )
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.CreateInstance(Func1 instanceCreator)
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.CreateInstanceWithNullCheck()    at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.GetInterceptedInstance()
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.BuildExpression()    at SimpleInjector.InstanceProducer.BuildExpressionInternal()    at System.Lazy1.CreateValue()
at System.Lazy`1.LazyInitValue()
at SimpleInjector.InstanceProducer.BuildExpression()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.BuildExpression()
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt(InstanceProducer[] producersToVerify)
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt()
at SimpleInjector.Container.VerifyInternal(Boolean suppressLifestyleMismatchVerification)
at SimpleInjector.Container.Verify(VerificationOption option)
at AudioBand.Deskband.ConfigureDependencies() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Deskband.cs:line 135
---END OF ORIGINAL EXCEPTION
2021-09-11 14:34:12.5655|INFO|AudioBand|Starting AudioBand. Version: "0.10.0", OS: Microsoft Windows NT 10.0.19043.0
2021-09-11 14:34:12.5655|ERROR|AudioBand|System.InvalidOperationException: The configuration is invalid. Creating the instance for type IAppSettings failed. The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists. ---> SimpleInjector.ActivationException: The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists. ---> System.IO.IOException: The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
at AudioBand.Settings.Persistence.PersistentSettings.CheckAndConvertOldSettings() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\Persistence\PersistentSettings.cs:line 46
at AudioBand.Settings.AppSettings..ctor(IPersistentSettings persistSettings) in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\AppSettings.cs:line 26
at lambda_method(Closure )
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.CreateInstance(Func1 instanceCreator)
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.CreateInstanceWithNullCheck()    at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.GetInterceptedInstance()
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.BuildExpression()    at SimpleInjector.InstanceProducer.BuildExpressionInternal()    at System.Lazy1.CreateValue()
at System.Lazy`1.LazyInitValue()
at SimpleInjector.InstanceProducer.BuildExpression()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.BuildExpression()
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt(InstanceProducer[] producersToVerify)
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt()
at SimpleInjector.Container.VerifyInternal(Boolean suppressLifestyleMismatchVerification)
at SimpleInjector.Container.Verify(VerificationOption option)
at AudioBand.Deskband.ConfigureDependencies() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Deskband.cs:line 135
---START OF EXCEPTION---
---END OF EXCEPTION---
---ORIGINAL EXCEPTION---
System.InvalidOperationException: The configuration is invalid. Creating the instance for type IAppSettings failed. The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists. ---> SimpleInjector.ActivationException: The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists. ---> System.IO.IOException: The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
at AudioBand.Settings.Persistence.PersistentSettings.CheckAndConvertOldSettings() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\Persistence\PersistentSettings.cs:line 46
at AudioBand.Settings.AppSettings..ctor(IPersistentSettings persistSettings) in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\AppSettings.cs:line 26
at lambda_method(Closure )
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.CreateInstance(Func1 instanceCreator)
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.CreateInstanceWithNullCheck()    at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.GetInterceptedInstance()
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.BuildExpression()    at SimpleInjector.InstanceProducer.BuildExpressionInternal()    at System.Lazy1.CreateValue()
at System.Lazy`1.LazyInitValue()
at SimpleInjector.InstanceProducer.BuildExpression()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.BuildExpression()
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt(InstanceProducer[] producersToVerify)
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt()
at SimpleInjector.Container.VerifyInternal(Boolean suppressLifestyleMismatchVerification)
at SimpleInjector.Container.Verify(VerificationOption option)
at AudioBand.Deskband.ConfigureDependencies() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Deskband.cs:line 135
---END OF ORIGINAL EXCEPTION
2021-09-11 14:34:25.4877|INFO|AudioBand|Starting AudioBand. Version: "0.10.0", OS: Microsoft Windows NT 10.0.19043.0
2021-09-11 14:34:25.4877|ERROR|AudioBand|System.InvalidOperationException: The configuration is invalid. Creating the instance for type IAppSettings failed. The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists. ---> SimpleInjector.ActivationException: The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists. ---> System.IO.IOException: The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
at AudioBand.Settings.Persistence.PersistentSettings.CheckAndConvertOldSettings() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\Persistence\PersistentSettings.cs:line 46
at AudioBand.Settings.AppSettings..ctor(IPersistentSettings persistSettings) in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\AppSettings.cs:line 26
at lambda_method(Closure )
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.CreateInstance(Func1 instanceCreator)
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.CreateInstanceWithNullCheck()    at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.GetInterceptedInstance()
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.BuildExpression()    at SimpleInjector.InstanceProducer.BuildExpressionInternal()    at System.Lazy1.CreateValue()
at System.Lazy`1.LazyInitValue()
at SimpleInjector.InstanceProducer.BuildExpression()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.BuildExpression()
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt(InstanceProducer[] producersToVerify)
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt()
at SimpleInjector.Container.VerifyInternal(Boolean suppressLifestyleMismatchVerification)
at SimpleInjector.Container.Verify(VerificationOption option)
at AudioBand.Deskband.ConfigureDependencies() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Deskband.cs:line 135
---START OF EXCEPTION---
---END OF EXCEPTION---
---ORIGINAL EXCEPTION---
System.InvalidOperationException: The configuration is invalid. Creating the instance for type IAppSettings failed. The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists. ---> SimpleInjector.ActivationException: The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists. ---> System.IO.IOException: The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
at AudioBand.Settings.Persistence.PersistentSettings.CheckAndConvertOldSettings() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\Persistence\PersistentSettings.cs:line 46
at AudioBand.Settings.AppSettings..ctor(IPersistentSettings persistSettings) in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\AppSettings.cs:line 26
at lambda_method(Closure )
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.CreateInstance(Func1 instanceCreator)
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.CreateInstanceWithNullCheck()    at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.GetInterceptedInstance()
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.BuildExpression()    at SimpleInjector.InstanceProducer.BuildExpressionInternal()    at System.Lazy1.CreateValue()
at System.Lazy`1.LazyInitValue()
at SimpleInjector.InstanceProducer.BuildExpression()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.BuildExpression()
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt(InstanceProducer[] producersToVerify)
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt()
at SimpleInjector.Container.VerifyInternal(Boolean suppressLifestyleMismatchVerification)
at SimpleInjector.Container.Verify(VerificationOption option)
at AudioBand.Deskband.ConfigureDependencies() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Deskband.cs:line 135
---END OF ORIGINAL EXCEPTION
2021-09-11 14:34:38.6617|INFO|AudioBand|Starting AudioBand. Version: "0.10.0", OS: Microsoft Windows NT 10.0.19043.0
2021-09-11 14:34:38.6617|ERROR|AudioBand|System.InvalidOperationException: The configuration is invalid. Creating the instance for type IAppSettings failed. The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists. ---> SimpleInjector.ActivationException: The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists. ---> System.IO.IOException: The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
at AudioBand.Settings.Persistence.PersistentSettings.CheckAndConvertOldSettings() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\Persistence\PersistentSettings.cs:line 46
at AudioBand.Settings.AppSettings..ctor(IPersistentSettings persistSettings) in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\AppSettings.cs:line 26
at lambda_method(Closure )
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.CreateInstance(Func1 instanceCreator)
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.CreateInstanceWithNullCheck()    at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.GetInterceptedInstance()
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.BuildExpression()    at SimpleInjector.InstanceProducer.BuildExpressionInternal()    at System.Lazy1.CreateValue()
at System.Lazy`1.LazyInitValue()
at SimpleInjector.InstanceProducer.BuildExpression()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.BuildExpression()
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt(InstanceProducer[] producersToVerify)
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt()
at SimpleInjector.Container.VerifyInternal(Boolean suppressLifestyleMismatchVerification)
at SimpleInjector.Container.Verify(VerificationOption option)
at AudioBand.Deskband.ConfigureDependencies() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Deskband.cs:line 135
---START OF EXCEPTION---
---END OF EXCEPTION---
---ORIGINAL EXCEPTION---
System.InvalidOperationException: The configuration is invalid. Creating the instance for type IAppSettings failed. The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists. ---> SimpleInjector.ActivationException: The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists. ---> System.IO.IOException: The file 'C:\Users\user\AppData\Roaming\AudioBand\old-audioband-settings.backup' already exists.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
at AudioBand.Settings.Persistence.PersistentSettings.CheckAndConvertOldSettings() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\Persistence\PersistentSettings.cs:line 46
at AudioBand.Settings.AppSettings..ctor(IPersistentSettings persistSettings) in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Settings\AppSettings.cs:line 26
at lambda_method(Closure )
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.CreateInstance(Func1 instanceCreator)
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.CreateInstanceWithNullCheck()    at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.GetInterceptedInstance()
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistration1.BuildExpression()    at SimpleInjector.InstanceProducer.BuildExpressionInternal()    at System.Lazy1.CreateValue()
at System.Lazy`1.LazyInitValue()
at SimpleInjector.InstanceProducer.BuildExpression()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.BuildExpression()
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt(InstanceProducer[] producersToVerify)
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt()
at SimpleInjector.Container.VerifyInternal(Boolean suppressLifestyleMismatchVerification)
at SimpleInjector.Container.Verify(VerificationOption option)
at AudioBand.Deskband.ConfigureDependencies() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\AudioBand\Deskband.cs:line 135
---END OF ORIGINAL EXCEPTION

@samsong Okay the issue is that you still have a settings with version 3, while the last settings was version 4
Something failed trying to convert the settings
if you do not have any custom profiles, it is easier to manually copy over your spotify client id and secret again, however, if you do have them Ill try to fix up the migration system for you, but I dont know how long thatll be.

And yes vanro is me, but thats just the stacktrace, it is normal it specifies my path and not yours, because you dont actually have the source code on yours

Hey mate
I have a LOT of visual customisation so what is the best way to migrate them?
Can I do it by using an older version first? (Didn't work first time)

yeah no of course, what you can try is the latest version of dsafa and then my latest version
If you trust me enough you can forward me your current settings file and ill try to get it migrated properly, its whatever you prefer

Thanks I already tried the last version of the old developers then the latest version of yours.
My main request is to migrate the STYLE. The spotify API is easy to migrate.
Can you help me to migrate the style file?
i attach it below in pastebin link
https://pastebin.com/XPKL2zY7

Ill take care of it! I have a busy day but Itll be done by tomorrow if I cant get around to it today.

@samsong
Profile1.profile.zip
You had 2 existing profiles, but the second profile was just a copy of the Default profile so I only ported your custom profile.
You should be able to go to the appdata folder (C:\Users\YOUR_USER_NAME\AppData\Roaming\AudioBand or %appdata%/Audioband) and remove everything there (do note you'll have to redo spotify auth and then you can import the profile provided in the zip above (either through the settings menu or you just drag the .profile.json into the Profiles folder.
If I was unclear at any point or it doesnt work feel free to let me know

champion. The styling looks right. I've tried adding the spotify client/secret key but don't see the title updating or buttons working.
I'm using windows 10 + spotify desktop app is installed.
in audioband:

callback port: 800
other settings default (poll interval, proxy , useproxy is off)
client id + secret key double checked is correct

in spotify developer app settings I added multiple callback URL's just to be sure:
http://localhost/
http://localhost:800/
http://localhost:800
Still i'm not seeing the song update when switching tracks or the media buttons responding.
audioband log has nothing
2021-09-13 22:03:58.0589|INFO|AudioBand|Starting AudioBand. Version: "0.10.0", OS: Microsoft Windows NT 10.0.19043.0
2021-09-13 22:03:58.1212|DEBUG|AudioBand.UI.GlobalSettingsViewModel|Starting edit
2021-09-13 22:03:58.3252|DEBUG|AudioBand.UI.AudioBandToolbarViewModel|Loading audio sources
2021-09-13 22:03:58.3252|DEBUG|AudioBand.AudioSource.AudioSourceManager|Loading audio sources in "C:\Program Files\AudioBand\AudioSources"
2021-09-13 22:03:58.6868|DEBUG|AudioSourceWrapper(iTunes)|Initializing wrapper
2021-09-13 22:03:58.7498|DEBUG|AudioSourceHost.AudioSourceLoader|Probing path "C:\Program Files\AudioBand\AudioSources\iTunes" for audio source
2021-09-13 22:03:58.9058|DEBUG|AudioSourceHost.AudioSourceLoader|Loading audio source from path "C:\Program Files\AudioBand\AudioSources\iTunes\iTunesAudioSource.dll"
2021-09-13 22:03:59.0368|DEBUG|AudioSourceWrapper(iTunes)|Wrapper initialization complete
2021-09-13 22:03:59.4188|DEBUG|AudioSourceWrapper(MusicBee)|Initializing wrapper
2021-09-13 22:03:59.4798|DEBUG|AudioSourceHost.AudioSourceLoader|Probing path "C:\Program Files\AudioBand\AudioSources\MusicBee" for audio source
2021-09-13 22:03:59.6388|DEBUG|AudioSourceHost.AudioSourceLoader|Loading audio source from path "C:\Program Files\AudioBand\AudioSources\MusicBee\MusicBeeAudioSource.dll"
2021-09-13 22:03:59.7558|DEBUG|AudioSourceWrapper(MusicBee)|Wrapper initialization complete
2021-09-13 22:04:00.0928|DEBUG|AudioSourceWrapper(spotify)|Initializing wrapper
2021-09-13 22:04:00.1518|DEBUG|AudioSourceHost.AudioSourceLoader|Probing path "C:\Program Files\AudioBand\AudioSources\spotify" for audio source
2021-09-13 22:04:00.3178|DEBUG|AudioSourceHost.AudioSourceLoader|Loading audio source from path "C:\Program Files\AudioBand\AudioSources\spotify\SpotifyAudioSource.dll"
2021-09-13 22:04:00.4621|DEBUG|AudioSourceWrapper(spotify)|Wrapper initialization complete
2021-09-13 22:04:00.8029|DEBUG|AudioSourceWrapper(Windows10)|Initializing wrapper
2021-09-13 22:04:00.8661|DEBUG|AudioSourceHost.AudioSourceLoader|Probing path "C:\Program Files\AudioBand\AudioSources\Windows10" for audio source
2021-09-13 22:04:01.0570|DEBUG|AudioSourceHost.AudioSourceLoader|Loading audio source from path "C:\Program Files\AudioBand\AudioSources\Windows10\Win10AudioSource.dll"
2021-09-13 22:04:01.1759|DEBUG|AudioSourceWrapper(Windows10)|Wrapper initialization complete
2021-09-13 22:04:01.2068|DEBUG|AudioBand.UI.GlobalSettingsViewModel|Ending edit
2021-09-13 22:04:01.2068|DEBUG|AudioBand.UI.AudioBandToolbarViewModel|Audio sources loaded. Loaded 4 sources
2021-09-13 22:04:01.2068|DEBUG|AudioBand.UI.AudioBandToolbarViewModel|Loaded 2 profiles. (may exclude idle profile)
2021-09-13 22:04:21.9312|DEBUG|AudioBand.UI.GlobalSettingsViewModel|Ending edit

OK I missed 1 step (wasn't clear). But I had to right click audioband toolbar & click "sources" and CHOOSE spotify.
Then browser opened & login request to spotify. Approved
But buttons don't work yet & no song info. BUT here we have a log now! :)
`2021-09-13 22:07:43.1606|DEBUG|AudioBand.UI.AudioBandToolbarViewModel|Activating new audio source "Spotify"
2021-09-13 22:07:43.1716|DEBUG|AudioSource(Spotify)|Connecting to Spotify through own application.
2021-09-13 22:07:43.5343|ERROR|AudioSource(Spotify)|
2021-09-13 22:07:43.5343|ERROR|AudioSource(Spotify)|Object reference not set to an instance of an object.
2021-09-13 22:07:43.5343|ERROR|AudioSource(Spotify)|System.NullReferenceException: Object reference not set to an instance of an object.
at SpotifyAudioSource.SpotifyAudioSource.d__102.MoveNext() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\SpotifyAudioSource\SpotifyAudioSource.cs:line 499
---START OF EXCEPTION---
---END OF EXCEPTION---
---ORIGINAL EXCEPTION---
System.NullReferenceException: Object reference not set to an instance of an object.
at SpotifyAudioSource.SpotifyAudioSource.d__102.MoveNext() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\SpotifyAudioSource\SpotifyAudioSource.cs:line 499
---END OF ORIGINAL EXCEPTION
2021-09-13 22:07:44.5783|ERROR|AudioSource(Spotify)|
2021-09-13 22:07:44.5783|ERROR|AudioSource(Spotify)|Object reference not set to an instance of an object.
2021-09-13 22:07:44.5783|ERROR|AudioSource(Spotify)|System.NullReferenceException: Object reference not set to an instance of an object.
at SpotifyAudioSource.SpotifyAudioSource.d__102.MoveNext() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\SpotifyAudioSource\SpotifyAudioSource.cs:line 499
---START OF EXCEPTION---
---END OF EXCEPTION---
---ORIGINAL EXCEPTION---
System.NullReferenceException: Object reference not set to an instance of an object.
at SpotifyAudioSource.SpotifyAudioSource.d__102.MoveNext() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\SpotifyAudioSource\SpotifyAudioSource.cs:line 499
---END OF ORIGINAL EXCEPTION
2021-09-13 22:07:45.5902|ERROR|AudioSource(Spotify)|
2021-09-13 22:07:45.5902|ERROR|AudioSource(Spotify)|Object reference not set to an instance of an object.
2021-09-13 22:07:45.5902|ERROR|AudioSource(Spotify)|System.NullReferenceException: Object reference not set to an instance of an object.
at SpotifyAudioSource.SpotifyAudioSource.d__102.MoveNext() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\SpotifyAudioSource\SpotifyAudioSource.cs:line 499
---START OF EXCEPTION---
---END OF EXCEPTION---
---ORIGINAL EXCEPTION---
System.NullReferenceException: Object reference not set to an instance of an object.
at SpotifyAudioSource.SpotifyAudioSource.d__102.MoveNext() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\SpotifyAudioSource\SpotifyAudioSource.cs:line 499
---END OF ORIGINAL EXCEPTION
2021-09-13 22:07:46.6003|ERROR|AudioSource(Spotify)|
2021-09-13 22:07:46.6003|ERROR|AudioSource(Spotify)|Object reference not set to an instance of an object.
2021-09-13 22:07:46.6003|ERROR|AudioSource(Spotify)|System.NullReferenceException: Object reference not set to an instance of an object.
at SpotifyAudioSource.SpotifyAudioSource.d__102.MoveNext() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\SpotifyAudioSource\SpotifyAudioSource.cs:line 499
---START OF EXCEPTION---
---END OF EXCEPTION---
---ORIGINAL EXCEPTION---
System.NullReferenceException: Object reference not set to an instance of an object.
at SpotifyAudioSource.SpotifyAudioSource.d__102.MoveNext() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\SpotifyAudioSource\SpotifyAudioSource.cs:line 499
---END OF ORIGINAL EXCEPTION
2021-09-13 22:07:47.6096|ERROR|AudioSource(Spotify)|
2021-09-13 22:07:47.6096|ERROR|AudioSource(Spotify)|Object reference not set to an instance of an object.
2021-09-13 22:07:47.6096|ERROR|AudioSource(Spotify)|System.NullReferenceException: Object reference not set to an instance of an object.
at SpotifyAudioSource.SpotifyAudioSource.d__102.MoveNext() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\SpotifyAudioSource\SpotifyAudioSource.cs:line 499
---START OF EXCEPTION---
---END OF EXCEPTION---
---ORIGINAL EXCEPTION---
System.NullReferenceException: Object reference not set to an instance of an object.
at SpotifyAudioSource.SpotifyAudioSource.d__102.MoveNext() in C:\Users\vanro\Documents\Programming\cs\audio-band\src\SpotifyAudioSource\SpotifyAudioSource.cs:line 499
---END OF ORIGINAL EXCEPTION
2021-09-13 22:07:48.3227|DEBUG|AudioBand.UI.AudioSourceSettingKeyValue|Starting edit
2021-09-13 22:07:48.3227|DEBUG|AudioBand.UI.AudioSourceSettingsCollectionViewModel|Starting edit`

Sorry one last important update.

Media buttons work (play, pause, next, prev)
don't work:
repeat/shuffle/progress bar/song info

@samsong if you do not have spotify premium, buttons apart from play/pause/next/prev will not work (due to spotifys api limitation, you require premium)
You may, I say may because I havent tried) be able to bypass it by using Windows10 as audiosource instead of Spotify, but I doubt it to be honest
but uh the last eerror log you shared also looks pretty wrong in the code so Ill take a look at that for sure

OK I missed 1 step (wasn't clear). But I had to right click audioband toolbar & click "sources" and CHOOSE spotify.
Then browser opened & login request to spotify. Approved

yeah someone actually PR'ed this change on the wiki recently on dsafas repository, Ill add the extra step on my repository

Hey mate. I have spotify premium yes. Buttons etc all worked before on old version.
Yeah overall looks like you've really improved the codebase/organisation.
Please let me know what you find about the song title etc because that's not showing right now still either
I wait for your new version

o song info doesnt work either? I assume itll have to do with the exceptions you were getting earlier, Ill have a look

Disregard. Force closed spotify & relaunched. suddenly all works. all media controls (repeat,shuffle,progress bar & song info)
Everything is OK now. maybe add another instruction step to your guide. "force closed (end process) on spotify for windows when upgrading"

Normally you dont have to do that so Ill try to fix the fact that you have to forceclose.
I just retried setting up the auth myself and I think I found the issue but it might be a bit hard to solve.
But I'll give it a shot for sure.
Thank you again for your patience and if you have any more issues or suggestions feel free to leave them here or in Our Discord

Thanks for your hard work. This tool is great! By the way one thing that might be useful to add is the "like" button.
sometimes when listening to a playlist after it finish spotify will start playing random songs. so it's easy to press the like if it's a good song.
I don't use this feature often but it's still a common button that would be logical to add for expanding the features!


Disallow Zero Price Listings

Currently it's possible to save a listing with a price of zero, and the purchase API allows a purchase to be made with a price of zero.
Since you can't have a successful transaction with a price of zero, it shouldn't be possible to save a listing with that price.
The same is true for a purchase, that should return an error if somehow a listing has bad data and a purchase is made with a price of zero.

Merchants may want to give a small number of items away for free for promotional purposes? Or give out voucher codes that make a particular purchase free? Maybe disallowing zero price listings makes sense in short term if you're worried about bugs, bad data causing unwanted sales at a price of zero. I don't know how big a problem this is likely to be.

If a listing has a price of zero, you can't create a transaction from it, and the transaction flow won't work.

Yeah would need to bypass the transaction just like you wouldn't enter credit card details if you had access to a free download. May be simpler to reject a price of zero for 2.0 but potentially allow for it in later versions. As an aside, you could theoretically create a transaction that sends zero to the multisig address, pays a fee to the miners and returns the rest of the funds to yourself?

@jjeffryes: I don't know if you saw https://github.com/OpenBazaar/openbazaar-desktop/issues/76. It expands on why we want free listings, and currently has 6 👍. The fact that you can't create a transaction is irrelevant if we don't require a transaction for free listings. That part of the purchase flow is simply skipped.

I believe it's possible to support this, but we will either need some help to flesh this out in the near term or risk pushing this to the backlog for after release.

I saw desktop issue 76.
Currently, listings priced at zero won't work correctly, and are not planned to work correctly at launch, so we shouldn't allow them to be saved the same way we shouldn't save any other invalid data.
In the future, if we support doing something with zero price listing, then we would consider a price of zero to be valid data, and allow listings with a zero price to be saved after that change happens.

In the future, if we support doing something with zero price listing, then we would consider a price of zero to be valid data

Old clients won't be forwards compatible, in the sense that they won't even be able to browse those listings despite being perfectly able to.


iOS Save filter views

It would be nice to save certain filter combinations so they're quickly accessible

Hey @zomars! I was considering adding this to Zeitgeist v3, but wondered if it would still be useful when Projects view is introduced. This view will effectively act like a filter to show deployments only for the chosen project, meaning further filters would just be filtering on the state and target (preview vs production) of a deployment. What do you think? Would a Project view solve your main use case in a similar way to saved filters?

I'm not sure TBH. Basically I want to query stuff like:

Show me only failed production deploys
Show me every successful production deploys
Show me X branch successful deploys
Show me all "building" deploys

Also building into this I would like to be notified only of "Failed production deploys"

Thanks for elaborating, this is super helpful! I hadn’t yet considered branch filtering but that’s a great idea. I can imagine many of these filters working on the project detail view, where you can see deployments for a specific project.
As for your additional request, in v3 the new notification settings will allow you to set up notifications only for production deployments! Here's an example screenshot of the new notifications settings screen which will be found on each project view.

That would be so helpful! Thanks for the response 🙏

Hey @zomars! I'm going to close this issue as won't-fix; the filters in Zeitgeist v3 have actually ended up quite simple and in order to implement things like git branch filtering would require a strange mix of server-side and local filtering. I hope the changes in v3 make browsing a bit easier, and I might add more advanced filtering via search pattern matching available in a future update!


Add a "make coverage"

It could be cool to output code-coverage even though it can potentially return false positives (bad code without assertions can still have 100% coverage).
Ideally this should run ALL tests and return coverage. As a minimum it should display unit test coverage.

Fixed here: https://github.com/kardolus/chatgpt-cli/commit/ba2bb7a28c7d22d56c0fb5d310a8fa303649bf9c


[APP-2955] Add custom ENV_VAR as Runtime Params

JIRA Ticket:

APP-2955

Rationale:

The point was to support adding custom ENV_VARS as runtime params to dr-apps.
The user can pass custom ENV_VARS as:

String:

--stringEnvVar FOO=BAR, --stringEnvVar API_KEY="RANDOM API KEY"

Numeric:

--numericEnvVar INT_VAL=3, --numericEnvVar FLOAT_VAL=3.14

Changes in this PR:

update_application_source_version: Patches all verified valid runtime params.
verify_runtime_env_vars: Checks the runtime param ENV_VARS against the metadata.yaml file.
Added a test.

Demo:
https://github.com/user-attachments/assets/b30aa2aa-2c5b-40d3-b44b-b24bcc1e26aa


feat(toolkit): improve docker build time in CI

When running in CI, try to pull the latest image first and use it as cache
for the build. CI is detected by the presence of the CI environment variable.
Closes #1748
To be discussed: name of env var for detection, CI is set by lots of CI providers (not by CodeBuild though), use a opt-in mechanism instead?
Test (with empty ECR):
$ docker images -a | grep "/cdk/" | awk '{print $3}' | xargs docker rmi # or a more specific grep
$ cdk deploy # should build and push image
$ docker images -a | grep "/cdk/" | awk '{print $3}' | xargs docker rmi --force # or a more specific grep
$ CI=true cdk deploy # should pull, build almost instantly but not push

Pull Request Checklist

[ ] Testing

Unit test added
CLI change?: coordinate update of integration tests with team
cdk-init template change?: coordinated update of integration tests with team

[ ] Docs

jsdocs: All public APIs documented
README: README and/or documentation topic updated

[x] Title and Description

Change type: title prefixed with fix, feat will appear in changelog
Title: use lower-case and doesn't end with a period
Breaking?: last paragraph: "BREAKING CHANGE: <describe what changed + link for details>"
Issues: Indicate issues fixed via: "Fixes #xxx" or "Closes #xxx"

[ ] Sensitive Modules (requires 2 PR approvers)

IAM Policy Document (in @aws-cdk/aws-iam)
EC2 Security Groups and ACLs (in @aws-cdk/aws-ec2)
Grant APIs (only if not based on official documentation with a reference)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.

Can you describe a little more about the rationale behind the change? Are we not trading docker build time for docker pull time? Are we guaranteed that pulling will be faster than building?

We are indeed trading docker build time for docker pull time. Generally pulling will be faster than building for Dockerfiles with OS packages installation and code packages installation (pip, npm, etc.). If nothing has changed in the current commit (in CI), it will be faster to pull than to build. If there are changes, it's more likely to see changes in the code that is copied in the image (COPY/ADD, the bottom layers) and again pulling should be faster than building.
For very simple Dockerfiles (FROM + COPY/ADD, few layers) or for a complete change of the Dockerfile, I can imagine that it could be faster to build.

Why limit this behavior change to CI builds only?

When running locally chances are that we already have a lot of layer cache available. In this case, pulling will almost always be slower than building.

Though I like the use of the CI environment variable, I think there needs to be a command-line switch --ci which is threaded through to the build step. When not supplied, it could default to the presence of the environment variable CI. Be aware that --no-ci should also work to disable an autodetected CI build (it'll be the difference between undefined and false in the yargs object).

OK, I will look into this.

Thanks for the explanation. I'd like to see that rationale captured in one or two sentenced in a code comment somewhere.


NMAP freeze on app close

NMAP is freezing when the node app is closed before the scan is complete.

Watch for process.on('SIGINT', function(){})
and
process.on('unhandledexception', function(){});
//check for actual strings.
Kill the spawned process in these events.