Intermittent test failure (UseFirstAvailableConfigSourceTest.testDescriptionAvailable)

Environment Details

Helidon Version: 0.9x, 0.10.0
Helidon SE or Helidon MP
JDK version: jdk9
OS: macos/linux(docker)
Docker version (if applicable):

Problem Description
This is an intermittent test failure.
We will track this test failure with this issue.
See relevant snippet from the log.
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in io.helidon.config.KeyTokenResolvingTest
Running io.helidon.config.ListenerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.ListenerTest
Running io.helidon.config.PollingStrategiesTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.PollingStrategiesTest
Running io.helidon.config.spi.AbstractConfigSourceTest
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.AbstractConfigSourceTest
Running io.helidon.config.spi.AbstractOverrideSourceTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.AbstractOverrideSourceTest
Running io.helidon.config.spi.AbstractParsableConfigSourceTest
Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.AbstractParsableConfigSourceTest
Running io.helidon.config.spi.AbstractSourceTest
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.AbstractSourceTest
Running io.helidon.config.spi.ConfigSourceConfigMapperTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.087 sec - in io.helidon.config.spi.ConfigSourceConfigMapperTest
Running io.helidon.config.spi.ConfigSourceTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.ConfigSourceTest
Running io.helidon.config.spi.OverrideSourceTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.OverrideSourceTest
Running io.helidon.config.spi.PollingStrategyConfigMapperTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.PollingStrategyConfigMapperTest
Running io.helidon.config.spi.PollingStrategyTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.PollingStrategyTest
Running io.helidon.config.spi.RetryPoliciesTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in io.helidon.config.spi.RetryPoliciesTest
Running io.helidon.config.spi.RetryPolicyConfigMapperTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.RetryPolicyConfigMapperTest
Running io.helidon.config.spi.SourceTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.SourceTest
Running io.helidon.config.UseFirstAvailableConfigSourceTest
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec <<< FAILURE! - in io.helidon.config.UseFirstAvailableConfigSourceTest
testDescriptionAvailable  Time elapsed: 0.001 sec  <<< FAILURE!
java.lang.AssertionError:

Expected: a string containing "ClasspathConfig[application.yaml]?->ClasspathConfig[", "io/helidon/config/application.properties]?->ClasspathConfig[", "io/helidon/config/application.conf]->ClasspathConfig[", "io/helidon/config/application.json]?" in order
     but: was "ClasspathConfig[application.yaml]?->ClasspathConfig[E:\Users\hantsy\temp\helidon-0.10.0\config\config\target\test-classes\io\helidon\config\application.properties]?->ClasspathConfig[E:\Users\hantsy\temp\helidon-0.10.0\config\config\target\test-classes\io\helidon\config\application.conf]->ClasspathConfig[io/helidon/config/application.json]?"
	at io.helidon.config.UseFirstAvailableConfigSourceTest.testDescriptionAvailable(UseFirstAvailableConfigSourceTest.java:46)

Results :

Failed tests:
  UseFirstAvailableConfigSourceTest.testDescriptionAvailable:46
Expected: a string containing "ClasspathConfig[application.yaml]?->ClasspathConfig[", "io/helidon/config/application.properties]?->ClasspathConfig[", "io/helidon/config/application.conf]->ClasspathConfig[", "io/helidon/config/application.json]?" in order
     but: was "ClasspathConfig[application.yaml]?->ClasspathConfig[E:\Users\hantsy\temp\helidon-0.10.0\config\config\target\test-classes\io\helidon\config\application.properties]?->ClasspathConfig[E:\Users\hantsy\temp\helidon-0.10.0\config\config\target\test-classes\io\helidon\config\application.conf]->ClasspathConfig[io/helidon/config/application.json]?"

Tests run: 3306, Failures: 1, Errors: 0, Skipped: 17

Steps to reproduce
This test happens intermittently as part of a full build. (mvn install)

@romain-grecourt Just a couple of notes:
I don't have a solution to this bug but I do wonder: a ConfigSource's description is arrived at by formatting its uid:
https://github.com/oracle/helidon/blob/0676914f85751b0ebbc66b2fbb9752293b9da966/config/config/src/main/java/io/helidon/config/spi/AbstractSource.java#L284-L287
uid() is defined like this:
https://github.com/oracle/helidon/blob/0676914f85751b0ebbc66b2fbb9752293b9da966/config/config/src/main/java/io/helidon/config/spi/AbstractSource.java#L110-L117
Then ClasspathConfigSource overrides it to do this:
https://github.com/oracle/helidon/blob/0676914f85751b0ebbc66b2fbb9752293b9da966/config/config/src/main/java/io/helidon/config/internal/ClasspathConfigSource.java#L86-L89
That is defined like this:
https://github.com/oracle/helidon/blob/0676914f85751b0ebbc66b2fbb9752293b9da966/config/config/src/main/java/io/helidon/config/internal/ClasspathSourceHelper.java#L42-L56
…which calls this:
https://github.com/oracle/helidon/blob/0676914f85751b0ebbc66b2fbb9752293b9da966/config/config/src/main/java/io/helidon/config/internal/ClasspathSourceHelper.java#L58-L65
…which will throw a FileSystemNotFound exception in the case of jar urls, incidentally, here, where the supplied resourceName will end up being used instead:
https://github.com/oracle/helidon/blob/0676914f85751b0ebbc66b2fbb9752293b9da966/config/config/src/main/java/io/helidon/config/internal/ClasspathSourceHelper.java#L61
…but even in the case of regular file system paths, this means that the uid of certain ConfigSource implementations is platform dependent because it's based simply on Paths#get(String...).  Should it be?  Or should the test change to use, e.g., File.separator instead of /?
I don't yet have any plausible idea why this test failure would be intermittent.

cc @tjquinno for inputs.

This is failing consistently on my windows box:
java.lang.AssertionError:
Expected: a string containing "ClasspathConfig[application.yaml]?->ClasspathConfig[", "io/helidon/config/application.properties]?->ClasspathConfig[", "io/helidon/config/application.conf]->ClasspathConfig[", "io/helidon/config/application.json]?" in order
     but: was "ClasspathConfig[application.yaml]?->ClasspathConfig[C:\dev\helidon\config\config\target\test-classes\io\helidon\config\application.properties]?->ClasspathConfig[C:\dev\helidon\config\config\target\test-classes\io\helidon\config\application.conf]->ClasspathConfig[io/helidon/config/application.json]?"
Expected :a string containing "ClasspathConfig[application.yaml]?->ClasspathConfig[", "io/helidon/config/application.properties]?->ClasspathConfig[", "io/helidon/config/application.conf]->ClasspathConfig[", "io/helidon/config/application.json]?" in order
Actual   :"ClasspathConfig[application.yaml]?->ClasspathConfig[C:\dev\helidon\config\config\target\test-classes\io\helidon\config\application.properties]?->ClasspathConfig[C:\dev\helidon\config\config\target\test-classes\io\helidon\config\application.conf]->ClasspathConfig[io/helidon/config/application.json]?"

Why couldn't the UID be based on a URI instead of a path? Perhaps there should be some additional methods in a ConfigSource that tests can use to avoid relying on human-readable string representations?

I like the direction @spericas is going. Given that we are still pre-1.0, if using a Path is not a good idea for tests then maybe it's not a good idea in general and we should change the API now rather than keeping the current (flawed?) methods and adding new, better ones. That is, instead of adding methods perhaps we change the existing ones to return URIs instead of Paths? I am not sure how big the impact would be on existing code that might depend on the existing methods.

Fixed


Update points

@aslams2020 : Please add remaining points here

@aslams2020 : you need to add level3 as well
There was 5 PRs which were pending.


GNSS metadata block

An implementation for the GNSS metadata block needs to be added to the packet types. The implementation should follow the style of previous implementations.
See /docs/radio_packet_format.pdf section 3.3.6 for more information.

@isharghura This might be a good one to start with, though I see you assigned and unassigned yourself. If you do want to do this one (just to get used to things), feel free to ask me any questions you have and I'll try and answer them

We're choosing not to include the GNSS metadata in logging/radio transmission right now. Might revisit the issue next year.


docs: add pptr-testing-library link

What:
This PR adds a reference to another implementation of this library for use with puppeteer.
Why:
To have consistent integration test style when using puppeteer.
How:
Inject dom-testing-library into the page and proxy all method requests to it. See https://github.com/patrickhulce/pptr-testing-library :)
Checklist:

[x] Documentation
[x] Tests N/A
[x] Ready to be merged
[x] Added myself to contributors table N/A...yet :)

Thanks for the library, love it :)

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Implement pull request sync service

TICKET 21219
This PR adds the PullRequestSyncService for importing pull request and deployment data to redmine, before the webhooks were setup.
Todo

[x] Implement repo fetching
[x] Implement pr fetching
[x] Implement pr filtering
[x] Implement PullRequest record updates
[ ] ~Implement pr deployment fetching (almost done)~
[ ] ~Implement PullRequestDeployment record updates~
[x] Add ui to call the service
[x] Implement webhook handler service object
[x] Rename to PullRequestImporter or something better

How is this accomplished?

The service fetches all repositories from the given organization env: GITHUB_ORGANIZATION_NAME
...

The service class
UI Changes

Screenshots

Thanks a lot for your feedback @schmijos! To summarize your detailed PR review:

Investigate per query cache for Pull Request count message
Protect import endpoint with a login page
Refactor issue_id param to redmine_issue_id
Remove PullRequest, Issue coupling
Remove default value for env variables
Implement background job as a workaround to tcp timeout

Regarding your previous comment:

Please consider my suggestions in separate pull requests to this one.

, should I:

Merge the current PR into master and create another PR for the improvements
Create a PR, branching from the historical-imports branch with all the improvements
Group problems by type (eg. Naming, authorization, background job) and branch off of master
Do the same as 3. but branch off of the current branch

Thanks for your time in advance!


Add word_stem Presto function

Description
Presto docs: https://prestodb.io/docs/0.278/functions/string.html
word_stem(word) → varchar
Returns the stem of word in the English language.

word_stem(word, lang) → varchar
Returns the stem of word in the lang language.

Presto's implementation: https://github.com/prestodb/presto/pull/9912
A possible C++ library that can be used in Velox: https://github.com/Blake-Madden/OleanderStemmingLibrary
CC: @aditi-pandit @majetideepak

@yhwang

Slowly set up my dev environment and check the possible C++ library. The C++ library doesn't support all the languages supported on the Java side. I am checking https://snowballstem.org/ which should be the equivalent of the Java implementation (or I should say Java is one of its implementations). It does provide a C version which means we need to build it from the source and use it in Velox. any suggestion/comment?

@mbasmanova ⬆


Currently uses L4 configuration method?

I notice the package is currently using the config file path structure of Laravel 4. publish:config isn't a thing any more unfortunately and the way things are generally done now with configuration files is by having say, maintenancemode.php in the root config folder and then environment-specific things are put in the env file.
Any plans to change to this new method?

Yeah, I need to get this updated. I haven't had a chance since L5 was still in dev a few months ago.

I've pushed a new release that has the L5 config method (c453c37e106ea9c7adc295f2bc96ea4eb2d76292 has the changes).


DocsArchive-<IP_ADDRESS>Auto archive content

Auto archive content from https://github.com/OPS-E2E-PPE/docs-archive-test

Docs Build status updates of commit de07aed:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error]

Cannot sync git repo to specified commit because branch Archive_master_2019-09-30-03-02-26 has been deleted or has been force pushed: fatal: Couldn't find remote ref Archive_master_2019-09-30-03-02-26

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.


Move examples and docs out of the README, point to docs instead

We're seeing people using the README contents on NPM as a source of real documentation, and missing out on the bigger picture because they're not seeing all of the other pieces.
Any objections to removing the README example content (specific snippets for each service) and pointing to the gh-pages docs instead?

I think the readme's job is to quickly make the sell on why gcloud is awesome, and part of that is shoving in the potential user's face how easy it is to "..." as soon as you can. A user going to a readme to look for the link to further documentation is common practice, so I would rather solve how to get the user to see our API documentation links than have the readme completely cater to the user rather than the maybe-user.
Since we already link to the docs at the top of the page and in each service's sub-section, is it possible to get opinions from the users who sourced this feedback to see what we could do better?

I'll have our UX guy share the results at the end, but it was super clear that the person just wasn't getting to the docs because they thought the README was all there was.
Can we add "for more details on , check out the docs here: " right after the example sections?
Our goal is to funnel people to the gh-pages site ASAP.

Were the participants of the study Node developers? We're super tuned in to the patterns of GitHub + npm + API docs, and how and when to use each resource.

Can we add "for more details on , check out the docs here: " right after the example sections?

:+1:

They were, but this one in particular was not SUPER experienced, I'd say a 5/10 Node dev.


refresh for Optic API interfaces

Generated client interfaces for server functions

Should cause no regressions.  Citing @llinggit for awareness.

Tests are running fine.


PowerToys Rename option in the modern Windows 11 Menu Bar

Description of the new feature / enhancement
The option to rename files in Power Toys with the right click of the mouse in the selected files is only available in the old Windows 10 menu bar, in Windows 11, i have to go every time in show more options. PowerRename could be on the modern Windows 11 Menu to be more easy to use it.
Scenario when this would be used?
When im renaming a lot of files in Windows Explorer
Supporting information
No response

Duplicate of #13168

Issue is a duplicate
Thank you for your issue! We've linked your report against another issue to centralize the thread.
Thanks for helping us to make PowerToys a better piece of software.


Incorrect client disconnection error codes

Describe the bug
On client disconnections for both HTTP1 and HTTP2 transports we should detect the client has disconnected and use an appropriate error code. Currently disconnects can see a connect.CodeUknown causing erroneous error reporting. To detect a client disconnect we could check the context for cancellation (see docs from deprecated http.CloseNotifier).
To Reproduce
Create a connection and close the underlying net.Conn to replicate a dropped client connection:
var conn client.Conn // Captured client connection.
transport := server.Transport()
dialContext := transport.DialTLSContext
transport.DialTLSContext = func(ctx context.Context, network, addr string, cfg *tls.Config) (net.Conn, error) {
  conn, _ = dialContext(ctx, network, addr, cfg) // Capture the client connection.
  return conn, nil
}
stream := ... // Create stream
stream.Send(nil) // Send headers
conn.Close() // Abruptly close
// Check handler error codes

Handler errors will be (only checked the envelope flow):

http1/read: invalid_argument: protocol error: incomplete envelope: unexpected EOF
http1/write: unknown: write envelope: io: read/write on closed pipe
http2/read: invalid_argument: protocol error: incomplete envelope: client disconnected
http2/write: unknown: write envelope: client disconnected

In all cases checking the context error will return a context.Cancelled error. The http2 client disconnect string is from this error.
Environment (please complete the following information):

connect-go version or commit: v0.1.12
go version: go version go1.18.3 darwin/amd64

Additional context
Thanks to the reports from:

@pqn  https://bufbuild.slack.com/archives/CRZ680FUH/p1701370334963849
@njiang747 https://bufbuild.slack.com/archives/CRZ680FUH/p1700005011055009

Related issue: https://github.com/golang/go/issues/52183 . Which seems to showclient disconnects can be reported without a context cancellation.

FWIW, closing the actual connection is not the same as a cancellation with http/2. With http/2, the client aborts the stream, but the connection remains open. With http/1.1, since multiplexing a single connection is not supported, the only way a client can cancel is to disconnect.
Though perhaps the server handler doesn't care about distinguishing the two cases -- in other words, maybe it doesn't care to distinguish the client intentionally cancelling a single stream vs. a network partition implicitly cancelling all streams (without the client's intent).

Hi, just wanted to check in on the prioritization of this, particularly for the http2 case.

@pqn, looks like @emcfarlane has opened a pull request, so hopefully it can be addressed in the next release.

This should be addressed in v1.15.0 (resolved in #659).


[FLINK-20928] Fix flaky test by retrying notifyCheckpointComplete until either commit success or timeout

This PR cherry-picks the PR from #17342 to the release-1.13 branch.

@AHeise could you help review this PR?


[Feature request] Allow decentralizing the definition of the rules

Hello,
Feature request
Is your feature request related to a problem? Please describe
I want to develop my server's typeDefs/resolvers in a modular way. In order to do it, I need a way to collocate shield's rules with my resolvers.
Describe the solution you'd like
I'd like to leverage the fact that we can declare a resolver using an object with the resolve key to add extra informations for my middlewares stack :
const resolvers = {
  Mutation: {
    createUser: {
      // pass rules using a special "permissions" key
      permissions: isAuthenticated,
      resolve: forwardTo('db')
    }
  }
}

Additional context
I already do this for my validation layer (big props to @JCMais for showing the way with his awesome post 👏 ) and it's working great so far :
const resolvers = {
  Mutation: {
    createUser: {
      // pass rules using a special "permissions" key
      permissions: isAuthenticated,
      // pass validation rules to my yup-middleware
      validation: (_, __, { db }) =>
        update('data.username', f =>
          f.unique(async username => !(await db.exists.User({ username })))
        )
      resolve: forwardTo('db')
    }
  }
}

Implementation
@maticzav gave me hints about collecting all the rules from the schema using something like https://github.com/graphql-binding/graphql-binding/blob/master/src/fragmentReplacements.ts
Here you can still declare shield's the current way by passing a map of your rules, but you can also overwrite them or define new ones using a special key inside your resolvers definitions (I pick 'permissions' by default, but it could be 'shield' as well, you can pick your own!)
const _ = require('lodash/fp')
const graphqlShield = require('graphql-shield')
const { middleware } = require('graphql-middleware')

function shield(initialPermissions = {}, options = {}) {
  const { permissionsKey = 'permissions', ...shieldOptions } = options
  return middleware(schema => {
    const permissions = _.merge(
      initialPermissions,
      collectPermissions(schema, permissionsKey)
    )
    return graphqlShield.shield(permissions, shieldOptions).generate(schema)
  })
}

function collectPermissions(schema, permissionsKey) {
  const resolvers = {
    Query: schema.getQueryType().getFields(),
    Mutation: schema.getMutationType().getFields()
  }
  let permissions = {}
  for (const typeName in resolvers) {
    const fieldResolvers = resolvers[typeName]
    for (const fieldName in fieldResolvers) {
      const fieldResolver = fieldResolvers[fieldName]
      if (fieldResolver[permissionsKey]) {
        permissions = _.set(
          [typeName, fieldName],
          fieldResolver[permissionsKey],
          permissions
        )
      }
    }
  }
  return permissions
}

module.exports = {
  ...graphqlShield,
  shield
}

Hey @jgoux 👋,
I think yours is a fantastic idea! Being able to define rules next to your resolvers could open up a whole new set of possibilities. I believe this idea would best be best implemented as a side package, primarily to keep shield as unopinionated as possible - in a structure non-interrupting manner.
Furthermore, what I am curious about is how would you suggest the implementation of type- or schema-wide rules. These are rules that are applied to every field of a particular type or, as in the second case, to every single field in a schema?
Let me know what you think! 🙂

how would you suggest the implementation of type- or schema-wide rules

I thought about type-wide rules and I didn't find a proper solution for them yet. We can't really declare them alongside the resolvers (at least using the regular syntax) because it's not a valid GraphQL typedef.
For the schema-wide rules, let's just keep them in the centralized configuration as they are global per se. 😄
I'll publish the current implementation as a side-package then. Do you have any idea for the name? It will be the exact same API as shield, with the additional permissionsKey in the option object.

Btw, about this topic, I've created a RFC on graphql-js for having a supported way to declare this extra metadata directly on each field definition: https://github.com/graphql/graphql-js/issues/1527

The feature has been merge in graphql-js, maybe a guide could be implemented here?


Prototype assembly/build documentation

Making instructions on how to assemble/build the device

This should be a dedicated page under content/en/tutorials/

trying to do DDD - will update with photos from first assembly

should be a tutorial - video and print formats

https://www.markmroden.com/Tetra-Testing/13-Aug-2020/i-4xkZWhM/A

This is the current state of the assembly instructions, based on how we have actually assembled the device. I've been using DDD (Documentation Driven Development) to draft these instructions. These should be neatened up/written in plain text and there should be a video storyboarded for the next draft.


Understanding the ground truth

Hi everyone,
I am relatively new to the world of object tracking. I don't understand why the ground truth labels for VOT and ALOV contain 8 coordinates (I believe it's the same bounding box but rotated?) In VOT it's the 2nd and 4th coordinate rotated and in ALOV it's the 1st and 3rd... why?
Also, how are these coordinates interpreted? How can they be translated to (xmin, ymin, xmax, ymax)? Any help understanding would be much appreciated!

Do you find out? the use of annotations?


Reporting source file name offense for Gemfile

Using rubocop 0.30.0, when running rubocop on a Gemfile file I am getting an offense regarding the file name:
$ bundle exec rubocop Gemfile
Inspecting 1 file
C

Offenses:

Gemfile:1:1: C: Use snake_case for source file names.
source "https://rubygems.org"
^

1 file inspected, 1 offense detected

With Gemfile being part of the default includes https://github.com/bbatsov/rubocop/blob/8f3cfc6f3654294dd9be1643c7c75a2ff6cacfb2/config/default.yml#L17 this seems wrong.
Am I using it wrong?

That does seem wrong, but I have not been able to reproduce this problem. Can you try running the same thing in different project directories and see if you can figure out the context in which the problem appears?

Ah, it only happens as soon as I add something to AllCops/Include, e.g.:
AllCops:
  Include:
    - 'config.ru'

I made a gist:
https://gist.github.com/carhartl/207f6bb25eab57fbd052
$ git clone https://gist.github.com/207f6bb25eab57fbd052.git && cd 207f6bb25eab57fbd052 && bundle && bundle exec rubocop Gemfile
Another question - I was expecting the includes to be merged with the default ones, that seems not to be the case? In that gist:
$ bundle exec rubocop
Inspecting 0 files

0 files inspected, no offenses detected

But:
$ bundle exec rubocop Gemfile
Inspecting 1 file
C

Offenses:

Gemfile:1:1: C: Use snake_case for source file names.
source 'https://rubygems.org'
^

1 file inspected, 1 offense detected

I can understand that you expected the Includes to be merged, but RuboCop only merges configuration values that are hashes, not arrays. I think this behavior is better than the alternative, because if arrays were merged, it would not be possible to override such values.
One thing we could do is to let the FileName cop disregard file names that are not included in current configuration, but included in default configuration. But that would hide the other problem, that you unintentionally missed to include Gemfile in your configuration.
So I think it's best to keep the functionality as it is. Just add all the files you want to inspect to your AllCops: Include, except *.rb files and files with a ruby hashbang line, which are always included.

Thanks, so it was wrong understanding of mine, closing.
One last question, do you think '**/config.ru'is worth adding to the default includes?

(If so I'm going to send a PR for it.)

As I understand it config.ru is a configuration file used in rack based applications. Adding it to the default includes seems perfectly logical to me. :+1:


fix problem with install

What can be the solution?

It seems that your database connection is not correct. can you please check your database connection?

the connection is correct

DB_CONNECTION=mysql
DB_HOST=<IP_ADDRESS>
DB_PORT=3306
DB_DATABASE=drive
DB_USERNAME=root
DB_PASSWORD=hornela21

nothing strange and this is rare.


Allow optionally forcing power requests

A power request might need to be forced to implement safety mechanisms, even when some components might be
seemingly failing (i.e. when there is not proper consumption information, the user wants to slowly discharge batteries to
prevent potential peak breaches).
Fixes #321

Added unit tests:

Check all batteries are used when none battery is working (missing test not entirely related to force power request)
Extend test that check all batteries are used when none battery is working and the power request is forced
Test all batteries are used when one of them is not working and the power request is forced
Test a battery is used even the metric  SoC, capacity or power bounds are currently set to NaN.

Note that the current patch/solution depends on the metrics cache, therefore if the cache is not available for a non-working battery then the battery won't be used even though the request is forced. This needs to be discussed as it was my personal assumption rather something explicitly added in the issue #312 or agreed with the team.
fyi @sahas-subramanian-frequenz

Note that the current patch/solution depends on the metrics cache, therefore if the cache is not available for a non-working battery then the battery won't be used even though the request is forced. This needs to be discussed as it was my personal assumption rather something explicitly added in the issue https://github.com/frequenz-floss/frequenz-sdk-python/pull/312 or agreed with the team.

It was agreed that the power need to be distributed equally between the batteries if there is no previous metrics cached and the request is forced.

I think we should have an expiry time for the cache data as well, maybe 2.5 hours, which is just over our gap discharge duration?

I'm not entirely convinced. The idea sounds good to me, though I think it won't  be reliable (or make any difference) to set it to an specific fixed time that might work for the current use-case but not for future ones.
@sahas-subramanian-frequenz what about if we reset the cache data once it's used/consumed?

But we want it to be available for a while, so we have better chance of success with slow discharge over a long interval.
Maybe we just leave it as it it, not clear by default. But actors can give us a timeout after which we clear them. But can probably be implemented in a separate PR.

I'll implement a simple cache with expiry time, and it can be removed if actors provide a timeout in the future

FYI, if this is blocking @shsms to move fast with his PR, I'm fine to merge this as is and address the remaining comments in a separate PR. We need to make sure to get the public API right before the release, but other minor improvements like the dataclass stuff or internal argument names can be worked out even after the release.

I've updated following most of the suggestions. However we still need to make our minds about the attribute name to force the power requests. Also documentation needs to be improved/amended. I´d suggest to review it again focus in the logic and we can address the naming and documentation updates in follow-up PRs to unblock Sahas


No redirects for Expired URLs

Fixes #35

Fails

:no_entry_sign:
Please assign someone to merge this PR, and optionally include people who should review.

  Generated by :no_entry_sign: dangerJS against 3fdfa5db1023e1f24bbac2664416dfb4e64324c9

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


Scrollbar issue

Hello,
When installing react-scan in my project it get rid of my scrollbar on my table (actually there are just not perceptible)
Before :

After:

It looks like react scan add theses styles :

Could you make thoses to only target your code ?  and not make it globally (*)
Thanks a lot for your work :)

I also been some time checking the styles on my project to see what it fails. I will try to make a pull request to fix the bug

I also been some time checking the styles on my project to see what it fails. I will try to make a pull request to fix the bug

I did make a pull request that fixes the bug. I hope they merge it.


Notification on succesful new account

Purpose

Closes #79
Changes

Saving pending accounts addresses in user preferences (that will allow showing the notification across app sessions)
Checking regularly (on view did appear event) if the pending accounts are being finalized
Show notification alert when an account is being finalized

Checklist

[ ] My code follows the style of this project.
[ ] The code compiles without warnings.
[ ] I have performed a self-review of the changes.
[ ] I have documented my code, in particular the intent of the
hard-to-understand areas.
[ ] (If necessary) I have updated the CHANGELOG.

CLA acceptance
_Remove if not applicable.
By submitting the contribution I accept the terms and conditions of the
Contributor License Agreement v1.0

link: https://developers.concordium.com/CLAs/Contributor-License-Agreement-v1.0.pdf

[ ] I accept the above linked CLA.

Looks good and seems to work fine. I'm a little concerned about the code duplication between AccountsCoordinator and MoreCoordinator from a maintenance perspective, but it's fine.

I agree about the duplication. Is not the best solution but in fact this is how the coordinator pattern forces us to do things and in my opinion it's main drawback. I would much rather prefer something like "Router" pattern which seems more of a cleaner approach 😊


Fixes to enable latest glusterfs plugin w/tachyon.

This patch includes changes for the latest glusterfs-hadoop plugin support and some fixes around URI handling/parsing.

@childsb  Are you still working on this PR?

when I left this patch it was building and passing on local build but failing on the server which seemed to be caused by some fail-on-formatting check on the build server not present in regular build. I haven't tested since. @haoyuan

@childsb
I've opened a JIRA ticket to track this issue here: https://tachyon.atlassian.net/browse/TACHYON-1005. Could you open another PR against the latest master? I'm going to close this one as it is out of date.


After upgrade >= 8.0.35 the sink stopped sending logs to azure. (I use custom IKeyGenerator)

Description
After upgrade the sink stopped sending logs to azure. (I use custom IKeyGenerator)
Reproduction
secrets.json:
"Serilog:Using:0": "Serilog.Sinks.AzureTableStorage",
"Serilog:WriteTo:0:Name": "AzureTableStorageWithProperties",
"Serilog:WriteTo:0:Args:storageTableName": "Logs",
"Serilog:WriteTo:0:Args:connectionString": "DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=myaccountkey==;EndpointSuffix=core.windows.net",
"Serilog:WriteTo:0:Args:keyGenerator": "MyProject.Loggers.Serilog.AzureKeyGenerator, MyProject.Loggers",
Program.cs:
.UseSerilog((ctx, config) =>
{
config.ReadFrom.Configuration(ctx.Configuration);
});
Expected behavior
To Find Logs in Azure table.
Relevant package, tooling and runtime versions
System: Win 11 Pro Version	10.0.22621 Build 22621
Project: net6.0
Packages: Affected with bug: Serilog.Sinks.AzureTableStorage >= 8.0.35 (Working version is: 7.0.25)
Additional context
Difference we find -> is the moved interface for: IKeyGenerator:
In versions < 8.0.35 its in: Serilog.Sinks.AzureTableStorage.KeyGenerator.IKeyGenerator
but versions >= 8.0.35 its in: Serilog.Sinks.AzureTableStorage.IKeyGenerator
Also the requirements of implemented methods for this interface is different.

You should now use AzureTableStorage instead of AzureTableStorageWithProperties

Changed but now i see only one row written in parralel i have console sink witch has a lot of logs and same logs needs to go to azure table also:
[12:13:21 INF Microsoft.Hosting.Lifetime] Now listening on: https://localhost:44373
[12:13:21 DBG Microsoft.AspNetCore.Hosting.Diagnostics] Loaded hosting startup assembly Bgf.Web
[12:13:21 DBG Microsoft.AspNetCore.Hosting.Diagnostics] Loaded hosting startup assembly Microsoft.AspNetCore.Watch.BrowserRefresh
[12:13:21 DBG Microsoft.AspNetCore.Hosting.Diagnostics] Loaded hosting startup assembly Microsoft.WebTools.BrowserLink.Net
[12:13:21 INF Microsoft.Hosting.Lifetime] Application started. Press Ctrl+C to shut down.
[12:13:21 INF Microsoft.Hosting.Lifetime] Hosting environment: Development
[12:13:21 INF Microsoft.Hosting.Lifetime] Content root path: D:\AzureDevOps\Loop\loop.api\Web\Bgf.Web
[12:13:21 DBG Microsoft.Extensions.Hosting.Internal.Host] Hosting started
Config:
"Serilog:Using:0": "Serilog.Sinks.Console",
"Serilog:WriteTo:0:Name": "Console",
"Serilog:WriteTo:0:Args:outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3} {SourceContext}] {Message:lj}{NewLine}{Exception}",
"Serilog:Using:1": "Serilog.Sinks.AzureTableStorage",
"Serilog:WriteTo:1:Name": "AzureTableStorage",
"Serilog:WriteTo:1:Args:storageTableName": "MyLogTable",
"Serilog:WriteTo:1:Args:connectionString": "myConStr",
"Serilog:WriteTo:1:Args:keyGenerator": "MyLoggers.Loggers.Serilog.AzureKeyGenerator, MyLoggers.Loggers",
"Serilog:MinimumLevel:Default": "Verbose",
"Serilog:MinimumLevel:Override:Default": "Verbose",
"Serilog:MinimumLevel:Override:Microsoft": "Verbose",
"Serilog:MinimumLevel:Override:Bgf": "Verbose",
"Serilog:MinimumLevel:Override:Bgf.Web.API.Controllers.LoopController": "Verbose",
"Serilog:MinimumLevel:Override:Microsoft.EntityFrameworkCore.Database.Command": "Verbose",
"Serilog:Enrich:2": "WithExceptionDetails",
"Serilog:Enrich:1": "WithMachineName",
"Serilog:Enrich:0": "FromLogContext",

From the custom key generator class, did you remove the suffix argument, from GenerateRowKey method?

Yes it is removed.

Also seeing this same problem (#98). I raised a new bug report, but the issue is identical to this. Downgrading to 7.0.25 fixes the issue and using a custom IKeyLogger implementation works once more.

the issue was you need a public parameterless constructor for the type specified in configuration. Version 9 updates the default implementations to support this requirement better. It is a minor breaking change however.

I appreciate your efforts, but please be aware that the problem has not been resolved in v9.0.0.
I have upgraded the library via Nuget, cleaned and rebuilt the solution, and updated the namespace in use to reference IKeyGenerator, as is now required. I get the EXACT same behaviour as originally outlined above.
Once more, the only way I get consistent output to TableStorage is by downgrading to 7.0.25.

Yes i confirm the last comment
Also "the issue was you need a public parameterless constructor" => I already have public parameterless constructor

could you give me more details to troubleshoot the issue?
@RoryMcCrossan what do you mean by IKeyGenerator is now required?  what is the configuration you are using?
could you setup debug logger to see if there are any errors?
https://github.com/serilog/serilog/wiki/Debugging-and-Diagnostics
thanks,
~ Paul

with 9.0.0 and empty constructor inside the IKeyGenerator it works
Also the setting:
"Serilog:WriteTo:1:Name": "AzureTableStorageWithProperties"
needs to be:
"Serilog:WriteTo:1:Name": "AzureTableStorage"
if using 9.0.0

closed due to no activity


Newly created account on testnet cannot be imported into wallet again

Problem
The newly created account on testnet cannot be imported into wallet again in another browser session.
When try to import the new account with seed phrase, the below error were met.

Expected Behavior
The newly created account on testnet wallet, should be able to be imported in another browser session / device
Steps to reproduce

Create a NEAR testnet account via NEAR Wallet: https://wallet.testnet.near.org, and save the seed phrase
Open a new NEAR testnet Wallet session in an incognito window. Recover the account with the saved seed phrase: https://wallet.testnet.near.org/recover-seed-phrase
The "No accounts were found for the seed phrase" error popup when recovering the account

@think-in-universe It's working fine for me and I don't see any errors being returned from the indexer over the last 12 hours in testnet. Is it still happening for you?
Next time you see this and are able to reproduce it consistently, please include the network response data from your browser's development console. The response from our service may contain more details we can use to determine the issue.

Using the public key from the attached screenshot I was able to verify that the key does exist in testnet by querying the indexer directly. In this case I think it was likely an intermittent issue with the testnet indexer that has since been resolved. Feel free to re-open if the issue starts happening again.

@andy-haynes  thanks.
yeah. I think it's temporary issue. now it's working.


Add distributed training support

Description
Add distributed training support
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.

[ ] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
[ ] Changes are complete (i.e. I finished coding on this PR)
[ ] All changes have test coverage:
Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
[ ] Code is well-documented:
For user-facing API changes, API doc string has been updated.
For new C++ functions in header files, their functionalities and arguments are documented.
For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
[ ] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

[ ] Feature1, tests, (and when applicable, API doc)
[ ] Feature2, tests, (and when applicable, API doc)

Comments

If this change is a backward incompatible change, why must this change be made.
Interesting edge cases to note here

@ashokei Yes, each node does Allreduce. It's SPMD model.
@wenzhe-nrv I think your requests should be covered. Please let me know if you have any further requests.

Approved.
One follow up: since push, pull, etc is not implemented in ngraph kvstore but inherent from kvstore local, should we define those methods that throw some warning? We could discuss later.

TESTNOW


Added logstash to bom

Description

Motivation and Context

Fixes #502
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have added tests to cover my changes.

👍


[Bug] If logged in and click on down button on home screen no action

Context
The down arrow button on home screen is not working when user is logged in
Expected Behavior
If user is logged in then onClick down button it should move to articles
If user is not logged in then onClick down button it should move to get started banner
Current Behavior
If user is logged in then onClick down button noting happen
If user is not logged in then onClick down button it should move to get started banner
Screenshots
Screencast from 2024-10-09 19-23-37.webm
Steps to reproduce
click on down button when you are logged in

If issue looks good then I can start working.

@HarshitT00
I cant reproduce this?
It is working fine for me on chrome.

It is happening after the current PR merge to remove the banner if logged in.
Try running the local

Ah.... I get you. Great catch, thanks.
I assigned you.


Windows.Media.Devices.VideoDeviceController-compatible devices

Is there a list of devices that are compatible with the Windows.Media.Devices.VideoDeviceController manual control APIs?
My Surface Book 2's camera is compatible with focus, zoom, and EV, but I can't find any other webcam that has those capabilities. e.g. Microsoft LifeCam Studio is not, Logitech V-U0027 is not.
I am guessing this is for the same reason as mentioned in #799.

For USB based cameras, since there’s typically only one pin, profiles are not needed. And in the Fall Creators Update and earlier, profiles were not available for USB Video Class based cameras (no way for IHV/OEMs to publish profiles for UVC based cameras).

Is this still not possible in 1803? Are there any external webcams on the market that are compatible with this API?
Sample
\Samples\CameraManualControls\cs\CameraManualControls
System Info
OS: Windows 10 Pro 1803 17134.48
SDK: Windows 10 SDK 10.0.17134.0

I notice that the Windows Camera app supports focus and EV control on all of the cameras I tried it with. What API is that app using?

This is not an issue with the sample, but rather with the platform. You can open a support case with our Developer Support team:

Visit http://aka.ms/storesupport and sign-in with your Microsoft account
Under the “App Development” section choose "Windows 10 universal app development", then choose the appropriate problem type and category to get engaged through a formal support channel.


Support Tor

It must be tested that spruned works well behind Tor.

--enable-tor
--force-tor

Design review.
There are two ways to use Tor:
--tor

if no proxy is specified with the --proxy command, the default 'localhost:9050' is used
this mode establish connections with hidden services only

--proxy localhost:9050

passing the tor proxy (i.e. localhost:9050) without using the --tor flag will enforce its usage, but not the hidden services policy: spruned would instead use tor exit nodes to connect to clearnet peers
only socks5 are supported

--proxy  and --tor can be used together, and would enforce both the hidden services policy specified proxy usage.

PR #76 merged, Tor is supported is in master.
No Pypi release yet
(See https://stackoverflow.com/questions/20101834/pip-install-from-git-repo-branch if you want to use pip)


Increase payload of wifi send_data

Hi everyone,
I have a board b-l475e-iot01a.
I am developing a project in which I implement a web server. mainly the web server, when it receives the request from the browser, inserts the html code of the page in the uint8_t http[4096] variable.
So, I call the WIFI_SendData function below.
`WIFIReturnCode_t WIFI_SendData(uint8_t socket, uint8_t *pdata, uint16_t Reqlen, uint16_t *SentDatalen, uint32_t Timeout)
{
WIFIReturnCode_t ret = eWiFiFailure;
if(ES_WIFI_SendData(&xWiFiModule.xWifiObject, socket, pdata, Reqlen, SentDatalen, Timeout) == ES_WIFI_STATUS_OK)
{
  ret = eWiFiSuccess;
}

return ret;
}`
The error that occurs is that when the html page is larger than 1200 characters, it is not sent correctly.
In the function ES_WIFI_Status_t ES_WIFI_SendData (ES_WIFIObject_t * Obj, uint8_t Socket, uint8_t * pdata, uint16_t Reqlen, uint16_t * SentLen, uint32_t Timeout); present in es_wifi.c I noticed the presence of an if that changes the length of the html variable to a predefined value (ES_WIFI_PAYLOAD_SIZE). So I tried to change this constant, but the problem still occurs around the size of 1500.
I don't know if I have to go and change some other parameter or if there is some other error.
Apparently, there seems to be a timeout problem .. is it possible?
Thank you in advance.

@aggarg you helped me with the wifi problem. would you be able to help me?

Looking at the code, ES_WIFI_PAYLOAD_SIZE determines the maximum length of the data that can be sent by ES_WIFI_SendData. What is the size of the data you want to send? If it is variable and cannot be determined at compile time, can you try sending in chunks (with maximum size of each chunk being ES_WIFI_PAYLOAD_SIZE)?
Thanks.

Hi, thank you for answering me.
I've thought about it too ... but how could I do?
The size of the data is variable and below is an example of the content of the http variable to be sent during the request.
void index_page(uint8_t http[]) //0 success, 1 failure {   strcpy((char *)http, (char *)"HTTP/1.0 200 OK\r\nContent-Type: text/html\r\nPragma: no-cache\r\n\r\n");   strcat((char *)http, (char *)"<html>");   strcat((char *)http, (char *)"<head>");
.......
Thanks.

The following pseudo code shows a way to send data in chunks:
/* http is the buffer which contains the data to send. */
/* httpDataLength is the length of the data to be sent. */

WIFIReturnCode_t ret;
uint32_t dataLengthToSend, dataLengthSent;

while( httpDataLength > 0 )
{
    if( httpDataLength > ES_WIFI_PAYLOAD_SIZE)
    {
        dataLengthToSend = ES_WIFI_PAYLOAD_SIZE;
    }
    else
    {
        dataLengthToSend = httpDataLength;
    }

    ret = WIFI_SendData( socket, http, dataLengthToSend, &( dataLengthSent ), timeout );

    if( ret != eWiFiSuccess)
    {
        /* Handle failure (probably print a log). */
        break;
    }
    else
    {
        /* Update what is left to send based on the length of the data actually sent. */
        httpDataLength = httpDataLength - dataLengthSent;
    }
}

Thanks.

Hello. I really thank you very much. I managed to break up the payload and it works fine.
I just ask you one last help: I am afraid that after exceeding a certain size of the http variable, the board is unable to satisfy in terms of memory, so I have noticed that in the last cells of the array there are values at random, or repeated without an apparent reason. What parameters should I adjust to have more headroom regarding the size of the arrays?
I have tried to change the constant
#define mainECHO_DEMO_STACK_SIZE (8192) //default 1024
but apparently I have not had any improvement ... and the array I need is made up like this:
uint8_t http[3000];
I thank you once again

Glad that it worked for you.
Would you please elaborate what you mean by the following:
I have noticed that in the last cells of the array there are values at random, or repeated without an apparent reason.

Do you mean that you get more data at the receiving end than you send?
Is this a global variable uint8_t http[3000];? If so, are there any concurrent accesses?
Thanks.

Hi, I'm sorry if I made myself wrong.
The web server consists of a thread initialized as follows:
xTaskCreate( wifi_server,          /* The function that implements the task. /
"SERVER",                   / Just a text name for the task to aid debugging. /
mainECHO_DEMO_STACK_SIZE, / The stack size. /
NULL,                     / The task parameter, not used in this case. /
mainECHO_DEMO_PRIORITY,   / The priority assigned to the task. /
NULL );                   / The task handle is not used. */
In the wifi_server function, I proceed with starting the web server and when a client connects, I send the web page through the function below.
int SendWebPage_Index() //0 success, 1 failure
{
uint8_t http[3000];
index_page((uint8_t *)http);
return SendWebPage((uint8_t *)http, strlen((char *)http));
}
The index_page () function does nothing but build the html page (as I posted earlier). The SendWebPage function does exactly what you sent me to solve the chunks problem.
Apparently, it is as if the http variable is too large for the thread stack. As you can see, http is not global and is created and destroyed every time the request is made by the client. How do you advise me to do to solve the problem?
Thanks for your patience

There are two possible issues:

First, you are creating a very large buffer http on the stack. You may be causing stack overflow - what is the value of mainECHO_DEMO_STACK_SIZE?
Second, does the index_page function ensures that a trailing NULL character is placed in the http buffer so that strlen works correctly?

I have the following two suggestions:

You should make the http buffer static so that it is not created on the stack. Note that this will make the function non-reentrant and you wont be able to call it from multiple tasks (without adding some synchronization primitives to prevent concurrent access to the http buffer). If you are not calling this function from more than one task, it should be okay.
Update your index function to return the number of bytes written to the http buffer. This way you will not need to call strlen.

int SendWebPage_Index() //0 success, 1 failure
{
  static uint8_t http[3000];
  uint32_t httpLength;

  httpLength = index_page((uint8_t *)http);

  return SendWebPage((uint8_t *)http, httpLength);
}

Thanks.

Hi @git-cerbero, Did the above work for you?
Thanks.

Hi @aggarg ,
sorry if I answer you only now.
I managed to solve the problem by increasing the value of mainECHO_DEMO_STACK_SIZE and simultaneously reducing the size of the http array.
Basically, I split the index_page function into two functions (index_page1 and index_page2), which write to the http array one after the other. In this way, I was able to use a small array and at the same time send very complex and large pages.
I thank you for your patience with me.


Closeable data source

With this code FlexyPoolDataSource implements Closeable and delegates close call to targetDataSource if it also implements Closeable interface.
This allows cleanup for example HikariDataSource pools when closing dataSource.

Coverage increased (+0.5%) to 93.157% when pulling dd59103b439d9869acc6da72e916e70fff727aa1 on ikettu:CloseableDataSource into a9eeff3fef3a26db2fbb5c7f248cad62ad608798 on vladmihalcea:master.

Applied upstream, thanks

I released FlexyPool 1.2.8 to incorporate your change.


THANK YOU SO MUCH

I don't have an issue to report. I just want to say, THANK YOU SO MUCH for this mind-blowingly amazing tool. I dreamed of such a plugin before, and can't believe it has become reality. The beautiful UI, clean export, and automatic conference venue linking ... that's all I ever wanted. I have no clue why Mendeley/Zotero/ReadCube cannot deliver such high-quality features with their bloated teams of engineers. I could've saved more productive hours for research had I discovered your repo earlier!
Please keep up the great work! Thanks again for your great service to the community.

Thank you so much for your message. It really warms my heart and pushes me to continue. I'll keep this issue open just because I like reading it 😁
The best things you can do to support my effort is to rate PaperMemory on the webstore and share it around you! In your lab or on Twitter, basically advocate for PaperMemory. And if you know anyone with Javascript experience I'll welcome help!
And please do share any problem you encounter, or open an issue to discuss ideas for features.
Thank you again for your kind words 🤗

Done, I left the 5-star review on Chrome store, followed you on twitter and retweeted your post! Btw I did project with Yoshua in 2016 as a research assistant 😄  Glad to be an alumnus with you!

Came to say thanks. Thanks for this.

I'm a bit late, but I use PaperMemory daily for something like 2 year I think ... So you clearly that love ❤

Hi, I just stumbled upon this extension today and can't believe I didn't come across it sooner.
I've been working on a similar extension for some time, but your implementation surpasses mine in almost every way. I've added a link to your extension in the description of my own, hoping it will help promote your great work.

Extremely useful. Thank you.


Change logo on sidemenu if sidemenu is collapsed

Question
Answer

Issue or Enhancement
Question

Laravel Version
v8.28.1

Project Version
v3.5.2

Current Behavior
Currently the logo and text stays on while the menu is extended and when the menu is collapsed it shows only the logo
Desired Behavior
I have changed the brand-logo-xs.blade.php file to this:
isLayoutTopnavEnabled())
        class="navbar-brand {{ config('adminlte.classes_brand') }}"
    @else
        class="brand-link {{ config('adminlte.classes_brand') }}"
    @endif>

    {{-- Small brand logo --}}

    {{-- Brand text --}}

And I would like to show the "Small Brand Logo" if the menu is collapsed/close and when the menu is open only show the Brand text.
Example (made with inspect element):
Extended menu:

Collapsed menu:

How it looks at the moment:

Hi @MathiasOliveira , on the configuration file you have the option to configure two logos (See Logo Configuration):

logo_img: The path to the small logo image. The recommend size is: 50x50px.
logo_img_xl: The path to the large logo image, if you set a img url here, then it will replace the text & small logo with one big logo. When the sidebar is collapsed it will displays only the small logo. The recommend size is: 210x33px.

So, instead of a logo image and a text, you can use two logo images, one (small) for the collapsed mode and another (large) for standard mode. Maybe, that fits your needs...

That is exactly what I wanted, who would've guessed, following documentation was the better way than doing things my way 😂
Thank you for your help.


Leaks memory

Discovered this issue while working on whisper, a program that uses this crate.
The demo leaks memory, as seen in this heaptrack output (I restarted the nc command a couple times as occasionally it would stop transferring data, don't know if that's another issue):

It seems to be in ipstack::stream::tcb::Tcb::add_inflight_packet:

To reproduce:

Run the tun2 example (had to remove the required-features = ["log"] in the Cargo.toml to get it to compile)
Assign it an IP (I used sudo ip route add <IP_ADDRESS>/32 dev tun0)
Run cat /dev/zero | nc <IP_ADDRESS> 2048 > /dev/null to send some traffic through the TUN device

I acknowledge this existing issue and thank you for the report. I believe that the 'change_last_ack' function is responsible for this issue, where 'ipstack' checks the received acknowledgments and must deallocate the memory.

I currently doesn't have access to a profiler. Could you please try this patch?
diff --git a/src/stream/tcb.rs b/src/stream/tcb.rs
index 0e7383b..a191a05 100644
--- a/src/stream/tcb.rs
+++ b/src/stream/tcb.rs
@@ -178,13 +178,17 @@ impl Tcb {
         let distance = ack.wrapping_sub(self.last_ack);

         if matches!(self.state, TcpState::Established) {
-            if let Some(i) = self.inflight_packets.iter().position(|p| p.contains(ack)) {
-                let mut inflight_packet = self.inflight_packets.remove(i);
-                let distance = ack.wrapping_sub(inflight_packet.seq);
-                if (distance as usize) < inflight_packet.payload.len() {
-                    inflight_packet.payload.drain(0..distance as usize);
-                    inflight_packet.seq = ack;
-                    self.inflight_packets.push(inflight_packet);
+            loop {
+                if let Some(i) = self.inflight_packets.iter().position(|p| p.contains(ack)) {
+                    let mut inflight_packet = self.inflight_packets.remove(i);
+                    let distance = ack.wrapping_sub(inflight_packet.seq);
+                    if (distance as usize) < inflight_packet.payload.len() {
+                        inflight_packet.payload.drain(0..distance as usize);
+                        inflight_packet.seq = ack;
+                        self.inflight_packets.push(inflight_packet);
+                    }
+                } else {
+                    break;
                 }
             }
         }

Still seems to be leaking at the same place.

Unable to reproduce.

Could you please try with https://github.com/narrowlink/ipstack/tree/ManualShutdownIssue and let me know if you can reproduce it?

I've applied the patch and am on the ManualShutdownIssue branch on Linux:
$ git diff
diff --git a/src/stream/tcb.rs b/src/stream/tcb.rs
index 0e7383b..a191a05 100644
--- a/src/stream/tcb.rs
+++ b/src/stream/tcb.rs
@@ -178,13 +178,17 @@ impl Tcb {
         let distance = ack.wrapping_sub(self.last_ack);

         if matches!(self.state, TcpState::Established) {
-            if let Some(i) = self.inflight_packets.iter().position(|p| p.contains(ack)) {
-                let mut inflight_packet = self.inflight_packets.remove(i);
-                let distance = ack.wrapping_sub(inflight_packet.seq);
-                if (distance as usize) < inflight_packet.payload.len() {
-                    inflight_packet.payload.drain(0..distance as usize);
-                    inflight_packet.seq = ack;
-                    self.inflight_packets.push(inflight_packet);
+            loop {
+                if let Some(i) = self.inflight_packets.iter().position(|p| p.contains(ack)) {
+                    let mut inflight_packet = self.inflight_packets.remove(i);
+                    let distance = ack.wrapping_sub(inflight_packet.seq);
+                    if (distance as usize) < inflight_packet.payload.len() {
+                        inflight_packet.payload.drain(0..distance as usize);
+                        inflight_packet.seq = ack;
+                        self.inflight_packets.push(inflight_packet);
+                    }
+                } else {
+                    break;
                 }
             }
         }
$ git branch
* ManualShutdownIssue
  main
$ cargo b --example tun2
$ sudo heaptrack ./target/debug/examples/tun2 --server-addr <IP_ADDRESS>:8080
starting application, this might take some time...
unknown transport - Ip Protocol 58 (IPv6-ICMP - ICMP for IPv6)
unknown transport - Ip Protocol 2 (IGMP - Internet Group Management)
unknown transport - Ip Protocol 0 (HOPOPT - IPv6 Hop-by-Hop Option)
==== New UDP connection ====
==== New UDP connection ====
unknown transport - Ip Protocol 0 (HOPOPT - IPv6 Hop-by-Hop Option)
==== end UDP connection ====
==== end UDP connection ====
unknown transport - Ip Protocol 2 (IGMP - Internet Group Management)
unknown transport - Ip Protocol 0 (HOPOPT - IPv6 Hop-by-Hop Option)
==== New UDP connection ====
==== end UDP connection ====
unknown transport - Ip Protocol 58 (IPv6-ICMP - ICMP for IPv6)
unknown transport - Ip Protocol 58 (IPv6-ICMP - ICMP for IPv6)
==== New TCP connection ====
unknown transport - Ip Protocol 58 (IPv6-ICMP - ICMP for IPv6)
==== New TCP connection ====
====== end tcp connection ======
==== New TCP connection ====
==== New TCP connection ====
unknown transport - Ip Protocol 58 (IPv6-ICMP - ICMP for IPv6)
Terminated
heaptrack stats:
        allocations:            1222232
        leaked allocations:     2286
        temporary allocations:  439457
Heaptrack finished!

Here's the dump file:
heaptrack.tun2.1097005.zip

The underlying issue for me seems to be that sometimes change_last_ack is called before the packet gets pushed into self.inflight_packets, which means it gets left inside the Vec.
I fixed this with this patch:
diff --git a/src/stream/tcb.rs b/src/stream/tcb.rs
index 0e7383b..7d7b94f 100644
--- a/src/stream/tcb.rs
+++ b/src/stream/tcb.rs
@@ -186,6 +186,9 @@ impl Tcb {
                     inflight_packet.seq = ack;
                     self.inflight_packets.push(inflight_packet);
                 }
+                if i != 0 {
+                    self.inflight_packets.drain(0..i);
+                }
             }
         }

I don't know if this is the best solution however.

Thanks!
The code you created may cause some issues since the inflight_packets aren't always ordered, especially when we push them back into the buffer/vector.

diff --git a/src/stream/tcb.rs b/src/stream/tcb.rs
index 0e7383b..ac90820 100644
--- a/src/stream/tcb.rs
+++ b/src/stream/tcb.rs
@@ -176,6 +176,7 @@ impl Tcb {
     }
     pub(super) fn change_last_ack(&mut self, ack: u32) {
         let distance = ack.wrapping_sub(self.last_ack);
+        self.last_ack = self.last_ack.wrapping_add(distance);

         if matches!(self.state, TcpState::Established) {
             if let Some(i) = self.inflight_packets.iter().position(|p| p.contains(ack)) {
@@ -187,9 +188,11 @@ impl Tcb {
                     self.inflight_packets.push(inflight_packet);
                 }
             }
+            self.inflight_packets.retain(|p| {
+                let last_byte = p.seq.wrapping_add(p.payload.len() as u32);
+                last_byte.wrapping_sub(self.last_ack) > 0 && self.seq.wrapping_sub(last_byte) > 0 // only keep packets that are not fully acked
+            });
         }
-
-        self.last_ack = self.last_ack.wrapping_add(distance);
     }
     pub fn is_send_buffer_full(&self) -> bool {
         self.seq.wrapping_sub(self.last_ack) >= MAX_UNACK

Could you please this patch?

 I just replaced wrapping_sub with saturating_sub.
diff --git a/src/stream/tcb.rs b/src/stream/tcb.rs
index 0e7383b..e771123 100644
--- a/src/stream/tcb.rs
+++ b/src/stream/tcb.rs
@@ -176,6 +176,7 @@ impl Tcb {
     }
     pub(super) fn change_last_ack(&mut self, ack: u32) {
         let distance = ack.wrapping_sub(self.last_ack);
+        self.last_ack = self.last_ack.wrapping_add(distance);

         if matches!(self.state, TcpState::Established) {
             if let Some(i) = self.inflight_packets.iter().position(|p| p.contains(ack)) {
@@ -187,9 +188,11 @@ impl Tcb {
                     self.inflight_packets.push(inflight_packet);
                 }
             }
+            self.inflight_packets.retain(|p| {
+                let last_byte = p.seq.wrapping_add(p.payload.len() as u32);
+                last_byte.saturating_sub(self.last_ack) > 0 && self.seq.saturating_sub(last_byte) > 0
+            });
         }
-
-        self.last_ack = self.last_ack.wrapping_add(distance);
     }
     pub fn is_send_buffer_full(&self) -> bool {
         self.seq.wrapping_sub(self.last_ack) >= MAX_UNACK

That fixes it! I'll close my PR.


Switch parameter consistency updates, round 2

Docs Build status updates of commit f123bb6:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

exchange/exchange-ps/exchange/Get-ManagementRoleAssignment.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-ManagementScope.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-MapiVirtualDirectory.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-Message.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-MigrationBatch.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-MigrationEndpoint.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-MigrationStatistics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-MigrationUserStatistics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-MobileDeviceStatistics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-MoveRequestStatistics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-OabVirtualDirectory.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-OutlookAnywhere.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-OwaVirtualDirectory.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-PolicyTipConfig.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-PowerShellVirtualDirectory.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-PublicFolder.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-PublicFolderDatabase.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-PublicFolderMailboxDiagnostics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-PublicFolderMailboxMigrationRequestStatistics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-PublicFolderMigrationRequestStatistics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-PublicFolderMoveRequestStatistics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-RMSTrustedPublishingDomain.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-Recipient.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-RecipientPermission.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-RemoteMailbox.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-RetentionPolicyTag.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-RoleGroup.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-RoleGroupMember.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-ServerHealth.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-SiteMailbox.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-SiteMailboxDiagnostics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-StoreUsageStatistics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-TextMessagingAccount.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-ThrottlingPolicy.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-UMIPGateway.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-UMMailbox.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-UMMailboxPIN.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-User.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-UserPhoto.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-WebServicesVirtualDirectory.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Import-ContactList.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Mount-Database.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Move-DatabasePath.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/New-AntiPhishPolicy.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/New-MailboxExportRequest.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/New-MailboxImportRequest.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/New-MailboxRestoreRequest.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/New-MoveRequest.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/New-PublicFolderMoveRequest.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/New-RemoteMailbox.md
:white_check_mark:Succeeded
View (exchange-ps)

This comment lists only the first 50 files in the pull request.
For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit 6f2cd1f:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

exchange/exchange-ps/exchange/Get-ManagementRoleAssignment.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-ManagementScope.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-MapiVirtualDirectory.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-Message.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-MigrationBatch.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-MigrationEndpoint.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-MigrationStatistics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-MigrationUserStatistics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-MobileDeviceStatistics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-MoveRequestStatistics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-OabVirtualDirectory.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-OutlookAnywhere.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-OwaVirtualDirectory.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-PolicyTipConfig.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-PowerShellVirtualDirectory.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-PublicFolder.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-PublicFolderDatabase.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-PublicFolderMailboxDiagnostics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-PublicFolderMailboxMigrationRequestStatistics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-PublicFolderMigrationRequestStatistics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-PublicFolderMoveRequestStatistics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-RMSTrustedPublishingDomain.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-Recipient.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-RecipientPermission.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-RemoteMailbox.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-RetentionPolicyTag.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-RoleGroup.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-RoleGroupMember.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-ServerHealth.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-SiteMailbox.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-SiteMailboxDiagnostics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-StoreUsageStatistics.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-TextMessagingAccount.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-ThrottlingPolicy.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-UMIPGateway.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-UMMailbox.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-UMMailboxPIN.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-User.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-UserPhoto.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-WebServicesVirtualDirectory.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Import-ContactList.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Mount-Database.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Move-DatabasePath.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/New-AntiPhishPolicy.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/New-MailboxExportRequest.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/New-MailboxImportRequest.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/New-MailboxRestoreRequest.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/New-MoveRequest.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/New-PublicFolderMoveRequest.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/New-RemoteMailbox.md
:white_check_mark:Succeeded
View (exchange-ps)

This comment lists only the first 50 files in the pull request.
For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


[hold][WIP] add tags widget to preprint form

Add ember-osf's tags widget into the preprint form. This is a front-end only feature.

Done with review. As discussed on flowdock, the big blocker will be making sure that the tags widget is initialized with the correct arguments passed in.

Closing to redo with conflict resolution and fully working version.


What does 'suppress base=true' do?

There's an attribute base in the XSD for the suppressions file with no indication of what it does.

Suppressed entries are still included in the report as suppressed. Suppression rules with base=true are completely excluded from the report. All of the suppression rules included in dependency-check-core have base=true set.


Implement binary search gasEstimation

This PR fixes Issue https://github.com/MetaMask/provider-engine/issues/80 by @kumavis
There are a number of strange edge-cases where the true amount of gas required by a transaction is above the amount returned by running the transaction through the VM locally. Because of this, the newest version of Geth implements a binary search approach to gasEstimation (https://github.com/ethereum/go-ethereum/pull/3587).
I've encountered one of these edge-cases myself and found out that it was because the VMSubProvider still uses the simplistic gasEstimation technique, so I decided to port over the binary search implementation used by Geth.
There is a perf hit to this approach, since the VM must rerun the transaction log(gasLimit) times to measure whether it fails or not, but it guarantees that transactions won't ever fail because of gasEstimation issues.

@fabioberger nice work! Do you have any estimates on how many runs this requires to complete?
My guess is log(4019491)/log(2) ~= 22 but google suggests the worst case is 2*log(4019491-1)~=44. I think binary search may be a "more correct" solution but I think we can come up with a better one by simulating with a high gas limit and then tracking the highest gas consumption during the duration of the run. That would only require a single run.
note:
we dont use vm-subprovider in the ./zero.js preconfigured provider but it is used in ethereumjs-testrpc

@kumavis it takes 23 iterations every single time it runs. The last 11 iterations however are to hone in on the gas consumption to a degree of detail that could be considered superfluous:
gas:  2356194
gas:  1178097
gas:  589048.5
gas:  294524.25
gas:  147262.125
gas:  73631.0625
gas:  36815.53125
gas:  55223.296875
gas:  64427.1796875
gas:  69029.12109375
gas:  71330.091796875
gas:  70179.6064453125
gas:  69604.36376953125
gas:  69316.74243164062
gas:  69172.93176269531
gas:  69244.83709716797
gas:  69280.7897644043
gas:  69298.76609802246
gas:  69307.75426483154
gas:  69303.260181427
gas:  69301.01313972473
gas:  69299.8896188736
gas:  69299.32785844803

We could improve perf by 100% if we simply stop the binary search once the difference between iterations is < 1000 gas. This would mean ~12 iterations per gas estimation.
I'm not sure I understand your alternative approach, could you elaborate on that? Happy to give it a try once I understand what you mean.

@fabioberger excellent observation! I think that optimization would be very nice and straight forward.
So the main problem with the current implementation is that it just reports the gasUsed at the end (totalGasAllocated - gasRefund). Its fairly common to see gas requirements during the processing of a transaction be higher than the final gasUsed amount. For example when a contract calls another contract, it needs to set a gasLimit for the call (just like on a tx). The unused portion is returned. So you can have a tx that in the end only uses 10k gas, but requires 1M gas to be reserved.
The way we can measure this with only a single VM run would be to run with a high gas limit, e.g. the block gas limit, and on each vm step, see what the current gas requirements are, and keep the highest observed.

That said, im working on a new version of provider-engine that is even more modular, to make it easier to use whatever method the module consumer desires.

Ah I see! Very clever.
I've just updated the PR with the optimization we discussed.
It you are about to go through a big refactor, we can leave it like this for now and then switch to your alternative approach once the time is right ;)

This looks good - just need to figure out why CI isnt running -- may be an s3 issue

Hm... I'm getting unrelated errors to gasEstimation when running truffle test against testrpc with this change to the codebase (testrpc has provider-engine as a dependency). It feels like a race-condition that might have been exposed by gasEstimation taking longer then before. Will let you know what I find.

Found this issue and fixed it!

@fabioberger I don't see any existing tests for eth_estimateGas
would you be willing to create one or two?

@kumavis I've added unit tests for the binary search gasEstimation. Let me know what you think!

published as 9.2.0

This is an amazing contribution, thank you @fabioberger!!

No problem @flyswatter! Glad I could help!


use id for commit_button like rails2 did it, closes #686

closes #686
/cc @sobrinho

Pulled, thanks!


Another createClient overload?

I would like to propose another overload for the createClient method. One that accepts another client to copy its parameters from.
var client1 = redis.createClient();
var client2 = redis.createClient(client1);

This would help library authors that accept a client as input to clone it to do things like pubsub.

I quite like this idea, but could you not use
var client1 = redis.createClient();
var client2 = redis.createClient(client1.address);

Of course, this wouldn't copy the other options (or database) which could be quite useful.

Sounds reasonable. But I suggest to add a new function instead of overloading createClient further or add a options to the options object. But the later might be more confusing. Using client.clone(options) would also allow to override some old options and copy all others.

This will be released with v.2.4


Specifying just a private buffer does not work

Using access_mode=private results in no buffer being created.
The $DW_JOB_PRIVATE environment variable is not set at least.
Is this expected or should one be able to request a private buffer without stripped?

User issue, I had a typo :)


Page refreshes when adding songs from one playlist to another

OS: Windows 10:
Issue: When adding songs from one playlist to another via right click or the 3 dot menu, This causes quite a few problems when trying to sort through songs to make a new playlist. This behavior does not occur in the browser version of Play Music.
Steps to Reproduce:

Select on song or multiple songs in a playlist
Add songs to another playlist
Page refreshes and goes all the way to the top causing you to lose your place

Can not confirm this one. Just tried multiple ways. I dragged from the current queue to the playlists slide out. I used the three dot menu, and added the song via right click menu.

This is happening for me as well. See more specs and info at #2657.

Also happening for me, but I get the exact same refresh on changes to a playlist in browser (Chrome) as well. Usually doesn't happen until the 5th playlist "action" though. (Adding, removing, or re-ordering songs being an "action.")

I just tried it in the browser. Yeah, it's doing it there as well. Probably not a GPMDP problem.

Probably not a GPMDP problem.

Sounds like unfortunate A/B testing, would just hold out for google to issue a fix for it 👍


The Volume.status has an incorrect generic type

@AutoValue
@JsonAutoDetect(fieldVisibility = ANY, getterVisibility = NONE, setterVisibility = NONE)
public abstract class Volume {
...
  @Nullable
  @JsonProperty("Status")
  public abstract ImmutableMap<String, String> status();
...
}

But some volume drivers returns status as complex structure not as simple String (f.e. vsphere volume driver).
Please change map from ImmutableMap<String, String> to ImmutableMap<String, Object>
Also:
  public abstract ImmutableMap<String, String> driverOpts();
  public abstract ImmutableMap<String, String> options();

I think that driverOpts and options have the same problem.
Thanks!

Can you give an example of the kind of status that gets returned that isn't just a String? Or a link to the docker API docs, if there are examples there.


Avoid invoking ConfiguredJdbcBatchSize each time a session is created

FIxes #1016

Well because it looks like we create the BatchingConnection once when the session is created, and save the setting from the factory. And so if you then call setBatchSize() the change will just be ignored because the BatchingConnection uses its cached value.

Ah, ok. I didn't think about the setBatchSize use case.


Add permalink feature to recordset app

Note: Need to support @sort(column) in the url.

tried it and worked for me


We'd love to add Neo4j as a vector store to the project

Neo4j added vector support in August 2023 based on HNSW, we'd like to add support for that to spring-ai
Just wanted to open an issue first before sending in a PR, to see if there are any thoughts.

Hey @jexp , thanks for raising this issue.
Looking forward for your PR!

PR was merged as a6fba7a3b6306b64c48cc881ecdc89096d3dd98f

Great news!!


Should state be kept separate from callbacks in the returned result?

Currently we return an object from useMethods which is a mixture of state and callbacks:
const initial = { count: 0 };

const methods = state => ({
  increment() {
    state.count++;
  },
  decrement() {
    state.count--;
  },
});

// ...

const { count, increment, decrement } = useMethods(initial, methods);

but maybe they should be kept separate, a la useState and useReducer:
const [{ count }, { increment, decrement }] = useMethods(initial, methods);

One advantage of this would be the option to use primitives instead of objects for state. For example in this case we could use a simple number for the state:
const initial = 0;

const methods = count => ({
  increment: () => count + 1,
  decrement: () => count - 1,
});

// ...

const [count, { increment, decrement }] = useMethods(initial, methods);

I think keeping state and methods separate is better. It would also help avoid conflicts between state key and methods.

Yeah, I think I'm leaning that way too.

Awesome! Is your 2nd example how things work now? So I can do:
const initial = 0;

const methods = count => ({
  increment: () => count + 1,
  decrement: () => count - 1,
});

// ...

const [count, { increment, decrement }] = useMethods(initial, methods);
```?

@Noitidart yes, except that I've also reversed the argument order (#3) to be consistent with that of useReducer, so:
const [count, { increment, decrement }] = useMethods(methods, initial);

Thank you! Super awesome!


Add span aware sampler

Pull Request Test Coverage Report for Build 09c41722-d1ba-4df8-b5b7-d4083dbab7ab

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.05%) to 65.07%

Totals

Change from base Build 5dc2737b-97ab-49bf-b822-b94bae48175a:
0.05%

Covered Lines:
1115

Relevant Lines:
1618

💛  - Coveralls


No Buffering state ever received, only Connecting and Paused

Describe the Bug
Using v2.2.0-rc3 I have noticed I never receive the Buffering state anymore.  I get a Connecting state when the queue first starts playing, and then a quick Paused state when skipping tracks/seeking within a track.  Here's an example log of states:
 LOG  None
 LOG  Connecting
 LOG  Playing
 LOG  Paused  <--- Skip to next track
 LOG  Playing
 LOG  Paused  <--- Seek within track
 LOG  Playing

Steps To Reproduce
Load up a queue of URLs, watch state transitions as you skip/seek tracks.
Environment Info:
Paste the results of npx react-native info
System:
    OS: Linux 5.4 Ubuntu 20.04.4 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
    Memory: 158.45 MB / 15.39 GB
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 14.19.1 - /tmp/yarn--1650003558066-0.14211410378890887/node
    Yarn: 1.22.18 - /tmp/yarn--1650003558066-0.14211410378890887/yarn
    npm: 6.14.16 - ~/.nvm/versions/node/v14.19.1/bin/npm
    Watchman: 4.9.0 - /usr/bin/watchman
  SDKs:
    Android SDK:
      Android NDK: 22.1.7171670
  IDEs:
    Android Studio: Not Found
  Languages:
    Java: 11.0.12 - /home/austin/.sdkman/candidates/java/current/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2
    react-native: 0.67.4 => 0.67.4
  npmGlobalPackages:
    *react-native*: Not Found

Paste the exact react-native-track-player version you are using

2.2.0-rc3

Real device? Or simulator?

Two simulated devices (one running Android 12, the other Android 9) one real device (Pixel 4 Android 12)

What OS are you running?

Ubuntu 20.04

How I can Help
What can you do to help resolve this?

I can test suggested changes

Have you investigated the underlying JS or Swift/Android code causing this bug?

No, I can try but I have very little Java experience and none in Kotlin

Can you create a Pull Request with a fix?

Probably not

@mpivchev this looks like a relevant rewrite issue.
@austinried , if you're willing to take a crack at a fix I'm happy to try and provide guidance. It's a great way to learn new tech and level up 😜

Sure, I can poke around at stuff as good as the next person. Just want to set your expectations on what the quality of a Kotlin PR from me would be. 😅
Just in case it's related I will add some info about my build process to #1475 which I suspect could be involved there.

No judgement, just appreciation!
I'm sure it'll be great and that's what the remote prices is for anyways 😃

Did you receive the Buffering state in rc1 and rc2?

@mpivchev looks like no, I just tested the example app in rc1 and rc2 and it's the same thing, no Buffering state.

I've done some investigation here and this is what I've found:

The Buffering event is in fact being fired in KotlinAudio as expected.
The issue seems to be a combination of 2 things:

Events being emitted in rapid succession overriding one another.
A potential issue with how the PAUSED event is emitted.

When playing a track and then skipping to the next one a Buffering event is emitted and then immediately followed by a Paused event (fired by the onIsPlayingChanged) immediately afterwards, resulting in only the Paused event being emitted.
My big question is, why are we even emitting a Paused event in this particular scenario, as no pause was actually caused. If we do need to emit a paused event in this scenario then we have effectively a race-condition scenario. Paused should technically be emitted before the Buffering state, but the buffering state is faster, and therefore getting swallowed.

The fix for this is in place and will be released in v3.2

Here's v3.2 https://github.com/doublesymmetry/react-native-track-player/releases/tag/v3.2.0
Should this be closed now?


Figure out a way how to handle multiple fragments

We need to find a way how to handle multiple fragments in a document i.e.
fragment x on Y { id }
fragment y on X { id }

This might lead to us stubbing in the wrong export-name for the document, we should investigate whether GQL-code-generator can handle this and whether we provide the correct export name.

Going to close this for now as I haven't found a real need for this yet


Support OAuth2 redirect URI as a first-class feature

When authorizing an application using OAuth2 and authorization code flow , the authorization server must redirect the user back to the application via a redirect_uri. The redirect URI is defined as optional in the RFC 6749 spec but is actually fundamental to specific flows. Attempting to authorize an application using authorization code flow without a redirect uri will simply not work with most (possibly all?) authorization servers (e.g. keycloak). Hence, for the authorization code flow, it is basically a requirement that a redirect uri also be supplied. My proposal is that redirect uri be added as an optional parameter to the oauth2 security definition so as to satisfy the ability to authorize applications as a first class concept.
This request was born out of the following discussion relating to swagger-editor / swagger-ui https://github.com/swagger-api/swagger-editor/issues/1410#issuecomment-316825266

As I understand it, the redirect URL is specific to a client application that has registered to have access to the API.  This is a property of the client application that the Authorization server must store for each client application.  I do not believe this is a value that is related to the description of the API.

Thanks @darrelmiller. I can see how the client specified parameters don't belong in a specification for the API. Happy to close out accordingly.

@michaeljfazio So, how to pass the Redirect URL to achieve Authorization Code Flow within swagger

Yes, how is the Redirect URL used?  When I set up an OAuth2 security description with my Authorize and Token URLs, etc and attempt to Authorize the API calls I get a response indicating the following:
error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration

@jdbealor When you attempt to Authorize your API using what client tooling?  This repo is just for the OpenAPI specification.  It is up to the client tooling to actually implement the OAuth flow.

Salesforce

Sorry, but I'm new to this...
From the followind definition I get to the Swagger UI "Authorize" dialog and enter my client id and secret and then the API Key.  When I click the Authorize for the first part I get the redirect uri error.
securityDefinitions:
test_auth:
type: oauth2
flow: accessCode
authorizationUrl: https://test.salesforce.com/services/oauth2/authorize
tokenUrl: https://test.salesforce.com/services/oauth2/token
scopes:
write:test: "write test"
read:test: "read test"
api_key:
type: apiKey
name: api_key
in: header

@jdbealor I have the same problem!

I understand the argument that redirect_uri is an application-side item, but since the Swagger UI editor creates an instant application client based on the api spec file, it needs redirect_uri to make the Oauth2 security definition work. So for practical reasons, client_id and redirect_uri should be added alongside authorizationUrl.

Agreeing with James above, running into this problem right now with SwaggerHub and Azure B2C implicit auth flow; impossible to authenticate to test the API within SwaggerHub without redirectUrl.
Although it might be up to the tooling to fix the flow, the ability to specify the redirectUrl should be part of the specs so that the tooling can implement it.

Following worked for me
authorizationUrl: "https://test.salesforce.com/services/oauth2/authorize?redirect_uri=http://localhost:8082/auth"


Rename to x86_64-unknown-none-hermitkernel

This adapts the new RustyHermit kernel target. See https://github.com/hermitcore/rusty-hermit/commit/c99060528ac069159cfc8baec20eb57de6ec1167 and https://github.com/rust-lang/rust/pull/77916.

@tlambertz, could you have a look at this? :)

Dang its been this long already? :D sorry bout that.
Do you know the current state of rftrace together with rusty-hermit? (ie, does it work for you with the pull requests you proposed, or are these just a required first step?)

No worries ;)
My PRs overcome some first issues, but did not make it work yet, if I remember correctly. I'll have to revisit this on the weekend though. Except for https://github.com/tlambertz/rftrace/pull/10 the PRs should be straight-forward, though.

Friendly ping. :)

I've just tried updating rftrace to run with the newest version of rustyhermit, but it seems the -Zinstrument-mcount option of the rust compiler is broken since nightly-2021-08-22. I've filed https://github.com/rust-lang/rust/issues/92109.
Without this instrumentation, rftrace cannot log anything.
As rusty-hermit currently uses nightly-2021-12-04, upstream has to be fixed first. The last working version would be hermit-sys-0.1.23 from August.

Alright, I found a work-around.
The hermitrust example now uses upstream rusty-hermit with a minor patch. It should work for me out-of-the-box, provided you have virtiofsd, uftrace and change the path to the loader in the makefile.


Documentation is wrong, this tool is correct: json_key_base64 vs. _json_key_base64

Not sure how to open a documentation bug, but this tool is correct, hopefully whoever works on this tool can forward it to the documentation team 🙏
Correct code sets .netrc with login to _json_key_base64: https://github.com/GoogleCloudPlatform/artifact-registry-go-tools/blob/52865e136f694d84edc386a6f04ceeb43d8a26b0/pkg/netrc/netrc.go#L40
Documentation sets .netrc with login to json_key_base64: https://cloud.google.com/artifact-registry/docs/go/authentication#authenticating_with_a_service_account_key
Trying json_key_base64 resulted in 401 Unauthorized errors and lots of head-scratching.
The documentation should be fixed to show _json_key_base64.

The fix has been submitted.