Example of use with Passport.js Session

I would love to know how I could use this with a passport.js session. An example would be super helpful.
I have an app that has protected routes, and it works great to restrict access with Passport.js and client-side cookies for persistent login sessions using express-session.
This works great from the client side like this.
const isLoggedIn = function(req, res, next) {
    if (req.isAuthenticated()) {
      return next();
    }
};

// Protected route with Passport.js authentication middleware
app.get('/protected-route', isLoggedIn, (req, res) => {
    // Send some protected user data back
    res.json(req.user);
});

But using an isomorphic app (with Next.js), I want to be able to isomorphic-fetch this data from /protected-route so that pages can be rendered with this info on both the server and the client side.
How do I get the cookie used in the Passport.js session usable in this way on the server side. Is this even possible? If so a nice example in the readme would be helpful for newbies like me. It seems there is a lot of talk about how to get authentication issues like this working with isomorphic apps. (See this issue for example)

Hey @adueck I've used it isomorphically with passport, storing a JWT in the cookie, but never with passport's session.  I'll try and tinker around with this and see if I can get an example together.

That would be fantastic, thank you!

Sorry to bother you, but I was just wondering if you were able to make any progress on this? It would be a huuuge help (and probably useful for many others). Or perhaps you could provide an example of how you did this?

I've used it isomorphically with passport, storing a JWT in the cookie...

In my case I have an isomorphic NextJS app, which fetches page info from the backend and frontend. On sensitive API calls that depend on user (session) info, I can only fetch from the browser frontend. But it would be fantastic if I could also fetch from the background with the passport session.

@adueck I've not had a chance to work on this, my fiance and I actually just had a baby, so things have been super busy!  I do have a nice paternity leave coming up though and will likely find some time to get a good example (and expand isomorphic-cookie as needed) in the next month or two.  Thanks for your patience!

Congratulations @bsidelinger912! 🎉 👏 👶 Again, sorry to bother you. Hope all is well and I'll be watching for when you are able to expand isomorphic-cookies! All the best.

@adueck I just made up a a very quick and simple example of what you need here: https://github.com/bsidelinger912/isomorphic-passport-session.  Passport sessions set a cookie with the session ID which gets added to the set-cookie header on the response after you log in.  That cookie is remembered by the browser and added to any other request made to the same domain by the browser.  So if you make a fetch() request from the browser that session cookie will be there (in the form of a Cookie header) and /protected-route will have authentication pass.  But if on the server you try to make a request (I used isomorphic-fetch, but it'd be the same scenario with node's http/https) it won't automatically put that Cookie header on there for you.  But if your isomorphic app is served under the same host as your /protected-route, you can easily get the cookie from the request to the isomorphic app and add it to the server-side request to /protected route.  An example using isomorphic-fetch would look like:
app.get('/profile', isLoggedIn, function(req, res) {
        fetch("http://localhost:8080/protected-route", {
          headers: {
            // This passes the cookies from the browser request into the server side request to /protected-route
            // if you comment the next line out, the catch statement will be hit because it won't pass authentication
            'Cookie': req.headers.cookie,
          },
        })
          .then(res => res.json())
          .then(data => {
            console.log('success fetching /protected-route!!!');
            console.log(JSON.stringify(data, null, 2));
            res.render('profile.ejs', {
                user : req.user
            });
          })
          .catch(error => {
            console.log('error fetching /protected-route:');
            console.log(JSON.stringify(error, null, 2));
            res.render('profile.ejs', {
                user : req.user
            });
          });
    });

In this case it simply logs the fetched data, but in your case you'd use that data for your Server side render in a similar fashion to how you did it on the client.  I get the sense you understand how to do your server side render but just need to be able make that fetch() call with the session cookie.  Hope this helps!

Thank you very much for the time and help in this... but I don't think this will quite work in my situation. The problem is that the fetch to the protected route is not coming from within the express route/function, but rather from within the React code which is rendered either by Next.js[https://nextjs.org/] on both the server side (SSR) and by the browser on the client side.
I am using Next.js which makes a site built with pages that get rendered (and filled up with data) both on the server side, and on the client side, as necessary. From the client side I can make fetch calls to the protected route because the express session cookie is in the browser, but when Next.js renders the pages ahead of time with their SSR setup, I don't see how I can get the cookie there. 🤔. Right now I am sticking to only getting and rendering the protected route stuff on the client side, which is not totally ideal.
Anyways, very thankful for any help if you feel like digging into this. It would be awesome if this library could work with these isomorphic/SSR setups which seem to be gaining popularity, but I also understand that this is asking a lot and not necessarily within the scope of this project. 🙇

Hey @adueck, so I think my answer is a little terse, but the stuff you need is there.  I'm not familiar with Next.js, but have built a number of isomorphic react apps.  What I'm trying to demonstrate is that you can get the cookie you need to call /protected-route from the request to the server (assuming the server that does SSR is the same server (or host) as your /protected-route.  I've built many isomorphic react apps, but never used Next.js, so the part of accessing the reqest to the server is new to me.
I was poking around the Next.js docs and it seems it may be very easy to get the req object in your component.  Looking here: https://nextjs.org/docs/#fetching-data-and-component-lifecycle. I see that req is available in getInitialProps.  You can see that their accessing request headers in that example just like you need to.  So, my guess is that all you need to do is this:
class Index extends React.Component {
  static async getInitialProps({ req }) {
    // req will be populated only on the server, which is the only place we need to add headers
    const headers = req ? {
        cookie: req.headers.cookie,
    } : undefined;

    const res = await fetch('https://example.com/api/protected-route', { headers })

    const data = await res.json()

    return {
      data: data
    }
  }

  render() {
    return (

Page With Fetched Data

           {props.data.map(({item}) => (

                 {item.name}

           ))}

    )
  }
}

export default Index

From the brief reading I did, it seems like you may need to use a class vs a SFC to get the req object in getInitialProps, but I'm not totally sure.
I didn't test this or anything, but from a quick scan of the docs, it seems it may be that easy.  If so, big props to Next.js as it's much more work to do this stuff manually.

Yes! This works perfectly! A huge help! Thanks so much for your time in helping me with this.
Yes, as you suspected, getting the cookie from getInitialProps was just that easy in Next.js.  It's just there under req.headers.cookie. I can also get the passport user info from req.user if I want.  And all this actually without any need for isomorphic-cookie. Thank you so much for your help.
I feel like this might allow for a much simpler solution for isomorphic authentication than all the discussion in this issue.

@adueck, I'm really glad this worked out.  Next.js is pretty awesome from the little I've seen, I'll probably be playing around with it soon!


Favicon looks fuzzy in screens that have a higher pixel density

Here's a possible way to solve this:

"Old (non-retina) favicons are 16 × 16 px; a retina favicon is thus 32 × 32 px. The lazy way to support retina is to replace your old 16 px favicon.ico file with a 32 px file, and allow non-retina browsers to scale the image. The proper solution, however, is to create a single favicon.ico file containing two icon resources: one 16 × 16, the other 32 × 32. ICO files support other resolutions as well, but I see no practical utility in doing so."

– http://daringfireball.net/2013/01/retina_favicons

Yeah, someone pointed it out on hacker news. I have a retina screen but chrome doesn't pay attention to my magnification settings so it leaves the icons as 16x16, so I didn't notice this. Thanks for the ticket.

Just in case it helps, I've noticed that http://ghcformacosx.github.io/ uses a favicon which shows nice on retina screens.


Sentry trace Serializer issue

sentry/sentry  sdk 2.4.1
Hi guys,
We create a magento sentry integration. It works well, except in this scenario.
It requires Magento 2 knowledge
In sentry I see issue with such a name
Cannot declare class Vendor\Customer\Plugin\Api\CustomerRepositoryPlugin, because the name is already in use
Inside issue in the message there is a actual exception message. No real Exception trace, just trace about class redeclare.
 in include called at /var/www/magento/releases/20201001162424/vendor/composer/ClassLoader.php (444)
 in Composer\Autoload\includeFile called at /var/www/magento/releases/20201001162424/vendor/composer/ClassLoader.php (322)
 in Composer\Autoload\ClassLoader::loadClass called at ? (?)
 in spl_autoload_call called at ? (?)
 in is_callable called at /var/www/magento/releases/20201001162424/vendor/sentry/sentry/src/Serializer/AbstractSerializer.php (102)
 in Sentry\Serializer\AbstractSerializer::serializeRecursively called at /var/www/magento/releases/20201001162424/vendor/sentry/sentry/src/Serializer/AbstractSerializer.php (110)
 in Sentry\Serializer\AbstractSerializer::serializeRecursively called at /var/www/magento/releases/20201001162424/vendor/sentry/sentry/src/Serializer/RepresentationSerializer.php (21)
 in Sentry\Serializer\RepresentationSerializer::representationSerialize called at /var/www/magento/releases/20201001162424/vendor/sentry/sentry/src/Stacktrace.php (177)
 in Sentry\Stacktrace::addFrame called at /var/www/magento/releases/20201001162424/vendor/sentry/sentry/src/Stacktrace.php (102)
 in Sentry\Stacktrace::createFromBacktrace called at /var/www/magento/releases/20201001162424/vendor/sentry/sentry/src/EventFactory.php (149)
 in Sentry\EventFactory::addThrowableToEvent called at /var/www/magento/releases/20201001162424/vendor/sentry/sentry/src/EventFactory.php (110)
 in Sentry\EventFactory::create called at /var/www/magento/releases/20201001162424/vendor/sentry/sentry/src/Client.php (183)
 in Sentry\Client::prepareEvent called at /var/www/magento/releases/20201001162424/vendor/sentry/sentry/src/Client.php (118)
 in Sentry\Client::captureEvent called at /var/www/magento/releases/20201001162424/vendor/sentry/sentry/src/Client.php (110)
 in Sentry\Client::captureException called at /var/www/magento/releases/20201001162424/vendor/sentry/sentry/src/State/Hub.php (132)
 in Sentry\State\Hub::captureException called at /var/www/magento/releases/20201001162424/vendor/mygento/module-sentry/Model/SentryHandler.php (285)
 in Mygento\Sentry\Model\SentryHandler::Mygento\Sentry\Model\{closure} called at /var/www/magento/releases/20201001162424/vendor/sentry/sentry/src/State/Hub.php (87)
 in Sentry\State\Hub::withScope called at /var/www/magento/releases/20201001162424/vendor/mygento/module-sentry/Model/SentryHandler.php (289)
 in Mygento\Sentry\Model\SentryHandler::write called at /var/www/magento/releases/20201001162424/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php (39)
 in Monolog\Handler\AbstractProcessingHandler::handle called at /var/www/magento/releases/20201001162424/vendor/monolog/monolog/src/Monolog/Logger.php (344)

AbstractSerializer.php somehow recreates plugin class

I want to start by saying I have no Magento knowledge at all!
We use is_callable which in turn asks the autoloader to autoload the class if it doesn't already exists. This seems to be the fault of the autoloader trying to load an already loaded class.
This can have multiple reasons, and you should try and see if any of them are happening, I don't think this is a direct bug in Sentry.
You can check:

If there is indeed 1 file which defines Vendor\Customer\Plugin\Api\CustomerRepositoryPlugin
Check if the file has the correct casing (correct upercase and lowercase letters) in the path, this is a common issue on Linux (when developing on OSX) where a rename messes up a path, for example it was created like: Customer\Plugin\Api\CustomerrepositoryPlugin.php but the class itself is called CustomerrepositoryPlugin, on OSX this is no issue but on Linux this becomes an issue and could confuse the autoloader in loading the file twice.

Again I don't think Sentry directly causes this issue but shines light on the issue but this will require a bit if work on your side to validate 😄

File definitely is 1 only, in CorrectCase. I'll try to provide more information about autoloading. This can be a Magento issue.

You could check and search the /var/www/magento/releases/20201001162424/vendor/composer/ClassLoader.php file, it should list the class it's loading but possibly it's duplicated in that file for some reason.

We spent time digging this problem and found the root cause

I would like to add that we've just run into the same issue in a legacy project with Yii 1's autoloader. we got a call to queryInternal('fetchAll', [7, 0], []) in which is_callable is checking against the [7, 0] argument.
This creates a new exception, as a the file/class "7.php" obviously does not exist.

I can reproduce with Yii 1 as well. This only happens when running from the command line, and for some reason thinks that 'runJob.php' which is related to the entry point name is callable.
ErrorException: Warning: include(runJob.php): failed to open stream: No such file or directory
#19 /protected/yii-1.1.22.bf1d26/framework/YiiBase.php(463): include
#18 /protected/yii-1.1.22.bf1d26/framework/YiiBase.php(463): YiiBase::autoload
#17 internal: spl_autoload_call
#16 internal: is_callable
#15 /vendor/sentry/sentry/src/Serializer/AbstractSerializer.php(102): Sentry\Serializer\AbstractSerializer::serializeRecursively
#14 /vendor/sentry/sentry/src/Serializer/RepresentationSerializer.php(21): Sentry\Serializer\RepresentationSerializer::representationSerialize
#13 /vendor/sentry/sentry/src/FrameBuilder.php(200): Sentry\FrameBuilder::getFunctionArguments
#12 /vendor/sentry/sentry/src/FrameBuilder.php(88): Sentry\FrameBuilder::buildFromBacktraceFrame
#11 /vendor/sentry/sentry/src/StacktraceBuilder.php(66): Sentry\StacktraceBuilder::buildFromBacktrace
#10 /vendor/sentry/sentry/src/StacktraceBuilder.php(46): Sentry\StacktraceBuilder::buildFromException
#9 /vendor/sentry/sentry/src/Client.php(304): Sentry\Client::addThrowableToEvent
#8 /vendor/sentry/sentry/src/Client.php(218): Sentry\Client::prepareEvent
#7 /vendor/sentry/sentry/src/Client.php(150): Sentry\Client::captureEvent
#6 /vendor/sentry/sentry/src/Client.php(140): Sentry\Client::captureException
#5 /vendor/sentry/sentry/src/State/Hub.php(138): Sentry\State\Hub::captureException
#4 /vendor/sentry/sentry/src/functions.php(40): Sentry\captureException
#3 /protected/components/ErrorHandler.php(15): ErrorHandler::handleException
#2 /protected/yii-1.1.22.bf1d26/framework/base/CErrorHandler.php(131): CErrorHandler::handle
#1 /protected/yii-1.1.22.bf1d26/framework/base/CApplication.php(750): CApplication::handleException
#0 internal: null

I can reproduce with Yii 1 as well. This only happens when running from the command line, and for some reason thinks that 'runJob.php' which is related to the entry point name is callable.
ErrorException: Warning: include(runJob.php): failed to open stream: No such file or directory
#19 /protected/yii-1.1.22.bf1d26/framework/YiiBase.php(463): include
#18 /protected/yii-1.1.22.bf1d26/framework/YiiBase.php(463): YiiBase::autoload
#17 internal: spl_autoload_call
#16 internal: is_callable
#15 /vendor/sentry/sentry/src/Serializer/AbstractSerializer.php(102): Sentry\Serializer\AbstractSerializer::serializeRecursively
#14 /vendor/sentry/sentry/src/Serializer/RepresentationSerializer.php(21): Sentry\Serializer\RepresentationSerializer::representationSerialize
#13 /vendor/sentry/sentry/src/FrameBuilder.php(200): Sentry\FrameBuilder::getFunctionArguments
#12 /vendor/sentry/sentry/src/FrameBuilder.php(88): Sentry\FrameBuilder::buildFromBacktraceFrame
#11 /vendor/sentry/sentry/src/StacktraceBuilder.php(66): Sentry\StacktraceBuilder::buildFromBacktrace
#10 /vendor/sentry/sentry/src/StacktraceBuilder.php(46): Sentry\StacktraceBuilder::buildFromException
#9 /vendor/sentry/sentry/src/Client.php(304): Sentry\Client::addThrowableToEvent
#8 /vendor/sentry/sentry/src/Client.php(218): Sentry\Client::prepareEvent
#7 /vendor/sentry/sentry/src/Client.php(150): Sentry\Client::captureEvent
#6 /vendor/sentry/sentry/src/Client.php(140): Sentry\Client::captureException
#5 /vendor/sentry/sentry/src/State/Hub.php(138): Sentry\State\Hub::captureException
#4 /vendor/sentry/sentry/src/functions.php(40): Sentry\captureException
#3 /protected/components/ErrorHandler.php(15): ErrorHandler::handleException
#2 /protected/yii-1.1.22.bf1d26/framework/base/CErrorHandler.php(131): CErrorHandler::handle
#1 /protected/yii-1.1.22.bf1d26/framework/base/CApplication.php(750): CApplication::handleException
#0 internal: null

Same issue in my project, array with two elements trying to chech for callable method, which failed in Yii 1

The stacktrace from https://github.com/getsentry/sentry-php/issues/1112#issuecomment-763200161 makes evident that the issue is in is_callable triggering YiiBase::autoload. This confirms my suspicion that the issue is in the autoloader.
We could silence errors coming from that call, but I would accept a fix like that only with a proper test, and I can't imagine how to (temporarily) mangle the autoloader in our test suite to do that.

Maybe as a solution use is_callable() with  $syntax_only = true and class_exists() with $autoload = false before testing array for callable.

That would probably reduce the efficacy of the serialization though.

Even if that class not loaded (what I can not imagine because it appears in backtrace args) the information about arg ['class', 'method'] more usable than fatal error in application while trying to load class

I was suggesting a mere
if (! @\is_callable(...)) {

as a fix; I'm just worried about how to add a test against this issue in our test suite.

I got my hands dirty with the autoloader in #1276 and probably fixed it!

Still reproduced. Same check in serializeValue() without handling exception


Version up boto3

Current coverage is 75.43%

Merging #44 into master will not affect coverage as of 3a35f77

@@            master     #44   diff @@
======================================
  Files            5       5
  Stmts          171     171
  Branches        21      21
  Methods          0       0
======================================
  Hit            129     129
  Partial          2       2
  Missed          40      40

Review entire Coverage Diff as of 3a35f77

Powered by Codecov. Updated on successful CI builds.


Cant find tone typings

Hi, typings search tone --ambient isn't finding anything. Has something changed?

Hey! Thanks for the report. I recently changed the structure a little and missed the new source in the API - fixed with https://github.com/typings/api/commit/ed1f19d1b5a640d020e57d1c3ed995d20f45c1fd.

Hi thanks for helping. It's finding tone now but if I try to install I get this error. Is there something else that needs to be updated to allow global typings to work?
luke$ typings install tone --ambient
? Found tone typings for undefined. Continue? Yes
typings ERR! message Invalid registry source: global

typings ERR! cwd /Users/luke/Sites/Theremin
typings ERR! system Darwin 14.3.0
typings ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/typings/dist/bin/typings-install.js" "tone" "--ambient"
typings ERR! node -v v5.5.0
typings ERR! typings -v 0.6.6

@lukephills Can you try the latest Typings version. This should be resolved with https://github.com/typings/typings/commit/45b3cd461c9d2153dd3139cf0452e7dfcb97b2b0.


:before is a valid notification timer, but FC032 does not allow :before timers.

According to the feature for FC032, :delayed, :immediately, and :immediate are recognized as valid, but :before is also valid according to the Chef docs.

Same issue in PR #441


Expose DBClusterIdentifier

We deploy a DB per-client (as part of a complete dedicated stack) so the ability to name them simplifies administration considerably.  I have this working on an internal branch and can PR to this repo once these changes are merged (to avoid conflicts).

sounds great. I will wait with the next release until this issue and #7 are closed?

merged


chore(test): allow to throw non error object

Description:
different to jasmine, mocha's async callback requires Error object explicitly. This PR updates custom interface bit to allow to throw any object (i.e throw 'bad';) by wrap into error object.
p.s : in case of explicit call to async callback, it's still requires to deliver error object.
Related issue (if exists):

Merged with 9c29409.


How to add?

Hey
How do I add this bot?
~Dan

Hey,
You can't just add this bot to your server, this is only the source code.
To set it up:

Create a new Application/Bot User here.
Copy the 'Token' from the app and paste it into the last line of toDoBot.py
Run the bot using just Python / using Docker (Dockerfile provided)
Get your Cliend ID from your perviously created Discord app, and insert it into this URL, and after it visit this URL and add the bot to your server.
https://discordapp.com/oauth2/authorize?&client_id=<CLIENT ID>&scope=bot&permissions=0

Ok. thanks. Any plans on making this bot freely available like some of the bigger bots?

@pixelflowxyz  did you add this to Heroku? If yes, please be kind enough to share.

In the end, no I didn't. Thanks though.
On 13 Feb 2018 4:47 p.m., "Pramesh Bajracharya"<EMAIL_ADDRESS>wrote:

@pixelflowxyz https://github.com/pixelflowxyz did you add this to
Heroku? If yes, please be kind enough to share.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/xdavidhu/toDoBot/issues/1#issuecomment-365327567, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AZbF5R-VyHQyBvTh-yhdOk8voslxlDm4ks5tUbykgaJpZM4PSEsh
.


The presence of a function prevents another function from running

What is the problem?
The presence of a function, foo, prevents another function, bar, from running properly, apparently because one of the arguments of bar unifies with the definition of foo.
How to reproduce it?
Run the following metta file (via metta.py)
;; Define foo
(= (foo $x) $x)             ; prevents bar from running properly

;; Define bar
(: bar (-> Atom Atom Atom))
(= (bar $query $rule)
   (let* (((: $ructor (-> $premise $conclusion)) $rule)
          ((: ($ructor $proof) $conclusion) $query)
          ((: $proof $premise) (: a A)))
          $query))

;; Test bar
!(bar (: ($f a) B) (: f (-> A B)))

What should normally be expected?
[(: (f a) B)]

What is output instead?
[]

Remark
If the definition of foo is removed then the output is the expected one.

Looks like it is a duplicate of #242 , closing as now it works as expected.


[FEATURE] Widget Support

Category:  Feature
Overview
This is a big one...
Many users have requested the option to display dynamic content within their dashboard. This PR introduces this feature, in the form of widgets.
It includes:

Several structural changes and improved  code re-use, to allow for widget development
30+ pre-built widgets, to display info from public APIs, and some self-hosted services
Custom widgets, to support (nearly) any service using embedded content, iframes or API responses
A CORS proxy endpoint, to support apps that cannot make client-side network requests
Docs, schema updates, tests and refactoring

Issue Number #229 #198 #231 #370 #383
New Vars
A new item, under section has been added. section.widgets accepts an array or widgets.
Screenshot
See here for screenshots and alpha widget docs
Code Quality Checklist (Please complete)

[X] All changes are backwards compatible
[X] All lint checks and tests are passing
[X] There are no (new) build warnings or errors
[X] (If a new config option is added) Attribute is outlined in the schema and documented
[X] (If a new dependency is added) Package is essential, and has been checked out for security or performance
[X] Bumps version, if new feature added

Things to Note:

Widgets are still in Alpha, there's a bit more work to do before they'll be stable
It's not yet possible to manage (add or edit) widgets directly through the UI. This will come later
Support for additional self-hosted services will come soon
This PR should (hopefully) be merged within the next week

Yay, ready for merge!!


Examples of error responses seem completely useless.

They seem to be simple copies of the schema (or a pseudo-schema) e.g.
    {
        "message": "string",
        "documentation_url": "string"
    },

I checked and didn't find any occurrence of "documentation_url": "string". Where exactly did you find it?
Note that the Open API files in https://github.com/octokit/openapi/tree/main/generated are all generated, we do not manually maintain them in this repository. They are downloaded from https://github.com/github/rest-api-description/tree/main/descriptions using an hourly cron job. If you find any problems with the JSON Schema itself that is not part of the x-octokit extension, could you please file it in in https://github.com/github/rest-api-description?

I checked and didn't find any occurrence of "documentation_url": "string". Where exactly did you find it?
Note that the Open API files in https://github.com/octokit/openapi/tree/main/generated are all generated, we do not manually maintain them in this repository. They are downloaded from https://github.com/github/rest-api-description/tree/main/descriptions using an hourly cron job. If you find any problems with the JSON Schema itself that is not part of the x-octokit extension, could you please file it in in https://github.com/github/rest-api-description?

Note that the Open API files in https://github.com/octokit/openapi/tree/main/generated are all generated, we do not manually maintain them in this repository. They are downloaded from https://github.com/github/rest-api-description/tree/main/descriptions using an hourly cron job.

Note that the Open API files in https://github.com/octokit/openapi/tree/main/generated are all generated, we do not manually maintain them in this repository. They are downloaded from https://github.com/github/rest-api-description/tree/main/descriptions using an hourly cron job.


Added ZIP.ch iOS app to showcase

Added ZIP.ch a phonebook for Switzerland.
Android app coming soon

Thanks for sending this pull request. According to the guidelines in that file, "infoLink" must be one of:
1/ An English-language news article discussing the app, built either by a funded startup or for a public company
2/ An English-language technical post on a funded startup or public company blog discussing React Native
I am going to close this, but if you have one of those two things, feel free to reopen with a new link.


fix(button): hover styles being applied to disabled buttons

Fixes the button hover styles being applied, even if a button is disabled.
Fixes #866.

@crisbeto LGTM if you can rebase

Sorry @jelbourn, I was away last week. It's rebased now.


Remove the operator-sdk settings

Changes
We already remove the operator-sdk from the build and test processes, but we still have settings and info include the operator-sdk, we should also remove them to avoid the confusion.
Submitter Checklist

[x] Includes tests if functionality changed/was added
[x] Includes docs if changes are user-facing
[x] Set a kind label on this PR
[x] Release notes block has been filled in, or marked NONE

/kind cleanup
Release Notes
Clean operator-sdk related settings and info from CI and document

/retest


Polymorphic expressions can produce surprising, poorly-performing code

https://roc.zulipchat.com/#narrow/stream/231635-compiler-development/topic/Polymorphic.20expressions.20considered.20tricky.20icky.20very.20picky/near/318132034
Here is an example of polymorphic expressions yielding subpar runtime code:
chompWhile : (List U8) -> (List U8)
chompWhile = \input ->
        index = List.walkUntil input 0 \i, _ -> Break i

        if index == 0 then
            input
        else
            List.drop input index

This is derived from a real program Luke wrote, in https://github.com/roc-lang/roc/issues/4717.
Note that both index and 0 are generic numbers, and there is no link between all three of index, 0, and how index appears in List.drop (the last of which specialized index to Nat). That means we end up compiling this program as the equivalent of
chompWhile : (List U8) -> (List U8)
chompWhile = \input ->
        index1 : I64
        index1 = List.walkUntil input 0 \i, _ -> Break I

        index2 : Nat
        index2 = List.walkUntil input 0 \i, _ -> Break i

        if index1 == 0i64 then
            input
        else
            List.drop input index2

This is not what I would expect from a surface look at the program.. and definitely not what we would want!
I can think of a way we can compile this differently (at the expense of compile time) so that only the Nat specialization is needed, but I think the better option is just not allowing polymorphism here.
Another example: https://github.com/roc-lang/roc/issues/4772 would produce two calls to Decode unless we were clever
Suggestion: disallow polymorphic expressions, except in particular cases like e.g. numbers.
This needs a proper design of both rules and implementation first.

Design: https://rwx.notion.site/Let-generalization-Let-s-not-742a3ab23ff742619129dcc848a271cf

Fixed with weakening


libpst: 0.6.75 -> 0.6.76

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/libpst/versions.
meta.description for libpst is: "A library to read PST (MS Outlook Personal Folders) files"
meta.homepage for libpst is: "https://www.five-ten-sg.com/libpst/"
meta.changelog for libpst is: ""
Updates performed

Version update

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

/nix/store/9q8psrdp6fy8jl19147j5kwd3xs2f9im-libpst-0.6.76/bin/lspst passed the binary check.

/nix/store/9q8psrdp6fy8jl19147j5kwd3xs2f9im-libpst-0.6.76/bin/readpst passed the binary check.

/nix/store/9q8psrdp6fy8jl19147j5kwd3xs2f9im-libpst-0.6.76/bin/pst2ldif passed the binary check.

/nix/store/9q8psrdp6fy8jl19147j5kwd3xs2f9im-libpst-0.6.76/bin/nick2ldif passed the binary check.

4 of 4 passed binary check by having a zero exit code.

4 of 4 passed binary check by having the new version present in output.

found 0.6.76 with grep in /nix/store/9q8psrdp6fy8jl19147j5kwd3xs2f9im-libpst-0.6.76

found 0.6.76 in filename of file in /nix/store/9q8psrdp6fy8jl19147j5kwd3xs2f9im-libpst-0.6.76

directory tree listing: https://gist.github.com/7cfed2130f3c3a7c67e693f5c0d8fed7

du listing: https://gist.github.com/1259e84af1ec362825217e2deecc955e

Rebuild report (if merged into master) (click to expand)

15 total rebuild path(s)

5 package rebuild(s)

5 x86_64-linux rebuild(s)
4 i686-linux rebuild(s)
2 x86_64-darwin rebuild(s)
4 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
almanah
evolution
evolution-ews
evolutionWithPlugins
libpst

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/9q8psrdp6fy8jl19147j5kwd3xs2f9im-libpst-0.6.76 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A libpst https://github.com/r-ryantm/nixpkgs/archive/2ee4c6b9612a5fc79aad7fd2271273f281100878.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/9q8psrdp6fy8jl19147j5kwd3xs2f9im-libpst-0.6.76
ls -la /nix/store/9q8psrdp6fy8jl19147j5kwd3xs2f9im-libpst-0.6.76/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

5 packages built:

almanah
evolution
evolution-ews
evolutionWithPlugins
libpst

Maintainer pings
cc @tohl for testing.

conflict


Error when Run Web

I succeed to build with ghcjs.
stack setup --stack-yaml stack-ghcjs.yaml
stack build --stack-yaml stack-ghcjs.yaml
But I get errors when I run web/build.sh:
➜  pact git:(master) ✗ ./web/build.sh
~/code/Blockchain/pact/.stack-work/dist/x86_64-linux/Cabal-<IP_ADDRESS>_ghcjs/build/pact/pact.jsexe ~/code/Blockchain/pact
all.js:2448: WARNING - Redeclared variable: dbits
var dbits;
    ^^^^^

all.js:2528: WARNING - Redeclared variable: BI_FP
var BI_FP = 52;
    ^^^^^^^^^^

all.js:5201: WARNING - Redeclared variable: n
            var n = next();
                ^^^^^^^^^^

all.js:5249: WARNING - Redeclared variable: j
      for(var j=0;j<nsrts;j++) {
              ^^^

all.js:6200: WARNING - Redeclared variable: i
            for(var i=0;i<t.length;i++) h$resetThread(t[i]);
                    ^^^

all.js:6369: WARNING - Redeclared variable: work
    var work, mark = h$gcMark;
        ^^^^

all.js:6411: WARNING - Redeclared variable: i
                    for(var i=0;i<s.length;i++) work[w++] = s[i];;
                            ^^^

all.js:7194: WARNING - Redeclared variable: b
  var b = h$bigFromWord(b);
      ^^^^^^^^^^^^^^^^^^^^

all.js:24681: WARNING - Variable referenced before declaration: i
    re.lastIndex = i;
                   ^

all.js:14320: ERROR - Variable h$runInitStatic declared more than once. First occurence: all.js
function h$runInitStatic()
         ^^^^^^^^^^^^^^^

all.js:21083: ERROR - Variable h$dumpRes declared more than once. First occurence: all.js
function h$dumpRes()
         ^^^^^^^^^

all.js:23928: ERROR - Variable h$jsstringTake declared more than once. First occurence: all.js
function h$jsstringTake(n, str) {
         ^^^^^^^^^^^^^^

all.js:23940: ERROR - Variable h$jsstringDrop declared more than once. First occurence: all.js
function h$jsstringDrop(n, str) {
         ^^^^^^^^^^^^^^

all.js:23969: ERROR - Variable h$jsstringTakeEnd declared more than once. First occurence: all.js
function h$jsstringTakeEnd(n, str) {
         ^^^^^^^^^^^^^^^^^

all.js:23980: ERROR - Variable h$jsstringDropEnd declared more than once. First occurence: all.js
function h$jsstringDropEnd(n, str) {
         ^^^^^^^^^^^^^^^^^

all.js:24971: ERROR - Variable h$listProps declared more than once. First occurence: all.js
function h$listProps(o) {
         ^^^^^^^^^^^

all.js:27496: ERROR - Variable h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e declared more than once. First occurence: all.js
function h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e()
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

8 error(s), 9 warning(s)
./web/build.sh: cannot ccjs all.js --compilation_level=ADVANCED_OPTIMIZATIONS

The ccjs (google closure compiler) version is:
➜  pact git:(master) ✗ ccjs --version
Closure Compiler (http://github.com/google/closure-compiler)
Version: v20170521
Built on: 2017-05-22 12:38

Do you know where I'm wrong?

After I remove the compiling flag --compilation_level=ADVANCED_OPTIMIZATIONS in web/build.sh and it build successfully.
But when open the web,  the default example can't compile and report error:
ERROR: "Setting transaction data"
:1:0:(env-keys "ABCD")

: "Invalid arguments, received [\"ABCD\"] for (keys:[string] -> string)"

Thanks for looking at this. It looks like it's working with your change there, the pact code is now the problem (should be (env-keys ["ABCD"])) ... which has been fixed in the next version which I'm releasing very soon; I'll try your fix and report back.

So, bad news, LTS 8.x stack is not supported for GHCJS at all, so Pact 2.2.x won't be supported in GHCJS for a while.

Correction, I mean there are not the prebuilt ghcjs tarballs working yet ...

GHCJS build is working again with Pact 2.3.2; 40a04ab restored typechecker so full functionality is present. Closing


skip_serializing_if is a footgun

skip_serializing_if only works if the serialization format is self-describing. It does not work with e.g. bincode. This is a footgun in a codebase that uses more than one serialization format at different points, because I can add skip_serializing_if to something that gets fed into the JSON serializer and it works fine, but when it gets fed into the bincode serializer it produces garbage that will fail to deserialize.
I think the solution here is for Serializers to declare whether or not they support skipping things and then make skip_serializing_if only have an effect for serializers that can tolerate it.

I think I would prefer not to build an additional toggle into the Serializer API for this.
This is a subissue of a limitation that data structures which need to follow a different codepath for serializing to different formats are not well supported by serde.

The lack of this feature causes problems when building serializable data structures to work with an arbitrary serializer.  We have to feature-gate our code to disable skip_serializing_if on the "bincode" feature, which is really awkward.

What if skip_field were still passed the field so that the serializer can decide to serialize it anyway?

Filed https://github.com/serde-rs/serde/issues/2012 for that idea

This continues to be a source of woe.


Add User-Agent to R recent search

The other samples for Recent Search all include an HTTP User-Agent header, this PR simply adds a UA header in the same format to the R sample for consistency.

that's a good point - not my original sample :-) but can rename and add to this PR.

This looks to me. Do we need another person, to review before merging?


Add merging to OSGi Feature specification

A common operation that needs to be done with OSGi Feature Models is the operation to merge them.
This became apparent in the the discussions around the Feature Launcher, where a requirement is that new Features should be added to an existing system already running a feature.
However feature merging is also common in other use-cases, for example when creating a distribution of a product. A product might have different variations, all sharing a common baseline. Differences could be target environments (e.g. a 'cloud' distribution vs a locally runnable distro) or different feature sets such as the 'basic' product, vs the product augmented with 'addons'.
These are 2 examples where merging is needed. Some of these apply to a build process while other apply to a launcher environment.
To make merging available in all these contexts, the OSGi Feature API should be extended to support merging.
Merging also comes with the complication of conflicts. If multiple features being merged declare the same bundle in different versions, which version do we pick? Or if the same configuration PID is specific by multiple features, what will the resulting configuration be?
For this reason a merge operation also needs to have a pluggable merge conflict resolution mechanism, so that the right conflict resolution mechanism can be provided by the API user for their context.

@timothyjward fyi

@bosschaert and I discussed this before starting the issue. Merging is important, and needs to provide the full set of input necessary to complete the merge. Specifically:

The data from the existing feature definition (e.g. the list of FeatureConfigurations)
The runtime information that corresponds to this feature (e.g. the actual configuration names/values being used)
The data from the feature definition being merged in (e.g. the list of FeatureConfigurations)

Some basic rules could be provided out of the box:

MINE - use the existing runtime (2) information as is
THEIRS - use the data from (3) as is
MERGE_MINE - new key/values from (3) are merged in, updated and removed key values from (3) are merged if and only if the runtime (2) and existing feature (1) have the same value for that key, values that only exist in the runtime (2) are kept
MERGE_THEIRS - new, updated and removed key/values from (3) are merged in, values that only exist in the runtime (2) are kept


Add templates for Cargo.toml

This PR addresses issue #3459.
New features
This change would add a --template NAME option to the new and the init subcommand where you can specify some template, say optimized. Cargo then looks for a file templates/optimized.toml in your .cargo folder.
These may be the contents of a template file:
[dependencies]

[profile.release]
lto = true

This would create the following Cargo.toml file:
[package]
name = "helloworld"
version = "0.1.0"
authors = ["My Name", "Some other name"]

[dependencies]

[profile.release]
lto = true

If you don't specify a the template flag, the Cargo.toml stays the same as before.
What was done already

I've already managed to add this flag to the USAGE string (I didn't know about docopt so it took me a while to figure out how cargo does the parsing).
A resolve_template_content function has been added
The template content will be inserted in the Cargo.toml

What has to be done
I'd need some help because I'm not very familiar with how cargo works internally.
Also, please tell me if my code is not idiomatic, I'm using Rust since a month :).
I think there is still documentation that has to be updated (including the manpages).
Also, is there a string containing the path to the .cargo folder?
When the template file does not exist, I get An unknown error occured. Is there a simple way to just display the error without getting rid of the nice ?-Syntax?

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.
If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.
Please see the contribution instructions for more information.

This may conflict with https://github.com/rust-lang/cargo/pull/3004 because that pull request is using the --template flag as well.

Is there anybody who could help to fix the error message or tell me how to do that? @alexcrichton
As for the cargo directory, I'd use cargo_home from util/config.rs if that is the right function.

Thanks for the PR @torkleyy! I think that to solve https://github.com/rust-lang/cargo/issues/3459 though we may not want to take the route of templates (like in #3004) as I think templates tend to have a different use case and/or connotations.
I don't currently off the top of my head know how to best solve #3459 but I don't think it should be templates.

I'm going to close this due to inactivity, but feel free to resubmit!


[BUG] Need to fix apps_state_budget_ratio = 0.495 < 1.0

We need to fix apps_state_budget_ratio = 0.495 < 1.0

Fixed!


Adds The Punisher

Checklist for submitting a pull request to Movies For Hackers:

[x] I have carefully read and comply with the Contributing Guidelines of this repo.
[x] I have searched the PRs of this repo and believe that this is not a duplicate.

Title: The Punisher
Link: http://www.imdb.com/title/tt5675620/
Genre: Action, Adventure, Crime
Rating: 9.0/10

Description: After the murder of his family, Marine veteran Frank Castle became a vigilante known as "The Punisher" with only one goal in mind, to avenge them.
The series also features the hacker Micro, who plays a major role in assisting Frank's revenge

While this is a good movie, it doesn't really hit the "hacker" vibe like the rest of the list.

Good TV show, and the character Microchip is indeed a hacker, but the hacking aspect of it is pretty minor. I'd say no.


Improving the contrast for library names

Fixes #1005
Changes:

Added a dark background to library name labels to increase the contrast so that it is readable to visually impaired or people with low vision.
Screenshots of the change:

Before:

After:

@outofambit @limzykenneth Please review this PR 🙂


NO-JIRA: Fix typo in error messages about OpenShiftAPIServer

OpenShiftAPIServer in extractOperatorSpec and extractOperatorStatus looks as a copy/pasta typo.

/assign @RomanBednar

/retest-required

/retest-required

/label docs-approved
/label px-approved

/label qe-approved


Sonar analysis for pull requests from forks

When someone opens a pull request from a fork (i.e., outside of the medplum/medplum repo), then the build fails.  That is because Github Actions does not share Github secrets for forked PR's, so SONAR_TOKEN is not available, and the SonarCloud step fails.
We experimented with changing pull_request to pull_request_target, as described here, but that has security risks.  A bad actor could submit a PR that completely changes the build scripts to perform an escalation attack as described here.  This was reverted back to pull_request.
The "right" fix requires the following:

Separate build.yml into two actions
First, the build step that builds and tests, triggered by pull_request, which does not share any secrets
Second, an analysis step, triggered by workflow_run, which sends data to Sonar and Coveralls

This will require some experimentation.  As others have found, the env variables in workflow_run are a weird hybrid of PR values and main branch values.

This will be complicated.  Need to stitch together a few high level concepts.  Taking notes...
When the build is complete, upload the code coverage data.  Something like this:
name: Upload data

on:
  pull_request:

jobs:
  upload:
    runs-on: ubuntu-latest

    steps:
      - name: Save PR number
        env:
          PR_NUMBER: ${{ github.event.number }}
        run: |
          mkdir -p ./pr
          echo $PR_NUMBER > ./pr/pr_number
      - uses: actions/upload-artifact@v2
        with:
          name: pr_number
          path: pr/

(source: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run)
Then, in the analysis step, download the code coverage data.  Something like this:
jobs:
  download:
    runs-on: ubuntu-latest
    steps:
      - name: 'Download artifact'
        uses: actions/github-script@v5
        with:
          script: |
            let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
               owner: context.repo.owner,
               repo: context.repo.repo,
               run_id: context.payload.workflow_run.id,
            });
            let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
              return artifact.name == "pr_number"
            })[0];
            let download = await github.rest.actions.downloadArtifact({
               owner: context.repo.owner,
               repo: context.repo.repo,
               artifact_id: matchArtifact.id,
               archive_format: 'zip',
            });
            let fs = require('fs');
            fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/pr_number.zip`, Buffer.from(download.data));

      - name: 'Unzip artifact'
        run: unzip pr_number.zip

Explicitly checkout the PR branch, not the main branch:
steps:
  - uses: actions/checkout@v2
    with:
      ref: ${{ github.event.workflow_run.head_branch }}
  - run: git branch
  - run: env

(source: https://stackoverflow.com/questions/63343937/how-to-use-the-github-actions-workflow-run-event)
Explicitly set sonar properties
sonar.pullrequest.key: ${{ github.event.workflow_run.pull_requests.number }}
sonar.pullrequest.branch: ${{ github.event.workflow_run.pull_requests.head.ref }}
sonar.pullrequest.base: ${{ github.event.workflow_run.pull_requests.base.ref }}

(source: https://github.com/data-integrations/azure/actions/runs/796666446/workflow)

https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts

https://securitylab.github.com/research/github-actions-preventing-pwn-requests/

https://community.sonarsource.com/t/how-to-use-sonarcloud-with-a-forked-repository-on-github/7363/28

This PR proves that it works!
https://github.com/medplum/medplum/pull/358


Fix condition for goToSlide on props receive

nextProps.slideIndex may sometimes be equal to 0, which results in falsy value.
nextProps.slideIndex should be tested as a number instead.

Well done


Bundler warns about non-writable files when in bundlerEnv

Is it expected that we get this sudo warning from bundler when using bundlerEnv?  Is there anything we can do about it?

[nix-shell:~/Developer/web]$ cat $(which rails)
#!/nix/store/q96lzix9isfmh9cbhb7ah65naq2v82z2-ruby-2.6.6/bin/ruby
#
# This file was generated by Nix.
#
# The application 'rails' is installed as part of a gem, and
# this file is here to facilitate running it.
#

ENV["BUNDLE_GEMFILE"] = "/nix/store/mnsbdlw174p05d8civb7ggixndl3wk5r-gemfile-and-lockfile/Gemfile"
ENV.delete 'BUNDLE_PATH'
ENV['BUNDLE_FROZEN'] = '1'

Gem.paths = { 'GEM_HOME' => "/nix/store/2hz3bsbi0ny5d7chsysac1m5avm7x9mf-gems-for-audioboom/lib/ruby/gems/2.6.0" }

$LOAD_PATH.unshift "/nix/store/vwmskqd95mq5hxb6jzgxplmmb79srf0n-bundler-2.1.4/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib"

require 'bundler'
Bundler.setup("default", "assets", "development", "test")

load Gem.bin_path("railties", "rails")

[nix-shell:~/Developer/web]$ rails console
Following files may not be writable, so sudo is needed:
  /nix/store/2hz3bsbi0ny5d7chsysac1m5avm7x9mf-gems-for-audioboom/lib/ruby/gems/2.6.0
  /nix/store/2hz3bsbi0ny5d7chsysac1m5avm7x9mf-gems-for-audioboom/lib/ruby/gems/2.6.0/bin
  /nix/store/2hz3bsbi0ny5d7chsysac1m5avm7x9mf-gems-for-audioboom/lib/ruby/gems/2.6.0/bin
  /nix/store/2hz3bsbi0ny5d7chsysac1m5avm7x9mf-gems-for-audioboom/lib/ruby/gems/2.6.0/build_info
  /nix/store/2hz3bsbi0ny5d7chsysac1m5avm7x9mf-gems-for-audioboom/lib/ruby/gems/2.6.0/build_info/libv8-7.3.492.27.1.info
  /nix/store/2hz3bsbi0ny5d7chsysac1m5avm7x9mf-gems-for-audioboom/lib/ruby/gems/2.6.0/build_info/mini_racer-0.2.9.info
  /nix/store/2hz3bsbi0ny5d7chsysac1m5avm7x9mf-gems-for-audioboom/lib/ruby/gems/2.6.0/build_info/nokogiri-1.10.9.info
  /nix/store/2hz3bsbi0ny5d7chsysac1m5avm7x9mf-gems-for-audioboom/lib/ruby/gems/2.6.0/build_info/sassc-2.2.1.info
  /nix/store/2hz3bsbi0ny5d7chsysac1m5avm7x9mf-gems-for-audioboom/lib/ruby/gems/2.6.0/bundler
  /nix/store/2hz3bsbi0ny5d7chsysac1m5avm7x9mf-gems-for-audioboom/lib/ruby/gems/2.6.0/cache
  /nix/store/2hz3bsbi0ny5d7chsysac1m5avm7x9mf-gems-for-audioboom/lib/ruby/gems/2.6.0/doc
  /nix/store/2hz3bsbi0ny5d7chsysac1m5avm7x9mf-gems-for-audioboom/lib/ruby/gems/2.6.0/extensions
  /nix/store/2hz3bsbi0ny5d7chsysac1m5avm7x9mf-gems-for-audioboom/lib/ruby/gems/2.6.0/gems
  /nix/store/2hz3bsbi0ny5d7chsysac1m5avm7x9mf-gems-for-audioboom/lib/ruby/gems/2.6.0/specifications
Running via Spring preloader in process 34287
Loading development environment (Rails <IP_ADDRESS>)
irb(main):001:0>

It seems harmless but annoying, pops up whenever you run a bundled gem executable.
Originally posted by @jdelStrother in https://github.com/NixOS/nixpkgs/pull/81442#issuecomment-611478478

Hit this too. It looks like we should patch bundler to check if we are in a bundlerEnv, and silence this warning.

I made an upstream pr https://github.com/rubygems/rubygems/pull/4032 that would allow us to set an environment variable to avoid these messages.

In the meantime, I use a hack to silence the warning:
{
  bundler_ = ruby: rec {
    inherit ruby;
    name = "${gemName}-${version}";
    gemName = "bundler";
    version = "2.2.11";
    source = {
      remotes = ["https://rubygems.org"];
      sha256 = "1izx6wsjdm6mnbxazgz1z5qbhwrrisbq0np2nmx4ij6lrqjy18jf";
      type = "gem";
    };
    # silence an annoying warning about sudo being needed:
    postInstall = ''
      sed -i -e '/if sudo_needed/I,+2 d' $out/${ruby.gemPath}/gems/${gemName}-${version}/lib/bundler.rb
    '';
  };

  bundler = bundler_ pkgs.ruby_2_7;
}


Allow to build against bitflags 2.x

How did this not break locally? The addition of the #[derives] unfortunately breaks compat with 1.3... so it's not mergeable as is.

Ah... it's only appearing as a problem when running cargo test, that's why I didn't catch it locally.

Let's go with a semver compatible change first.


EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

I am getting EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
How to fix it?

That's because the JavaScript file is not found. You need to run the gulp task.


Applied fixes from StyleCI

This pull request applies code style fixes from an analysis carried out by StyleCI.

For more information, click here.

Changes Unknown when pulling cb500dc277aae23ab80adb24849ea47867f5f00d on analysis-8jlWOB into ** on develop**.

Closing this, I'll add a config file to use the PSR2 preset instead.
(PSR2 is in the guidelines.


Parsing Issue #16 change const to var (for support nodejs 0.10.x)

Fix for https://github.com/NodeRedis/node-redis-parser/issues/16

My 2 cents on this -
@alexanderMykhailenko suffered the same issue today in our setup. Maybe add a revert for 09ca39e007f9b001196fb9d7035db481811b47b0 to catch this?
@BridgeAR I assume with that commit you want to deprecate older node versions. However, maybe that can be done in a semver major version?
If you are intending to not support older node versions then @alexanderMykhailenko can you also update package.json in this PR to reflect the correct node engine? Happy to set up a new PR with these, but thought it would be cleaner to do it in one place.

@alexanderMykhailenko Oh, I pushed my commit before looking into the pull requests. Sorry, about that :/
@neeharv I do want to remove support at some point in near future but I did not intend to do this right now and I would do it as a semver major. It was a oversight.

@BridgeAR Thanks


Remove unnecessary templating.

I am okay with this approach if others prefer it, the reason for all the generics was to make the API easier to extend.  For instance, in this pull request, if you call client.post(uri).body(inputstream) it returns a BodyRequestObject instead of a PostRequest, and you would not have access to post specific methods like digest.
You can get around that by adding overrides for every API method (which you started on), which is more duplication when extending.  So it's just a trade off, and the initial discussion with @ajs6f on the ticket went the other way.  But I do find this approach much more readable.

It is more readable, but that's only because the API isn't complete (to my mind). Until there is a single starting point (and not a bunch of constructors) the utility of the generics isn't visible.

How much more extension do you have in mind? It seems like you have already implemented the HTTP methods in this PR. I would suggest polymorphism over this sort of templating.

Even before extension, polymorphism fails to provide true factory methods instead of constructors.

I'm not sure which way to go with this.  After playing around with andrews branch some I haven't noticed major issues.  There are other API end points that I think should be added to this client in the future, namely transaction creation, versioning, etc, but they would not benefit from extending existing implementations.  Use cases for extending this client aren't readily coming to mind, but that may just be a failure of imagination on my part.

Have you provided the single-method starting pöint? If so, I wouldn't worry too much about the rest, myself.

FcrepoResponse response = FcrepoClient
    .withAuthentication(user, pass, host)
    .throwExceptionOnFailure()
    .create() // Returns FcrepoClient
    .post(uri) // Returns PostBuilder
    .withBody(body, type)
    .perform();

does this seem like what you have in mind?  Or starting with FcrepoClient.create

More or less. (I would break host out of withAuthentication.)

There's another conversation to be had here about whether a client that offers methods like post and put is actually high-level enough to be a valuable artifact, but that's a separate conversation.

host is the authentication scope host, so I'll make sure it has a more sensible variable name but keep it in withAuthentication, and make it optional.
I agree that having methods like post is not very user friendly in terms of indicating what the purpose of the operation is.  We could rename the starting method names based on purpose rather than http method, which would mainly mean splitting PUT into two starting methods.


Docker build has no -v option

In your documentation located here - https://docs.docker.com/reference/commandline/cli/#build - there's no option to pass through -v, which I believe would be very useful for developers who are trying to debug Docker build configuration issues.
Any thoughts on when this option might be available?

Hi!
If you are reporting a new issue, PLEASE make sure that does not have any duplicates already open.
We would like to take this time to remind you of the information we need to debug the problem you are seeing. This is an automated response so if this ticket is not about a bug, do not fret.
If you fail to provide this information within 7 days, we will close this because we cannot debug your issue. We can reopen whenever the information is provided.
Thank you.
Please see:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues
Description of problem:

`docker version`:

`docker info`:

`uname -a`:

Environment details (AWS, VirtualBox, physical, etc.):

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual Results:

Expected Results:

Additional info:

#ENEEDMOREINFO

Hi, thanks for submitting.
This is by design.
To troubleshoot build issues, the failed container and image are preserved for inspection.


[bug] mat-form-field: Missing validation on change without blur

Bug, feature request, or proposal:
Bug
What is the expected behavior?
When you enter (focus) a mat-form-field the validation errors should occur in the form field when changing the value.
What is the current behavior?
When you enter the form field the validation errors are not shown, until the form field loses the focus (on blur) the first time.
After that you can enter the form field again and the validation errors are shown correctly.
What are the steps to reproduce?
https://stackblitz.com/edit/angular-kqgcii
What is the use-case or motivation for changing an existing behavior?
Every validation.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
newest versions.
Is there anything else we should know?
no

This is the actually the desired behaviour.
https://material.angular.io/components/input/overview#changing-when-error-messages-are-shown
You can change the behaviour by changing the ErrorStateMatcher as explained in the documentation

Hmm. Thnx alot.
Seems like I've somehow failed to see this in the documentation.


Feature/fix user gem attr

If user uses user_installs::gems attribute, target gems are installed as root user.
Therefore user can't delete those gems as user permission.
I fixed this problem.

FWIW, this still seems to happen

OK, I'll check again

Closing due to inactivity.
If this is still an issue please reopen or open another PR.
Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help!
Thanks,
Sous-Chefs

Closing due to inactivity.
If this is still an issue please reopen or open another PR.
Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help!
Thanks,
Sous-Chefs


Minor improvement for default theme

While implementing the default theme on my website, I found this little issue with the background color on tokens. Here is the way it looks before applying the change proposed in this PR for JavaScript syntax:

Notice that behind = and || there is a slight difference in the background color. This is how it looks after applying this change:

Although I believe this doesn't depend on a specific syntax, here is example with Rust:
Before (look at the =):

After:

The change is minimal, just remove a background CSS rule from theme/prism.css. Just to give more context, I went through all the other template files (theme/prism-*.css) and realized they aren't specifying this rule.

That's not a bug, it's a feature.
I know that this sentence is usually used ironically but for real: it's a feature. I agree that it looks somewhat... special and you aren't the first one to report this as a bug but the white background is intentional.

@RunDevelopment interesting.


Truncate module title .dnn_menu_label

Description of problem
The module label displayed in .dnn_menu_label pulls from the module title. If the module title becomes lengthy it can cause an overflow onto other modules or extend the page length in unintended ways. Long module display labels add to visual clutter that can be controlled or standardized.
While you can go and update the title in the module settings, we can't expect the end user to do this. Having some sort of truncate would be great. Some modules (2sxc in this example) pull the contents "favorite" input control to display in the .dnn_menu_label.
Description of solution

Implement a standard truncate limit of 15 characters for displaying in the .dnn_menu_label.
Create a definition that can be managed in DNN to set the truncate limit for maximum flexibility.

Description of alternatives considered

Implement css to achieve truncate with the following markup
(found here: /admin/menus/ModuleActions/ModuleActions.css:185)
.div.actionMenu ul.dnn_mact li.dnn_menu_label > div{    max-height: 120px;   white-space: nowrap;   overflow: hidden;   text-overflow: ellipsis; }
This markup uses the height parameter to determine the length of the truncate but would not provide customization like a DNN definition could.

Screenshots
Current View
Proposed View
Additional context
Affected browser

[x] Chrome
[x] Firefox
[x] Safari
[x] Internet Explorer
[x] Edge

I for one find the vertical label ridiculous, we do have room in the dotted drag bar to have it horizontal.

I for one find the vertical label ridiculous, we do have room in the dotted drag bar to have it horizontal.

That sounds like an even better solution than a truncate.


ValueError: ',' is not a valid scope name

data_type_dict = {'numerical': ['lexical__avg_sen_len', 'lexical__std_sen_len', 'lexical__lex_diversity', 'characters__,' ,'characters__,d', 'characters__,m', 'label']}
output_var = 'label'
auto = Automater(data_type_dict=data_type_dict, output_var=output_var)
I have a few numerical features, where the one named characters__, seems to cause problem due to the comma symbol. Any way to get around this without renaming the features?

~/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py in name_scope(self, name)
4002         # op name regex, which constrains the initial character.
4003         if not VALID_OP_NAME_REGEX.match(name):
-> 4004           raise ValueError("'%s' is not a valid scope name" % name)
4005     old_stack = self.name_stack
4006     if not name:  # Both for name=None and name="" we re-set to empty scope.
ValueError: 'input_characters,' is not a valid scope name

Or could you try a pip install -U keras-pandas, and re-running your code?

Addressed in 3.0.1


Redis fixes

Various fixes for the RedisAsyncConnection EventLoop:

Replaced pipe fd by ML::Wakeup_Fd to avoid EAGAIN on write (it does not happen anymore)
The EventLoop now handles POLLHUP to avoid spinning indefinitely

Looks good.

Make sure to upstream the fix to the rtbkit/rtbkit and resolve the issue.


Fix test

Fixes the default value for test equations.

LGTM.

This change is not correct.  The Current value was set earlier in line 192, to the value that was passed to it from the URL options (the last saved value).  Setting it to 0 will override that.
Can you say what problem you are trying to solve?  Some browsers do their own form input caching, and it may be that that is causing some issues.  The correct solution may be to set the value of the input field explicitly to the lab.Current value, not set lab.Current to 0.
@pkra, you were a bit quick off the draw to merge this.  Did you test it out to see if it worked as expected?  I didn't have a chance to look through the code to see what the changes were, even.

It gave me a NaN as value return value for this.Current.
Even the initial value of Lab.Current was NaN.
Volker
On 10 August 2015 at 22:30, Davide P. Cervone<EMAIL_ADDRESS>wrote:

This change is not correct. The Current value was set earlier in line 192
https://github.com/mathjax/MathJax-RespEq/blob/6f1ddd73a265f7f04b6c03370ca3fbe9fb742a2d/Semantics-Lab/Semantic-Lab.js#L192,
to the value that was passed to it from the URL options (the last saved
value). Setting it to 0 will override that.
Can you say what problem you are trying to solve? Some browsers do their
own form input caching, and it may be that that is causing some issues. The
correct solution may be to set the value of the input field explicitly to
the lab.Current value, not set lab.Current to 0.
@pkra https://github.com/pkra, you were a bit quick off the draw to
merge this. Did you test it out to see if it worked as expected? I didn't
have a chance to look through the code to see what the changes were, even.
—
Reply to this email directly or view it on GitHub
https://github.com/mathjax/MathJax-RespEq/pull/10#issuecomment-129614128
.

What does the URL look like?

Perhaps changing line 192 to be
  Lab.example.value = defaults[1]; Lab.Current = parseInt(defaults[1]) || 0;

would do the trick.

Right, I can now see the assignment (that statement is double parked ;-)
Still parseInt("") is NaN.
Maybe change line 172 to
var defaults = [null,0,
On 10 August 2015 at 23:33, Davide P. Cervone<EMAIL_ADDRESS>wrote:

Perhaps changing line 192 to be
Lab.example.value = defaults[1]; Lab.Current = parseInt(defaults[1]) || 0;
would do the trick.
—
Reply to this email directly or view it on GitHub
https://github.com/mathjax/MathJax-RespEq/pull/10#issuecomment-129634900
.

Sure, that works, too.


Can't build on MacOSX via Macports installed PHP

Output
Error: Configure failed:
The last 5 lines in the log file:
checking size of int... (cached) 4

checking size of long... (cached) 8

checking size of long long... (cached) 8

checking size of off_t... 0

configure: error: off_t undefined; check your library configuration

Expected Result
No error, I gess
Command
Paste your phpbrew install command here (be sure to install with --debug flag, e.g. phpbrew --debug install)
phpbrew --debug install 5.6 +default

Build Log
https://gist.github.com/GabeAtWork/3a13c04f786164ff75d6564bf2ceea61
Platform
OS: OS X 10.12.6
Installing PHP: 5.6, 7.1

I had the same problem and I reinstall openssl before i run
phpbrew install 7.1.9 +default +fpm +pdo +mysql +sqlite +gd +openssl=/usr/local/opt/openssl -- --with-gd=shared --with-jpeg-dir=/usr/local/Cellar --with-png-dir=/usr/local/Cellar --enable-gd-native-ttf --with-freetype-dir=/usr/local/Cellar

reinstall openssl command line.
brew reinstall openssl

Same problem here.
Platform: OSX 10.12.6
Wanted to install 7.1.11. Had the same error with other versions I tried too.
What I did to somehow understand what exactly failed I looked in the running processes while phpbrew was running and found the whole ./configure commmand:
./configure
'--cache-file=/Users/hauke/.phpbrew/cache/config.cache'
'--prefix=/Users/hauke/.phpbrew/php/php-7.1.11'
'--with-config-file-path=/Users/hauke/.phpbrew/php/php-7.1.11/etc'
'--with-config-file-scan-dir=/Users/hauke/.phpbrew/php/php-7.1.11/var/db'
'--disable-all' '--enable-phar'
'--enable-session'
'--enable-short-tags'
'--enable-tokenizer'
'--with-pcre-regex'
'--with-zlib=/usr'
'--enable-dom'
'--enable-libxml'
'--enable-simplexml'
'--enable-xml'
'--enable-xmlreader'
'--enable-xmlwriter'
'--with-xsl'
'--with-libxml-dir=/usr/local/opt/libxml2'
'--enable-opcache'
'--enable-bcmath'
'--with-bz2=/usr'
'--enable-calendar'
'--enable-cli'
'--enable-ctype'
'--enable-dom'
'--enable-fileinfo'
'--enable-filter'
'--enable-shmop'
'--enable-sysvsem'
'--enable-sysvshm'
'--enable-sysvmsg'
'--enable-json'
'--enable-mbregex'
'--enable-mbstring'
'--with-mhash=/usr/local'
'--with-mcrypt=/usr/local'
'--enable-pcntl'
'--with-pcre-regex'
'--with-pcre-dir=/usr/local'
'--enable-pdo'
'--with-pear=/Users/hauke/.phpbrew/php/php-7.1.11/lib/php/pear'
'--enable-phar'
'--enable-posix'
'--with-readline=/usr/local/opt/readline'
'--enable-sockets'
'--enable-tokenizer'
'--with-curl=/usr'
'--with-openssl=/usr/local/opt/openssl'
'--enable-zip'
'--enable-bcmath'
'--enable-calendar'
'--enable-mbstring'
'--enable-pcntl'
'--enable-sockets'
'--enable-zip'
'--with-bz2=/usr/local/lib'
'--with-mhash=/usr/local/lib'
'--with-pcre-regex'
'--with-libxml-dir=/usr/local/opt/libxml2'
'--with-pdo-mysql'
'--with-readline=/usr/local/opt/readline'
'--with-curl'
'--with-openssl=/usr/local/opt/openssl'
'--with-mysqli'
'--with-mcrypt'
'--with-pear'

With this I tried a "divide & conquer" approach to find out which toggle was responsible for the configure: error: off_t undefined; check your library configuration error message.
The culprit is the zip extension contained in the +default variants.
I'm not sure why but building PHP with the zip extension seems to be a known problem for some users since I found a bug report on this: https://bugs.php.net/bug.php?id=68302
When I tried to compile PHP with phpbrew without the default variant but by specifying all contained variants but the zip extension it compiled.
phpbrew install php-7.1.11 +bcmath +bz2 +calendar +cli +ctype +dom +fileinfo +filter +ipc +json +mbregex +mbstring +mhash +mcrypt +pcntl +pcre +pdo +pear +phar +posix +readline +sockets +tokenizer +xml +curl +openssl

Ok, short addendum before I finally go into my weekend...
I just thought maybe it's the new XCode 9 and installed XCode 8.3.3 again.
Look here how to work with multiple XCodes: https://medium.com/@hacknicity/working-with-multiple-versions-of-xcode-e331c01aa6bc
After switching back to XCode 8.3.3 everything is back to normal. I can compile PHP like a god now. ;-)


Generics in app state

I am continuing to work with your crate, it's really useful.
One thing where I am stuck: I have an object from an external crate that comes in as an &mut imp SomeTrait. It is a storage interface. Is there any way I can store this in the application state? I tried, but I get into trouble with Send and Sync traits.

Sorry for late reply, I was on vacation when the bug was filed and the notification slipped me by.
I agree that this scenario could be a challenge. The app in Impl<App> as I envisioned it is intended to be an owner of application state or "configuration", like storing the address to the database you connect to. I haven't tested putting lifetime constrained types in Impl, or &mut stuff, I admit I never thought of this usecase!
It sounds a little tricky. Send/Sync bounds are inserted everywhere to make this work with tokio work-stealing, with currently no way to opt out IIRC.
What I would do to test a proof of concept would be to write a small test app, apply the normal #[entrait] annotations, and then do expand macro recursively (w/rust-analyzer) on all these sites and replace your app with the desugared code. Then try to modifiy the bounds and see if you can somehow make it compile. If it's possible, we could look at new entrait options to modify code generation to suit your usecase.

I gave up on this for now, as I can just pass the &mut impl SomeTrait around as an additional variable. Except for elegance this does the job just as well.
What I do is use Impl to store some mutexed variables, which works nicely out of the box.


mpris-enabled branch

(NOTE: Mpris is not enabled in this branch. See mpris-enabled)!

Not sure if you just forgot to publish this branch. I was going to proceed with using Jarek's fork but thought I would check here first as it seems mpris-enabled should exist due to #6.

Removed the branch temporarily. Should return by 1.6.0

How is it coming? I'm starting to add more to my build again, but I noticed your repo picking up steam. I figured maybe I could makes some PRs to this repo instead. Do you need assistance integrating Mpris?

I shouldn't have an issue adding it myself, but feel free to make a PR cause that would help a lot.


fix: typo in aks-log-collector glob pattern for cilium-cni

What type of PR is this?
/kind bug
What this PR does / why we need it:
Collect from /var/log/cilium-cni* instead of /var/log/cillium-cni* (one 'l' in cilium).
Which issue(s) this PR fixes:
Fixes #
Requirements:

[x] uses conventional commit messages
[ ] includes documentation
[ ] adds unit tests
[ ] tested upgrade from previous version

Special notes for your reviewer:
Release note:
Update aks-log-collector script with correct glob pattern for cilium-cni logs.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 79.343%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
2293

Relevant Lines:
2890

💛  - Coveralls


chore: remove outdated TODOs

Codecov Report
Patch coverage has no change and project coverage change: -31.69% :warning:

Comparison is base (ecb02cc) 60.14% compared to head (25987c6) 28.46%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #803       +/-   ##
===========================================
- Coverage   60.14%   28.46%   -31.69%
===========================================
  Files          48       48
  Lines        3914     3914
===========================================
- Hits         2354     1114     -1240
- Misses       1267     2641     +1374
+ Partials      293      159      -134

Flag
Coverage Δ

integration-test
28.46% <ø> (-31.69%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.
see 29 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


[Snyk] Security upgrade @babel/core from 7.21.8 to 7.22.6

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to fix one or more vulnerable packages in the `npm` dependencies of this project.
Changes included in this PR

Changes to the following files to upgrade the vulnerable dependencies to a fixed version:

frontend/package.json

Vulnerabilities that will be fixed
With an upgrade:

Severity
Priority Score (*)
Issue
Breaking Change
Exploit Maturity

658/1000  Why? Proof of Concept exploit, Recently disclosed, Has a fix available, CVSS 5.3
Regular Expression Denial of Service (ReDoS) SNYK-JS-SEMVER-3247795
No
Proof of Concept

(*) Note that the real score may have changed since the PR was raised.
Check the changes in this PR to ensure they won't cause issues with your project.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings
📚 Read more about Snyk's upgrade and patch logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Regular Expression Denial of Service (ReDoS)

Codecov Report

Merging #16 (d968ab0) into dev (51e61b4) will not change coverage.
The diff coverage is n/a.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@           Coverage Diff           @@
##              dev      #16   +/-   ##
=======================================
  Coverage   58.31%   58.31%
=======================================
  Files         897      897
  Lines       24867    24867
  Branches     4508     4508
=======================================
  Hits        14500    14500
  Misses       9943     9943
  Partials      424      424

Flag
Coverage Δ

unittests
58.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


returned non-zero exit status 1.

@mrlooi thank you for your great job.
Running the code for multi-gpu has got this error:
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-u', 'tools/train_net.py', '--local_rank=1', '--config-file', 'configs/rotated/my_config.yaml']' returned non-zero exit status 1.

torch 1.4.0
torchvision 0.5.0
cuda 10.1

Hey, I haven't tried torch 1.4. Posting the error trace would be helpful.
The config needs to update the number of GPUs, and make sure that batch size is a multiple of the GPUs

Hi
Thanks for your reply.
I used :
export NGPUS=8
python -m torch.distributed.launch --nproc_per_node=$NGPUS tools/train_net.py --config-file "configs/rotated/my_config.yaml"
I have not found any item in config.yaml whic represent batch size!
MODEL:
META_ARCHITECTURE: "GeneralizedRCNN"
WEIGHT: "catalog://ImageNetPretrained/MSRA/R-50"
ROTATED: True
BACKBONE:
CONV_BODY: "R-50-FPN"
RESNETS:
BACKBONE_OUT_CHANNELS: 256
RPN:
USE_FPN: True
ANCHOR_STRIDE: (4, 8, 16, 32, 64)
PRE_NMS_TOP_N_TRAIN: 2000
PRE_NMS_TOP_N_TEST: 1000
POST_NMS_TOP_N_TEST: 1000
FPN_POST_NMS_TOP_N_TEST: 1000
STRADDLE_THRESH: -1
ANCHOR_ANGLES: (-90, -60, -30)

BBOX_REG_WEIGHTS: (1.0, 1.0, 1.0, 1.0, 1.0)

ROI_HEADS:
USE_FPN: True
# weights on (dx, dy, dw, dh, dtheta) for normalizing rotated rect regression targets
BBOX_REG_WEIGHTS: (10.0, 10.0, 5.0, 5.0, 1.0)

USE_SOFT_NMS: True
SOFT_NMS:
  METHOD: 1

ROI_BOX_HEAD:
POOLER_RESOLUTION: 7
POOLER_SCALES: (0.25, 0.125, 0.0625, 0.03125)
POOLER_SAMPLING_RATIO: 2
FEATURE_EXTRACTOR: "FPN2MLPFeatureExtractor"
PREDICTOR: "FPNPredictor"
ROI_MASK_HEAD:
POOLER_SCALES: (0.25, 0.125, 0.0625, 0.03125)
FEATURE_EXTRACTOR: "MaskRCNNFPNFeatureExtractor"
PREDICTOR: "MaskRCNNC4Predictor"
POOLER_RESOLUTION: 14
POOLER_SAMPLING_RATIO: 2
RESOLUTION: 28
SHARE_BOX_FEATURE_EXTRACTOR: False
MASK_ON: True
MASKIOU_ON: True
ROI_MASKIOU_HEAD:
USE_NMS: True
DATASETS:
TRAIN: ("coco_my_dataset",)
TEST: ()
DATALOADER:
SIZE_DIVISIBILITY: 32
SOLVER:
BASE_LR: 0.001
WEIGHT_DECAY: 0.0001
STEPS: (60000, 80000)
MAX_ITER: 90000
OUTPUT_DIR: "checkpoints/rotated/synthetic_images_msrcnn"

Hi
@mrlooi Thanks for your reply
This is te error appeared while I run it:
Traceback (most recent call last):
File "tools/train_net.py", line 196, in
main()
File "tools/train_net.py", line 189, in main
model = train(cfg, args.local_rank, args.distributed)
File "tools/train_net.py", line 89, in train
arguments,
File "/home/nima/rotated_bbox/rotated_maskrcnn/maskrcnn_benchmark/engine/trainer.py", line 71, in do_train
loss_dict = model(images, targets)
File "/home/nima/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/nima/.local/lib/python3.6/site-packages/torch/nn/parallel/distributed.py", line 459, in forward
self.reducer.prepare_for_backward([])
RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one. This error indicates that your module has parameters that were not used in producing loss. You can enable unused parameter detection by (1) passing the keyword argument find_unused_parameters=True to torch.nn.parallel.DistributedDataParallel; (2) making sure all forward function outputs participate in calculating loss. If you already have done the above two steps, then the distributed data parallel module wasn't able to locate the output tensors in the return value of your module's forward function. Please include the loss function and the structure of the return value of forward of your module when reporting this issue (e.g. list, dict, iterable). (prepare_for_backward at /pytorch/torch/csrc/distributed/c10d/reducer.cpp:518)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x33 (0x7fb6b1f9d273 in /home/nima/.local/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #1: c10d::Reducer::prepare_for_backward(std::vector<torch::autograd::Variable, std::allocatortorch::autograd::Variable > const&) + 0x734 (0x7fb6fcc829e4 in /home/nima/.local/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
frame #2:  + 0x691a4c (0x7fb6fcc71a4c in /home/nima/.local/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
frame #3:  + 0x1d3ef4 (0x7fb6fc7b3ef4 in /home/nima/.local/lib/python3.6/site-packages/torch/lib/libtorch_python.so)

Have a look at defaults.py, IMS_PER_BATCH (should be a multipler of NGPUs)
As for the error you posted, haven't seen that before. Might have to do with different versions of torch, back then I used torch 1.1

@mrlooi Thanks
And what torchvision version?

I believe 0.4 - 1.1

@mrlooi
The error when running on my own dataset
RuntimeError: invalid argument 2: non-empty 3D or 4D input tensor expected but got: [0 x 1 x 28 x 28] at /pytorch/aten/src/THCUNN/generic/SpatialDilatedMaxPooling.cu:37.
IMS_PER_BATCH = 16
NGPU = 2
By changing IMS_PER_BATCH to 2, 4, 8 same issue appears

This is a separate issue.
See #21  https://github.com/mrlooi/rotated_maskrcnn/issues/21#issuecomment-600703061


Adds command pa app permission list

Closes #4645

Thank you, will try to review it ASAP

Hi Milan
Thanks for the review. I've changed your remarks (and left a comment at two remarks).
Could you, if you have no further questions or remarks, have another look?
Of we change our decision regarding the trimming of the output, I'll obviously change it 😉

Merged manually. Thank you for this awesome new command! 👏


moves ansible role to CH repo

replaces christiangda/ansible-role-amazon-cloudwatch-agent in companieshouse/rhel6-base-ami/ansible/requirements.yml
resolves DVOP-1946

Needs testing


Friday 08 December 2017  06:08:07 -0500 (0:00:00.138)       0:00:05.570 *******  fatal: [k8s-m]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).\r\n", "unreachable": true} ok: [k8s-w1] ok: [k8s-w2]

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

Environment:

Cloud provider or hardware configuration:

OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):

Version of Ansible (ansible --version):

Kubespray version (commit) (git rev-parse --short HEAD):
v2.3
Network plugin used:
Copy of your inventory file:
[kube-master]
k8s-m
[etcd]
k8s-m
[kube-node]
k8s-w1
k8s-w2
[k8s-cluster:children]
kube-node
kube-master
Command used to invoke ansible:
nohup ansible-playbook -i inventory/hosts cluster.yml
Output of ansible run:

fatal: [k8s-m]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).\r\n", "unreachable": true}
Anything else do we need to know:

i fix this issue。 the owner of my root folder is not root group，just excute his command： chown -R root：root /root。

Hi, I have the same issue, please provide me more info !
Thanks

the owner of my root folder is not root group，just excute his command： chown -R root：root /root。


Fix gym compatibility

Add new tests and fix ScheduleEnvs reset.

I added older versions of gym to github workflows. Gym 0.24 introduces an env_checker that raises warnings or even errors when the obs returned by step is not contained in observation_space. I disabled it for now since it raised some errors in the tests (some envs will need a revision if we want to enable this env_checker).

I commented out the reset function in BaseEnv since:

It doesn't call gym.Env.reset and is not compatible with its signature
It returns the entire output of step but reset should return only the ob
TrialEnv already implements reset


Resource utilization log

Jobs periodically upload upload a resource utilization log (json lines format)
The frontend can load this and show utilization graphs using plotly.

Codecov Report
Attention: 33 lines in your changes are missing coverage. Please review.

Comparison is base (744164d) 75.03% compared to head (d28a655) 75.18%.

Files
Patch %
Lines

python/dendro/sdk/_run_job.py
72.47%
30 Missing :warning:

...hon/dendro/sdk/_resource_utilization_log_reader.py
93.33%
2 Missing :warning:

python/dendro/compute_resource/_start_job.py
0.00%
1 Missing :warning:

Additional details and impacted files
@@                Coverage Diff                 @@
##           usage-tracking      #78      +/-   ##
==================================================
+ Coverage           75.03%   75.18%   +0.15%
==================================================
  Files                  67       68       +1
  Lines                4025     4126     +101
==================================================
+ Hits                 3020     3102      +82
- Misses               1005     1024      +19

Flag
Coverage Δ

unittests
75.18% <76.92%> (+0.15%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Drop and log unknown capabilities, log responses, deserialize with Pydantic

Logging API responses will help debugging issues reported by users, like https://github.com/skodaconnect/homeassistant-myskoda/issues/18
I started working on replacing pydantic with mashumaro but I'm not convinced yet. Pydantic does a lot of nice things and does them elegantly, like this additional validator which will drop unknown capabilities. It also enforces types and even coerces 'wrong' types into the desired type. So these validators to convert str to int aren't actually required. Use pydantic (.parse_raw()) to de-serialize the json responses.

Just noticed this includes/obsoletes #3

Yeah basically the same thing as #3


Slowing down Zotero when the Add-on is turned on

Debug log ID
8A9FQ6NR-refs-apse/6.7.165-7
What happened?
It looks like Better bibtex slows down Zotero 7 dramatically. I am using the latest released version of Zotero Beta 7 in Win 11. Every move including clicking the menu or importing new items takes a much longer responding time. It sounds similar to #2783, but on my side, you still get responses but very slow.
My entire team are heavy users of better bibtex, but right now we have to turn it on and off manually to maintain the basic function of Zotero. We'll appreciate it if a newer update could address this issue!

There's nothing that stands out in the log. My main suspicion would be auto-export, I'm working on a performance fix there but it's slow going. Try setting auto-export to "in idle", if it's the auto-export, that should make a big difference.

There's nothing that stands out in the log. My main suspicion would be auto-export, I'm working on a performance fix there but it's slow going. Try setting auto-export to "in idle", if it's the auto-export, that should make a big difference.

That's great because the performance fix I'm working on addresses this specific issue. Once that is done you should be able to use "On Change" without the slowdowns.

Just linking the original issue #2667

a build will drop on #2667 in a few minutes that has the performance fix; please follow that issue and comment there for further questions.


Not saying time info players ping etc.

So my tracker is broken its not saying time info players ping etc.

Known issue due to log file changes used to parse - see #141 for updates


Move to using SPDX Licence Format

@jetwhiz , as dicussed
I also changed Nabils email, as it was the old MIT contact address for him. I put the keylime groups io address instead.

Should we be on the "BSD-2-Clause" license instead of "MIT"?

Should we be on the "BSD-2-Clause" license instead of "MIT"?

Updated

@jetwhiz should be good now!


initialize variable failed to retrieve dynamic inputs

Describe the Bug with repro steps
Add initialize variable
Type in name of "InstanceId"
Change Type to "string"
Then there is no save, so hit the << to close insert.
Shows error: Failed to retrieve dynamic inputs. Error Details: 'Cannot read properties of undefined (reading '0')
What type of Logic App Is this happening in?
Consumption (Portal)
Are you using new designer or old designer
New Designer
Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg
Yes
Workflow JSON
No response
Screenshots or Videos
No response
Browser
Edge
Additional context
No response
AB#24994773

@RichardFoster2 do you have a video of the issue by any chance? I can't repro the problem based on your description
https://github.com/Azure/LogicAppsUX/assets/13208452/6495ad7f-754a-4d56-85ec-424133941220

Hi @RichardFoster2, this issue is currently being hotfixed, we are trying to have the fix rolled out to all regions by EoD
Feel free to try again tomorrow and if you're still running into the issue let us know!


Profiling does not seem to be working

From latest master: https://1661-49015296-gh.circle-artifacts.com/0/home/ubuntu/scratch/out/logs/run_stats.log#
All runtime_memory_gb is either "Unknown" or 0.0. I don't think this ever worked - this is the log from the PR enabling profiling: https://1652-49015296-gh.circle-artifacts.com/0/home/ubuntu/scratch/out/logs/run_stats.log#

The reason why profiling does not work is because the 'profile_runtime' execution config option is not set to true. This config option is only respected if it is set in a config file - not programmatically.

I'll check on this soon and reopen if it is still not working.


bpf: test: add some IPv6 DSR integration tests

Some IPv6 tests I didn't upstream as part of https://github.com/cilium/cilium/pull/22978. This looks a bit prettier now that we have pktgen support for IPv6 extension headers.

/test

https://jenkins.cilium.io/job/Cilium-PR-K8s-1.16-kernel-4.19/1473/ fail is https://github.com/cilium/cilium/issues/22749#issuecomment-1401682979.

/test-1.16-4.19


Write a GO program to convert time from 12-hour to 24-hour format

Description
Write a GO program to convert time from 12-hour to 24-hour format
Input  : 12:05:45PM
Output : 12:05:45

How to contribute

Save the solution in program/convert_time_from_12-hour_to_24-hour_format.go file
Add convert_time_from_12-hour_to_24-hour_format.go file in convert-time-from-12-hour-to-24-hour-format folder

!assign

Hey @MadhuS-1605,
This issue has been assigned to you for more than 15 days.
We are unassigning you from this issue.
If you are still interested in contributing to this issue, please get auto-assigned on the issue by commenting !assign again.
Thanks for your contributions :)


Support for new extended tweets

Hey, I've noticed recently that images attached to a tweet weren't always getting returned in the Entities object. From doing a quick search it looks like it's down to the new extended tweets feature. I've pasted some links below on what I've found so far.
https://twittercommunity.com/t/some-tweets-are-not-returning-media-entity/74979
https://dev.twitter.com/overview/api/upcoming-changes-to-tweets
https://twittercommunity.com/t/new-attachment-url-option-is-now-live-on-the-tweet-endpoints/74270
Cheers, Tom

Thanks for reporting :D
The Twitter API documentation doesn't seems to be fully updated at the moment, but I will look into adding support for this ;)

how i can retrieve email user?

@FabioRLeite Please create a new issue rather than posting a comment in an unrelated issue.
Anyways, you can read more about getting the email address here (which is only possible for the authenticated user): http://social.skybrud.dk/twitter/endpoints/account/getting-information-about-the-authenticated-user/


Remove Ubuntu20 mysql workaround

Description
Bug fix for #4799 - [Ubuntu] Issue with libstdc++ cannot allocate memory in static TLS block. Remove old workaround since it is not needed as new versions of MySQL are available
Related issue:
#4799
Check list

[x] Related issue / work item is attached
[x] Tests are written (if applicable)
[ ] Documentation is updated (if applicable)
[ ] Changes are tested and related VM images are successfully generated

/azp run ubuntu2004

Remove the init.d script too, as the deb distribution was incomplete and we had to port it manually from ubuntu.

@ddobranic this one https://github.com/actions/virtual-environments/blob/main/images/linux/scripts/helpers/mysql-service-helper.sh

/azp run ubuntu2004


chore: Project Addition by mohit-dhote #2193

Add a new project to the list
I want to add my project.
Fixed:- #2193
Record
✅ I have checked the existing issues
✅ I have read the Contributing Guidelines
✅ I agree to follow this project's Code of Conduct

there is no issue number

there is no issue number

I have added the issue no @priyankarpal please review the changes! thank you!

there are conflicts error please fix them

there are conflicts error please fix them

done

Due to various issues, I will have to close the PR. However, you can resubmit it after hacktoberfest.


Update changPV

This might need a backport also, not sure. I think I thought this was already in the release branch :see_no_evil:

The release branch is good, this is just on master.


[Matching Engine] Update the Matching Engine to include the distance and filters

Hello 👋,
This Pull Request adds more capability to the MatchingEngine vectorstore of GCP. It includes the similarity_search_by_vector_with_relevance_scores function and also filters to filter the namespaces when retrieving the results.

Description: Add filter in  similarity_search and add similarity_search_by_vector_with_relevance_scores method
Dependencies: None
Tag maintainer: Unknown

Thank you!

cc @tomaspiaggio @scafati98


Per-service access logs options

Do you want to request a feature or report a bug?
Feature
What did you expect to see?
The ability to configure access logs on a per-service basis rather than just globally.
This would allow logs to be redirected depending on the service, or include/exclude information required for that particular service.
In some cases (ie chatty services) it may be useful to switch off logging for a single container.
Where a service has no configured access log options, the global setting should be used instead.
Ideally, for Docker containers this should be able to be controlled dynamically via labels.
Ideally the implementation should expose the accesslog config options per container:
Eg:
 - "traefik.accesslog.enabled=true"
 - "traefik.accesslog.filePath=/path/to/container/logs/access.json"
 - "traefik.accesslog.format=json"
 - "traefik.accesslog.bufferingSize=100"
 - "traefik.accesslog.filters.statusCodes=200, 300-302"
 - "traefik.accesslog.filters.retryAttempts=true"
 - "traefik.accesslog.filters.minDuration=10"
 - "traefik.accesslog.fields.defaultMode=keep"
 - "traefik.accesslog.fields.defaultMode=keep"
 - "traefik.accesslog.fields.names.ClientUsername=drop"
 - "traefik.accesslog.fields.headers.defaultMode=keep"
 - "traefik.accesslog.fields.headers.User-Agent=redact"
 - "traefik.accesslog.fields.headers.Authorization=drop"
 - "traefik.accesslog.fields.headers.Content-Type=keep"

Hi.
We do not think this kind of task is not a part of traefik's responsibilities so we are not going to work on that. Especially since if we accept to work on this kind of feature, we would get many other requests in this domain from users having needs different than yours.
We recommend that you leave the task of processing logs to a dedicated log manager software that would get as input the log produced by traefik.