Google AMP (Accelerated Mobile Pages)

I am considering building this, and it is already on the wishlist (https://ideas.ghost.org/forums/285309-wishlist/suggestions/12437706-accelerated-mobile-pages)
What are the thoughts of the team, things I should consider, implications on themes etc.? Do you guys think this should this be included in Core or should it be implemented by theme builders or as a marketplace item...?
I believe ideally this should be in the core as it is a way to deliver optimized content for mobile users (Feels pretty much like "the front-end version of Ghost" to me), but it obviously has many implications to theme builders and restricts a lot of what we can do (i.e., Disqus). Still, I feel it's most likely worth it.

If you want to tackle it, that's fantastic :+1: There has been some discussion in the #dev channel on slack, so I recommend joining there - that's the best place to work through questions like this.
This is the kind of thing we usually build in labs in core to start with, see how it goes, and then make a decision how to move forward with it.
The first thing to do would be to identify exactly what AMP is in the context of Ghost. That means reading through the spec and identifying which parts are relevant / should be built into Ghost and if there are any parts which are not relevant, etc.
It is very preferable that all this gets written down in an outline of what will be implemented, a great similar example is the original issue for adding structured data. Writing it down means: 1) it's easy to write tests and see that the implementation matches the intention 2) if you get part way through and don't have time to finish someone else can easily pick up where you left of and 3) we can refer back to it in future if/when extending the feature to see how and why the existing one works.
Without a written description of the implementation, anyone looking at your PR or the code in future has to refer back to and read all of the AMP documentation to understand what you've done and why. It leaves a lot of things up in the air, and makes it much harder to be sure a PR is correct & mergable.
Would you be up for doing that first?

This sounds great!

why install ghost.js so inconvenient?

+1 +1 +1

I've been working with AMP since the beginning. I use AMP for my blog posts, implemented at the theme level.
AMP strictly forbids any kind of client-side scripting, offering AMP custom elements instead—so using the public API would become problematic. I remember when I started messing with AMP I was deliberately omitting {{ghost_head}} from my theme because it was including jQuery automatically.
Apart from the API access issue I mentioned, AMP is super simple to implement at the theme level. Adding it as a core feature would almost necessitate the creation of a secondary theme anyway, and I don't think that's the answer.
JSON+LD and meta tags are all permitted and even encouraged, so the structured data wouldn't need to be amended. I don't even use AMP on all of my pages and I control this using if/is blocks in handlebars.

so using the public API

Only if you use it via Ajax rather than the {{#get}} helper 😉

I think it is best done at the theme level

That may well be true, but perhaps there are additional features we can provide to make it easier to support? Something beyond the existing if/is blocks?

Only if you use it via Ajax rather than the {{#get}} helper 😉
Yes, that's true, I should have been clearer in how I expressed myself. I mainly use Ajax to return search results for the search controller I've added. Oh and for a Ajax'd contact form I added as well, but obviously both can work without Ajax so AMP need not cause too much trouble.

Something beyond the existing if/is blocks?
I think that would be pretty great. A helper like {{#amp}} <something> {{/amp}} or {{^amp}} <something> {{/amp}} would definitely be the best approach. Then the AMP boilerplate code would need to be added to he <head>—this could be done easily in helper/ghost_head.js but it might not belong there long term, might be better off as a separate amp_head.js helper.

Massive support signal from Google at the end of last month: the 2016 Founders' Letter mentions AMP as one of Google's major investments in the mobile web:

We also continue to invest in the mobile web—which is a vital source of traffic for the vast majority of websites. Over this past year, Google has worked closely with publishers, developers, and others in the ecosystem to help make the mobile web a smoother, faster experience for users. A good example is the Accelerated Mobile Pages (AMP) project, which we launched as an open-source initiative in partnership with news publishers, to help them create mobile-optimized content that loads instantly everywhere.

As a Developer Advocate at Google helping with PWA and AMP efforts, please let me know if there's anything we can do to help Ghost launch AMPed posts.

Integration of AMP for posts in Ghost
Hello everyone,
I will start now to integrate AMP for posts in Ghost and want to put out, what kind of changes I'm going to do. Especially when it comes to questions like theme development I'd love to hear your thought on that.
These are the major requirements:

The default template will be in Ghost core, but can be overridden by a custom amp.hbs template should be included in themes root directory, so developers can adjust the style to their themes, or create their own amp template.
We cannot import css, so it has to be inline or in the  section of the template as <style amp-custom>.
AMP support for posts only.
Modify/add/change ghost helpers to output content in amp html way (means, replace prohibited html tags with amp conform one and add width and height to every kind of media).
For every amp component we might use (animated images, embedded videos, depending on the original html content) we need to include the amp component for this specific amp tag in a <script> tag in our head!

Based on the requirements, these changes will be done to our codebase:
As soon, as the url has an appended /amp (e. g. https://myghostblog.com/my-blog-post/amp), we will render an amp.hbs template, which will provided in our Ghost core, but can be overridden by an amp.hbs template in themes root directory.
It is necessary to serve width and height properties for every kind of media. As we don't have a proper image handling yes (see #4453), I want to include a npm module called amperize (https://github.com/jbhannah/amperize or modify this version to a more suitable one) to simply get those properties. Plus, and even more important: his module will also translate our html to be amp conform.
Some helpers will need to be added or updated, to work with amp html:

{{ghost_head}} needs a canonical link to its according amp page
{{amp_head}} will output everything we need in our <head>, like our application/json+ld, the meta data and the mandatory script tag to load the AMP runtime and the script tags to load extended components.
{{amp_content}}: will output the html of the content, but amp conform. The html needs to be checked (see amperize module) and some tags have to be replaced for amp specific ones (<img> with <amp-img>, <img> with a .gif as a src with <amp-anim> and <iframe> with <amp-iframe>). This module returns also the necessary width and height property to all kind of media.

Most of the helpers can still be used, especially the {{post_class}} and {{body_class}}, so we're able to reuse the rendered classes in our inline css in <head>.

cool \0/

So loving this was a onside ring amp support myself

This is merged to amp branch, but will stay open until it's merged to master.

Is this real?

@PunKeel yes, very real 😊

Amazing!
Upgrade Ghost from 0.7.* (Yes, 1 year ago, I'm sorry) and SO AMAZING!
Thanks so much for intergating AMP feature to the core!


how to kill powerd process after uninstall gem ?

I can remove this process:
ps -ef | grep pow
0   932     1   0  2:39PM ??         0:00.06 /System/Library/CoreServices/powerd.bundle/powerd
504   935   417   0  2:39PM ttys000    0:00.01 grep pow

powder down now properly unloads powder. If you uninstall powder before running down, you can take a look in the source and run the command from there (this and this


[8.x] Add changingTo, changedTo in eloquent models

This PR intends to be the successor of the prior PR about changingTo and changedTo methods which initially created by @themsaid .
https://github.com/laravel/framework/pull/37434.
First of all, I would like to thank @themsaid for this initiative.
I felt that there is a need to create a separate PR for me to share how I would implement the feature.
And also I can get faster feedback from Laravel team and I can respond to their feedback effectively.
Also, the first PR becomes a long thread.
This PR supports the following:
$user->changingTo('name', 'zain');
$user->changingTo('score', 1);
$user->changingTo('score', fn ($score) => $score > 0); // supports callback as second parameter
$user->changingTo('items', [1, 2], [0, 1]);  // supports array casted attribute

changingToAny(), changedToAny()
This PR also adds new methods changingToAny() and changedToAny() to support multiple values seamlessly instead of using the same method.
$user->changingToAny('name', 'zain', ['mohamed', 'said']);
$user->changingToAny('name', ['zain', 'lara'], ['mohamed', 'said'])
$user->changingToAny('name', ['zain', 'lara'], 'mohamed');
$user->changingToAny('title', ['A', 'C'], ['BB', null]);

getPrevious()
This PR also add new method getPrevious($key=null).
I have a project where I upload photo for a user and upload to s3. I need to delete the previous photos in s3 after saving the new photos.
$user->photo = $request->file('photo')->store('photos', 's3');
$user->photo_thumbnail = $request->file('photo')->callMyResizeMacro()->store('photos', 's3');
$user->save();
$oldPhotos = Arr::only($user->getPrevious(), ['photo', 'photo_thumbnail']);
Storage::disk('s3')->delete($oldPhotos);

The most important feature here is we are able to get the previous attributes. This way we can effectively compare it to the new original attributes.
Other examples:
if ($subscription->changedTo('status', 'expired')) {
  $user->notify(new ExpiredSubscription($subscription);
}

if ($subscription->changedTo('status', 'new', 'expired')) {
  $user->notify(new RenewedSubscription($subscription);
}

Suggested revision:
I am seeing a flaw in the method signature. null is a valid $from value. So I am thinking to change to signature to something like this:
public function changingTo(...$params)
{
        $attribute = $params[0];
        $to = $attribute[1];
        // null is a valid $from value so we can use $params[2] to represent $from,
        // or maybe create new class like Undefined
       $from = array_key_exists(2, $param) ? $params[2] : new Undefined;
      // this way, we can compare if the given value is actually a null or there is no given value for $from
}

$subscription->changedTo('status', 'new');            // status is changed from any value to new
$subscription->changedTo('status', 'new', null);      // status is changed from null      to new
$subscription->changedTo('status', 'new', 'expired'); // status is changed from expired   to new

Coming soon... $from parameter can also be a callback
This is easy to implement.
$user->changingTo(
  'score',
  fn ($score) => $score > 0,
  fn ($score) => $score < 0
);

Coming soon... support accessor/mutators
class User {
  function getFullNameAttribute() {
    return "{$this->first_name} {$this->last_name}";
  }
}
// original first_name='John' and originail last_name = 'Doe';
$user->first_name = 'Peter';
$user->changingTo('full_name', 'Peter Doe'); // true
$user->changingTo('full_name', 'Peter Doe', 'John Doe'); // true

Question:
Maybe instead of getPrevious(), we can just use wormhole instead. So the example would be like this:
$user->photo = $request->file('photo')->store('photos', 's3');
$user->photo_thumbnail = $request->file('photo')->callMyResizeMacro()->store('photos', 's3');
$user->save();
$oldPhotos = Arr::only();
Storage::disk('s3')->delete($user->wormhole()->only(['photo', 'photo_thumbnail']));

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.


Support for non-rust projects.

I find cargo-watch to be a really useful tool and I find I want similar functionality in other domains.  It is quite common for me to run a command when a folder changes.  I tried this:
cargo watch -c -q -- just build

inside a non-Rust project.  Unsurprisingly, it didn't work and complained about not finding the project root.
I was wondering if there could be a flag that allows cargo-watch to run in a non-Rust project?

No. But watchexec (which cargo watch uses under the hood) exists for exactly this!


[#342] Setup 'bundler-audit' gem and fix vulnerabilities

Closes #342
In this PR I set up bundler-audit gem. I found 2 vulnerable gem versions and updated them.

I merged this but it seems to be causing the terrastories_web_1 container to crash with this error:
bundler: failed to load command: rails (/usr/local/bundle/bin/rails)
web_1  | Bundler::GemNotFound: Could not find bundler-audit-0.6.1 in any of the sources
web_1  |   /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.6/lib/bundler/spec_set.rb:91:in `block in materialize'
web_1  |   /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.6/lib/bundler/spec_set.rb:85:in `map!'
web_1  |   /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.6/lib/bundler/spec_set.rb:85:in `materialize'
web_1  |   /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.6/lib/bundler/definition.rb:171:in `specs'
web_1  |   /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.6/lib/bundler/definition.rb:238:in `specs_for'
web_1  |   /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.6/lib/bundler/definition.rb:227:in `requested_specs'
web_1  |   /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:108:in `block in definition_method'
web_1  |   /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:20:in `setup'
web_1  |   /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.6/lib/bundler.rb:107:in `setup'
web_1  |   /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.6/lib/bundler/setup.rb:20:in `<top (required)>'
web_1  |   /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
web_1  |   /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'

I reverted to a previous commit locally and the container ran fine so I think it is related to this new gem. I've put a PR in to revert this merge temporarily while we figure this out. Thanks

I have reopened these changes in 387. They can be merged as-is with no modification.
Per @MxOliver's issue: I was able to reproduce by doing the following:

Creating container from master.
Shutting container down
Checking out new branch from the revert PR
Restarting the old/existing container before the gem was added
Verified: Container crashed on boot.

However, the Heroku deploy was successful with no build issues.
Since the docker builds the container via the script and it does not automatically take on changes from configuration changes, such as new gems, the error that was encountered is expected and resolved locally using the docker-compose build command. This error is also documented in the FAQ linked from the SETUP guide && common errors & gotchas section.


Fixes env.rb and support files load order

Summary
Fixes the load order of env.rb files
Details
According to The Cucumber Book on pp. 129-130:

Just like features/step_definitions, Cucumber will load all Ruby files it finds in features/support. This is convenient, because it means you don't need to pepper require statements everywhere, but it does mean that the precise order in which files are loaded is hard to control. In practice, this means you can't have dependencies between files in the support directory, because you can't expect that another file will have already been loaded. There is one exception to that, a special file called env.rb.
The file features/support/env.rb is always the very first file to be loaded when Cucumber starts a test run.

This is also extened such that any env.rb file located in descendant support folders are also loaded before other *.rb files in support folders.
However, when attempting to create a better port of Cucumber in the Pester PowerShell testing framework, I found this load ordering to not be correct.
This commit fixes the order in which files in support folders are loaded so that:

the features/support/env.rb file is always loaded first, if found
other env.rb files located in descendent support folders under features are loaded second
all other *.rb files in descendant support folders are loaded

Motivation and Context
For one, the most authoritative, canonical reference, The Cucumber Book states that this is how Cucumber behaves. But in addition to that, the book states a very good reason for this behavior: in order to help control the load order of files (through the use of require).
How Has This Been Tested?
A new unit test has been added to ensure that env.rb files are loaded in the correct order.
Types of changes

[ ] Refactor (code change that does not change external functionality)
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

I'm actually not sure if this should be categorized as a breaking or non-breaking change. Changing the load order of files could potentially break tests which depend on the current behavior. The question is, how many tests would be written to depend on the load order, since that would in most cases, be a bad idea. It's probably best to label this as a breaking change—but ultimately, I'll leave this decision up to the maintainers.
Checklist:

[x] I've added tests for my code
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.

👍 thanks!


Questions about podman 1.4.3

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
Currently podman 1.4.0 released via package on atomic ppa.  However 1.4.3 is already in release.
One of the features is a much better performance in I/O heavy environments.

What does it mean compared to 1.3.2?  I currently run ceph in podman and it is I/O intensive.
Will 1.4.3 package built any time soon?

I'll poke @lsm5 about a fresh release on the PPA.
On a test system with 100% pegged I/O on the partition Podman was using, we saw execution times for simple Podman commands go down from ~90 seconds to ~4 seconds. This is mostly accomplished through streamlining the fastpath - there are still many things which will cause slower performance (for example, launching containers will not be significantly sped up - but commands like ps or inspect will be).

@mheon: Any updates on 1.4.3?

building now..

@lsm5 the build doesn't appear on PPA yes

On Thu, Jun 27, 2019 at 10:14:21AM -0700, alitvak69 wrote:

@lsm5 the build doesn't appear on PPA yes

It will, once it's done, fighting some other fires too, I'll let you know once
the build is ready
--
Lokesh
IRC, GitHub: lsm5
GPG: 0xC7C3A0DD
https://keybase.io/lsm5

Can we build our own debian package? I also need to upgrade podman to version 1.4.2, but only 1.4.0 in ppa.

I just built 1.4.3 for 18.04 (16.04 to follow), should be published in a bit.
@mritd in case you're interested in building your own or if you want to package it for vanilla debian, untar this tarball and look in the debian/ directory.

@lsm5 Thank you for your help.
I am not familiar with the debian package build, I just used fpm to create the debian package. Does the official have tools such as scripts for quickly creating installation packages for different Linux distributions? (e.g. make package)


Implement exponentiation as a builtin method to neo3-boa

Summary or problem description
Neo added an exponentiation opcode
Do you have any solution you want to propose?
Add it as a builtin
Where in the software does this update applies to?
Builtin methods

I think it would be good if there is a mapping not only for the built-in pow() but also for the expression base ** exp


Diagram Connections

As a user, I want to be able to select connections to view details.
ACs:

[ ] 1) it is possible to select "lines / wires" to see details in sidebar (via click)
[ ] 2) display connected IED details similar to IED selection

Hints:

there are often two cables for a connection
sometimes there are more than two cables (which we can ignore for now)

Blocker Questions:

Which messages run over which cables?

We won't implement 2) in favor of

https://github.com/sprinteins/oscd-plugins/issues/17


Remove the context inheritance feature

Attention! It is breaking change!!!
I think the context inheritance feature is over-engineering. See #20 and #29 for more details. This feature will be removed in version 3.0
plugins {
    id("io.github.ermadmi78.kobby")
}

kobby {
    kotlin {
        entity {
            // Will not be available since version 3.0!
            contextInheritanceEnabled = true
        }
    }
}

Available since release 3.0.0-beta.01


Fancy Zones failing

Microsoft PowerToys version
0.67.0
Installation method
PowerToys auto-update
Running as admin
Yes
Area(s) with issue?
FancyZones
Steps to reproduce
Dual monitors. Zones setup via editor. Windows in place, not modified when monitors powered down. Once monitors are powered back up, windows are bunched up on secondary monitor.
✔ Expected Behavior
Windows to stay in place.
❌ Actual Behavior
Once monitors are powered back up, windows are bunched up on secondary monitor.
Other Software
No response

Hi @grimley, does it happen with all windows or with those that were snapped (or not snapped)?
/needinfo

I have a custom layout with 5 zones that span 2 monitors

There are 2 zones on my main monitor (1)

There are 3 zones on my secondary monitor (2)

5 windows are kept snapped in place (at all times) with Fancy Zones (when the PC is restarted for whatever reason, the windows are snapped back into place, one by one)

The monitors are turned off at the end of the work day (powered down - not placed on standby by Windows)

When the monnitors are powered up in the morning, the windows that were placed in the 2 zones on the main monitor have moved to the second monitor (where they overlap the set zones there). They must then moved back (with the shift key) to the zones on the main monitor.

(Not the end of the world obviously, but this was not occurring a few updates ago. Thank you for your work.)
On 2023-02-27 7:47:21 AM, Seraphima Zykova @.> wrote:
Hi @grimley [https://github.com/grimley], does it happen with all windows or with those that were snapped (or not snapped)?
/needinfo
—
Reply to this email directly, view it on GitHub [https://github.com/microsoft/PowerToys/issues/23814#issuecomment-1446266917], or unsubscribe [https://github.com/notifications/unsubscribe-auth/ACMSFQWEHTD7NROGFMJ36M3WZSO5PANCNFSM6AAAAAAUQEBXCI].
You are receiving this because you were mentioned.Message ID: @.>
[133c4ad7-5bc6-46b5-9003-3dd026d0cca6]

Can you please attach a /bugreport?


MongooseServerSelectionError: getaddrinfo EAI_AGAIN mongodb

Good day sir.
Please assist me with this issue when connecting mongo docker to the mongoose to start the server. I'm new to docker and I'm trying to connect mongo docker to mongoose but apparently, things are not working so well. Your assistance would be highly appreciated.
Error:

MongooseServerSelectionError: getaddrinfo EAI_AGAIN mongodb
at NativeConnection.Connection.openUri (/home/app/node_modules/mongoose/lib/connection.js:824:32)
at /home/app/node_modules/mongoose/lib/index.js:380:10
at /home/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:41:5
at new Promise ()
at promiseOrCallback (/home/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:40:10)
at Mongoose._promiseOrCallback (/home/app/node_modules/mongoose/lib/index.js:1225:10)
at Mongoose.connect (/home/app/node_modules/mongoose/lib/index.js:379:20)
at connectDB (/home/app/connections/database.js:4:18)
at start (/home/app/server.js:31:9)
at Object. (/home/app/server.js:39:1) {
reason: TopologyDescription {
type: 'Unknown',
servers: Map(1) { 'mongodb:27017' => [ServerDescription] },
stale: false,
compatible: true,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
logicalSessionTimeoutMinutes: undefined
},
code: undefined
}

mongo.yaml
version: "3"
services:
mongodb:
image: mongo
ports:
- 27017:27017
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=password
mongo-express:
image: mongo-express
depends_on:
- mongodb
restart: always
ports:
- 8080:8081
environment:
- ME_CONFIG_MONGODB_ADMINUSERNAME=admin
- ME_CONFIG_MONGODB_ADMINPASSWORD=password
- ME_CONFIG_MONGODB_SERVER=mongodb
- ME_CONFIG_MONGODB_HOSTNAME=localhost
  server.js

  const express = require("express");

const app = express();
const bodyParser = require("body-parser");
const path = require("path");
// Routes and controllers
const router = require("./routes/route");
const controller = require("./controllers/controller");
const connectDB = require("./connections/database");
const User = require("./models/User");
app.use(express.json());
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
extended: true,
limit: "100000mb",
parameterLimit: 10000000
}));
app.use("/public", express.static(path.join(__dirname, "assets")));
app.set("views", __dirname + "/views");
app.set("view engine", "ejs");
app.get("/", async (req, res) => {
res.render("index");
});
app.use("/api/v1/test", router);
const PORT = 3000;
const start = async () => {
try {
await connectDB("mongodb://admin:password@mongodb");
app.listen(PORT, () => console.log(Server is listening to port ${PORT}));
} catch(error) {
console.log(error);
return error;
}
}
start();
Thank you.

Your same issue? https://www.reddit.com/r/mongodb/comments/x5h9cw/mongooseserverselectionerror_getaddrinfo_eai/
Seems like the mongo container isn't running, what do the logs show for that one?
I'm not able to reproduce with your docker-compose file
$ docker-compose up -d
Creating mongo_mongodb_1 ... done
Creating mongo_mongo-express_1 ... done

$ docker-compose logs 2>&1 | tail -n 5
mongodb_1        | {"t":{"$date":"2022-09-06T16:02:09.195+00:00"},"s":"I",  "c":"NETWORK",  "id":23015,   "ctx":"listener","msg":"Listening on","attr":{"address":"<IP_ADDRESS>"}}
mongodb_1        | {"t":{"$date":"2022-09-06T16:02:09.195+00:00"},"s":"I",  "c":"NETWORK",  "id":23016,   "ctx":"listener","msg":"Waiting for connections","attr":{"port":27017,"ssl":"off"}}
mongodb_1        | {"t":{"$date":"2022-09-06T16:02:11.667+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"<IP_ADDRESS>:50582","uuid":"ee51f193-d383-4c21-b60a-8a6fbd0bd881","connectionId":1,"connectionCount":1}}
mongodb_1        | {"t":{"$date":"2022-09-06T16:02:11.681+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn1","msg":"client metadata","attr":{"remote":"<IP_ADDRESS>:50582","client":"conn1","doc":{"driver":{"name":"nodejs","version":"3.7.3"},"os":{"type":"Linux","name":"linux","architecture":"x64","version":"4.19.0-18-amd64"},"platform":"'Node.js v12.22.7, LE (legacy)"}}}
mongodb_1        | {"t":{"$date":"2022-09-06T16:02:11.712+00:00"},"s":"I",  "c":"ACCESS",   "id":20250,   "ctx":"conn1","msg":"Authentication succeeded","attr":{"mechanism":"SCRAM-SHA-256","speculative":true,"principalName":"admin","authenticationDatabase":"admin","remote":"<IP_ADDRESS>:50582","extraInfo":{}}}

You could also try asking over at the Docker Community Forums, Docker Community Slack, or Stack Overflow. Since these repos aren't really a user-help forum


Feature request: Could you please add to support random object sizes (ceil, floor) for WRITE OP, like PutObject

We're interested in random object size PutObject tests with two parameters rangeUpper and rangeLower values.
With them, we can upload objects with size objects (rangeLower <= object size <= rangeUpper)  randomly.
Thank you very much.

Does the -uniformDist parameter serve the purpose you were looking for?


[active bug] Setup of sensor platform fails

First of all: Thanks for this great integration!
Since yesterday, the tgtg platform can't setup sensors for me anymore. The stack trace indicates the API does require to solve a captcha, which can't be served obviously.
My first instinct would be the API is applying a rate limit, but I have an update_interval of 90 seconds, which imo is far from enough to warrant rate limiting.
So my second guess is TGTG changed their API and the integration needs to be updated, hence this issue.
Any help is much appreciated!
Stack trace:
Error while setting up tgtg platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/tgtg/sensor.py", line 67, in setup_platform
    add_entities([TGTGSensor(each_item_id)])
  File "/config/custom_components/tgtg/sensor.py", line 87, in __init__
    self.update()
  File "/config/custom_components/tgtg/sensor.py", line 180, in update
    self.tgtg_answer = tgtg_client.get_item(item_id=self.item_id)
  File "/usr/local/lib/python3.9/site-packages/tgtg/__init__.py", line 244, in get_item
    self.login()
  File "/usr/local/lib/python3.9/site-packages/tgtg/__init__.py", line 121, in login
    self._refresh_token()
  File "/usr/local/lib/python3.9/site-packages/tgtg/__init__.py", line 111, in _refresh_token
    raise TgtgAPIError(response.status_code, response.content)
tgtg.exceptions.TgtgAPIError: (403, b'<title>apptoogoodtogo.com</title>
Please enable JS and disable any ad blocker
\n')

Hi @CantBeCorrect
Thanks for your nice words, glad that it's useful 😊
I can also reproduce the error, which is coming from the upstream module as well - see this reply
The fix is to update useragents, which today are defined in the tgtg library. So as soon as an update come, I'll update this module.
I want also to be able to define useragents manually in Home Assistant, so we are less reliant on tgtg updates.
I'll try to do it in the coming days.

As a very temporary fix, I successfully added a custom user agent to the TgtgClient. (From https://github.com/ahivert/tgtg-python/issues/154#issuecomment-1158059839):
def setup_platform(
    hass: HomeAssistant,
    config: ConfigType,
    add_entities: AddEntitiesCallback,
    discovery_info: DiscoveryInfoType | None = None,
) -> None:
    """Set up the sensor platform."""

    username = config[CONF_USERNAME]
    item = config[CONF_ITEM]
    access_token = config[CONF_ACCESS_TOKEN]
    refresh_token = config[CONF_REFRESH_TOKEN]
    user_id = config[CONF_USER_ID]
    user_agent = '**TGTG/22.2.1 Dalvik/2.1.0 (Linux; U; Android 9; SM-G955F Build/PPR1.180610.011)**'

    global tgtg_client

    # Log in with tokens
    tgtg_client = TgtgClient(
        access_token=access_token, refresh_token=refresh_token, user_id=user_id, user_agent=user_agent
    )

I've published 4.1.0, which allow a custom user_agent to be defined in configuration.yaml - see Readme
Also, i've defaulted the user_agent to one that we know works
But it's not super good practice I think - let's open another issue to track that improvement


Performance issues with lookupReaderProxyData and lookupWriterProxyData [6116]

Looking up a reader or writer proxy structure is very computational expensive in both the PDP and EDP code.
https://github.com/eProsima/Fast-RTPS/blob/master/src/cpp/rtps/builtin/discovery/participant/PDP.cpp#L478-L496
https://github.com/eProsima/Fast-RTPS/blob/master/src/cpp/rtps/builtin/discovery/participant/PDP.cpp#L517-L535
As well as a few other places.
The runtime complexity is at in the worst case: O(p^e) with p=#participant and e=#endpoint per participant. On large distributed system, this can be come a significant bottleneck.
To reproduce the issue, simple create a subscriber (or subscribers) with a very large number (50,000+) of publisher endpoint with reliable QoS. The creation of this number of endpoints takes time but is it not too bad. Then, once these endpoints are created, destroy them one at a time in a loop. As the deletion of those endpoint happens, the gross inefficiency of the code really takes its toll. Having a good profiler to visualize the time taken (such as vtune) will pinpoint the performance problem to the GUID comparison. Although this takes time, it is simply because the lookup method end up comparing every single guid with every single other guid in the lookup.

This was fixed by #772


GH2866: Support multiple dotnet test options

Fixes #2866 (and #2623).

@gitfool your changes have been merged, thanks for your contribution 👍


Clean up build and install

We should be able to build jupyterlab without an internet connection, while still allowing a simple install at the root level.
This may involve changing npm run update to explicitly run npm install jupyterlab, and then adding a postinstall script to run npm install in the sub-directory, but we want to make sure this script not run when installing jupyterlab as a library.

Use prepublish:
prepublish: Run BEFORE the package is published. (Also run on local npm install without any arguments.)
https://docs.npmjs.com/misc/scripts


Change graphics controller to VMSVGA

The driver seems to work better in the casual testing I've done. Let's switch as part of the fall release testing.
Closes #280

The blog post from the issue seemed to mention some manual intervention in the guest. Did I misunderstand or is it no longer necessary? Does this introduce a hard dependency on VBox 6?

I'm not seeing anything, just setting the VM preference, making sure the guest additions are installed, and a command to validate that the driver is active. We can certainly run that to validate for our own testing, but I don't see it as a requirement for the end-user.
I believe this would raise the minimum level to 6, but we're already pushing the 6.x drivers and building the OVA on 6. VBox 6 will have been out around a year by the time we ship Tina, so I think I'm ok with setting it as the baseline.

VMSVGA seems to work better all of the time. The desktop doesn't tear as much when resizing, the screensaver doesn't get stuck half-engaged, and the Mint logo doesn't appear yellow.

Do I need to build the vm myself as far as testing this?

I've got a test 19.2 build you can use if you want: https://linode2.ripleymj.net/~ripleymj/artifacts/ or just toggle the VMSVGA driver in the VirtualBox settings on any existing copy of 19.1.


Firebase project not found or not correctly mentioned on config.json

Build/Submit details page URL
No response
Summary
EAS BUILD FAILED AAB FILE, when trying  build aab file for android so i am getting errors , i am also attaching an image for your reference.

Managed or bare?
Bare
Environment
expo-env-info 1.2.1 environment info:
System:
OS: macOS 14.4.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v22.11.0/bin/yarn
npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm
Watchman: 2<IP_ADDRESS> - /usr/local/bin/watchman
Managers:
CocoaPods: 1.15.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.5, iOS 17.5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5
Android SDK:
API Levels: 30, 31, 33, 34
Build Tools: 30.0.3, 33.0.0, 33.0.1, 34.0.0, 35.0.0
System Images: android-30 | Google Play Intel x86 Atom, android-33 | Google Play Intel x86_64 Atom, android-34 | Google Play Intel x86_64 Atom, android-35 | Google Play Intel x86_64 Atom
IDEs:
Android Studio: 2024.2 AI-242.21829.142.2421.12409432
Xcode: 15.4/15F31d - /usr/bin/xcodebuild
npmGlobalPackages:
eas-cli: 13.2.0
expo-cli: 6.3.12
Expo Workflow: bare
Error output
No response
Reproducible demo or steps to reproduce from a blank project
When creating an aab file from the command eas build -p android or yarn app:build-android so i am getting
Android build failed only i have checked it on expo dashboard and attached the screenshot , please anyone help me out.

Hey, do you have your google-services.json set up for a project? If so is this file gitignored? If that's the case you may want to follow this guide to unblock yourself: https://docs.expo.dev/build-reference/variables/#how-to-upload-a-secret-file-and-use-it-in-my-app-config.


OR-Chained middlewares

Do you want to request a feature or report a bug?

Feature
What did you expect to see?

It would be cool if traefik could support chaining middlewares with or instead of executing them one after one. Currently, there is the chain middleware, which executes middlewares one after the other. The thing I have in mind would be to execute the first one in the list, if that fails execute the second one etc. A problem here might be a middleware does not "fail" or "succeed", it either calls the next one or does not iirc.
A bit more context on the use case:
We have one site which we want to secure using ip whitelist and basic auth, either one should work. If a user accesses the site not on the ip whitelist, it should need to complete the basic auth.
I'm not sure if a general way of doing this is a good idea or if the use case is too specific and thus, a custom thing would be better suited.
I've discussed this a bit in https://github.com/justinas/alice/issues/50

Hi,
I had a simillar situation, needing to access the site via basic auth only if the client's IP is not in a whitelist. You can accomplish this with a trick:

Create a dummy route in your application that will always ask for basic auth.
Create another dummy route, that will return an HTML page, that will do a redirect from Javascript to the path at point 1.
Add a Traefik errors middleware, that captures 403 errors and the service is the path created at point 2.
Add a Traefik route for this path with a rule that matches the path and with a chained middleware: Basic auth and redirect to site's home path
Add a Traefik route with a check if the request has "Authorization" header. Attach the basic auth middleware to this route.
Add your usual Traefik route. Attach to this route a chained middleware, with the errors middleware at point 3 and the IP whitelist middleware. Attention, the order is important: the first middleware in the sequence must be the errors one, so it will capture 403 error codes from the IP whitelist middleware.

Hope this helps.

Adding another use-case. Sadly, I don't think the above workaround covers me.
We have multiple clients, each having access to a subset of our services. We want to or-chain multiple whitelists depending on which client(s) have access to which service. This would allow both easy readability and single source-of-truth for each whitelist instead of updating all service whitelists any time we need to change a client whitelist.
For instance -

Client A can access service 1 and 2
Client B can only access service 2
Service 1 has a route that uses the Client A whitelist
Service 2 has a route that uses Client A whitelist or Client B whitelist.

Currently, we have to update every service's whitelist when a client's IPs change as they must be manually merged into a single whitelist per service. It would be very convenient to change the client's whitelist and have the OR middleware reference them by name.

Currently, we have to update every service's whitelist when a client's IPs change as they must be manually merged into a single whitelist per service.

Are you using by any chance Docker in your infrastructure?

Yup, we're using kubernetes (v 1.11 currently). So these are all managed with the Middleware and IngressRoute CRDs

There is a workaround then, depending on how you construct the final whitelist for service. For example, you could use 2 Environment variables, like $IP_CLIENTA and $IP_CLIENTB where you store the IPs. Then, create another 2 Environment variables $IP_SERVICE1=$IP_CLIENTA and $IP_SERIVCE2=$IP_CLIENTA,$IP_CLIENTB. Finally, use $IP_SERVICE1 or $IP_SERVICE2 in your middleware configuration.

That's essentially what we're doing currently. Our deployment system does the merge of the whitelist when a service is deployed. However, if any of those whitelists change then we have to trigger the system to edit every Middleware with the new ips. If we were able to create an or-chain then we would only have to edit the client's whitelist Middleware in a single location and all the or-chains would simply point at those specific Middlewares, causing an immediate change for all services whitelisting the client.

Hi,
I had a simillar situation, needing to access the site via basic auth only if the client's IP is not in a whitelist. You can accomplish this with a trick:
1. Create a dummy route in your application that will always ask for basic auth.

2. Create another dummy route, that will return an HTML page, that will do a redirect from Javascript to the path at point 1.

3. Add a Traefik errors middleware, that captures 403 errors and the service is the path created at point 2.

4. Add a Traefik route for this path with a rule that matches the path and with a chained middleware: Basic auth and redirect to site's home path

5. Add a Traefik route with a check if the request has "Authorization" header. Attach the basic auth middleware to this route.

6. Add your usual Traefik route. Attach to this route a chained middleware, with the errors middleware at point 3 and the IP whitelist middleware. Attention, the order is important: the first middleware in the sequence must be the errors one, so it will capture 403 error codes from the IP whitelist middleware.

Hope this helps.

There's also another solution/workaround for this problem I want to mention  -> simple-trick-to-bypass-basic-auth
For a simple scenario the solution to set up a second route with additional HeadersRegexp rule is doing the trick.
Anyway, it would be great to have a flexible and generic way of conditional or OR-chaining middlewares.

Since we now have plugins (since traefik 2.3) this is something that could be implemented using a plugin.
I did a quick search and found this which looks promising: https://github.com/kingjan1999/traefik-plugin-exception-authbasic
Havent't tried it yet, but it looks like a very good solution for my use case and maybe others.
Ping @kingjan1999

Since we now have plugins (since traefik 2.3) this is something that could be implemented using a plugin.
I did a quick search and found this which looks promising: https://github.com/kingjan1999/traefik-plugin-exception-authbasic
Havent't tried it yet, but it looks like a very good solution for my use case and maybe others.
Ping @kingjan1999

A couple of other uses cases:
I use authelia in a separate container providing authentication thru Traefik Forward Auth middleware. As the container might not be healthy (or still not deployed) I would like traefik 'fails-back' or 'chain-or middleware' to either AuthBase middleware or even restrict access to a set of IPs.
I though about CircuitBreaker middleware but this is focused on service health, not middleware availability.

Is there any possibility on a fix for this? Like stacking multiple ipwhitelist middlewares in a chain? Let's say I just try adding the rfc1918 (internal ips) whitelist to the cloudflare (external ips) whitelist. Well this is causing some sort of loop within traefik and removing them from both whitelists fixed it. It appears that not only can you not have multiple whitelists in a chain, but you also can not have those same ip's in multiple whitelists.
Here are my middlewares. Services I expose to the world I also want to be able to access internally also, which currently is not possible.
external-auth chain (ak-outpost is my forwardauth middleware)
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: external-auth
  namespace: networking
spec:
  chain:
    middlewares:
      - name: cloudflare-ips
      - name: security-ak-outpost-authentik-embedded-outpost@kubernetescrd

cloudflare-ip whitelist
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: cloudflare-ips
  namespace: networking
spec:
  ipWhiteList:
    sourceRange:
      - <IP_ADDRESS>/22
      - <IP_ADDRESS>/22
      - <IP_ADDRESS>/22
      - <IP_ADDRESS>/13
      - <IP_ADDRESS>/14
      - <IP_ADDRESS>/18
      - <IP_ADDRESS>/22
      - <IP_ADDRESS>/18
      - <IP_ADDRESS>/15
      - <IP_ADDRESS>/13
      - <IP_ADDRESS>/20
      - <IP_ADDRESS>/20
      - <IP_ADDRESS>/20
      - <IP_ADDRESS>/22
      - <IP_ADDRESS>/17

internal-auth chain:
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: internal-auth
  namespace: networking
spec:
  chain:
    middlewares:
      - name: rfc1918-ips
      - name: security-ak-outpost-authentik-embedded-outpost@kubernetescrd

internal-ip whitelist
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: rfc1918-ips
  namespace: networking
spec:
  ipWhiteList:
    sourceRange:
      - <IP_ADDRESS>/8
      - <IP_ADDRESS>/12
      - <IP_ADDRESS>/16

Hello @jr0dd,

It appears that not only can you not have multiple whitelists in a chain, but you also can not have those same ip's in multiple whitelists.

To clarify, I tried to use two different ipWhiteList middlewares with the same configuration (with and without an explicit Chain middleware to wrap them) on the same router, and it is working.
So, if I didn't miss something, both of your statements are not accurate.
Nonetheless, chaining ipWhiteList middlewares doesn’t make much sense and this issue proposal could indeed help if there is a need for declaring different sets of IPs, hence by declaring multiple ipWhiteList middlewares.
Otherwise, it's recommended to declare the set of allowed IPs in one place (one middleware), as the constraints should be the same in all ipWhiteList middlewares in a chain for a request to be able to pass through.
However, it seems that your use case can be solved by IP-based routing that has been introduced in v2.5, please take a look a the rule documentation and specifically at the new ClientIP rule.

Hello @jr0dd,

It appears that not only can you not have multiple whitelists in a chain, but you also can not have those same ip's in multiple whitelists.

To clarify, I tried to use two different ipWhiteList middlewares with the same configuration (with and without an explicit Chain middleware to wrap them) on the same router, and it is working.
So, if I didn't miss something, both of your statements are not accurate.
Nonetheless, chaining ipWhiteList middlewares doesn’t make much sense and this issue proposal could indeed help if there is a need for declaring different sets of IPs, hence by declaring multiple ipWhiteList middlewares.
Otherwise, it's recommended to declare the set of allowed IPs in one place (one middleware), as the constraints should be the same in all ipWhiteList middlewares in a chain for a request to be able to pass through.
However, it seems that your use case can be solved by IP-based routing that has been introduced in v2.5, please take a look a the rule documentation and specifically at the new ClientIP rule.

Thanks for your reply. I was not aware of that new middleware. That may work. I have no clue why having the same ip's in more than 1 ipWhiteList are now causing looping with my forwardAuth software. I have worked with one of the devs for many hours on this. As soon as I removed the rfc1918-ips from being bundled in the cloudflare-ips auth started flowing again as it should. The cookie was not returning as it should.

For some of the use cases described here this PR seems like a good fit, maybe?

This is still not working:
eg. I have 20 routers, with different IPs whitelisted, but all of them have the same management IPs whitelisted.
The way traefik currently works, I have to create 20 whitelists, with all management IPs + special IPs for that router:
  routers:
    first-router:
      rule: Host(`domain.tld`)
      entryPoints:
        - web-secure
      middlewares:
        - security-headers
        - first-whitelist # <-----------
      service: first

  middlewares:
    first-whitelist:
      ipWhiteList:
        sourceRange:
          - "<IP_ADDRESS>" # mgmt IP 1
          - "<IP_ADDRESS>" # mgmt IP 2
          - "<IP_ADDRESS>" # special request IP 3 for "first" service
          ...

And imagine having this for 20 routers, if I want to add a device to the management IPs whitelist, I have to edit all 20 routers.
Instead of having a single management whitelist and special ones on a per case basis. Like this:
  routers:
    first-router:
      rule: Host(`domain.tld`)
      entryPoints:
        - web-secure
      middlewares:
        - security-headers
        - management-whitelist # <--------
        - first-whitelist # <-----------
      service: first

  middlewares:
    management-whitelist:
      ipWhiteList:
        sourceRange:
          - "<IP_ADDRESS>" # mgmt IP 1
          - "<IP_ADDRESS>" # mgmt IP 2
          ...

    first-whitelist:
      ipWhiteList:
        sourceRange:
          - "<IP_ADDRESS>" # special use case IP 3 for "first" service
        ...

:sleeping: :sleeping: :sleeping:

3 whole years later, will this be implemented in v3?

Looking for something like this as well but my use case is with forward auth middleware chain.
So, if primary authentication server fails, then move to the next middleware which points to the secondary authentication server.
Essentially failover capabilities.

I think @Atoms comment above looks the most ergonomic and logical. As amatter of fact, merge could be part of the ipwhitelist middleware itself so theres little need to build a separate ones. Having ORd ipwhitelist middleware is a must definitely.

I wouldn't agree, because if we have X routers, and each one has a slightly different whitelist requirement, we still need to create X middlewares for each router AND then merge middlewares on top of that, which makes it even harder to manage - Instead of just adding all the required whitelists directly to the router, as I demonstrated above.

I notice that the last comments mainly addresses the "merging" of middleware-config (specifically for the IPAllowList middleware), and not the conditional/OR chaining of middlewares, which was the original topic of this issue/feature request. I'd say that the "merge" approach described above should be created as a separate issue, and leave this issue for the conditional/OR chaining approach.

Is it really not possible to have basic-auth and ip-whitelist that bypasses the basic-auth? (ip-whitelist OR basic-auth). Was the point of this example just double security (ip-whitelist AND basic-auth)?

Was the point of this example just double security (ip-whitelist AND basic-auth)?

Yes. You don't get the BasicAuth prompt if your IP is not among the whitelisted ones.

Yes. You don't get the BasicAuth prompt if your IP is not among the whitelisted ones.
How can I implement IP whitelist that allows a particular IP to bypass basic-auth (while requiring basic-auth for all other IPs)? I tried this approach , but seems that its not working in dockerized Traefik 2.7. My setup is masking IPs internally. Any ideas / suggestions?

How can I implement IP whitelist that allows a particular IP to bypass basic-auth (while requiring basic-auth for all other IPs)?

That is literally what this GitHub issue is about.


improvements for [slug].js

[ ] make hero images responsive and keep original aspect ratio
[ ] switch CKEditor to markdown and render maybe using React Markdown
[ ] make update time more readable, probably using React Moment or another date utility package
[ ] fix this error: Warning: Prop src did not match. Server: "http://localhost:1337/uploads/stream_starting_soon_d9b7dca817.png" Client: "undefined/uploads/stream_starting_soon_d9b7dca817.png"

combined with #28


Allow glob exclusions

Some projects commit build (dist) files to the repository. Usually, the syntax of these generated files is out of the scope of linters. But ATM all files that matches the glob pattern will run against linters.
Ideally we want *-staged tasks to be configured the same way as normal linter tasks.
But this might require a major rewrite and switch to the Node from CLI.

@okonet I've run into exactly this issue: my generated global.min.css does break linting rules, so I'd like to exclude it. My current config is:
  "lint-staged": {
    "gitDir": "../../../../../../../../",
    "linters": {
      "*.js": "eslint",
      "*.css": "stylelint"
    }
  }

so I'd like to exclude specific files (e.g. "*.css, !global.min.css": "stylelint", but this does not seem to work.
Any tips?

You can use globs in the lint-staged config. See https://github.com/isaacs/minimatch documentation.
I'd recommend to add minified files to global .eslintignore and .stylelintignore. By doing so you'll have the config shared between all runs not just in lint-staged.

Thanks again @okonet — I've looked into the minimatch globbing but did not found it very intuitive. Got it to work with "[!Public]*.css" (exclude files from Public output folder).
However, using a .stylelintignore file is a much more elegant solution. Thanks again!

Ouch, this burned me too. I was trying to use !(node_modules|dist|lib|es)**/*.js for my pattern. And the minimatch docs say:
If the pattern starts with a ! character, then it is negated. Set the nonegate flag to suppress this behavior, and treat leading ! characters normally. This is perhaps relevant if you wish to start the pattern with a negative extglob pattern like !(a|B). Multiple ! characters at the start of a pattern will negate the pattern multiple times.
I'm trying to see if there's a way to work around this with a different pattern, but otherwise I'll have to think about making a PR to support passing the nonegate flag to minimatch somehow...

Hey there,
I was naively trying to do something like:
"lint-staged": {
    "src/**/*.js server/src/**/*.js, !server/src/models/**/*.js ": [
      "prettier --write",
      "git add"
    ]
  }

but it doesn't seem to be working. Do I need to do something else to get the functionality I need?
Maybe you could use https://yarnpkg.com/en/package/multimatch instead of minimatch to support what I'm trying to do?
Thanks!

Good suggestion. Do you mind creating a PR for that?

Hey there @okonet @jharris4 @davidhund ,
I was naively trying to do something like:
"lint-staged": {
    "src/**/*.js server/src/**/*.js, !server/src/models/**/*.js ": [
      "prettier --write",
      "git add"
    ]
  }

but it doesn't seem to be working. Do I need to do something else to get the functionality I need?
Maybe you could use https://yarnpkg.com/en/package/multimatch instead of minimatch to support what I'm trying to do?
Thanks!

For anyone who stumbles upon this issue like me it now supports glob match but uses micromatch now read this post I added for the fix.
https://stackoverflow.com/a/57981925/1221731


python subprocess filenotfounderror: (winerror 2) the system cannot find the file specified

Fifth lesson from the course
My code is;
"def main():
print("Hello !")"
when I launch it with
"brownie run scripts/deploy.py"
I receive "FileNotFoundError: [WinError 2] File not found (...)"
Any help ?
Best

You have to rewind the lesson a bit and install nodejs, yarn, ganache-cli which are required to run a script with Brownie. Once everything is installed it should work fine.


Change default port to something other than 8000

Sync server is also running on 8000. So, by default in local env, we won't be able to run the sync server and the admin server at the same time :)
Why you should change and not us? We used it first!
cc @pb82

I’ll change it to 8080, makes the most sense for a web ui.

Am 03.07.2018 um 14:36 schrieb Ali Ok<EMAIL_ADDRESS>Sync server is also running on 8000. So, by default in local env, we won't be able to run the sync server and the admin server at the same time :)
Why you should change and not us? We used it first!
cc @pb82 https://github.com/pb82
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/aerogear/data-sync-ui/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/ABw_PuxOicz0nuokKzGPHsff4EBBL1Adks5uC2VYgaJpZM4VA3V5.


Why is setting RUSTFLAGS required?

In the README you mention that it might be necessary to set RUSTFLAGS="-Clink-args=-lstdc++". Would it be possible to do that in the build.rs within whisper-rs ?

The current git version of the library automatically does this already. It's only required if you're using the crates.io version.

This was fixed last week in the crates.io version.


[go-graphql-spa-version] Provide explicit schema file

Currently the GraphQL schema is linked to a URL (roundest-go.fly.dev/graphql), however it's preferable to have explicit schemas to then codegen the Go types, and general reproduction of the project not having to rely on deployed data.
My current intent is to reverse engineer the current schema so that the project doesn't rely on a deployed schema - although it could also be reversed engineered from the Go-backend code ~- to then tie in gql.tada (sources: Theo, and Fireship) for codegen, types, and syntax highlighting. These were the main pain points Theo mentioned on his video of these versions~.

For other issues:

I do believe Theo's frustration with GraphQL field asserts can be mitigated using qgl.tada as asserting every schema field (e.g. [Foo!]!), as it uses a tsconfig plugin and LSP for type safety. However, the code savings are negligible (I implemented it but decided not to include it in the above PR). In Theo's gql.tada video itself it also included syntax highlighting for "unused" field, but couldn't replicate it. This method might have saved him frustration with his current codegen approach.
Code Gen in go is possible, but to have DB annotations it'd require extra config (if using github.com/99designs/gqlgen) that's equivalent to the hard-coded typings. Not attempting that.


remote source plugin can introduce non-determinism

See original issue on GitLab
In GitLab by [Gitlab user @tristanvb] on Aug 2, 2018, 13:57
Summary
Similarly to #527, and discussed already here https://gitlab.com/BuildStream/buildstream/merge_requests/581#note_91185598 and in following comments, the remote source will store a downloaded file locally in the source cache, which it will later stage; without ensuring that the mode bits of the file are deterministic, even though the mode of the file itself is dependent on the user's umask.

In GitLab by [Gitlab user @tristanvb] on Aug 2, 2018, 13:57
marked this issue as related to #527

In GitLab by [Gitlab user @tristanvb] on Aug 2, 2018, 13:57
marked this issue as related to #540

In GitLab by [Gitlab user @tristanvb] on Aug 2, 2018, 13:57
marked this issue as related to #541

In GitLab by [Gitlab user @tristanvb] on Aug 2, 2018, 13:57
marked this issue as related to #542

In GitLab by [Gitlab user @tristanvb] on Aug 2, 2018, 13:57
marked this issue as related to #543

In GitLab by [Gitlab user @tristanvb] on Aug 2, 2018, 13:57
marked this issue as related to #544

In GitLab by [Gitlab user @tristanvb] on Aug 2, 2018, 14:36
mentioned in merge request !581

In GitLab by [Gitlab user @toscalix] on Aug 6, 2018, 09:36
assigned to [Gitlab user @valentindavid]

In GitLab by [Gitlab user @valentindavid] on Aug 6, 2018, 17:09
mentioned in commit 4d142206bdba11bcef52e54c8c2ea4e1ad525d03

In GitLab by [Gitlab user @tristanvb] on Aug 7, 2018, 10:24
As of !581, this only needs fixing on the bst-1.2 branch, the problem is no longer there in master.

In GitLab by [Gitlab user @valentindavid] on Aug 7, 2018, 17:40
mentioned in merge request !616

In GitLab by [Gitlab user @valentindavid] on Aug 10, 2018, 15:21
mentioned in merge request !634

In GitLab by [Gitlab user @toscalix] on Aug 13, 2018, 09:09
closed


[Announcement] YARP <IP_ADDRESS> Released

YARP <IP_ADDRESS> was released today and is now available for download at: https://github.com/robotology/yarp/releases/. This release is a stable release and it fixes a few bugs in YARP <IP_ADDRESS>.
A (partial) list of bug fixed and issues resolved in this release can be found here.
Important Changes
Bug Fixes
YARP_OS

Fixed join() return values of threads when C++11 compilation is activated.
Fixed segmentation fault while closing YARP modules. (#942)

YARP_dev

Added missing YARP_dev_API to ControlBoard interfaces.
Fixed segfault in ControlBoardWrapper2 for multiJoints functions

GUIs

yarpdataplayer

Dataset with one entry can now be played. (#936)
Resetting sendstrict upon new dataset. (#941)

yarplogger

Open logs by drag'n'drop. (#934)

Devices

serial

Print error when the device cannot be opened.

Contributors
This is a list of people that contributed to this release (generated from the
git history using git shortlog -ens --no-merges v<IP_ADDRESS>..v<IP_ADDRESS>):
    12  Daniele E. Domenichelli<EMAIL_ADDRESS>     4  Vadim Tikhanoff<EMAIL_ADDRESS>     3  Claudio Fantacci<EMAIL_ADDRESS>     2  Matteo Brunettini<EMAIL_ADDRESS>     1  Alberto Cardellino<EMAIL_ADDRESS>     1  Alberto Cardellino<EMAIL_ADDRESS>     1  Alexandros Paraschos<EMAIL_ADDRESS>     1  Gabriele Nava<EMAIL_ADDRESS>     1  Giovanni Saponaro<EMAIL_ADDRESS>     1  Marco Randazzo<EMAIL_ADDRESS>     1  Silvio Traversaro<EMAIL_ADDRESS>

cc @robotology/all-robotology-developers


Organize modifications files/modification types

customizing the modification text files for an individual search with no preservation of the core modfication text files could lead to accumulation of errors and mistakes as the files migrate further from original with ever increasing array of searches. Rather have teh ability to select mods for usage at runtime (e.g. varible phospho, methyl, acetyl etc.) rather than editing files. Not to mention it kinda sucks having to look up the names/formulas/masses for stuff that we should already have somewhere.

Ugh, the modifications are such a mess right now!
I propose we first fix the Search task modifications, and then see what needs to be done with Gptmd and Calibration tasks.
Here are some thoughts:

In a search task, Uniprot modifications only make sense in the context of localization: setting them as fixed or variable never makes sense. So, instead of the vague ptmlist.txt entry in the mod selection table, have a separate checkbox, "localize uniprot PTMs"
The modification filenames are non-descriptive. Instead of displaying all the files in the Mods folder, use a collapsible tree view with the top level being the modification type, and the children being the modifications of that type. Automatically load all files, and categorize modifications by their modification type.
Instead of the three or four checkboxes next to each modification, corresponding to variable, fixed, localize, have three tabs: fixed, variable, localize. In every tab can select modification types, or even specific modifications that the user wishes to include as fixed, variable, or localize.
Possibly display the modification summaries on the search task window, in the form    variable: Oxidation of M
    fixed: Carbamidomethyl of C, TMT tag
    localize: 250 modification types

In the pruned database, the only decision to be made by the user is whether to keep all uniprot modifications in place, or only the identified ones. We should give that as a checkbox. For all other modification types, it is understood that pruning will only include them if they are confidently identified.
A custom.txt file for user-defined modifications.
The multitude of the original modification files should be collapsed into a single file, that should remain untouched.

Anthony suggested in https://github.com/smith-chem-wisc/MetaMorpheus/issues/286 to "make a reference list of all modification types ", we should address that too.
Please give me your thoughts/suggestions!

I like the idea of the a single file that's not modifiable; the modification type tag can be used to distinguish between the modifications listed.
I like the idea of a tree better than tabs if the {fixed,variable,localized} set might expand. Otherwise, if we don't expect the list of categories to expand, let's go with the tabs.
We should say "localized" instead of "localize," so that they're all adjectives
I like the custom.txt idea. Maybe we should be able to drag-drop a custom file into the GUI somewhere to have it recognized, too.

I do think the modification types (MT) could get out of hand with redundant classes as they are added over time, e.g. ModificationType and Modification_Type, or something like that. That would negatively impact the expected behavior of that string property, so let's make sure the types are formatted similarly and that they're a subset of some easy-to-find reference of all the types.

I like:
Instead of the three or four checkboxes next to each modification, corresponding to variable, fixed, localize, have three tabs: fixed, variable, localize. In every tab THE USER can select FROM A LIST OF specific modifications. Could have groups that automatically cause all members to be selected. For example, clicking glyco automatically turns on/off all glyco mods

Yea. Actually with the multiple checkboxes gone, it might be possible to go back to the way Morpheus was doing it! Something like

More considerations:

"localize" is confusing to the average user
Make the default setting to have every single entry checked in the localize tab. Only experts might want to uncheck some entries there.
What do we do about the modifications specified in the mzLibXML file??? They, and their types are not known prior to start of a task, so it makes no sense to place them in the boxes in the picture above. I think we could have another checkbox to take care of them, namely "localize modifications defined in database file"

I like "database-localized" instead of "localized" to tell you where/why those mods are being localized.
I also think "whether to keep all uniprot modifications in place, or only the identified ones" should keep all UniProt identified PTMs there by default. The option to uncheck that box is ok. I assume those PTMs have been relatively rigorously identified and we don't want people accidentally deleting things from their databases.
Otherwise I agree with all points

Regarding the mzLibXml files, those have some modifications defined in the file. Those modifications should be read in ahead of time, and added as options in the three boxes. They would be mixed in with the original modifications, because of the organization by modification type! This is a nice feature.
The remaining problem is how to represent the selection of modifications in a parameters file. Possible as pairs of strings: <ModType, ModID>
Now I'm thinking that the original idea of  having a checkbox, "localize uniprot PTMs" is not sufficient. Users might want to cherry-pick which uniprot modifications to localize.
Anthony suggested having a search bar to find/filter modifications. Possibly filter by modification mass as well.

You can filter by any field or property with this code from proteoform suite.

Mostly complete in https://github.com/smith-chem-wisc/MetaMorpheus/pull/301.
Moving some residual ideas to new issues.


[TF] Remove legacy test utilities for GPE from TensorFlow module.

Underscored test utilities such as _hostOp(_:), _scalarTensorWithShape(_:), and _addScalarTensorsWithShape(_:_:) were added for GPE send/receive testing. They are removed in this PR so that https://github.com/tensorflow/swift-apis/pull/109 won't need to make them public.
Runtime test hangers.swift is removed because it's for testing GPE graph lowering
control dependencies and it's obsolete.

@swift-ci please test tensorflow


Creating a PoC with VS code plugin changes to demonstrate the AI data mapper

A PoC has to be created with to demonstrate the AI assisted datamapper in VS code
Tasks

Study the VSCode plugin
Add support for AI assisted suggestions
related to #5957

Until there are any further requirements, this will be moved to On Hold

This task is complete and the VS code pluggin is released


Inverse Kinematics & Motion Planning- tutorial code error

When I run the tutorial code, i get this error. "qpos_start exceeds joint limit. Relaxing joint limit to contain qpos_start for planning."

this is not error, it's a warning
it simply means the initial configuration exceeds the joint limit, so the planner will relax the joint limit to contain the initial configuration


Wrote a python script for converting RGB to grayscale

Solved Issue #3

Why not using cvtColor to do conversion for you? Code would be more concise using only OpenCV or Pillow


change type

This should be a string.

Do you need to update parameters: https://github.com/workos-inc/workos-ruby/blob/d910c4c09e318f66daed132eadc90e572ebc885d/lib/workos/sso.rb#L62?


UITests LaunchArguments Failing in Headless Mode

I have been using Launch Arguments to modify if my user is logged in (authenticated launch argument) or logged out (unauthenticated launch argument) for testing, having followed this part of the docs https://hmlongco.github.io/Factory/documentation/factory/testing/#Xcode-UITesting. This works perfectly when running the tests within Xcode, with all tests passing.
When I switch to using Fastlane Tests or xcodebuild test in the terminal to run the test, these same tests fail. I assume this is due to the headless mode that these tests are run in.
Here's a reproduced example of what I've been trying. Hopefully this slimmed down example displays well enough what I'm trying to highlight, if you need more information let me know
UI Tests File:
import XCTest
final class UITestsV2: XCTestCase {
    func testMinimumReproduceableExample() throws {
        let app = XCUIApplication()
        app.launchArguments.append("authenticated")
        app.launch()
        XCTAssertTrue(app.buttons["New"].exists, "The 'New' button does not exist")
    }
}

Container+Extensions File:
extension Container: AutoRegistering {
    public func autoRegister() {
        if ProcessInfo().arguments.contains("unauthenticated") {
            let authTokenRepositoryMock = AuthTokenRepositoryMock()
            authTokenRepositoryMock.changeMockUserAuthenticated(newStatus: false)
            authTokenRepository.register { authTokenRepositoryMock }

        } else if ProcessInfo().arguments.contains("authenticated") {
            let authTokenRepositoryMock = AuthTokenRepositoryMock()
            authTokenRepositoryMock.changeMockUserAuthenticated(newStatus: true)
            authTokenRepository.register { authTokenRepositoryMock }
        }
    }
}

And here is the file which changes the authorisation status to determine if the user is logged in or out:
import Combine
import Factory
import Foundation

public class AuthTokenRepositoryMock: AuthTokenRepositoryProtocol {

    private var mockUserAuthenticatedStatus: Bool = true

    public init() {
    }

    public func changeMockUserAuthenticated(newStatus: Bool) {
        mockUserAuthenticatedStatus = newStatus
    }

    public func hasToken() -> Bool {
        return mockUserAuthenticatedStatus
    }
}

I have further refined this issue and perhaps have noticed that it was not what I first anticipated that is causing the issue.
It seems this line is what is causing my issues authTokenRepositoryMock.changeMockUserAuthenticated(newStatus: false). If instead of changing the authenticated status through a function, I create two Mocks: one for auth which hasToken returns true and one for unauth which hasToken returns false, this works fine.
I'm still unsure why, but perhaps this is not a Factory specific issue
extension Container: AutoRegistering {
    public func autoRegister() {
        if ProcessInfo().arguments.contains("unauthenticated") {
            let authTokenRepositoryMock = AuthTokenRepositoryMockUnAuthenticated()
            authTokenRepository.register { authTokenRepositoryMock }

        } else if ProcessInfo().arguments.contains("authenticated") {
            let authTokenRepositoryMock = AuthTokenRepositoryMockAuthenticated()
            authTokenRepository.register { authTokenRepositoryMock }
        }
    }
}


typing and interface tuning

Coverage remained the same at 100.0% when pulling 7b74134df53fdc4932a520421dbfeacae109392a on fix/typings into 3bb6e55212a28e2539cc85483ffeb5d64d5cef31 on master.

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Memory leak

We've been using sharp for a little while now and have been very happy with everything. Thanks for all of the hard work you've put into this library 😁. Recently, we've switched over from using sharp on an aws lambda function to using it on one of our nodejs servers. Alongside this change, we've noticed a quite significant increase in memory usage. I suspect that this was likely a preexisting problem in our lambda given that the lambda instances get disposed of when not in use.
These are some analytics from an EC2 instance that I set up for load testing. This instance would have seen no traffic during the times recorded in the analytics (I forgot to destroy it when I finished testing 😅):

After scouring the libvips' documentation, I found some notes on the libvips' cache and a stackoverflow page where others seemed to be struggling with a similar issue. I tried to disable the cache using sharp.cache(false) and manage concurrency with sharp.concurrency(1), but this had no effect.
I also tried a slew of other environment variables that libvips provides for configuration:
VIPS_DISC_THRESHOLD=512m # a setting that we have previously used on our lambda
VIPS_LEAK=true
VIPS_CONCURRENCY=1

None of these seemed to work either. As of right now, I'm out of ideas. I found another interesting bit in libvips' docs:
If a source does not support mmap or seek and the source is used with a loader that can only work from memory, then the data will be automatically read into memory to EOF before the loader starts. This can produce high memory use if the descriptor represents a large object.

Use vips_pipe_read_limit_set() to limit the size of object that will be read in this way. The default is 1GB.

Set a value of -1 to mean no limit.

See also: --vips-pipe-read-limit and the environment variable VIPS_PIPE_READ_LIMIT.

I suspect that this wouldn't contribute to a memory leak, just high memory usage. Perhaps it's worth considering?
This is a simplified version of our code that utilizes sharp:
const sharp = require('sharp');

sharp.cache(false);
sharp.concurrency(1);

function streamImage(req, res, next) {
  const { id, renderOptions, shouldRenderOriginal } = res.locals;

  return fetchStream(id)
    .then((stream) => shouldRenderOriginal
        ? stream.pipe(res)
        : stream.pipe(transformWithSharp(renderOptions)).pipe(res);
    )
    .catch((e) => handleError(e));
}

function transformWithSharp(options) {
  const pipeline = sharp({
    sequentialRead: true
  });

  if (options.shouldCrop) {
    const extractOptions = { left: options.x, top: options.y };

    if (options.cropHeight) extractOptions.height = options.cropHeight;
    if (options.cropWidth) extractOptions.width = options.cropWidth;

    pipeline.extract(extractOptions).resize(options.width, options.height, { fit: 'inside' });
  }

  if (options.padding) {
    pipeline.extend({
      background: options.color.background,
      bottom: options.padding.vertical,
      left: options.padding.horizontal,
      right: options.padding.horizontal,
      top: options.padding.vertical
    });
  }

  if (!options.optimize) pipeline.withMetadata();

  pipeline.rotate(); // * ensure iphone images aren't rotated

  return pipeline;
}

I would be supremely grateful for any help. Thank you 🙏

Please ensure you've fully read and understood everything discussed in https://github.com/lovell/sharp/issues/955 and, because you've mentioned AWS Lambda, please also ensure you've read and understood everything in https://github.com/lovell/sharp/issues/1710
If your question remains, please provide further evidence of a leak, remembering that plateauing RSS graphs are not indicative of a leak.


create AsciiDoc specification for publication (#46)

Implements #46.  Notes:

management rules copied from https://github.com/wmo-im/wis2-topic-hierarchy/wiki/Change-Management
README.md is now a pointer (similar to WCMP2/WTH READMEs)
a canned PDF is attached for convenient review of the output
wis2-topic-hierarchy.pdf

Thanks @antje-s, makes sense.


How to disable retry in Socket Mode?

I'm trying to build a bot listener service in Java by listening to the AppMentionEvent, but I see that whenever the task takes more than 3000 milliseconds, I receive the messages multiple times.
Reproducible in:
implementation("com.slack.api:bolt-socket-mode:1.36.1")
implementation("javax.websocket:javax.websocket-api:1.1")
implementation("org.glassfish.tyrus.bundles:tyrus-standalone-client:1.19")
implementation("org.slf4j:slf4j-simple:1.7.36")

The Slack SDK version
|    +--- com.slack.api:slack-api-client:1.1.0 -> 1.36.1
|    |    +--- com.slack.api:slack-api-model:1.36.1
+--- com.slack.api:bolt-socket-mode:1.36.1
|    +--- com.slack.api:slack-api-model:1.36.1 (*)
|    +--- com.slack.api:slack-api-client:1.36.1 (*)
|    +--- com.slack.api:slack-app-backend:1.36.1
|    |    +--- com.slack.api:slack-api-model:1.36.1 (*)
|    |    +--- com.slack.api:slack-api-client:1.36.1 (*)
|    \--- com.slack.api:bolt:1.36.1
|         +--- com.slack.api:slack-api-model:1.36.1 (*)
|         +--- com.slack.api:slack-api-client:1.36.1 (*)
|         +--- com.slack.api:slack-app-backend:1.36.1 (*)
+--- com.slack.api:bolt-socket-mode:1.36.1 (n)
|    +--- com.slack.api:slack-api-client:1.1.0 -> 1.36.1
|    |    +--- com.slack.api:slack-api-model:1.36.1
+--- com.slack.api:bolt-socket-mode:1.36.1
|    +--- com.slack.api:slack-api-model:1.36.1 (*)
|    +--- com.slack.api:slack-api-client:1.36.1 (*)
|    +--- com.slack.api:slack-app-backend:1.36.1
|    |    +--- com.slack.api:slack-api-model:1.36.1 (*)
|    |    +--- com.slack.api:slack-api-client:1.36.1 (*)
|    \--- com.slack.api:bolt:1.36.1
|         +--- com.slack.api:slack-api-model:1.36.1 (*)
|         +--- com.slack.api:slack-api-client:1.36.1 (*)
|         +--- com.slack.api:slack-app-backend:1.36.1 (*)
|    +--- com.slack.api:slack-api-client:1.1.0 -> 1.36.1
|    |    +--- com.slack.api:slack-api-model:1.36.1
+--- com.slack.api:bolt-socket-mode:1.36.1
|    +--- com.slack.api:slack-api-model:1.36.1 (*)
|    +--- com.slack.api:slack-api-client:1.36.1 (*)
|    +--- com.slack.api:slack-app-backend:1.36.1
|    |    +--- com.slack.api:slack-api-model:1.36.1 (*)
|    |    +--- com.slack.api:slack-api-client:1.36.1 (*)
|    \--- com.slack.api:bolt:1.36.1
|         +--- com.slack.api:slack-api-model:1.36.1 (*)
|         +--- com.slack.api:slack-api-client:1.36.1 (*)
|         +--- com.slack.api:slack-app-backend:1.36.1 (*)
|    +--- com.slack.api:slack-api-client:1.1.0 -> 1.36.1
|    |    +--- com.slack.api:slack-api-model:1.36.1
+--- com.slack.api:bolt-socket-mode:1.36.1
|    +--- com.slack.api:slack-api-model:1.36.1 (*)
|    +--- com.slack.api:slack-api-client:1.36.1 (*)
|    +--- com.slack.api:slack-app-backend:1.36.1
|    |    +--- com.slack.api:slack-api-model:1.36.1 (*)
|    |    +--- com.slack.api:slack-api-client:1.36.1 (*)
|    \--- com.slack.api:bolt:1.36.1
|         +--- com.slack.api:slack-api-model:1.36.1 (*)
|         +--- com.slack.api:slack-api-client:1.36.1 (*)
|         +--- com.slack.api:slack-app-backend:1.36.1 (*)

Java Runtime version
openjdk version "11.0.17" 2022-10-18 LTS
OS info
ProductName:		macOS
ProductVersion:		14.1.1
BuildVersion:		23B81
Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000
Steps to reproduce:
package slackBot;

import com.slack.api.bolt.App;
import com.slack.api.bolt.socket_mode.SocketModeApp;
import com.slack.api.methods.response.chat.ChatPostMessageResponse;
import com.slack.api.model.event.AppMentionEvent;

public class Main {

    public static void main(String[] args) throws Exception {
        // App expects an env variable: SLACK_BOT_TOKEN
        App app = new App();

        final String MESSAGE_TEXT_SEPARATOR = " ";

        app.event(AppMentionEvent.class, (payload, context) -> {
            AppMentionEvent event = payload.getEvent();
            String eventMessageText = payload.getEvent().getText();
            context.logger.info("Received message: " + eventMessageText);
            ChatPostMessageResponse replyMessage;
            String command = eventMessageText.split(MESSAGE_TEXT_SEPARATOR)[1];
            switch (command) {
                case "timeout":
                    try {
                        Thread.sleep(4000);
                    } catch (InterruptedException e) {
                        throw new RuntimeException(e);
                    }
                    replyMessage = context.client().chatPostMessage(r -> r.channel(event.getChannel()).threadTs(event.getTs()).text("We have timed out."));
                    break;
                case "hi":
                    replyMessage = context.client().chatPostMessage(r -> r.channel(event.getChannel()).threadTs(event.getTs()).text("Hey there"));
                    break;
                default:
                    replyMessage = context.client().chatPostMessage(r -> r.channel(event.getChannel()).threadTs(event.getTs()).text("I don't understand what you're saying."));
                    break;
            }
            if (replyMessage == null || !replyMessage.isOk()) {
                assert replyMessage != null;
                context.logger.error("chat.postMessage failed: " + replyMessage.getError());
            } else {
                context.logger.info("Responded to the " + command + " related message");
            }
            return context.ack();
        });

        // SocketModeApp expects an env variable: SLACK_APP_TOKEN
        new SocketModeApp(app).start();
    }

}

Expected result:
I'm looking for some way to avoid the automatic retries that the Slack SDK is doing.
Actual result:
I tried to do context.getAdditionalValues().put("X-Slack-No-Retry", "1"); to no avail. I always get multiple responses in case of the timeout command I defined in my code. But that never happens for the other commands in the code.

Hi @akshayamaldhure, thanks for asking the question.
Instead of disabling the retries, we recomend using app.executorService().submit( ... ) to run time-consuming tasks in your listener. See https://github.com/slackapi/java-slack-sdk/issues/982#issuecomment-1116957657 for more details.
If your app has an additional overhead outside the listener function (e.g., cold-start time when spinning up app instance), which can badly affect the response time, improving the runtime performance will be also necessary to make the app to stably function.
I hope this helps.

Hi @akshayamaldhure, thanks for asking the question.
Instead of disabling the retries, we recomend using app.executorService().submit( ... ) to run time-consuming tasks in your listener. See #982 (comment) for more details.
If your app has an additional overhead outside the listener function (e.g., cold-start time when spinning up app instance), which can badly affect the response time, improving the runtime performance will be also necessary to make the app to stably function.
I hope this helps.

Thanks @seratch for the quick response to my question. Could you please point me to a code example that uses app.executorService().submit( ... ) in Java? Basically, I'm trying to understand how app.executorService().submit( ... ) is supposed to work with AppMentionEvent.

Here is a simple example demonstrating how to do so with app_mention events: https://github.com/slackapi/java-slack-sdk/blob/v1.36.1/bolt-servlet/src/test/java/samples/S3OAuthSample.java#L29-L38

Thanks a lot @seratch once again. Modifying my code like this helps.
package slackBot;

import com.slack.api.bolt.App;
import com.slack.api.bolt.socket_mode.SocketModeApp;
import com.slack.api.methods.response.chat.ChatPostMessageResponse;
import com.slack.api.model.event.AppMentionEvent;

public class Main {

    public static void main(String[] args) throws Exception {
        // App expects an env variable: SLACK_BOT_TOKEN
        App app = new App();

        final String MESSAGE_TEXT_SEPARATOR = " ";

        app.event(AppMentionEvent.class, (payload, context) -> {
            AppMentionEvent event = payload.getEvent();
            String eventMessageText = payload.getEvent().getText();
            context.logger.info("Received message: " + eventMessageText);
            String command = eventMessageText.split(MESSAGE_TEXT_SEPARATOR)[1];
            app.executorService().submit(() -> {
                ChatPostMessageResponse replyMessage;
                try {
                    switch (command) {
                        case "timeout":
                            try {
                                Thread.sleep(4000);
                            } catch (InterruptedException e) {
                                throw new RuntimeException(e);
                            }
                            replyMessage = context.client().chatPostMessage(r -> r.channel(event.getChannel()).threadTs(event.getTs()).text("We have timed out."));
                            break;
                        case "hi":
                            replyMessage = context.client().chatPostMessage(r -> r.channel(event.getChannel()).threadTs(event.getTs()).text("Hey there"));
                            break;
                        default:
                            replyMessage = context.client().chatPostMessage(r -> r.channel(event.getChannel()).threadTs(event.getTs()).text("I don't understand what you're saying."));
                            break;
                    }
                    if (replyMessage == null || !replyMessage.isOk()) {
                        assert replyMessage != null;
                        context.logger.error("chat.postMessage failed: " + replyMessage.getError());
                    } else {
                        context.logger.info("Responded to the " + command + " related message");
                    }
                } catch (Exception e) {
                    context.logger.error("Something went wrong: " + e.getMessage());
                }
            });
            return context.ack();
        });

        // SocketModeApp expects an env variable: SLACK_APP_TOKEN
        new SocketModeApp(app).start();
    }

}


Added an example for Using with ethers.js.

Added an example from codesandbox for using with ethers.js.
This example will help the developers get started easily.

Really nice example @aayushmahapatra 🙌


Show the migration file name that had an exception

[It would be nice to have] some kind of indication of which migration file failed in the case of SQL errors.  A simple dump of the filename while spooling through the migrations would work.  As an example, which of the 6 migrations that needed to run here failed?  https://www.screencast.com/t/ATWzEPeeTx0I
Originally posted by @Daemach in https://github.com/commandbox-modules/commandbox-migrations/issues/24#issuecomment-795702987

Fixed since 3.*


⚠ Node - sg-67539fc1.yalaso.top has degraded performance

In 146e94c, Node - sg-67539fc1.yalaso.top (http://sg-67539fc1.yalaso.top/api/v1/ping) experienced degraded performance:

HTTP code: 200
Response time: 2400 ms

Resolved: Node - sg-67539fc1.yalaso.top performance has improved in d67db58.


Add support for TCP_USER_TIMEOUT socket options for envoy clusters

(This is used to request new product features, please visit https://discuss.istio.io for questions on using Istio)
Describe the feature request
The motivating factor is well described in https://github.com/istio/istio/issues/33466
The issue described above and what we have experienced relates to gRPC streaming workloads.  When envoy is proxying a connection and the upstream host dies ungracefully (could be OOM, segfault, node power down, whatever) and envoy has written unACK'd data to the socket, many platform kernels will begin TCP retransmission steps which could leave the socket (to a dead endpoint) open for ~15 minutes.  There is a good writeup on this here: https://www.evanjones.ca/tcp-connection-timeouts.html
https://github.com/istio/istio/issues/33466#issuecomment-863988971 states that application-level pings (such as H2 ping) should be implemented to detect half-closed connections.  This type of configuration needs to be implemented on both the client and server side (grpc-go servers will by default only allow one such request per 5 minute period) and may not be feasible for all users.
In our particular use case, gRPC traffic is originating from the sidecar proxy (for example https://github.com/envoyproxy/envoy/blob/1575185d14abc3bc508ce5a6ba45422393322551/source/extensions/access_loggers/grpc/grpc_access_log_impl.h).  On ungraceful termination of the upstream endpoint, we have observed the sockets to remain open for ~15 minutes which results in a large amount of data accumulating in send buffers that is eventually lost.  In some scenarios, this can result in the proxy sidecar being OOM killed.
The TCP_USER_TIMEOUT socket option works well for limiting retransmission times.  Envoy has a rudimentary API for setting this option:
kind: EnvoyFilter
metadata:
  name: sampleoptions
  namespace: istio-system
spec:
  configPatches:
  - applyTo: CLUSTER
    match:
      context: SIDECAR_OUTBOUND
      cluster:
        name: "outbound|12345||foo.ns.svc.cluster.local"
    patch:
      operation: MERGE
      value:
        upstream_bind_config:
          source_address:
            address: "<IP_ADDRESS>"
            port_value: 0
            protocol: TCP
          socket_options:
          - name: 18
            int_value: 10000
            level: 6

I would like to propose extending the istio/api to provide a more usable interface for this option.  For example:
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: bookinfo-ratings
spec:
  host: ratings.prod.svc.cluster.local
  tcp:
    tcpKeepAlive:
    tcpUserTimeout: <Duration>

If there is some general agreement on this, I would be happy to open the PRs for istio/api and istio/istio.
Describe alternatives you've considered
Affected product area (please put an X in all that apply)
[ x] Docs
[ ] Installation
[ x] Networking
[ ] Performance and Scalability
[ ] Extensions and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Affected features (please put an X in all that apply)
[ ] Multi Cluster
[ ] Virtual Machine
[ ] Multi Control Plane
Additional context

Another option would be for us to change these options (or add an environment variable) for HTTP and/or GRPC connections.

https://postgrespro.com/list/thread-id/2521183   [Wrong configuration of tcp_user_timeout can terribly affects tcp_keepalives mechanism]

related: https://github.com/istio/istio/issues/40397

I get much meaningful info from this issue. Thanks. But I have a small question here:
I think what you are talking about is TCP Half-Open connections. Not Half-Closed connections. I am sorry, maybe I am just a nerd.
What I ref:

https://en.wikipedia.org/wiki/TCP_half-open
https://www.excentis.com/blog/tcp-half-close-cool-feature-now-broken
[TCP/IP Illustrated Vol1]


Trailers don't include images

The Jikan API returns the following data for the trailer:
{
  "youtube_id": "LHtdKWJdif4",
  "url": "https://www.youtube.com/watch?v=LHtdKWJdif4",
  "embed_url": "https://www.youtube.com/embed/LHtdKWJdif4?enablejsapi=1&wmode=opaque&autoplay=1",
  "images": {
    "image_url": "https://img.youtube.com/vi/LHtdKWJdif4/default.jpg",
    "small_image_url": "https://img.youtube.com/vi/LHtdKWJdif4/sddefault.jpg",
    "medium_image_url": "https://img.youtube.com/vi/LHtdKWJdif4/mqdefault.jpg",
    "large_image_url": "https://img.youtube.com/vi/LHtdKWJdif4/hqdefault.jpg",
    "maximum_image_url": "https://img.youtube.com/vi/LHtdKWJdif4/maxresdefault.jpg"
  }
}

However, jikan4.js only includes the youtube_id, url, and embed url.
export class YoutubeVideo extends BaseClass {
  public readonly id: string
  public readonly url: URL
  public readonly embedUrl: URL

  public constructor (client: Client, data: any) {
    super(client)

    this.id = data
    this.url = new URL(`https://youtu.be/${this.id}`)
    this.embedUrl = new URL(`https://www.youtube.com/embed/${this.id}`)
  }
}

For my project, I need access to the images. Can we modify the YoutubeVideo class to include these properties?

Hello. Sorry for the late response. The new version that resolves this should be available right now.


Setup toolchains, compile project with Java 20 only, run test on various Java versions

Closes #1888

Description
I wanted to open the project, but it failed to sync for me locally (because my defaults point to Java 20), so I decided to make the build more deterministic. I'll comment out all changes in the PR since some of them require your input, but the tl;dr is:

The project will be built only with a single Java version (that's what the release workflow does)
Only tests will be invoked on various Java versions (that's what project consumers do)
The project will compile on Java 20, and if someone doesn't have Java 11 or 20 installed locally, Gradle will fetch missing ones
I also removed a few of annoying compiler and deprecation warnings

Checklist
Before submitting the PR, please check following (checks which are not relevant may be ignored):

[X] Commit message are well written. In addition to a short title, the commit message also explain why a change is made.
[x] At least one commit message contains a reference Closes #<xxx> or Fixes #<xxx> (replace<xxx> with issue number)
[ ] Tests are added
[ ] KtLint format has been applied on source code itself and violations are fixed
[X] CHANGELOG.md is updated
[X] PR description added

Documentation is updated. See difference between snapshot and release documentation

[ ] Snapshot documentation in case documentation is to be released together with a code change
[ ] Release documentation in case documentation is related to a released version of ktlint and has to be published as soon as the change is merged to master
[ ] In case of adding a new rule, it needs to be added to experimental rules documentation

We have to wait till next week before @shashachu  is back from holidays. I cannot change the configuration so that the remaining checks are run as well.

@mateuszkwiecinski I am not sure whether we are both waiting for the other to proceed. As far as I know, there are still some conversations which I have not resolved because they are not fixed, but I could be wrong.

Yes, sorry, I saw your comments and I still plan to address them as soon as I find some time. Both here and in the other PR I have opened.
If you wanted to speed things up, you should be able to push to the branch, if not, I should be able to take another round tomorrow or on Thursday :)

Yes, sorry, I saw your comments and I still plan to address them as soon as I find some time. Both here and in the other PR I have opened. If you wanted to speed things up, you should be able to push to the branch, if not, I should be able to take another round tomorrow or on Thursday :)

Sure, no problem. Just wanted to make sure that we are aligned.

Oookay, I think I addressed all remaining items now. Please let me know in case I missed something 👀
If you manage to merge the new CI pipeline, I'll monitor build scans for a week or two to see if there are any bottlenecks or low-hanging fruits to improve CI build times 👀

I have merged #2136 earlier today. As of that a merge conflict appead in this PR. I am not sure how to resolve. So please have a look.

I think the checks have been updated properly now.

I think the checks have been updated properly now.

Looks like it. The build succeeded. I will merge.


Chinese Translation

I'm able to help with Chinese translation.
I've already requested in Transifex, please check it. And also if needed, I can make a pull request.

I have approved the translation however I like pull requests.

@HumbleBeeBumbleBee Is there any thing more than providing with src/main/res/values/values-zh-CN/string.xml ? or I have to translate in transifex and then generate a xml file?

As long as you translate all the lines, you can't get the information anyway you want.

Email
Post them here
Pull request
Transifex

Awesome merged!


Remove font overrides and use defaults

This means monospace will be used for code blocks as well.

What's the reason behind doing this? This was something Nat Hartman and I intentionally set up.

Code samples were not being rendered in monospace.

There should be a way to target only the code samples. This current change I'd consider more of a step back than forward, since storybook is a good staging ground for ensuring design fidelity, and design fidelity is tied closely to our font choices.

There should be a way to target only the code samples. This current change I'd consider more of a step back than forward, since storybook is a good staging ground for ensuring design fidelity, and design fidelity is tied closely to our font choices.

Changing the font here only affects the docs themselves, not the font used in the components themselves. I would not consider the fonts in the documentation to be necessary for ensuring design fidelity.
Targeting the code samples does not work because of these overrides.

Changing the font here only affects the docs themselves, not the font used in the components themselves

Nice! Ok, this wasn't clear to me since this used to not be the case. Thanks for explaining, all fears assuaged 🎉

Random thought: we should really get a deploy tag on Prime so that I don't bombard PRs with pointless comments 😂

Agreed! Great DX improvement