Start Lua-Casbin developement as a GSoC 2021 task

Lua is the language used by the ecosystem like Nginx, OpenResty, Kong, etc. They have a solid requirement for access control like ACL, RBAC, ABAC. Some posts are like:

https://github.com/zmartzone/lua-resty-openidc/issues/222
https://github.com/prabago/kong-plugin-jwt-auth-rbac

So implementing Lua-Casbin will boost the related area to enhance their permission management security.

@divy9881 any update?

@divy9881 any update?

Recommended dev env:

IDE: IntelliJ IDEA + EmmyLua Plugin (https://plugins.jetbrains.com/plugin/9768-emmylua)
Compiler: Lua 5.1 via Luarocks (https://github.com/luarocks/luarocks/wiki/Download)
OS: Win10 x64

Recommended dev env:

IDE: IntelliJ IDEA + EmmyLua Plugin (https://plugins.jetbrains.com/plugin/9768-emmylua)
Compiler: Lua 5.1 via Luarocks (https://github.com/luarocks/luarocks/wiki/Download)
OS: Win10 x64

@hsluoyz
I was thinking of creating a PR which would restructure the current file structure in this repo and would make it similar to that of other implementations of Casbin (like directories of config, effect, model, persist) and add basic barebones to it too. Just wanted to ask would this be fine?

Fixed by: https://github.com/casbin/lua-casbin/commit/3757291273be4ca6db2085f92a05a6a539746f82


Discord Webhook: add support for mentions

Is your feature request related to a problem? Please describe.
I wanted to mention a certain role on my discord server so not everyone gets the notifications who has access. I found out that you can mention roles by adding this to the message:
<@&XXXXXXXXXXXXXX>
But this is not working because the message is sent in the title of the embed.
Describe the solution you'd like
I want that you can define a ENV variable where you can define mentions which are then sent in the description of the message.
Describe alternatives you've considered
Alternatively the message could also be sent in the description and the mention would be in the message too. The title would be something like "Palworld Server" or whatever :)
Additional context
How to mention a role: here
Discord Webhook live parser: here

This is a very cool idea, right now the json I am building is pretty simple.
JSON=$(jo embeds[]="$(jo title="$MESSAGE" color=$COLOR)")

We can modify it to:
JSON=$(jo embeds[]="$(jo title="$TITLE" description="$MESSAGE" color=$COLOR)")

Can create a new title for each one instead, or completely scrap the title? What do you think?

This is a very cool idea, right now the json I am building is pretty simple.
JSON=$(jo embeds[]="$(jo title="$MESSAGE" color=$COLOR)")

We can modify it to:
JSON=$(jo embeds[]="$(jo title="$TITLE" description="$MESSAGE" color=$COLOR)")

Can create a new title for each one instead, or completely scrap the title? What do you think?

How about if the title would be the script or function for example: Backup, Update and so on. Then the description can be what the script is doing.


It's Guzzle 7 now

Q
A

Bug fix?
yes

New feature?
no

BC breaks?
no

Deprecations?
no

Related tickets
N/A

Documentation
N/A

License
MIT

What's in this PR?
This PR turns the remaining sixes into sevens.
Why?
Because this is the Guzzle 7 Adapter, after all.

Strange... I did search for this...
Thank you


Fix stream reader raw data read and add skip samples method

Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] This change requires a documentation update

Checklist:

[ ] Pull request title reflects its content
[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes

Description:

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Refactor Docker Compose version detection to predictably pick v2 only if v1 is not available

Description
Refactor Docker Compose version detection to predictably pick v2 only if v1 is not available. At the moment, if V1 and V2 are installed, the V1 is checked but ignored, with no option to be picked up.
Related Issues
Followup on https://github.com/opensearch-project/OpenSearch/pull/16049

Check List

[ ] Functionality includes testing.
[ ] API changes companion pull request created, if applicable.
[ ] Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Thanks a lot @cwperks, @andrross @dblock mind please taking a quick look? thanks!


does not rename the ios folder.

react-native-rename: 2.9.0

Try using mine, I fixed a few bugs to support 0.70 https://github.com/grzmot22/react-native-rename-config

Closing, please check v3


fix typos

thanks! any luck with the #41 branch after these changes?

nope those changes were required to build the polyfill :)

@jfcampos 😄


Indicator

This PR should fix the page indicator, i changed the color of the active ellipse to orange to make it easier for me to see but it can be changed back if it worse

sorry wrong branch


HSEARCH-3509 Document the limitations of the date/time conversion in the Pojo mapper for java.util.Calendar and java.util.Date

https://hibernate.atlassian.net//browse/HSEARCH-3509

@yrodiere good work! I have just a suggestion.
Shall we add to the documentation that using Java legacy type is not recommended?

Ok, I'll add that and merge. Thanks


Prevent AttributeError on docker instance

Just tried using this blockchain, and got this exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File "blockchain.py", line 254, in full_chain
return jsonify(response), 200
File "/usr/local/lib/python3.6/site-packages/flask/json.py", line 251, in jsonify
if current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] and not request.is_xhr:
File "/usr/local/lib/python3.6/site-packages/werkzeug/local.py", line 347, in getattr
return getattr(self._get_current_object(), name)
AttributeError: 'Request' object has no attribute 'is_xhr'
It might be a mismatch between Request module and Flask installed. However, adding this line can help fix this issue, without me playing with things I don't understand in the docker file

I've observed this problem as well when running it outside of Docker.


Change envVars from array to a map

As a user of Helmet, I want to modify specific sections of envVars. However, it's not possible. This is because envVars is an array. Consequently, changing a single key is impossible since Helm overrides the entire set of variables. This PR fixes the open issue https://github.com/companyinfo/helm-charts/issues/19.
The solution involves changing the data type from an array to a map, like this:
# Current
envVars:
  - name: FOO
    value: "bar"
  - name: BOB
    value: "alice"

# New
envVars:
  FOO: "bar"
  BOB: "alive"

Will valuesFrom still work with this format?

Will valuesFrom still work with this format?

nice catch! this is a fix we can implement to support both cases:
envVars:
  FOO: "bar"
  BOB:
    valueFrom:
      configMapKeyRef:
        name: "foo"
        key: "bar"

What do you think?

@p-afraz Yeah, that format seems logical. Looking into the changes here now, the new helmet.dictToArray helper needs to be updated to support that.


Add ability to provide multiple users when running the tests

This change will break test APIs that may be in use by others and they will need to move to the new one.
This change will enable you to have multiple users:
func TestFoobar(t *testing.T) {
	testUsers := map[string]TestUser{
		"test": {
			Audience:           "test-client",
			Subject:            "test",
			Name:               "Test Testersson",
			GivenName:          "Test",
			FamilyName:         "Testersson",
			Locale:             "en-US",
			Email<EMAIL_ADDRESS>			AccessTokenKeyType: "JWT+AT",
			IdTokenKeyType:     "JWT",
		},
		"foo": {
			Audience:           "foo-client",
			Subject:            "foo",
			Name:               "Foo Bar",
			GivenName:          "Foo",
			FamilyName:         "Bar",
			Locale:             "en-US",
			Email<EMAIL_ADDRESS>			AccessTokenKeyType: "JWT+AT",
			IdTokenKeyType:     "JWT",
		},
	}

	op := optest.NewTesting(t, optest.WithTestUsers(testUsers), optest.WithDefaultTestUser("test"))
	defer op.Close(t)

	[...]

	token1 := op.GetToken(t) // for user `test`
	token2 := op.GetTokenByUser(t, "test") // for user `test`
	token3 := op.GetTokenByUser(t, "foo") // for user `foo`
}

Fixes #154

@ahockersten thanks! Great feedback. Will try to fix according to your comments later in the week.
Just to be clear, you only need to specify the "default user name" if you modify the TestUsers. The other way would require us to range over a map, which won't guarantee ordering.

When iterating over a map with a range loop, the iteration order is not specified and is not guaranteed to be the same from one iteration to the next. > If you require a stable iteration order you must maintain a separate data structure that specifies that order.

Source: https://go.dev/blog/maps
This could potentially cause inconsistent results and I haven't figured out a better way to handle it. Any feedback is welcome!


move EPH to @azure structure

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

client/README.md
:white_check_mark:Succeeded

client/changelog.md
:white_check_mark:Succeeded

client/lib/util/constants.ts
:white_check_mark:Succeeded

client/package-lock.json
:white_check_mark:Succeeded

client/package.json
:white_check_mark:Succeeded

processor/README.md
:white_check_mark:Succeeded

processor/examples/sendBatch.ts
:white_check_mark:Succeeded

processor/lib/checkpointInfo.ts
:white_check_mark:Succeeded

processor/lib/eventProcessorHost.ts
:white_check_mark:Succeeded

processor/lib/hostContext.ts
:white_check_mark:Succeeded

processor/lib/index.ts
:white_check_mark:Succeeded

processor/lib/modelTypes.ts
:white_check_mark:Succeeded

processor/lib/partitionContext.ts
:white_check_mark:Succeeded

processor/lib/partitionManager.ts
:white_check_mark:Succeeded

processor/lib/partitionPump.ts
:white_check_mark:Succeeded

processor/lib/util/constants.ts
:white_check_mark:Succeeded

processor/package-lock.json
:white_check_mark:Succeeded

processor/package.json
:white_check_mark:Succeeded

processor/tests/eph.spec.ts
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Remove std::io dependency from SHA-3

@homu r+

:pushpin: Commit 7eadab5 has been approved by hauleth

:zap: Test exempted - status


Fix escape key press in memory view

If esc is pressed while editing symbol showed as . in text view, actual byte will be replaced with b".". Esc should just drop cursor instead.

Switching Qt and C++ (for now, will be reevaluated when there are some good Rust bindings for Qt) so closing.


Create Codespace config

This PR creates the necessary configuration files to define a Codespaces environment for this repo. It sets up VSCode, Python, Node.js, other dependencies, and spins up a docs development server with a browser preview.
I leave it up to the consensus of reviewers to decide if the costs of using Codespaces outweigh its benefits and, consequently, if this PR should be merged.

Going to merge this as it is an easier alternative for internal contributors who find it tedious or time consuming to set up a local dev env. We're not charged if we don't use it. Having it as an option for other internal contributors is beneficial.
Post-merge:
To launch a codespace, click on Code -> New  codespace -> Create codespace


Code optimization

Hi
a little optimization: there is the method putIfAbsent that allows to writing core more compact
ciao
matteo

Hi
I created this PR many months ago. Can someone check it?
ciao
matteo

Dead project. Newest for Spring is spring-cloud-azure-dependencies (docs here), otherwise use qpid-jms-client directly.


Create POC for Neo4j integration

This is a small, probably very wrong experiment for Neo4j support (following up on https://github.com/ent/ent/issues/2551).
I time-boxed this to 1 hour without any knowledge of the codebase.
I am happy to get this further, with proper testing and more guidance, as what I've done here is most likely not enough at all (and there are issues we would need to discuss as well if the current implementation remains).

Some implementation notes/questions:
context.Context

context.Context is not used in the latest release of the Neo4j Go driver (but will be in 5.0)
some APIs such as Commit and Rollback do not accept a context.Context but their Neo4j counterparts will, in 5.0 (since COMMIT and ROLLBACK are messages sent over the wire). Is there a plan to add Context there?

Transactions
Before 5.0, there is no easy way for the user to retry transactions unless they use what we call transaction functions (i.e. managed transaction callbacks).
However, the current API seems to align with explicit transactions and that's what the POC does.
Also, some specific Cypher queries CANNOT run with explicit transactions (CALL {} IN TRANSACTIONS with Neo4j 4.4 and later, USING PERIODIC COMMIT with Neo4j up to 4.4).
They need to be run with Session.Run. Is there any way for the executor to get that info so that it picks the right Neo4j API?


Mobile Services Wizard does not catch faulty passwords

I created a new mobile service with the creation wizard with an existing database but entered the wrong password. The wizard does not prompt the error, proceeds on with the service creation, and simply doesn’t configure a database which leaves the service “unhealthy” in the portal. It took a while for me to figure out what was wrong since there weren't any proper error messages.

This is a dupe. There is no API error for this. Investigating... Now it creates a service in an unhealthy state..

Right after we create the mobile service we perform a status request. If the status is any other than Healthy, we erase it; this is the same behavior than in Visual Studio.
I've tested this, creating a mobile service with wrong db password, both from the new Azure Services Activity wizard, and the Service Explorer, and it's working as expected (using our current dev branch).
If you see an unhealthy mobile service in the portal, you should wait for the process to complete in IntelliJ, probably with an error message explaining the cause of failure. If you then refresh the portal, the unhealthy mobile service should be deleted.

This is working as expected as per @leo.


refactor subscription logic

[x] refactor webhooks
[x] rename enum TierIDs
...

is this currently being worked on ?


Ubuntu 22.04 image breaking existing workflow

Description
Upon running
  docker run \
    --volumes-from=$HOST_CONTAINER_ID \
    --workdir $GITHUB_WORKSPACE \
    aquasec/trivy:0.22.0 --light --exit-code 0 --severity CRITICAL,HIGH --no-progress $FULL_IMAGE_NAME

with ubuntu Image: ubuntu-22.04
we are getting
  BusyBox v1.32.1 () multi-call binary.

  Usage: basename FILE [SUFFIX]

  Strip directory path and .SUFFIX from FILE

If we roll back the ubuntu version to Ubuntu 20.04 the action runs with no issue.
Hoping to find the root cause of this, if it's an ubuntu issue or the trivy package.
Here's a before and after of anchoring our ubuntu version to 20.04 instead of ubuntu-latest
Before:
https://github.com/WW-Digital/cmx-search-metadata-service/actions/runs/3462362051/jobs/5785677832
After:
https://github.com/WW-Digital/cmx-search-metadata-service/actions/runs/3462953802/jobs/5782527104
Platforms affected

[ ] Azure DevOps
[X] GitHub Actions - Standard Runners
[ ] GitHub Actions - Larger Runners

Runner images affected

[ ] Ubuntu 18.04
[ ] Ubuntu 20.04
[X] Ubuntu 22.04
[ ] macOS 10.15
[ ] macOS 11
[ ] macOS 12
[ ] Windows Server 2019
[ ] Windows Server 2022

Image version and build link
Image: ubuntu-22.04
Version: 20221027.1
Is it regression?
Ubuntu 20.04
Expected behavior
Expected the action step to pass on the new ubuntu image
Actual behavior
Build action fails when running command
Repro steps

Attempt to run aquasec/trivy:0.22.0 --light --exit-code 0 --severity CRITICAL,HIGH --no-progress $FULL_IMAGE_NAME
on an image

Hello @znorcross211,
The issue does not recur with the specified steps. Please provide more details or I will be forced to close the issue.
Logs with simple repro: logs_45.zip

@erik-bershel  seems like I was incorrect. It was due to HOST_CONTAINER_ID=$(basename $(cat /proc/self/cgroup | grep name)) will need to update how we are doing this thanks for taking a look

@znorcross211 so I'll close this issue. Feel free to contact us if you have another concerns.


Update takeoutLocationHistorySettings.py

These commits support both the newer Settings.JSON file as well as the prior version. It was found that some keys and key-value pairs were changed, and new ones were added, including deviceActiveness and encryptedBackupsControls.


toggle preview

I have searched issues, and haven't found this being mentioned; sorry if it has already been discussed.
I almost never want to see the preview: I use yazi in a netrw/oil.nvim style, however especially with images, having a preview is very helpful.
I would love to have an ability to toggle the preview! You can currently set the ratio, and that's also how you can disable the preview. I want to be able to set the ratio, but keep the preview disabled by default (via a config option; I don't suggest that to be the actual default); then I would be able to press a mapping to toggle it on / off.
I assume I can achieve this by writing a plugin (correct me if I'm wrong), but it felt to me like something obvious to have, and so I think it would be a good thing to add to core.

https://github.com/yazi-rs/plugins/tree/main/hide-preview.yazi is exactly what are you looking for
You can find more awesome plugins at https://yazi-rs.github.io/docs/resources
Closing as already exists

thank you! missed that completely


VOC2007 support test set

Fixes https://github.com/pytorch/vision/issues/1336
Instead of always enabling a test set, we explicitly only allow it for VOC2007.
@vedaldi @pmeier does this sound ok to you?

Codecov Report

Merging #1340 into master will decrease coverage by 0.06%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #1340      +/-   ##
==========================================
- Coverage   65.84%   65.77%   -0.07%
==========================================
  Files          75       75
  Lines        5785     5791       +6
  Branches      885      887       +2
==========================================
  Hits         3809     3809
- Misses       1710     1716       +6
  Partials      266      266

Impacted Files
Coverage Δ

torchvision/datasets/voc.py
21.64% <0%> (-1.43%)
:arrow_down:

torchvision/transforms/transforms.py
80.98% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Fix rounding error for small amounts

What current issue(s) does this address, or what feature is it adding?
when sending tokens the amount argument has a rounding error
neo> wallet tkn_send PCG1 AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y AZQyxPDwXhiNyvzXx6sLyW1LcbotpeQjp1 0.00000012
Used 3.353 Gas

-----------------------------------------------------------
Will transfer 0.00000011 PCG1 from AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y to AZQyxPDwXhiNyvzXx6sLyW1LcbotpeQjp1
Transfer fee: 0.0001
-------------------------------------------------------------

Note the value difference in "will transfer" from what is specified on the cli
How did you solve this problem?
use the Decimal class instead of float.
How did you make sure your solution works?
manual testing
Are there any special changes in the code that we should be aware of?
Please check the following, if applicable:

[ ] Did you add any tests?
[X] Did you run make lint?
[ ] Did you run make test?
[X] Are you making a PR to a feature branch or development rather than master?
[X] Did you add an entry to CHANGELOG.rst? (if not, please do)

Coverage remained the same at 79.39% when pulling 0f3383311d6ae69bb185effd9eb44eb8c4fa7c0e on ixje:fix_asset_amount_rounding into ff3fdea08e90d321d771a6c8de403534f329ff11 on CityOfZion:development.


Update README.md to include indicator explanation

I've added the code where the indicators are explained.

Thanks!


Users can control day/night cycle speed

Users should be able to control the speed at which day/night cycle progresses.
Here is a list of mods that have implemented this feature:

Extended Days (MC 1.12.2)
OpticManager (MC 1.12.2)
TooMuchTime (MC 1.7.10)
Longer Days (MC 1.12.2)
Time Dilation (MC 1.14.4)

Opened in the wrong repository, oh geez :confused:


Throw an exception when building models that lack required fields

https://github.com/pinterest/plank/issues/185
https://github.com/pinterest/plank/issues/213

Closing while I re-evaluate how to best do this. It likely needs to be configurable.


Configuring Multitenancy with CRUD queries

Hi, this is very nice 👍
For multi-tenant purpose, I have added a companyId int field/value to the aspUsers table. I also have the companyId col in most of the entities/table, and followed your wiki.
The issue is the default scaffolding in the controllers does not include your Ctx filter at the controller, does setting a global filter automatically over ride or inject into the local controller context? can you tell me how to configure and setup/do this?

So, how can I set a filter during user login, that will user his tenantId/companyId to filterOnly his organizations records when the companyId field is available on the entities, and prevent other visibility.
Is the filter per session, and does it dispose automatically when user logs out/? how to implement dispose on time-our or user lock-out as well?
In wiki help help I only see Query Filter, what about rest CRUD filter like in Dynamic Filters, for updates and deletes on the main table and related tables, can you please include some CRUD filter samples around multitenancy

Thanks
Weedy

Hello @weedkiller ,
Currently, there is an issue in our library for filtering by context.
The query plan is cached globally and not by context which causes some trouble to our library when multiple different filters must exist at the same time (Tenant Filter).
I will give you a better answer to all your questions when this issue will be fixed but meanwhile, I don't recommend using the library for tenant scenario unless the tenant is global (not by the user currently logged)
Best Regards,
Jonathan

ok thanks for letting me know.
In the meantime, can you provide some samples on a different context.
For e.g. filter records by time, last week, last month and grouping etc - does not apply to tenant but on the time domain. The fluentTime lib is nice, but I was hoping to see that aspect in your lib

Hi, I have a same multi tenant bug. The filter always same to every users because of globally query cache,
@JonathanMagnan Could you tell me how long will it take to fix this bug? I stuck here and deadline is coming closer. Thanks
 public EfContext(string nameOrConnectionString)
            : base(nameOrConnectionString)
{
    this.Filter<IHaveTenant>(q => q.Where(x => x.TenantId == UserSessions.TenantId));
}

Hello @weedkiller , @cuongdn
I'm very sorry for the long time I took to try to fix this issue. Unfortunately, free time to support this library is currently very hard to find.
The v1.4.33 has been released
https://github.com/zzzprojects/EntityFramework-Plus/wiki/Downloads
The issue with Tenant filter should now be fixed.
However, there is still some existing limitation.

LazyLoading is fully compatible with global filter but not with context filter (issue caused by cached query)
If you use context filter, use SetFiltered method over Set (The Set method have the same problem as LazyLoading)

Let me know if the Query Filter is finally working.
Best Regards,
Jonathan

After upgrade, I get error "Object reference not set to an instance of an object" when using AsNoFilter().SingleOrDefault(...), my app totally broken
Partial stack trace
[NullReferenceException: Object reference not set to an instance of an object.]
   Z.EntityFramework.Plus.QueryFilterContextInterceptor.Initialize(DbContext context) +574
   Z.EntityFramework.Plus.QueryFilterContextInterceptor..ctor(DbContext context) +320
   Z.EntityFramework.Plus.QueryFilterManager.AddOrGetFilterContext(DbContext context) +100
   Z.EntityFramework.Plus.QueryFilterInterceptorDbCommandTree.TreeCreated(DbCommandTreeInterceptionContext interceptionContext) +562
   System.Data.Entity.Infrastructure.Interception.DbCommandTreeDispatcher.<Created>b__0(IDbCommandTreeInterceptor i, DbCommandTreeInterceptionContext c) +10
   System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch(TResult result, TInterceptionContext interceptionContext, Action`2 intercept) +148
   System.Data.Entity.Infrastructure.Interception.DbCommandTreeDispatcher.Created(DbCommandTree commandTree, DbInterceptionContext interceptionContext) +160
   System.Data.Entity.Core.Common.DbProviderServices.CreateCommandDefinition(DbCommandTree commandTree, DbInterceptionContext interceptionContext) +99
   System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory.CreateCommandDefinition(ObjectContext context, DbQueryCommandTree tree) +142
   System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory.Prepare(ObjectContext context, DbQueryCommandTree tree, Type elementType, MergeOption mergeOption, Boolean streaming, Span span, IEnumerable`1 compiledQueryParameters, AliasGenerator aliasGenerator) +159
   System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable`1 forMergeOption) +993
   System.Data.Entity.Core.Objects.<>c__DisplayClass7.<GetResults>b__6() +32
   System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction(Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) +288
   System.Data.Entity.Core.Objects.<>c__DisplayClass7.<GetResults>b__5() +154
   System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func`1 operation) +190
   System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +283
   System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0() +15
   System.Data.Entity.Internal.LazyEnumerator`1.MoveNext() +45
   System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source) +121
   System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__2(IEnumerable`1 sequence) +40
   System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle(IEnumerable`1 query, Expression queryRoot) +59
   System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute(Expression expression) +114
   System.Data.Entity.Internal.Linq.DbQueryProvider.Execute(Expression expression) +116
   System.Linq.Queryable.SingleOrDefault(IQueryable`1 source, Expression`1 predicate) +249

Hello @cuongdn ,
I will look at this issue today.
Do you think you could provide us an example that's not working to speed-up the bug correction?
All our test-case are currently working.
Best Regards,
Jonathan

Hello,
I fixed this error but I'm not satisfied about this solution. You can see my code as follow repository
https://github.com/cuongdn/efplusfilter
Problem
Core.DataAccess (only QueryFilter)
 <package id="Z.EntityFramework.Plus.QueryFilter.EF6" version="1.4.33" targetFramework="net452" />

DataAccess (all features)
  <package id="Z.EntityFramework.Plus.EF6" version="1.4.33" targetFramework="net452" />

EfFilter: need nothing

Using AsNoFilter() => Error: NullReferenceException as previous stack trace

Solution
It works when only use Z.EntityFramework.Plus.QueryFilter.EF6 or Z.EntityFramework.Plus.EF6 in both Core + DataAccess (not QueryFilter.EF6 and Plus.EF6)
But project Core.DataAccess actually doesn't need all features, it only need  QueryFilter.EF6. I hope it will help you figure out this bug or explain what I did wrong.
Regards,
Cuong

Thank a lot @cuongdn ,
I will for sure check it tomorrow.

context.Set only work with GlobalFilter (You can use the method SetFiltered instead)

One more thing, I don't understand what you mean about GlobalFilter because after upgrade using my solution (only upgrade package and no more code), everything still works. I have never used SetFiltered yet and all filtering configurations is in EfContext.

Hello @cuongdn,
Let first explain the difference:

A global filter is normally creating once when the application start.
An instance filter is created by context

The Set is still filtered by global and instance filter but once compiled, it caches the query to execute in a shared cache.
Global Filter
// using Z.EntityFramework.Plus; // Don't forget to include this.
QueryFilterManager.Filter<Customer>(q => q.Where(x => x.IsActive));

var ctx = new EntitiesContext();
// TIP: You can also add this line in EntitiesContext constructor instead
QueryFilterManager.InitilizeGlobalFilter(ctx);

// SELECT * FROM Customer WHERE IsActive = true
var list = ctx.Customers.ToList();

Instance Filter
// using Z.EntityFramework.Plus; // Don't forget to include this.
var ctx = new EntitiesContext();

ctx .Filter<Customer>(q => q.Where(x => x.IsActive));

// SELECT * FROM Customer WHERE IsActive = true
var list = ctx.Customers.ToList();

Here is an example that will not work
// Apply some global filter when the application start
QueryFilterManager.Filter<Customer>(q => q.Where(x => x.OrderCount > 5));

var ctx1 = new EntitiesContext();
var ctx2 = new EntitiesContext();

// SELECT * FROM Customer WHERE OrderCount > 5
// The first time the query compile, it's apply and cache the query with all global && instance filter
var list1 = ctx1.Set<Customer>().ToList();

// Apply the filter
ctx2.Filter<Customer>(q => q.Where(x => x.IsActive));

// SELECT * FROM Customer WHERE OrderCount > 5
// Oops! The following set have not been filtered with the instance filter since the cached query has been used
var list1 = ctx2.Set<Customer>().ToList();

// SELECT * FROM Customer WHERE OrderCount > 5 AND IsActive = true
// Now it's work since the SetFiltered has been used
var list1 = ctx2.SetFiltered<Customer>().ToList();

Hi @JonathanMagnan , you explained this well between the global and instance filters - now that we understand what you mean by those two, let me clarify. I am seeking is a hybrid where I can pass in any entity at a per context and per session but for all entities, if they have a column specified.
for e.g. an instance scoped context filter  defined with a generic entity/table definition so that, regardless of an interface, if a table contains a col for tenant it will filter.  Here T is any table/entity OfTypeGenericEntity if you look in EF DbSet, you may find it there or you can also discover from here

ctx .Filter<T>(q => q.Where(x => x.user.TenantId)); // tenantMay or Maynot exist in sometables, if its not, then just return all values.
Also make it fluent, so we can check,
     ctx .Filter<T>(q => q.
     .Where(x => x.user.TenantId)
     .Where(rec => rec.IsNotArchived)

also a positive note 👍 : what I have found with your framework, is that its more flexible and easier to use than others like dynmfilters etc.
Lastly I know you have libs for sale, and my boss might be interested if we can show performance improvements above regular EF for the CRUD, and not just bulk. If you figure out how to map to Dapper for  reads only, or such, check out this lib

Hello @cuongdn ,
Thank you for your project, now I understand better your issue.
Problem
The following exception is thrown Object reference not set to an instance of an object
Cause
That error happens if a both library is used within the same solution:

Assembly A: Z.EntityFramework.Plus.EF6
Assembly B: Z.EntityFramework.Plus.QueryFilter.EF6

Solution
Only one of this library can be used in a solution.
Only one assembly will be copied to the output project instead of having two different assemblies.
Why we will not fix?
While a fix could be possible to allow both libraries within the same solution, some weird behavior will still exist or we will eventually make the same mistake in future changes.
Both libraries contain a set of the filter instead of a library containing all filters. By example calling AsNoFilter() may be handled only by the hook in the Assembly A. But since we remove the workaround used to specify we should not add a filter, the Assembly B hook will not be aware of it and will still apply the filter.
The risk of eventual mistake is a way to high.
I'm not sure if I explained it correctly so let me know if you need more detail, but I highly recommend you to use only the full version since only one library will be used in the final in the output project.
Best Regards,
Jonathan

Hello @weedkiller,
Could you contact me directly for the last question about EF CRUD (This thread is enough long hehe)? You may have got a very good idea here if I understand your requirement ;)
Best Regards,
Jonathan

Hello @weedkiller ,
Yes, our library is easier to use but because it not supports only filter but also other methods in the "Filter" method like Take, OrderBy, Include, etc.. We cannot, unfortunately, use the same technique as the DynamicFilter library. So some scenario is currently not supported by our library (Set and Lazy loading for Instance Filter).
So if I understand your requirement for the QueryFilter feature, you want to be able to do something like this?
public interface ITenant
{
	public int TenantID { get; set; }
}

public class NotHeritingFromInterface
{
	public int ID { get; set; }
	public int TenantID { get; set; }
}

ctx.Filter<ITenant>(x => x.Where(y => y.TenantID == 2));

// SELECT * FROM NotHeritingFromInterface WHERE TenantID == 2
ctx.NotHeritingFromInterface.ToList();

So even if the class NotHeritingFromInterface doesn't inherit from ITenant, the filter is also applied?
Best Regards,
Jonathan

I was saying my EF objects do not implement these interfaces, and I think the col names on the table/Entites should be enough to filter.


React: connected the footer form to the backend

Connected the footer form to the backend

Hey nice work man!


Conduits and Conduit Facade's not appearing.

We are having issues on our server with conduits and conduit facades disappearing. When you mouse over them you can still see the black outline but you don't see the actually conduit. I am not sure what is causing it because it doesn't happen to all conduits but it is enough to cause issues. Thank you for your time.

see #2862


Compatibility with graphql-tag

Hi, I have vscode and the Apollo extension for it. It beautifully highlights my gql statements, as well as autocomplete.
import gql from 'graphql-tag'

const USER_SUBSCRIPTION = gql`
  subscription getContacts {
    contacts {
      id
      first_name
    }
  }
`

but this produces a problem in hasura/apollo/swr (I think swr):
{"type":"connection_error","payload":"parsing ClientMessage failed: Error in $.payload.query: expected Text, encountered Object"}

I think the solution is https://github.com/apollographql/graphql-tag/issues/144#issuecomment-359367651
It would be cool if you could support for this!
Without the gql bit on my USER_SUBSCRIPTION , vscode no longer highlights it.

SWR doesn't do anything special to support GQL, it will receive the query generated by Graphql-tag and pass it as is to the fetcher function, I think your fetcher will need to support graphql-tag.

Would be great if you can create a minimal reproduction on CodeSandbox. 👍
Closing this PR for now.


AGUrlRequest: failed to set SNI with Firefox

Added more logging

More logging helped: I see garbage instead of safebrowsing host sometimes.

Seems to be a problem in managed code.

Testing instructions:

Turn on debug mode in Adguard
Surf the Internet in Firefox
Make sure that is no "Failed to set SNI" messages in Adguard log


Cookybooky

see #1

ah @pngwn for future reference, dont bother with doctocing PRs - once you merge it in i think doctoc will take care of it in subsequent commit


Chage 'new Buffer()' into 'Buffer.from()' or 'Buffer.alloc()'

refs: #167
Please have a look.

Thank you so much !!


Cannot upload new logo and change logo link

I'm submitting a ...
[ ] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project

Summary

Dear Concerned, I would like replace my old logo with a new logo and update the link, auto-merge doesn't allow that.

Please refer to PR #16594

The token address is 7bFfvNZqJr2KFDjdP58MVud7kM9AMbXvoFcfAmgBHtfx

I deleted the old logo and uploaded a new logo image in assets

I updated the logo link in line number 93214 of src/tokens/solana.tokenlist.json

Thank you for your kind consideration

Other information (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

merged


fetch fonts over https

currently being blocked(blocked:mixed-content)

theres a recent PR on main mapwarper repo which could be good?

True, https://github.com/timwaters/mapwarper/pull/120 does the trick.


Change Posting Prompts to be a Clearer Step by Step

When you are posting a new link without originating it from the context menu (right click) or the posting button, you see a series of messages that tell you what to do. This is essentially a step-by-step guide, but it is currently displayed as a series of boxes that appear after clicking in the proper place. The step-by-step nature of this process could be made more explicit by perhaps adding numbers to the left hand side of the popup.

Screen cap for reference (see the yellow area).

Pull #192 looks good except it seems to me that step 1 and 2 are the same, could we get rid of step 1 and the word "Now" on step 2 for simplification? Having 3 messages is kind of overwhelming.

@spectralsun Thanks for the feedback. Do you mean like this?

Ha, I don't think he did exactly but I was just about to suggest this.

@d356 I was thinking just remove the top line all together, just have the https link (as the first message) and the message below about copy/paste and the button top open.
@smcgregor thoughts?

Based on Think-Aloud study results, we must tell the user what to do with the link. So the first message is required.

Hi privly devs! I was looking into this issue and I feel that the link in a separate <p> tag makes it look like an additional step. I made something like this:

The advantage of this can be that it maintains the continuity of Step 1 while separating the steps into distinctive paragraphs. Furthermore, the instructions and action-to-be-taken part of 1st step are separated by a horizontal rule as well. Do let me know if this looks like a viable solution to you.

Looks good to me. @spectralsun, how does it look to you? I think I would make a few changes, but they are more tweaks like rounding the corners, playing with the width of the horizontal rule, etc.

@smcgregor I'm working on the tweaks right now. I'd like to ask if I should give border radius to all the p.flash.notice elements (which includes the connection checking message and the login message as well)?

Yes. It is hard for me to picture it mentally, but this would probably look better.

@smcgregor How does this look?

Looks good.

Okay, updating the pull request. Is it okay if I amend my commit and force push it? Or do you want me to rebase?

Why aren't you just adding another commit?

I wasn't sure of the guidelines. I'll just add a new commit. Thanks! :)

Fixed by https://github.com/vatsalj/privly-applications/commit/72fc545930b68222d800509c1151a074fe3d82a6


[WIP] 🐛 Fix timeout for image requests

This is a proposal for a fix for issue #8041.
I have a very simple reproduction case where this doesn't work.

Find an image URL that doesn't respond. Not 404 or host error, but hangs. I have this if you need one.
Put this url in a post image field.
Publish the post & try to visit it.

With an http url, on node v4.4.7, the timeout is still 2mins. It may be different on https or on a different node version.
The fix here is the same timeout pattern I used in the gravatar util after researching timeouts and finding them to be inconsistent.
I have only tested that this case is fixed.
@kirrg001 please can you take this over and make sure there is a well tested fix in place for 0.11.8 / alpha? Feel free to ignore this proposal and use a different approach.
Either way, it needs fixing for this case and for the AMP case which uses the same code RE: https://github.com/jbhannah/amperize/issues/95? Note: I think we will need to supply the fix ourselves.

Closing in favour of #8210


After Updating ubuntu 20.10 version, AD users can't login the system

After Updating ubuntu 20.10 version, AD users can't login the system. Today only updated few patches. Please share the solutions if anyone faced this...
Error: Username & password is incorrect. Try it again

Does anything useful get logged to /var/log/secure or /var/log/authlog when a user tries to login?


Fix various misspellings of the word Repository in AzureBlast.Web

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: AndrewLane sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


feat: added spotify url support

each change is in separate commit
as discussed playlists/albums need some tweaking, you can wait for me to finish or you can do it yourself

Bad code, broken query, leaked Spotify client id and secret token.

Spotify will be added soon to Music.

Bad code

I've did this as poc in few minutes only cuz the other guy asked. Music commands weren't even working before.
You don't even have .gitignore in your project
btw. black reformatted all files so ig they also weren't any good smh 🤷♂🤦♂

broken query

what

leaked Spotify client id and secret token.

😂😂😂🤣 API keys are public in spotdl repo, good luck telling people to generate their own spotify API keys
The issues with this issue (no pun intended)

One reason many prefer spotdl is because they don't have to generate their own API keys, it doesn't carry any permanent ramifications (like getting your account deleted which will be done for stream-ripping) but as a general idea, many users (especially non-coders) find that generating their own API key and linking up spotdl to their personal accounts disagreeable.
spotdl is not a that widely used for a malicious attack, its possible but highly improbable + if spotdl was big enough to justify a malicious attack, we would have already been served a notice to shut this project down, after all this whole project is only for "educational" purposes.
It flies in the face of spotdl being "easy to use out of the box".

What we can do

Provide an option to use personal API keys.

Additional note

We have 3.2k download per week (from PyPi alone), that's ~ 457 downloads per day.
Assuming 100% of downloads are for immediate use (vs. just updating the package) that's 457 users per day, which is almost definitely not the case.
Assuming each one of them downloads a 500 song playlist (which is overkill), that's ~ 228500 songs per hour = 19517 requests per hour.total_users = 457
total_songs = 457*500 # 228500

# song metadata is fetched is batches (20 songs per batch)
total_song_data_queries = total_songs/20 # 11425
# album and artist metadata is fetched individually
total_additional_queires = total_songs*2 # 457000

total_queries = total_song_data_queries + total_additional_queries # 468425
total_queries_per_hour = total_queries/24 #19517

Which is still far less than Spotify's vague 20,000 request per hour limit (I ran 20k requests on a personal token, haven't been limited yet) [the diag was outdatad]

Source: https://github.com/spotDL/spotify-downloader/issues/1225

Spotify will be added soon to Music.

Good luck with that 💀 try doing this without my code 🤝
why I am wasting time on helping yall kids ffs

the .gitignore file is not required but recommended to use, and since we both dont use atom, we dont really need it :)
as i said, you made the youtube query system not work since you did this:
if query.startswith("https://open.spotify.com/"):
  data = await MusicManager.fetch_spotify_data(query)

elif query.startswith("http://youtube.com/"):
  data = await MusicManager.fetch_youtube_data(query)
else:
  data = None

what if, instead of passing a "youtube.com/" link when playing, i want to use a "youtu.be/" one, or alternatively, i want to play songs using a query, for example "Never Gonna Give You Up", well, that wont work. obviously.
Looks like i was mistaken, spotidl uses 1 api key, thats kinda weird, but alright.
The only music command that wasnt working was lyrics, congratulations, you found a bug!! if you find any more, please open an issue. <3
and no, we wont REALLY have a problem making it without your code. :) that was kinda rude, wasnt it?
this pull request will be closed now, thank you!


[#6764] Fix coverage display when running tests

Checklist

[x] I have filed an issue about this change and discussed potential changes with the maintainers.
[x] I have received the approval from the maintainers to make this change.
[x] This is not a stylistic, refactoring, or cleanup change.

Discussion thread for this change
Issue number: #6764
Description of this change
This restores show coverage functionality broken by #6728

@mai93 @tpasternak this removes the release blocker from #6764


Add screens for setting fuel types

Description
Add screens for setting fuel types
What type of PR is this? (check all applicable)

[x] 🍕 Feature
[ ] 🐛 Bug Fix
[ ] 📦 Chore (Release)
[ ] ✅ Test

Related Tickets & Documents
BPHH-2446
Steps to QA
Fuel types screen works as expected:

additional fuel types can be configured by selecting "yes" on initial page
if "other" is selected, user goes to the configuration screen for adding additional fuel types
if "no" is selected, the additional fuel types are deleted from the checklist.
if "other" is unselected, the additional fuel types sub-section is removed

UI Accessibility Checklist

Note the following checklist is not an exhaustive list. Check
the WebAIM checklist for
a user-friendly checklist with more details. Aim to meet at least AA conformance level where applicable. Check
the WCAG guidelines for the full guidelines.

[ ] Markup uses semantic HTML?
[ ] Additional context added through aria-roles and aria-labels?
[ ] Checked
with Wave Browser Extension
for accessibility errors?
[ ] Usable with a keyboard and navigable in a logical order?
[ ] Usable using a screen reader (e.g. Voiceover for Mac) with enough context for the user?

General Checklist

[ ] ✅ Provide tests for your changes where relevant
[x] 📝 Use descriptive commit messages
[ ] 📗 Update any related documentation and include any relevant screenshots
[ ] 📱 For UI-related tasks, ensure responsive design is implemented across multiple screen size
[x] 🗂 Move your relevant story/task to the Ready for Code Review state

[optional] Are there any post-deployment tasks we need to perform?
n/a

wrong branch


Derive rlp en-/decoding for Sealed<T>

Motivation
RLP encoding of Sealed<T>. Ref https://github.com/paradigmxyz/reth/issues/11123.
Solution
Enables feature derive for alloy-rlp dep, to derive en-/decoding of Sealed<T>.
PR Checklist

[ ] Added Tests
[ ] Added Documentation
[ ] Breaking changes

this is still problematic
we should treat this impl as a delegation:
https://github.com/paradigmxyz/reth/blob/093b1a16dfca2def7b1bf76cb12e554bbe7d967b/crates/primitives-traits/src/header/sealed.rs#L77-L100
if the seal is keccask(rlp) this would also allow us to specialize the decode impl but for this type we can't expect this to always be the case

I see, the hash isn't rlp encoded in the buffer also, it's computed. to unblock this, we need to define a trait Seal, and an extension trait Keccak256Seal: Seal and update the sealed type to Sealed<T, S> + manual impl of rlp traits for Sealed<T, S: Keccak256Seal. proceed? I prefer this to cursing use of Sealed<T> to a wrapper type for rlp encoding impl, since most evm rollups will use the keccak256 seal.

hmm, after thinking about this a bit, I actually leaning towards not using the struct Sealed in reth because this comes with a few limitations, like we can't implement foreign traits on Sealed and always need to push them in here if we need them.
from reth pov, I wonder if something like trait Sealed would be more useful

hmm, after thinking about this a bit, I actually leaning towards not using the struct Sealed in reth because this comes with a few limitations, like we can't implement foreign traits on Sealed and always need to push them in here if we need them.
from reth pov, I wonder if something like trait Sealed would be more useful

imo it's good to have as an inner type nonetheless, with the "ethereum autotraits" being implemented, like rlp. rather skip rlp impl than not linking alloy and reth via this type.


inject with a function argument is hard to test

I believe testing would be easier if inject with a function function argument deferred to props if the context is empty, similar to inject by name.  I am currently wrapping everything that uses inject with a function argument in Providers.  If I don't, the stores I'm trying to access are undefined and throw errors in tests.
Is there an existing solution besides wrapping all test renders in Provider?  If not, is there a reason inject with a function argument doesn't behave this way?

@IcculusC, you can pass props directly to the injected component (this will override injection) https://jsfiddle.net/Sl1v3r/w4qquwgg/
Doesn't it help in your case?

@andykog, I'm using inject as outlined here https://github.com/mobxjs/mobx-react#customizing-inject to wrap a stateless component.
if you follow the source you end up here https://github.com/mobxjs/mobx-react/blob/master/src/inject.js#L52
here's a contrived example to kind of explain
// Example.jsx
import React from 'react';
import PropTypes from 'prop-types';
import { inject, observable } from 'mobx-react';

const StatelessComponent = ({ title }) =>
{title}
;
StatelessComponent.propTypes = {
  title: PropTypes.string.isRequired,
};

const Example = inject(
  /*
  If the component is wrapped in a <Provider />, the first argument of this
  function will be an object of the "stores" supplied to the <Provider />
  as props.  This is taken from the context as this.context.mobxStores.

  If the component is not wrapped in a <Provider /> the first argument
  will be an empty object as you can see in the code linked above.

  I grab the 'store' out of this object in this particular case.
  */
  ({ store }, props_, context_) => ({ title: store.title }),
)(observable(StatelessComponent));

export default Example;

// Example.jest.jsx
import React from 'react';
import renderer from 'react-test-renderer';
import { Provider } from 'mobx-react';
import Example from './Example.jsx';

describe('Example', () => {
  it('will work', () => {
    // here I'm passing the 'store' into the <Provider /> which propagates to context
    const component = renderer.create(<Provider store={{ title: 'bar' }} ><Example /></Provider>);

    const tree = component.toJSON();
    expect(tree).toMatchSnapshot();
  });

  it('will throw', () => {
    const component = renderer.create(<Example title={'bar'} />);

    const tree = component.toJSON();
    expect(tree).toMatchSnapshot();
  });
});

It seems like it would be easier to test if it deferred to the props.  If that were the case you could just provide an object with the appropriate structure.

Oh, I see

@IcculusC eh I don't :-)
Shouldn't the throwing test not be at least (that still doesn't work probably at the moment), but I think interily by passing the inject might be confusing?
it('will throw', () => {
    const component = renderer.create(<Example title={'bar'} store={{ title: 'bar' }} />);

    const tree = component.toJSON();
    expect(tree).toMatchSnapshot();
  });

But maybe not. I'm not sure :). What do others think?

leave it as is
don't call inject function if there is no Provider context
pass props as both first & second argument to the inject function if there is no Provider context

Also: how are we going to warn about a forgotten Provider outside testing scenario's? That is something that you will detect quite lately with solution 2 / 3 as there is no direct throw anymore

personally I like #3
I want to be able to use the redux-like state mapping without losing mobx goodies.  It feels really awkward to me to pass state mocks in a provider or as props when I only use a subset of the state in a component.

I've just found this (having thrashed around for a bit).  Tempted to turn this into a blog post as it caused me pain (invariably the source f all my blogposts :smile:)

But maybe not. I'm not sure :). What do others think?

leave it as is
don't call inject function if there is no Provider context
pass props as both first & second argument to the inject function if there is no Provider context

Probably because I'm new to mobx I didn't quite follow these options.  Apologies.  However, here's my twopennyworth:
My component looks like this:
import * as React from 'react';
import { CounterStore } from '../../../stores/counterStore';
import { inject, observer } from 'mobx-react';
import { Stores } from '../../../stores';

export interface ICounterProps {
    store: CounterStore;
}

@inject(
    (stores: Stores) => ({
        store: stores.counterStore
    }) as ICounterProps
)
@observer
export class Counter extends React.Component<Partial<ICounterProps>> {
    handleIncrement = () => {
        this.props.store.increment();
    }

    render() {
        console.warn('the props', this.props)
        const { count } = this.props.store;
        return (

                The count is: {count}

                <button onClick={this.handleIncrement}>Increment counter</button>

        );
    }
}

My working test looks like this:
import * as React from 'react';
import { Provider } from 'mobx-react';
import * as renderer from 'react-test-renderer';
import { Counter } from '../component';

function makeStubCounterStore() {
    const stubCounterStore = {
        count: 0,
        increment() {
            this.count += 1;
        }
    };
    return stubCounterStore;
}

describe('counter', () => {
    it('component renders as expected', () => {
        const stubCounterStore = makeStubCounterStore();
        const component = renderer.create(
            <Provider counterStore={stubCounterStore}>
                <Counter />
            </Provider>
        );
        let tree = component.toJSON();
        expect(tree).toMatchSnapshot();
    });
});

However, rather than
        const component = renderer.create(
            <Provider counterStore={stubCounterStore}>
                <Counter />
            </Provider>
        );

I think it would make sense to be able to write:
        const component = renderer.create(
                <Counter store={stubCounterStore} />
        );

And have it just work.  Was that one of the options?

I think the proposal here is really to have directly passed props override injected props passed by context.
The change would probably go here
var additionalProps =
    grabStoresFn(this.context.mobxStores || {}, newProps, this.context) || {}
for (let key in additionalProps) {
    newProps[key] = additionalProps[key]
}

I feel like this should be the expected behavior (there are already tests to verify a nested provider overrides a parent provider). I see this like an extension of that.

Looking at the tests, this requested functionality seems to be the opposite of the original intention. There is a test "inject merges (and does not overrides) props" to ensure that the inject functionality does explicitly overrides and declared props.
I would propose offering an alternative inject method that does not do this. Maybe injectWeak? This way the change would not break any existing workflows.

I like the inject as is, because it gives user absolute control over the behavior (instead of making assumptions):
// You can fallback to prop (making <Provider> optional)
inject((stores, props) => ({
  store: stores.counterStore || props.store
}));

// Or you can prioritize the prop and fallback to context
inject((stores, props) => ({
  store: props.store || stores.counterStore
}));

// You can throw (enforcing <Provider> ...)
inject((stores, props) => {
  if (!stores.counterStore) {
    throw new Error("counterStore is missing")
  }
  // ...
});

// You can make Provider conditionally optional (eg. for tests only):
inject((stores, props) => {
  if (!props.isTest && !stores.counterStore) {
    throw new Error("counterStore is missing")
  }
  //....
});

// You can re-map props based on store
inject((stores, props) => ({
  a: stores.store.foo ? props.a : props.b
  b: stores.store.foo ? props.b : props.a
});

I tried to provide a little explanation for current behavior here

Whilst I can see your point, unit testing is a pretty common use-case, it would be nice if maybe a wrapper could be created which is only for testing purposes and let's one create new context from that.


Tree control focus frame is not clipped by parent container

Godot version
4.1.dev (9b9bb418cb1137e69b5131ec9fa7b41c0396db28)
System information
Ubuntu 22.04, Intel Iris Plus Graphics G7, Wayland
Issue description
The focus frame around the Tree control overflows its parent container, even if it should be clipped due to scrolling.

Steps to reproduce
Create a blank project and a new theme resource, to access the theme preview panel.
Focus on the tree control of the previewed widgets and scroll the whole preview to notice the overflowing frame.
Minimal reproduction project
N/A

Can you reproduce this in 3.5.2?

No, it does not happens in 3.5.2, seems related with the new default theme


[E::hts_open_format] Failed to open file "" : No such file or directory

Hi,
here after what I obtain at the "Viral_Track_scanning" step :
Output directory does not exist ! Creating it ! 1 Fastq files are going to be processed ! Mapping UPN1_S1_L001_R2_001_extracted.fastq file Apr 29 12:58:01 ..... started STAR run Apr 29 12:58:01 ..... loading genome Apr 29 12:59:11 ..... started 1st pass mapping Apr 29 13:04:15 ..... finished 1st pass mapping Apr 29 13:04:15 ..... inserting junctions into the genome indices Apr 29 13:06:05 ..... started mapping Apr 29 13:17:46 ..... finished mapping Apr 29 13:17:47 ..... started sorting BAM Apr 29 13:21:16 ..... finished successfully Mapping ofUPN1_S1_L001_R2_001_extracted.fastq done ! All fastq files have been mapped successfully Starting the BAM file analysis Indexing of the bam file for UPN1_S1_L001_R2_001_extracted is done Computing stat file for the bam file for UPN1_S1_L001_R2_001_extracted is done Checking the mapping quality of each virus... Export of the viral SAM file done for UPN1_S1_L001_R2_001_extracted Exporting QC  UPN1_S1_L001_R2_001_extracted ....No viral sequences detected detected Exporting QC table for  UPN1_S1_L001_R2_001_extracted .... done !Creating QC plot for  UPN1_S1_L001_R2_001_extracted ....QC plot done ! Merging Viral SAM files identified[E::hts_open_format] Failed to open file "" : No such file or directory samtools merge: fail to open "": No such file or directory
It seems that the list of BAM files, that it is supposed to merge, is empty, but in the "Viral_BAM_files" folder there are 52 BAMs files.
Thank you in advance

Hi Jules (if I am not mistaken),
So this is also a mistake I have spotten, it is not really a problem as Viral-Track works perfectly and I just need to remove the useless lines generating this error message. Do you get the correct QC files at the end of the process ?
Best

Hi,
yes I obtain a correct QC file at the end of the process (even if it is quite strange to obtain a 100% viral mapping events on the barplot of the second line).
Thank you

Hi,
Great ! For the mistake you mentionned that's weird : can you send me your QC pdf file so I can see ?
Best

As in the example one of the github : https://github.com/PierreBSC/Viral-Track/blob/master/QC_report.pdf

Ok, I thought I had corrected that mistake. Thank you for pointing this out ! If you don't have any other problem I can close the issue.


v0.3.0 fails on ubuntu with a conditional check error

Error
TASK [ansible-role-github_cli : Ensure that github_cli_check_rpm_key_fingerprint is set correctly] ***
Friday 29 April 2022  09:31:39 +0000 (0:00:00.037)       0:00:56.100 **********
fatal: [default -> localhost]: FAILED! =>
  msg: 'The conditional check ''github_cli_check_rpm_key_fingerprint is boolean'' failed. The error was: template error while templating string: no test named ''boolean''. String: {% if github_cli_check_rpm_key_fingerprint is boolean %} True {% else %} False {% endif %}'

playbook
- name: install github gh cli
  include_role:
    name: "ansible-role-github_cli"
    apply:
      become: true

What version of jinja2 are you using? Older versions don't have support for the boolean test. These checks should not need to be conditional.

Sorry, missed earlier ping.
I was using Jinja2 3.1.1 via ansible 5.4.0.


Better handling of popUntil Location not found?

Hi there!
Currently, when calling popUntil with a Location that is not in the current Stack, the result is a blank screen (as all pages are popped).
Should we throw an exception when this happens, or handle it another way, or should we accept this as a result of the package's simplicity?

After giving it some thought, I prefer keeping it as is, as it reflects the behavior of the underlying Navigator.


bump digitalmarketplace-utils dependency to v50.0.0

https://trello.com/c/dz3EnMnh
This mostly brings us werkzeug 0.16.

Thanks - I'm kinda looking to hit the merge button on a frontend first so that I can discover something's wrong quickly before I make loads of merges which I then need to back out.


Support net46

Add a net45 target to the generated library nupkgs, which is used by net46 builds rather than the netstandard1.3 target.
This will also be used by net45 projects, but that should essentially be a no-op.
Fixes #845.

Just to check, this will work for net461 as well as net46, right?

Yes, I've checked it on 45, 451, 452, 46, 461 in both VS and dotnet cli.

LGTM, although I gather you're not going to merge it into master anyway.

PTAL
I've added the version update to 1.17.0, so this can now be merged to master tomorrow, ready for a manual nuget release tomorrow after the auto-release.


Word selection is incomplete for C++ identifiers containing certain allowed characters

Version: 1.55.2 (user setup)
Commit: 3c4e3df9e89829dce27b7b5c24508306b151f30d
Date: 2021-04-13T09:35:57.887Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.19042
Steps to Reproduce:

Use the following code in a C++ file (test.cpp) :

int main()
{
    int abc$$$xyz;
    abc$$$xyz = 1;
    return 0;
}

This code compiles.

Double-click within "abc".  Note that only "abc" is selected.  The "$"'s are valid within identifiers in C++, so should have been included in the selection.
(With the C/C++ Extension also installed) Right-click anywhere in the identifier, and select "Rename Symbol" from the context menu.  Note that the identifier is not fully included in the rename field.

Does this issue occur when all extensions are disabled?: Yes (Step 2)
Based on https://github.com/microsoft/vscode/issues/51084 , it looks this could be solved by the wordPattern in the language configuration.  Looking in the language-configuration.json for built-in cpp extension, I don't see a wordPattern specified there.  Maybe it's using the default?
Perhaps a wordPattern should be added to cpp that reflects allowable characters in C++ identifiers?

@Colengms I'm a bit puzzled as searching for 'valid characters c++ identifier' doesn't mention $ (https://en.cppreference.com/w/cpp/language/identifiers) or even says it is not permitted. https://fresh2refresh.com/cpp-tutorial/cpp-identifiers-and-keywords/
But I'm happy to add it. We currently use the same language configuration c and c++. What's with $ i plain c ?

It looks like the dollar sign is special, and support has crept into most C++ compilers.  https://stackoverflow.com/questions/7926394/dollar-sign-in-variable-name
I've tested the example on cl.exe, gcc, and clang, on Windows, Mac, and Linux, x64 and x86, and they all accept it.
MSDN mentions that it's supported in cl.exe (but implies it's non standard).  https://docs.microsoft.com/en-us/cpp/cpp/identifiers-cpp?view=msvc-160
GCC supports it (unless not supportable due to the target assembler): https://gcc.gnu.org/onlinedocs/gcc/Dollar-Signs.html#Dollar-Signs  "because many traditional C implementations allow such identifiers"
Clang supports it likely due to its high level of compatibility with gcc.
It looks like it's an extension and not part of the standard, but would be accepted by the compilers used by most users.


Exception after tapping repeatedly on Components in Material Gallery

Run the Material Gallery sample and tap on the Components drop-down several times in quick succession.
The framework throws this exception:
I/flutter ( 5324): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════════════════════════
I/flutter ( 5324): The following exception was raised during performLayout():
I/flutter ( 5324): 'package:flutter/src/rendering/box.dart': Failed assertion: line 511: 'debugDoingThisResize || debugDoingThisLayout ||
I/flutter ( 5324):                   (RenderObject.debugActiveLayout == parent && _size._canBeUsedByParent)' is not true.
I/flutter ( 5324): Either the assertion indicates an error in the framework itself, or we should provide substantially more information in
I/flutter ( 5324): this error message to help you determine and fix the underlying cause.
I/flutter ( 5324): In either case, please report this assertion by filing a bug on GitHub:
I/flutter ( 5324):   https://github.com/flutter/flutter/issues/new
I/flutter ( 5324): The following RenderObject was being processed when the exception was fired:
I/flutter ( 5324): RenderViewport NEEDS-LAYOUT
I/flutter ( 5324): This RenderObject had the following creator:
I/flutter ( 5324):   Viewport ← Listener ← _GestureSemantics ← RawGestureDetector-[GlobalKey 498787747] ← ScrollableViewport-['Gallery
I/flutter ( 5324):   List'] ← Block ← TwoLevelList ← LayoutId-['_ScaffoldSlot.body'] ← CustomMultiChildLayout ←
I/flutter ( 5324):   NotificationListener ← ⋯
I/flutter ( 5324): This RenderObject had the following descendants (showing up to depth 5):
I/flutter ( 5324):   RenderPadding relayoutSubtreeRoot=up1
I/flutter ( 5324):     RenderBlock relayoutSubtreeRoot=up2
I/flutter ( 5324):       RenderDecoratedBox relayoutSubtreeRoot=up3
I/flutter ( 5324):         RenderPadding relayoutSubtreeRoot=up4
I/flutter ( 5324):           RenderFlex relayoutSubtreeRoot=up5
I/flutter ( 5324):       RenderDecoratedBox relayoutSubtreeRoot=up3
I/flutter ( 5324):         RenderPadding relayoutSubtreeRoot=up4
I/flutter ( 5324):           RenderFlex relayoutSubtreeRoot=up5
I/flutter ( 5324):       RenderDecoratedBox relayoutSubtreeRoot=up3
I/flutter ( 5324):         RenderPadding relayoutSubtreeRoot=up4
I/flutter ( 5324):           RenderFlex relayoutSubtreeRoot=up5
I/flutter ( 5324): Stack trace:
I/flutter ( 5324): #0      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:27)
I/flutter ( 5324): #1      RenderBox.size. (package:flutter/src/rendering/box.dart:511)
I/flutter ( 5324): #2      RenderBox.size (package:flutter/src/rendering/box.dart:501)
I/flutter ( 5324): #3      RenderInkFeatures.splashAt (package:flutter/src/material/material.dart:216)
I/flutter ( 5324): #4      _InkResponseState._handleTapDown (package:flutter/src/material/ink_well.dart:96)
I/flutter ( 5324): #5      TapGestureRecognizer._checkDown (package:flutter/src/gestures/tap.dart:77)
I/flutter ( 5324): #6      TapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:57)
I/flutter ( 5324): #7      GestureArenaManager._tryToResolveArena (package:flutter/src/gestures/arena.dart:138)
I/flutter ( 5324): #8      GestureArenaManager._resolve (package:flutter/src/gestures/arena.dart:155)
I/flutter ( 5324): #9      GestureArenaEntry.resolve (package:flutter/src/gestures/arena.dart:45)
I/flutter ( 5324): #10     OneSequenceGestureRecognizer.resolve (package:flutter/src/gestures/recognizer.dart:77)
I/flutter ( 5324): #11     OneSequenceGestureRecognizer.dispose (package:flutter/src/gestures/recognizer.dart:82)
I/flutter ( 5324): #12     _DragGestureRecognizer.dispose (package:flutter/src/gestures/drag.dart:136)
I/flutter ( 5324): #13     RawGestureDetectorState._syncAll (package:flutter/src/widgets/gesture_detector.dart:381)
I/flutter ( 5324): #14     RawGestureDetectorState.replaceGestureRecognizers (package:flutter/src/widgets/gesture_detector.dart:353)
I/flutter ( 5324): #15     ScrollableState.updateGestureDetector (package:flutter/src/widgets/scrollable.dart:569)
I/flutter ( 5324): #16     _ScrollableViewportState._handlePaintOffsetUpdateNeeded (package:flutter/src/widgets/scrollable.dart:687)
I/flutter ( 5324): #17     RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:305)
I/flutter ( 5324): #18     RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1100)
I/flutter ( 5324): #19     PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:703)
I/flutter ( 5324): #20     BindingBase&Scheduler&Gesturer&Services&Renderer.beginFrame (package:flutter/src/rendering/binding.dart:88)
I/flutter ( 5324): #21     WidgetFlutterBinding.beginFrame (package:flutter/src/widgets/binding.dart:103)
I/flutter ( 5324): #22     BindingBase&Scheduler&Gesturer&Services&Renderer._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:82)
I/flutter ( 5324): #23     BindingBase&Scheduler.invokeFrameCallback (package:flutter/src/scheduler/scheduler.dart:270)
I/flutter ( 5324): #24     BindingBase&Scheduler.handleBeginFrame (package:flutter/src/scheduler/scheduler.dart:247)
I/flutter ( 5324): #25     _beginFrame (file:///ssd2/sky/engine/src/out/android_Debug/gen/sky/bindings/hooks.dart:48)

@Hixie

@Hixie This crash is very interesting.  RawGestureDetectorState._syncAll is causing us to dispose a drag gesture recognizer, which is causing a tap recognizer to win in the arena and fire a tap gesture in the middle of layout.  All manner of insanity then takes place.
I suspect the solution is to delay win-by-last-gesture-standing in the arena to the end of the microtask.  Thoughts?

Seems legit. Can't see any reason it would need to be synchronous.


Return more meaningfull HTTP error code for mTLS

Is your feature request related to a problem? Please describe.
Istio authentication (especially with mTLS) have different error code returns:

If request is plain text, and server expect mTLS, the request is rejected with 000 (due to TLS handshaking failure)
If request is TLS, but server is expecting plain text, return code is 503 (service not found).
Last but not least, if connection is made, but request is rejected by authn filter, return code is 401 (which is the right code)

Describe the solution you'd like
It would be best if we can change all of them to return 401, with message to explain why.

Thanks @diemtvu for opening this, for more detail, please refer to https://github.com/istio/istio/issues/6180#issuecomment-396761980


Split flows fix

the new algorithm uses GeoPandas overlay with identity method to create splits. then these splits are ordered by lake IDs. a subsequence that goes in and out of a lake multiple times is modified to have at most three parts: the one going into the late, the one in the lake, and the one out of the lake. the new algorithm returns such splits as a GeoDataFrame for the next step 1.5km length-based splitting. That length-based splitting is unchanged.
Also, added one step after HUC8 overlay to remove empty geometries.
Changing the request to branch dev-FIM3

This PR has been dropped, it was part of FIM3 and is no longer applicable


Port to futures 0.3

While this requires nightly, the API is now stabilized and will become part of Rust 1.36. IMHO we should merge this now so that it can all get wider testing.
This is currently marked as WIP because it uses https://github.com/gtk-rs/glib/pull/476 and https://github.com/gtk-rs/gir/pull/753 via Cargo patching

This should succeed now. Let's see :)

Yeah this one works

@GuillaumeGomez green, appveyour is still not fixed (unrelated to this PR) so will fail

Should we merge it as is?

To be more precise,
[patch.crates-io]
futures-preview = { git = "https://github.com/rust-lang-nursery/futures-rs.git"}

isn't making me very confident...

See comment above: https://github.com/gtk-rs/examples/pull/240#pullrequestreview-231125510
Alternatively I can also copy the implementation of future::Either into the example, but that does not seem very useful.

True... Then let's get this merged as is. Thanks! :)

Thanks, triggering the glib PR and the gio master build then.


How to ceate a SubPage without Hamburger Menu

Hi,
I use a MainPage with Hamburger Menu, but on a SubPage I do not want any Menu or Statusbar, so the Page should be kind of Fullscreen in the App.
Maybe something like this for the StatusBar:
var statusbar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView();
await statusbar.HideAsync();
Thanks
Regards
Dominik

Hi Dominik,
HamburgerMenu has just the property for fullscreen
IsFullScreen = true;
Cheers

That would be the best option, and I am assuming that you are asking this in regard to windows 10 mobile.  Don't forgot you would have to have some sort of way for the user to get the menu(Hamburger) back.

Page.OnNavTo() => Shell.HamburgerMenu.IsFullScreen = true;
Page.OnNavFrom() => Shell.HamburgerMenu.IsFullScreen = false;
That should do it for you.

@SWilkov: Thanks a lot,
@mvermef: I need this Option only on the Phone-App and there is a back Button. ;-)
@JerryNixon: Thank you, too. I try this today. T10 is really fantastic. I develop SW for over 25 years and learn a lot from your source code.

I wanted the StatusBar as is as well on the Windows Phone so in App.xaml.cs in OnInitializeAsync I did this and didn't have to make any other changes and get the StatusBar.  Comments on if this is a good or bad idea.
        if (ApiInformation.IsApiContractPresent("Windows.Phone.PhoneContract", 1, 0))
        {
            var statusBar = StatusBar.GetForCurrentView();

            statusBar.BackgroundOpacity = 1;
        }


use latest CmdStan link on README.md

The link to CmdStan under readme -> Getting Started still leads to a "this page is not available" page. Given the recent announcement of StataStan in the Stata Journal, this may cause a lot of confusion.

Confirmed. this needs to be fixed.  The new link is:

http://mc-stan.org/users/interfaces/cmdstan.html

I thought we had redirects in place for all these old links.  Maybe @seantalts knows what happened.  Anyway, it'll be easy to change the page.  I'll submit a pull request.

Hm, I checked in a version where I was redirecting to a .md file, which doesn't work. I must have messed up the testing of it. It seems to work live for me now. If one of you wants to double check my work and close this I'd appreciate it! Thanks.

Perfect, thanks.

Sorry, didn't mean to close this.  The README for the repo should still be updated to point at the new location.

Ah, okay. Thanks!


[5.3] Add progress method to console commands.

Resubmitting #13843 against 5.3

This makes it quite a lot easier to use the Symfony progress bar in console commands:
$items = collect(['whatever']);

$this->progress($items, function ($item, $key, $bar) {
    // Do something with $item
});

$key and $bar are optional.
It includes a much nicer format for progress bars, including the ability to use the $bar->setMessage() functionality of the Symfony progress bar.
I'm not 100% sure what to do with caught exceptions, would appreciate feedback if this is something we're interested in.

How would you display progress on something that wasn't necessarily array based? Maybe something like performing N number of installation steps that take a variable amount of time?

Maybe this best as being just a laravel package that ships with a trait someone can use, or something?

Well, I just find myself doing something like this on nearly every project. Granted, I do a lot more console command stuff than most probably do. Not sure about something that's not array based — if this is a feature we're interested in generally, I'd be happy to work on it some more.

Gonna hold off for now because it doesn't cover those non-array cases.

@taylorotwell Just wanted to ping you on this quickly — I literally never don't wind up doing something like this, when writing console commands that iterate through data. I wonder if you could elaborate on your concern for "non-array" use cases?


[otbn, dv] Add testcase to verify OTBN.CALL_STACK.ADDR.INTEGRITY

Original effort estimate:

estimate 16
remaining 2022-08-30 2

Closed with https://github.com/lowRISC/opentitan/pull/14656

remaining 2022-09-13 0


Fix typo from wont to won't

Fixed a typo I first noticed in the README, and then elsewhere.
Perhaps the choice of "wont" vs "won't" was stylistic or preferred by the author, in which case please ignore!

Mostly just lazy!


Rename Bundling to Batching

This PR contains 3 commits, which perform the bundling->batching rename in stages:

Update the Java surface only, not changing shared code
Update shared code, but no changes that affect GAPIC yamls
Update config proto, which changes the bundling/batching settings

Baselines for all other languages are unchanged. The corresponding googleapis PR is here: https://github.com/googleapis/googleapis/pull/294

Codecov Report

Merging #1119 into master will increase coverage by <.01%.
The diff coverage is 94.87%.

@@             Coverage Diff              @@
##             master    #1119      +/-   ##
============================================
+ Coverage     85.63%   85.63%   +<.01%
- Complexity     3623     3624       +1
============================================
  Files           368      368
  Lines         14210    14211       +1
  Branches       1636     1636
============================================
+ Hits          12169    12170       +1
  Misses         1605     1605
  Partials        436      436

Impacted Files
Coverage Δ
Complexity Δ

...m/google/api/codegen/transformer/SurfaceNamer.java
78.94% <ø> (ø)
157 <0> (ø)
:x:

...gle/api/codegen/viewmodel/ApiCallSettingsView.java
85.71% <ø> (ø)
4 <0> (ø)
:x:

.../api/codegen/viewmodel/StaticLangSettingsView.java
100% <ø> (ø)
8 <0> (ø)
:x:

...gle/api/codegen/viewmodel/DynamicLangXApiView.java
55.55% <ø> (ø)
7 <0> (ø)
:x:

...com/google/api/codegen/config/InterfaceConfig.java
72.67% <100%> (ø)
46 <0> (ø)
:x:

...e/api/codegen/transformer/BatchingTransformer.java
100% <100%> (ø)
16 <7> (?)

.../api/codegen/viewmodel/BatchingDescriptorView.java
100% <100%> (ø)
4 <2> (?)

...n/java/com/google/api/codegen/ServiceMessages.java
88.23% <100%> (ø)
9 <1> (ø)
:x:

.../google/api/codegen/nodejs/NodeJSGapicContext.java
63.76% <100%> (ø)
60 <0> (ø)
:x:

...ansformer/csharp/CSharpGapicClientTransformer.java
98.71% <100%> (ø)
36 <0> (ø)
:x:

... and 14 more

Continue to review full report at Codecov.

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

LGTM


How to copy files from remote machines via ssh

Thank you for your feedback!
The issues in this repo are for documentation feedback.
If you are submitting your documentation feedback issue directly through GitHub, please provide the URL of the article so we can route the feedback to the correct author.
Please report Azure DevOps or TFS software bugs, feedback, or questions in the Azure DevOps Developer Community.

@sakthiyuvaraj Both SSH and SCP (for file transfers) are now supported in Windows 10.
Please see Installation of SSH to get started.


Bucket tenants and rbd usage by namespace support

Hi,
as we have already discussed, the exporter should support multi-tenancy for rgw buckets and rbd usage.
I suggest the following changes:
rgw_buckets should contain a tenant if it exists
new metrics:
rbd_size_provisioned_bytes(pool="", namespace="", image="") 0
rbd_size_used_bytes(pool="", namespace="", image="") 0

The rbd volume size is accessible via the Ceph go bindings but I haven't seen a direct call to get the used bytes.
Looking at Ceph's rbd du cli command code there seems to be more done than just a "single API call." I have to see if it is possible to easily "copy"/call the code in/from Go.
Additionally I haven't found any field that mentions the namespace nor tenant in the volume/image info returned by the Ceph go bindings GetImage call.
Does the namespace/tenant show up in the rbd info VOLUME_NAME command output? If so, please post the output here so I can see where that info might come from, thanks!

You must add the namespace information to all rbd commands, just as you do for the pool::
rbd du --pool POOL_NAME --namespace NAMESPACE
rbd info VOLUME_NAME --pool POOL_NAME -namespace NAMESPACE
rbd image 'IMAGE_NAME':
	size 8 GiB in 2048 objects
	order 22 (4 MiB objects)
	snapshot_count: 0
	id: IMAGE_ID
	block_name_prefix: rbd_data.PREFIX
	format: 2
	features: layering
	op_features:
	flags:
	create_timestamp: Sun Dec 17 02:48:55 2023
	access_timestamp: Sun Dec 17 02:48:55 2023
	modify_timestamp: Sun Dec 17 02:48:55 2023

I see, so I'll probably end up doing something similar for the rbd "module" as with RGW multi realm.

Specifying a list of pools with namespaces is now available https://github.com/galexrt/extended-ceph-exporter/blob/main/config.example.yaml#L26-L30
The namespace is only added to metrics if a pool has one or more namespaces listed in the config.
Please let me know if the feature works as expected with release v1.7.0.


MM is not loading page when MMM-Mplayerradio is included in config.js

Hi,
I use MMM-MplayerRadio with vlc and MMM-Volume.
Whenever I include the module MMM-MplayerRadio in the config.js, the page of MM is loading as black screen and no modules are displayed.
The mm-out.log does not show any error.
What I can see is:
[27.06.2021 18:52.08.075] [LOG]   MMM-MplayerRadio: Received notification CONFIG
[27.06.2021 18:52.08.197] [LOG]   [VOLUME] Set Volume To: 50
config.js:
{
module: "MMM-Volume",
classes: "always",
position: "top_left", // It is meaningless. but you should set.
config: {
usePresetScript: null,
getVolumeScript: amixer sget 'Master' | awk -F"[][]" '{print ""$2""}' | grep %  | awk '{gsub ( /%/, "" ) ; print}',
setVolumeScript: amixer sset -M 'Master' #VOLUME#%,
volumeOnStart: 50,
}
},
{
module: "MMM-MplayerRadio",
classes: "always",
header: "Radio",
position: "top_left",
config: {
customCommand: "/usr/bin/vlc",
customCommandArgs: ["-I", "dummy", "###URL###"],
//autoplay: 0,
stations: [
{
title: "NDR Info - SH",
url: "https://www.ndr.de/resources/metadaten/audio/m3u/ndrinfo_sh.m3u",
logo: "https://upload.wikimedia.org/wikipedia/commons/a/a1/NDR_Info_Logo_2019.svg",
},
],
displayStationsOnStartup: true
},
Do you have any idea/help/hint for me?
Thanks a lot,
Joachim

Hi,
great if you want to use my module.
I do not know if you copied one line short from your config.js but at the end there is "}," missing.
To me it looks like you want to use MMM-Volume in the PULSE setup. Instead of defining the configuration strings by your self you can use the build-in ones.
You may want to comment out the MMM-Volume configuration and try to run the mirror with only MMM-MplayerRadio configured to check which configuration part causes the issues.
Please use three backtics if you insert code or configuration parts to github. My suggested configuration would be:
{
    module: "MMM-Volume",
    classes: "always",
    position: "top_left", // It is meaningless. but you should set.
    config: {
        usePresetScript: null,
        usePresetScript: "PULSE",
        volumeOnStart: 50,
    }
},
{
    module: "MMM-MplayerRadio",
    classes: "always",
    header: "Radio",
    position: "top_left",
    config: {
        customCommand: "/usr/bin/vlc",
        customCommandArgs: ["-I", "dummy", "###URL###"],
        //autoplay: 0,
        stations: [
            {
                title: "NDR Info - SH",
                url: "https://www.ndr.de/resources/metadaten/audio/m3u/ndrinfo_sh.m3u",
                logo: "https://upload.wikimedia.org/wikipedia/commons/a/a1/NDR_Info_Logo_2019.svg",
            },
        ],
        displayStationsOnStartup: true
    },
},

Hi Tom,
thanks for your help so far.
I have reduced my config.js so that only two modules are used namely

	{
		module: "MMM-MplayerRadio",
		classes: "always",
		header: "Radio",
		position: "top_left",
		config: {
			customCommand: "/usr/bin/vlc",
			customCommandArgs: ["-I", "dummy", "###URL###"],
			//autoplay: 0,
			stations: [
				{
					title: "NDR Info - SH",
					url: "https://www.ndr.de/resources/metadaten/audio/m3u/ndrinfo_sh.m3u",
					logo: "https://upload.wikimedia.org/wikipedia/commons/a/a1/NDR_Info_Logo_2019.svg",
				},
			],
			displayStationsOnStartup: true
		},
	},
	{
		module: "helloworld",
		classes: "always",
		position: "top_left",	// This can be any of the regions.
		config: {
			// See 'Configuration options' for more information.
			text: "Test"
		}
	},

Still when MM is restarted it shows nothing.
When I outcomment the Mplayer module, it shows the text of the helloworld module.
From the mm-out.log:
`

<EMAIL_ADDRESS>start /home/pi/MagicMirror
DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js

[28.06.2021 10:09.11.420] [LOG]   Starting MagicMirror: v2.15.0
[28.06.2021 10:09.11.428] [LOG]   Loading config ...
[28.06.2021 10:09.11.437] [LOG]   Loading module helpers ...
[28.06.2021 10:09.11.454] [LOG]   Initializing new module helper ...
[28.06.2021 10:09.11.457] [LOG]   Module helper loaded: MMM-MplayerRadio
[28.06.2021 10:09.11.461] [LOG]   No helper found for module: helloworld.
[28.06.2021 10:09.11.464] [LOG]   All module helpers loaded.
[28.06.2021 10:09.11.583] [LOG]   Starting server on port 8080 ...
[28.06.2021 10:09.11.600] [LOG]   Server started ...
[28.06.2021 10:09.11.603] [LOG]   Connecting socket for: MMM-MplayerRadio
[28.06.2021 10:09.11.606] [LOG]   Sockets connected & modules started ...
[28.06.2021 10:09.11.879] [LOG]   Launching application.
[28.06.2021 10:09.13.501] [LOG]   MMM-MplayerRadio: Received notification CONFIG
`
I appreciate any further hint you have.
Thanks,
Joachim

Hi,
i found the problem. It is a bug which is only caused if less than two stations are used. I need a moment but will provide a bugfix release in the next hours.

Fixed in 0.0.7. Your config now should work as expected.
Please use
git pull

in the module folder to update.

It works!
Thank you so much for your help and your fantastic module.
All the best,
Joachim

Perfect. Have a lot of fun with the module. It is great to see that I am not the only one using it.


clippy: upgrade to nursery and apply lints

This PR upgrades clippy to warn about nursery lints on CI and applies said lints.
Applied changes:

Make applicable functions constants
Replace usage of pub(crate) with pub in already private modules.
Replace unnecessary struct name repetitions (e.g.: when implementing From for an enum, inside said functions you dont have to use Enum::Variant as it's already implying its usage, therefore using Self instead of Enum).
Derive Eq for DnsEntry, it already implements PartialEq but Eq is also applicable.
Replace some ifs/matches with dedicated methods (an example of this is Option::map_or_else which is more cleaner and concise).
Add allow(clippy::cognitive_complexity) for the service_daemon module, the lint rates the complexity of a function and warns if it is exceeded, in this case 2 functions pass the default threshold, the solution to this is to make it smaller by refactoring, splitting it into multiple functions etc (or maybe not possible in some cases), I've added this as solving it would be outside of the PR's scope, so lets make CI pass.

This is a 'low-hanging fruit' PR that attempts on making the code a bit more concise (and possible more performant because of the constants and/or dedicated methods for if/match).
Note: the nursery lint group are "new lints that are still under development", if you might not want it, I'll remove it from the CI file.

Add allow(clippy::cognitive_complexity) for the service_daemon module, the lint rates the complexity of a function and warns if it is exceeded, in this case 2 functions pass the default threshold, the solution to this is to make it smaller by refactoring, splitting it into multiple functions etc (or maybe not possible in some cases), I've added this as solving it would be outside of the PR's scope, so lets make CI pass.

It's cool to learn about this (for me). Although I opted not to mandate cognitive_complexity lint, I'm curious what the two functions are. (A quick local run didn't turn up such warnings unless I missed them).

Add allow(clippy::cognitive_complexity) for the service_daemon module, the lint rates the complexity of a function and warns if it is exceeded, in this case 2 functions pass the default threshold, the solution to this is to make it smaller by refactoring, splitting it into multiple functions etc (or maybe not possible in some cases), I've added this as solving it would be outside of the PR's scope, so lets make CI pass.

It's cool to learn about this (for me). Although I opted not to mandate cognitive_complexity lint, I'm curious what the two functions are. (A quick local run didn't turn up such warnings unless I missed them).

Yeah, very interesting to see that clippy nursery suggests splitting big chunks of code/complexity.
    Checking mdns-sd v0.11.0 (/Users/cosminpatrinjan/Github/_contributing/mdns-sd)
error: the function has a cognitive complexity of (50/25)
   --> src/service_daemon.rs:624:8
    |
624 |     fn exec_command(zc: &mut Zeroconf, command: Command, repeating: bool) {
    |        ^^^^^^^^^^^^
    |
    = help: you could split it up into multiple smaller functions
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cognitive_complexity
    = note: `-D clippy::cognitive-complexity` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::cognitive_complexity)]`

error: the function has a cognitive complexity of (26/25)
    --> src/service_daemon.rs:1970:8
     |
1970 |     fn handle_query(&mut self, msg: DnsIncoming, ip: &IpAddr) {
     |        ^^^^^^^^^^^^
     |
     = help: you could split it up into multiple smaller functions
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cognitive_complexity

error: could not compile `mdns-sd` (lib) due to 2 previous errors

Yeah, very interesting to see that clippy nursery suggests splitting big chunks of code/complexity.
    Checking mdns-sd v0.11.0 (/Users/cosminpatrinjan/Github/_contributing/mdns-sd)
error: the function has a cognitive complexity of (50/25)
   --> src/service_daemon.rs:624:8
    |
624 |     fn exec_command(zc: &mut Zeroconf, command: Command, repeating: bool) {
    |        ^^^^^^^^^^^^
    |
    = help: you could split it up into multiple smaller functions
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cognitive_complexity
    = note: `-D clippy::cognitive-complexity` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::cognitive_complexity)]`

error: the function has a cognitive complexity of (26/25)
    --> src/service_daemon.rs:1970:8
     |
1970 |     fn handle_query(&mut self, msg: DnsIncoming, ip: &IpAddr) {
     |        ^^^^^^^^^^^^
     |
     = help: you could split it up into multiple smaller functions
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cognitive_complexity

error: could not compile `mdns-sd` (lib) due to 2 previous errors

cool! we can look into them. I opened a separate issue #204  to track this .


README.md uses outdated StackDriver term

Hi, I immediately get the feeling that something is outdated when I read StackDriver. I propose changing the text in the picture and the text in the README.md to Operations Suite. I would proceed with a PR if you give me a thumbs up?

I've updated it to show Google Cloud Monitoring as well -- sorry, Operation Suite is so unrecognizable, and most folks still use the term Stackdriver for Google Cloud's monitoring offering.