GithubHelp home page GithubHelp logo

Comments (4)

ReubenBond avatar ReubenBond commented on June 1, 2024

uhoh, thanks for pointing this out @heikki-heikkinen-ptcs. Are you able to submit a PR? We can make a quick release afterwards.

from orleans.redis.

heikki-heikkinen-ptcs avatar heikki-heikkinen-ptcs commented on June 1, 2024

@ReubenBond Sure, I'll cook this up on my pipe vision breaks. BTW are there any agreed practices for fixing code style, beautification and unrelated issues? There are some that are not directly related.
Examples:

  • private const string _writeScript: This might be a naming convention issue depending on what they are. Commonly const fields are in PascalCase.
  • Structured logging issue:
var initMsg = string.Format("Init: Name={0} ServiceId={1} DatabaseNumber={2} UseJson={3} DeleteOnClear={4}",
                            _name, _serviceId, _options.DatabaseNumber, _options.UseJson, _options.DeleteOnClear);
_logger.LogDebug($"RedisGrainStorage {_name} is initializing: {initMsg}"); 

In this case there are several issues:

  • _logger.LogDebug: call takes an interpolated string as a parameter. This should be exploded into a structured logging call where the format arguments are passed to the LogDebug call as parameters

  • The initMsg should not be passed as a single parameter but should be incorporated as part of the entire log message using structured logging.

  • If there is a good reason for adding the initMsg as a single log parameter the string should probably be formed wwith FormattableString.Invariant($"message goes here as interpolated string")

  • Uninformative exceptions:

                    var etagEntry = hashEntries.Single(e => e.Name == "etag");
                    var valueEntry = hashEntries.Single(e => e.Name == "data");
  • Sure the Single extension method is handy but it results in an uninformative InvalidOperationException with a generic message "Sequence contains more than one matching element" which doesn't tell you anything about the context.

Should I tidy things up or just do the bare minimum here?

from orleans.redis.

heikki-heikkinen-ptcs avatar heikki-heikkinen-ptcs commented on June 1, 2024

Pushed the rename to global.json to the PR by mistake. It was only preventing the solution from loading as far as I know if you don't have that exact version of dotnet SDK installed.
#11

from orleans.redis.

ReubenBond avatar ReubenBond commented on June 1, 2024

Fixed by #11

from orleans.redis.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.