An easy way to clone a CommandAPICommand instance

Description
An easy way to clone a CommandAPICommand instance
Expected code
Something like:
new CommandAPICommand(instance);

Or:
instance.copy();

Extra details
No response

Implemented in release 8.6.0.


Offer information for using GM as IM where possible

This helps in avoiding the bundling of GM on platforms which already have ImageMagick in their bundle (e.g. Heroku). Also I feel it gives a little hint to someone who has no clue about image processing, what are the available tools etc (almost like I was when I came here).

Please add this info also to: https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/image-processing.md (PRs accepted on dev branch)


GLFW.glfwInit segfaults when running with java temurin 19

Version
3.3.1
Platform
Windows x64
JDK
temurin 19
Module
GLFW
Bug description
When running with java 19 in debug mode, calling GLFW.glfwInit(); crashes the JVM. The crash does not happen and everything is functioning correctly when not debugging.
Steps I have taken to create this:

Create an empty maven project in intellij
Set maven.compiler.target and maven.compiler.source to 19
Paste minimal opengl dependencies
run with debug:

public static void main(String[] args){
	GLFW.glfwInit();
}

Stacktrace or crash log output
Connected to the target VM, address: '<IP_ADDRESS>:57952', transport: 'socket'
[LWJGL] [ThreadLocalUtil] Unsupported JNI version detected, this may result in a crash. Please inform LWJGL developers.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ff872b76b28, pid=30472, tid=31440
#
# JRE version: OpenJDK Runtime Environment Temurin-19+36-RC1(beta) (19.0+36) (build 19-beta+36-pre)
# Java VM: OpenJDK 64-Bit Server VM Temurin-19+36-RC1(beta) (19-beta+36-pre, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# C  [jdwp.dll+0x26b28]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\...\hs_err_pid30472.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/adoptium/adoptium-support/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Disconnected from the target VM, address: '<IP_ADDRESS>:57952', transport: 'socket'

Process finished with exit code 1

This is probably already fixed by #799 which should be available in the next snapshot.

LWJGL 3.3.2 snapshot 3 is now available and works on JDK 19.

This is probably already fixed by #799 which should be available in the next snapshot.

The crash does not happen and everything is functioning correctly when not debugging.

I can't think of any reason why this would only happen in debug mode though.

The debugger probably uses the new function, otherwise it wouldn't be called.


[tlcli] Add a benchmark command

This patch adds a benchmark command to the telamon CLI, allowing to
re-run benchmarks (both of the generated code, and the reference code)
for a given kernel and replay file after-the-fact.
This will print the same information as in the benchmark.txt generated
during the search, namely the average runtime of the benchmarked kernel
and the reference.   The bound for the fixed candidate generated is also
displayed.
A batch mode is also provided, for running the same kernel with
different replays.  In that case, the output (to stdout) is a .csv
containing one line per replay, with the raw measurements.

Changed num bench runs to a parameter.


Feature: configure unit testing

Resolves #9.

Pair-programmed avec moi, but we still want feedback over where to place the tests (next to the component, or in tests or __tests__ directory?), and also on consistency in the config files format (like, we .babelrc, but jest.config.mjs)

I think that tests should be placed in slices of functionality, i.e. one level below the components
Regarding config files, do we really need Babel? I think it wasn't necessary when I was configuring the testing of Apparitions

I don't have concrete information on whether Babel is really needed here or not, but if I understood correctly, we need it for compatibility of TS and ES6 (we weren't sure what we're gonna be dealing with so we just decided to stay safe).
Do you suggest to remove it?

It's fine for now, maybe I'll look into removing it in the future


multiple base directories and routes

On the documentation, it says that it can be used as a drop-in replacement for gulp-connect.
How to use it in the following situation?
gulp.task('connect', ['styles'], function () {
  var serveStatic = require('serve-static');
  var serveIndex = require('serve-index');
  var app = require('connect')()
    .use(require('connect-livereload')({port: 35729}))
    .use(serveStatic('.tmp'))
    .use(serveStatic('app'))
    .use('/bower_components', serveStatic('bower_components'))
    .use(serveIndex('app'));

  require('http').createServer(app)
    .listen(9000);
});

If I use var app = require('gulp-connect-php')() I get:
TypeError: object is not a function

Sorry for the delay Isaac, was not receiving emails on issues. Looking into this tonight, should have a patch out soon

Hi Isaac, unfortunately gulp-connect-php doesn't currently support livereload. It is a feature I would like to implement but haven't yet had the time. There are also some other features from gulp-connect that aren't supported. gulp-connect is a very robust server module whereas this module only supports the most fundamental features.

Hey Micah, I was able to use gulp-connect-php with BrowserSync very easily:
gulp.task('connect', function() {
  connectPHP.server({
    hostname: '<IP_ADDRESS>',
    bin: '/Applications/MAMP/bin/php/php5.5.3/bin/php',
    ini: '/Applications/MAMP/bin/php/php5.5.3/conf/php.ini',
    port: 8000,
    base: 'app'
  });
});

gulp.task('serve',  ['connect'],function () {
  notify: true,
  browserSync({
    proxy: "localhost:8000"
  });
});

Is it possible to use multiple base directories and routes?
With BrowserSync, it works like this:
  browserSync({
    notify: false,
    port: 9000,
    server: {
      baseDir: ['.tmp', 'app'],
      routes: {
        '/bower_components': 'bower_components'
      }
    }
  });

Thanks to inagaxiii and saacalves for pointing out the ease of integrating BrowserSync with gulp-connect-php. Below is a snippet of a working example using BrowserySync to live reload the browser while editing php files. Enjoy
var gulp = require('gulp'),
    connect = require('../../index.js'),
    browserSync = require('browser-sync');

gulp.task('connect-sync', function() {
  connect.server({}, function (){
    browserSync({
      proxy: 'localhost:8000'
    });
  });

  gulp.watch('**/*.php').on('change', function () {
    browserSync.reload();
  });
});

Hey Micah, you're welcome!
There are some issues though:
Sometimes BrowserSync doesn't work (it just doesn't refresh, I need to do it manually), for PHP, Sass and js files. I haven't been able to find out yet exactly when and why, it seems to occur randomly.
Also, each time I hit refresh in the browser, I get in the CLI a cluttering list of all the page assets, for example:
[BS] Reloading Browsers...
[Fri Jan 30 11:07:32 2015] <IP_ADDRESS>:54464 [200]: /
[Fri Jan 30 11:07:33 2015] <IP_ADDRESS>:54465 [200]: /bower_components/font-awesome/css/font-awesome.css
[Fri Jan 30 11:07:33 2015] <IP_ADDRESS>:54468 [200]: /main.css
[Fri Jan 30 11:07:33 2015] <IP_ADDRESS>:54469 [200]: /bower_components/modernizr/modernizr.js
[Fri Jan 30 11:07:33 2015] <IP_ADDRESS>:54470 [200]: /bower_components/jquery/dist/jquery.js
[Fri Jan 30 11:07:33 2015] <IP_ADDRESS>:54471 [200]: /bower_components/skrollr/src/skrollr.js
[Fri Jan 30 11:07:33 2015] <IP_ADDRESS>:54472 [200]: /bower_components/bootstrap-sass-official/assets/javascripts/bootstrap/affix.js
[Fri Jan 30 11:07:33 2015] <IP_ADDRESS>:54475 [200]: /bower_components/bootstrap-sass-official/assets/javascripts/bootstrap/alert.js
// etc...

I've been able to use multiple root paths by running gulp-connect and gulp-connect-php side by side, with the help of moderewrite middleware:
var gulp = require('gulp');
var connect = require('gulp-connect');
var phpconnect = require('gulp-connect-php');
var modrewrite = require('connect-modrewrite');
var browserSync = require('browser-sync').create();

gulp.task('serve', ['sass'], function() {

    phpconnect.server({}, function() {
        // connect is required to serve static assets from multiple roots
        connect.server({
            port: 8001,
            root: ['.', '.tmp', 'node_modules'],
            middleware: function() {
                return [
                    // urls without extensions or with php extension should
                    // be proxied to php. This prevents dots in urls, though.
                    modrewrite([
                        '^([^.]*|.*?\.php)$ http://localhost:8000$1 [P,NC]'
                    ])
                ];
            }
        });
        browserSync.init({
            proxy: 'localhost:8001'
        });
    });

   // ad-hoc watches for my website
    gulp.watch("./assets/css/**/*.scss", ['sass']);
    gulp.watch("./assets/js/*.js").on('change', browserSync.reload);
    gulp.watch("./site/**/*.php").on('change', browserSync.reload);
});

@louisremi Thank you so much for your suggestion. For the first time since I'm trying to make gulp-webapp work with php I get to see page with styles!
It's an awesome first step. I do notice that the moment the server starts gulp spits out the following error:
[21:39:46] Server started http://localhost:8001
[Wed Aug 26 21:39:55 2015] <IP_ADDRESS>:55766 [200]: /
[BS] Proxying: http://localhost:8001
[BS] Access URLs:
 --------------------------------------
       Local: http://localhost:3000
    External: http://<IP_ADDRESS>:3000
 --------------------------------------
          UI: http://localhost:3001
 UI External: http://<IP_ADDRESS>:3001
 --------------------------------------
[Wed Aug 26 21:39:56 2015] <IP_ADDRESS>:55774 [200]: /
Error: Forbidden
    at createError (c:\Users\S\dev\gulp-php\node_modules\gulp-connect\node_modul
es\connect\node_modules\serve-index\index.js:188:13)
    at Object.directory [as handle] (c:\Users\S\dev\gulp-php\node_modules\gulp-c
onnect\node_modules\connect\node_modules\serve-index\index.js:100:46)
    at next (c:\Users\S\dev\gulp-php\node_modules\gulp-connect\node_modules\conn
ect\lib\proto.js:194:15)
    at SendStream.error (c:\Users\S\dev\gulp-php\node_modules\gulp-connect\node_
modules\connect\node_modules\serve-static\index.js:86:37)
    at SendStream.emit (events.js:107:17)
    at SendStream.error (c:\Users\S\dev\gulp-php\node_modules\gulp-connect\node_
modules\connect\node_modules\serve-static\node_modules\send\lib\send.js:172:51)
    at SendStream.onStatError (c:\Users\S\dev\gulp-php\node_modules\gulp-connect
\node_modules\connect\node_modules\serve-static\node_modules\send\lib\send.js:28
5:48)
    at c:\Users\S\dev\gulp-php\node_modules\gulp-connect\node_modules\connect\no
de_modules\serve-static\node_modules\send\lib\send.js:378:26
    at FSReqWrap.oncomplete (fs.js:95:15)

Do you know what is causing this?

I found out that it has something to do with settings the root property of gulp-connect.
See: https://github.com/AveVlad/gulp-connect/issues/38

For now, the formal response to this will be @louisremi's response found here: https://github.com/micahblu/gulp-connect-php/issues/2#issuecomment-124124307
We may consider it as an option in the future, and we welcome patches for it both in terms of adding the support to the library and as documentation in the readme or an example gulpfile... but for now, this seems reasonable.


Replace the rest of the hardcoded references to amd64 with {{ go_arch }}

Thank you for writing this role - it saved me a bunch of time writing my own.
I've updated the install tasks to use {{ go_arch}} instead of amd64 directly. This should match how the binaries are downloaded - I followed the pattern used in #22.
I have a pi and an old debian-running macbook I ran this updated version against and it appears to successfully install and run promtail on both of the hosts.

@mkeesey
Thank you very much for the PR and please excuse the delay in review.
The change itself makes sense - I am wondering if it would make sense to completely remove the notion of architecture from the binary itself? What do you think/suggest?
Let me know and I merge the PR and create a new release :-)

@mkeesey
Thank you very much for the PR and please excuse the delay in review.
The change itself makes sense - I am wondering if it would make sense to completely remove the notion of architecture from the binary itself? What do you think/suggest?
Let me know and I merge the PR and create a new release :-)

No problem at all! Thanks for taking a look.
I think a lot of the necessity of the architecture-specific name comes down to the unzip process - the Grafana folks package the binary within the zip itself with OS and architecture specific names. Annoyingly, I haven't found a reasonable way to transform the filenames within the zip as they are extracted from promtail-$OS-$arch to a standard name like promtail. We could do a copy or move step afterwards so that the existence check at the beginning and the symlinking stage can use the base name, but it seems simpler to me to stay with the convention the upstream packagers use so we don't have to worry about multiple stages of checking if we need to do an operation.
I'm definitely ok with playing around with it some more if you want to iterate on the design a bit. :+1:

Thanks for your explanation 👍

but it seems simpler to me to stay with the convention the upstream packagers use so we don't have to worry about multiple stages of checking if we need to do an operation.

Agreed - I'll merge the PR and create a new release. Thank you very much for your efforts


Allow global http agent for firebase as a setting (#253)

Discussion
As discussed in https://github.com/firebase/firebase-admin-node/issues/253
The global http agent is implemented as a static variable under the FirebaseNamespace.
I'm not proud of this solution, but there seems to be no clean way of doing this short of a bigger rewiring around HttpClient constructions.
Usage
import * as admin from "firebase-admin";
const HttpsProxyAgent = require("https-proxy-agent");

export const initializeFirebaseAdmin = (serviceAccount: any) => {
	const proxyUrl = process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy;
	if (proxyUrl) {
		admin.setHttpAgent(new HttpsProxyAgent(proxyUrl));
	}

	admin.initializeApp({
		credential: admin.credential.cert(serviceAccount),
	});
};

thx @googlebot

I do like the simplicity of this approach. But I'm not sure if we want to expose any statics from the FirebaseNamespace. Will discuss this with the team and get back to you.

Thank you @Gyunikuchan, great feature.
global-tunnel use-case won't work for me, so I wanted to specify an agent for firebase-admin, I tried cloning your repo using "firebase-admin": "git+https://github.com/Gyunikuchan/firebase-admin-node.git" in my npm dependencies, but no luck when importing?
Error: Cannot find module 'firebase-admin'

Thank you @Gyunikuchan, great feature.
global-tunnel use-case won't work for me, so I wanted to specify an agent for firebase-admin, I tried cloning your repo using "firebase-admin": "git+https://github.com/Gyunikuchan/firebase-admin-node.git" in my npm dependencies, but no luck when importing?
Error: Cannot find module 'firebase-admin'
I guess because it's not an official version release?
@hiranya911 Can you please approve that :)

If you trust my repo or just want a quick insecure build, you may import from
"firebase-admin": "git+https://github.com/Gyunikuchan/firebase-admin-node.git#built"


New Feature: Quick Reference

Quick Reference
Add a new sub page Quick Reference located at /documentation/quick-reference. This page lists all* CSS classes available in the calcite-web source and has a search filter to narrow classes by string.
Based on an idea from @noahmulfinger in #782.
*Not all.
Cool Features

Section headers link to appropriate documentation page/anchor
Entire section hides if no classes in that section are matched by a search string.
Icons!
Uses the user-select CSS property to select only the actual text of the class name for easy copying.
Adds a new list classes to table_of_contents.yml to source class names that aren't listed under the modifiers list.

Screenshots

Filtered

Looks good! Nice work @oknoway :1st_place_medal:
I think there are a couple things we could tweak, which I basically told you while you looked over my shoulder:

Use  elements for the... code elements
Keep the lists, as that is semantically what this is
Make the sections darker so they pass WCAG 2.0 AA standards (at least link-darkest-gray)

So something like:

    Avenir

.avenir-regular

.avenir-regular

.avenir-regular

That gives a similar look without all the custom classes:

But that's all just 🎨   C O S M E T I C  🎨  . Nice Work! 👌  🆕   ✅
Also thanks to @noahmulfinger for the idea.

Thanks @paulcpederson ‼
I've incorporated your changes here.
Also, as discussed, I've made Quick Reference a top level page. 👨🍳💋👌


clusteradm addon enable does not do any validation or warning about unknown addons

clusteradm addon manages specific addons, as documented in
https://open-cluster-management.io/getting-started/integration/
but will happily enable any name - for example:
$ clusteradm addon enable --names foo-bar --clusters dr1,dr2 --context hub
Deploying foo-bar add-on to namespaces open-cluster-management-agent-addon of managed cluster: dr1.
Deploying foo-bar add-on to namespaces open-cluster-management-agent-addon of managed cluster: dr2.

On the hub, you see that the new addon was added but it remain in Unknown state
since there is no such addon.
$ kubectl get managedclusteraddons -A --context hub | grep foo-bar
dr1         foo-bar                       Unknown
dr2         foo-bar                       Unknown

I think the user expectation is:

Either don't allow addons that are unknown
Or at least warn that this addon is unknown to alert users

See also the discussion in slack:
https://kubernetes.slack.com/archives/C01GE7YSUUF/p1684951933479419

Maybe we need to check against the ClusterManagementAddOn first but I am not sure if ClusterManagementAddOn is required.
@ycyaoxdu what do you think?

ClusterManagementAddOn is actually required

/kind bug


Hot Module Replacement not working for CSS changes.

First of all, love this starter pack!
I ran into a small issue -- in dev mode, HMR is working with changes to the JSX but not working with changes to the CSS files. I believe this has to do with the fact that we are using extract-text-webpack-plugin in dev.
Taken from:
https://github.com/webpack/extract-text-webpack-plugin

Caveats:
Additional HTTP request
Longer compilation time
More complex configuration
No runtime public path modification
No Hot Module Replacement

@mjyoung Thanks! Unfortunately you're right, you may need to plug something else in to make the browser refresh CSS... I'm sure someone somewhere made a webpack plugin exactly for this purpose :)

I've opened a PR with a fix for this

Cool !


Papermerge 3 Status

Currently Papermerge 3 2.2.x is in active development.
The major feature for 3 2.2.x release, from user point of view, will be the support for OAuth2, OpenID Connect (OIDC) and LDAP authentications.
In general the whole authentication is being carved out into a separate microservice.
Sounds great, right? But what does it mean?
It means basically that authentication will not be performed by "papermerge-core" application, but in separate one. By default from 3 2.2.x onward the authentication will be performed by auth-server. As mentioned in first paragraph, auth-server will support oauth2, oidc and ldap in addition to default classical database user credentials authentication. The whole point of this feature, is that in case you want to replace default authentication system with another one e.g. authelia, keycloak etc you etc will be able to do so.
Why? You may wonder why would I need an external authenticator?
Well, because if you want to store your documents securely, then you may consider an 2FA authentication - and here were all external authentications come into the picture.
Or maybe you want to authenticate to your Papermerge instance with your github account (which has 2FA enabled of course)? This is where support of oauth2 protocol comes into the foreground.
Another change, which I guess is not relevant for end users, but still keeps me busy, is the replacement of emberjs based frontend with reactjs. Also in frontend I use now TypeScript instead of JavaScript. Frontend code base was moved into papermerge-core repository.
Yet another change, which I think is relevant, is that REST API will be now written in FastAPI instead of DRF; from end user perspective it means much cleaner (and complete, i.e. with detailed definition of all fields) documentation of REST API.
I will be posting development updates in this ticket.

A couple of points:

In order to avoid confusion, and be in line with semantic versioning - the release 2.2 will be re-titled 3.0. This is because 3.0 won't be compatible with 2.x.
There is a new documentation page https://papermerge.github.io/documentation/; which is not yet official, but it will be in a month or so. In new docs it is more intuitive how to switch between 2.0, 2.1 and 3.0. In new docs, version 3.0 is currently labeled 3.0-dev.


Enable opt-in publishing release from certain branches even when not on tag

Allows the user to choose certain branches, where a stable version of the artifact will be published on every push (i.e. not only when on a tag).
This is suitable, for example, in a continuous publishing/deployment scenario.

Thank you for this contribution! I'm curious if it's possible to achieve similar functionality with the following steps in CI?
git tag -af $(git describe) -m $(git describe)
sbt ci-release

I would prefer to try and keep this plugin as simple as possible.

Hi, I understand the desire to keep the plugin small and simple. So I tried you suggestion, to see how far it can get us.
> git describe --tags
v1.5.3-5-g5e98230

> sbt version
...
[info]  1.5.3+5-5e98230c-SNAPSHOT

> git tag -af v1.5.3+5-5e98230 -m v1.5.3+5-5e98230
> git describe --tags
v1.5.3+5-5e98230

> sbt version
...
[error] scala.MatchError: v1.5.3+5-5e98230+0-5e98230c

It doesn't seem to work as intended. sbt-dynver chokes on this "faked" tag-as-describe. We can work around this by using - instead of + and prepending g in front of the short hash.
> git describe --tags
v1.5.3-5-g5e98230

> sbt version
...
[info]  1.5.3+5-5e98230c-SNAPSHOT

> git tag -af v1.5.3-5-g5e98230 -m v1.5.3-5-g5e98230
> git describe --tags
v1.5.3-5-g5e98230

> sbt version
...
[info]  1.5.3-5-g5e98230

Then it "works". But it's quite hacky :disappointed: . People probably won't like the g and would like +, so that the version would look the same as if produced by sbt-dynver in a normal way.
Another advantage of doing this in sbt-ci-release (over manipulating with git from the outside), is that you don't need to touch git yourself at all. All you need is sbt-ci-release and do the configuration in sbt.

You can BTW avoid the + character with dynverSeparator in ThisBuild := "-". The MatchError looks like a bug in sbt-dynver. I encourage you to report an issue to sbt-dynver so that the version number can be configured. Alternatively, you can set the version yourself with version in ThisBuild := "..."
I'm gonna close this PR since I'm not convinced the benefits outweigh the added complexity in this plugin. You can always fork the repo and release under another organization, CiReleasePlugin.scala is less than 200 lines of code anyways.


Adapt plugin creation/initialization so that it works with TS 2.2.2 out of the box

A summary of the changes can be found in this comment.

@Istar-Eldritch I would like to accept this PR, even if it breaks our tests. Are you OK?

@angelozerr The test basically ensure backwards compatibility with tsserver-plugin, it requires the plugin to export a function create. If this is not a requirement feel free to blow them up.

The test basically ensure backwards compatibility with tsserver-plugin

I have aligned tsserver-plugins with TypeScript 2.2.1, so now create function is not required. Thanks for the info.

Adding a comment why this code is duplicated would make me feel better ;-)

Yes sure!

Thanks @egamma!
I will adapt your work to fix tests and uses registerCodeFix

@angelozerr I've tested the latest from VS Code. With the change to use registeredCodeFix I don't get quick fix proposal for tslint errors.
I assume that Eclipse doesn't use the same protocol for requesting quick fixes.
Here is an edited trace from VS Code:
Info 24   request: {"seq":4,"type":"request","command":"getSupportedCodeFixes","arguments":null}
Info 26   response: {"seq":0,"type":"response","command":"getSupportedCodeFixes","request_seq":4,"success":true,"body":["2304","2339","2377","2420","2503","2515","2653","2663","2686","2689","6133","6138","17009"]}
...
Info 39   request: {"seq":8,"type":"request","command":"getCodeFixes","arguments":{"file":"c:/Users/egamma/Projects/tries/ls-plugin/test-plugin/hello.ts","startLine":13,"endLine":13,"startOffset":17,"endOffset":24,"errorCodes":[2515]}}
Info 40   tslint-language-service getCodeFixes 2515

Notice that the VS Code first makes a getSupportedCodeFixes request. This request returns the error codes which have quick fixes. Only if an error code has a quick fix, VS Code sends the requrest  getCodeFixes. I haven't figured out why 6999 isn't returned as  a supported code fix, since you have registered.
Obviously changing the tslint error code to one returned by getSupportedCodeFixes will make the quick fix appear.
The code fix action also has no effect in VS Code and doesn't open the tslint.json. Again Eclipse handles the edit request differently than VS Code and I assume Eclipse always opens the file for an edit. VS Code doesn't do so.
Bottom the Eclipse client and the VS Code client interpret the language server protocol slightly different.

Thanks for the feedback @egamma. I will try with VSCode to discover the problem.

@angelozerr I don't know your development setup, but do you have a setup where you can debug the language server/plugin? If not I can describe how I do it with VS Code.

@egamma I think we should do more serious unit testing. I still don't know what is going on in the plugin internals, but I would like to "emulate" the calls from tsserver instead of doing manual Q.A.

@angelozerr getting more unit testing coverage is the right thing to do.
However, one issue is that the TS protocol is not fully specified, while the individual request/responses are documented in protocol.ts, the request/response sequence isn't. The best you can do for now is to consider vscode as a reference implementation and trace its sequence to the server.

@angelozerr I could not resist.. so here is what happens.
The registerCodeFix call from the plugin works properly and registers the code fix. However, the issue is that the VS Code client makes a request to get the 'supportedCodeFixes' only once during initialization and stores the result. Then later it only makes a server request when an error code is a supported error code. Now the problem is that errorCode 6999 is registered after the VS Code client made the call to getSupportedCodeFixes, so it is registered too late.
So I really think there needs to be supported API from TS to register quick fixes, the only other work around that comes to mind is to the hack to reuse an existing error code with code fixes...

The other option is to not use caching of supported error codes in VS Code, but since getQuickFixes is called in VS Code on each cursor change, this is on a critical path and the caching optimization makes good sense.

The other option is to not use caching of supported error codes in VS Code

I cache it too, but I call getSupportedCodeFixes only when I need it, that's to say for the first quick fix to display.

@egamma I think we should do more serious unit testing. I still don't know what is going on in the plugin internals, but I would like to "emulate" the calls from tsserver instead of doing manual Q.A.

+1
Perhaps we should do the same thing than TypeScript which does some tsserver test (with protocol), not sure with that.

So I really think there needs to be supported API from TS to register quick fixes, the only other work around that comes to mind is to the hack to reuse an existing error code with code fixes...

Do you want I use existing error code like you have fone for the moment? Perhaps my suggestion https://github.com/angelozerr/tslint-language-service/pull/13#issuecomment-295334208 could resolve the problem? Tell me.

@angelozerr your suggestion from above makes sense and I'll discuss it with @mjbvz he owns the TypeScript integration. In the meantime I suggest to do the existing error code work around. It enables to do some quick fix testing.
We should also start to think about what is needed to be done before we invite early adopters to try the tslint-language plugin from VS Code. I'll file a separate issue for this.


build fails with "The system cannot find the path specified" on Windows

I am trying bubblewrap on windows nodejs v12.10.0
This is how my llama-pack config looks like where I have directed it to latest android cli and OpenJDK directory
{"jdkPath":"D:\\work\\openjdk","androidSdkPath":"D:\\work\\and-cli"}
This the error it returns
bubblewrap build
Installing Android Build Tools. Please, read and accept the license agreement
Installing Build Tools
The system cannot find the path specified.

cli ERROR undefined

I have already done the init which worked fine but build is not working

Could you confirm the version of Bubblewrap being used? It'd be great if you could confirm the version of the android-cli-tools being used too, as this may be related to this issue: https://issuetracker.google.com/issues/154298380

It seems Bubblewrap is being unable to execute sdkmanager.  it should be located inside D:\\work\\and-cli\\tools\\bin. Can you check if it exists in that directory?

I checked running with a folder without /tools/bin/sdkmanager and I can reproduce the error. My guess is that the android CLI tools was unzipped incorrectly (eg: maybe it unzipped the content into a sub-directory?)
While trying it out, I bumped into another issue on Windows, caused by the recent update to the Android CLI tools. I have created #148 to fix it.

It seems Bubblewrap is being unable to execute sdkmanager. it should be located inside D:\\work\\and-cli\\tools\\bin. Can you check if it exists in that directory?

Yes It does ,
So whats the final resolution

No final resolution yet. I need to be able to reproduce the issue in order to fix it. Any further details on your environment setup that could help?

The code callssdkmanager instead of sdkmanager.bat. It does work on my install. I wonder if that's the culprit.
@amanintech If you run D:\work\and-cli\tools\bin\sdkmanager on the command-line, what output do you get? Is it different from running D:\work\and-cli\tools\bin\sdkmanager.bat?
@JotinhaBR Could you try it too?

@andreban
this is my return:

Ok, that last error seems related to this: https://issuetracker.google.com/issues/154298380, which is a bug on the Android SDK client. It seems unzipping the SDK with the Extract All... from Windows creates the wrong directory structure. Unzipping with something like 7-zip creates the correct structure. Can you try unzipping with 7-zip and check if that fixes the issue?

@andreban
I did the file extraction with 7-zips, even going straight to disk C to not have space, but I still have the same error.

Oh, I see -> the Android CLI tools needs to be extracted to a folder. For instance: C:\android-cli-tools. The \tools directory will be inside that.  It need to be like that because when you run the tools it will create more files in that folder. llama-pack-config.json needs to point to C:\\android-cli-tools.

@andreban
Now it worked :)
Conclusion, the space does not get in the way, but the Android folder is protected for ADM only, so it’s not a good idea to put the SDK there, so I put it in the root C disk, and made the structure that spoke.
following prints:

thank you :)

@JotinhaBR glad to hear that!
@amanintech let me know if the same solution applies to you or if you are running into a different issue.

@andreban that indeed worked
But Now it gives me this error

This is my environment configuration -
windows 10 x64
android CLI - 6200805_latest
OpenJDK -8

@amanintech This seems like the issue fixed via #148. Version 1.1.2 of @bubblewrap/cli has been released and should have the fix. Can you check if you are on version 1.1.2?

@andreban Yes that's true updating to 1.1.2 fixed the issue.
Also, I think we should update the quick setup guide to suggest them to add android-cli tools to the tools folder.

@amanintech thanks for confirming!
+1 on improving the quick setup guide. It's probably worth creating an issue to track this. Also, contributions (docs and code) are greatly appreciated. 😉

I would to fix that and already have  Created issue #155
Please assign that to me

OS: Windows 10
Node: v12.16.1
bubblewrap: v1.5.0

This is the error I'm getting while running bubblewrap build
I've downloaded and unzipped commandlinetools for android but still its pointing to Android Studio application.
need some help to solve this asap.

@rohitattaluri Did, you tried following the exact steps at https://github.com/GoogleChromeLabs/bubblewrap/tree/master/packages/cli ?

@rohitattaluri Did, you tried following the exact steps at https://github.com/GoogleChromeLabs/bubblewrap/tree/master/packages/cli ?

thanks man. Actually I referred to some other doc's. Went to some Misinterpretation.
Thanks for the reference link. Followed it and works amazing.

Awesome 👏🏻


Select a matrix subset

How do I select and return a subset of a matrix? I.e. a selection of rows and columns...
Thanks
Enrico

This is definitely a missing feature. Do you have any suggestions on how you'd like it implemented?
Examples:

JavaScript (ndarray)
Python (numpy)
Matlab
Julia

Hi Mateo, in my project I'm using a very simple function that looks like this:
`function subset(matrix, rowRange, colRange) {
const rows = matrix.shape[0];
const cols = matrix.shape[1];
matrix = matrix.toArray();
const matrixSubset = [];

let i = 0;
rowRange.forEach(function(rowValue) {
    matrixSubset.push([])
    colRange.forEach(function(colValue) {
        matrixSubset[i].push(matrix[rowValue - 1][colValue - 1]);
    })
    i++;
})

return new Matrix(matrixSubset);

}`
Where I pass to the subset function the original matrix and two arrays that represent the rows and columns I want to select. As you can see, the arrays in the example are not "zero-based", i.e. if I want to extract the first 2 rows and the first column of a given matrix I would pass [1,2] and [1]. It's just more intuitive to me.

See slice method.


More explicit instructions to get going with Hugo

Hah, I thought it auto-default to source branch when checkout the repo 🤔 oh well ¯\_(ツ)_/¯ commit looks legit 👍

It didnt auto default to source afaict. That's why i had an error


CEDAR fields with inconsistent types failed to be indexed with ES dynamic mapping

Sunset reported on 3/6/2024:

Juan Puerto just ran the process to build that information, please check this uuid 163a9e01b60177840a26965970f947c4, now that we are seeing the same issue as we did on DEV. (404 on portal)

Zhou 3/7/2024:
ERROR:libs.es_writer:Failed to write doc of uuid: 3ad74c9d10ccf828672b2ba990f915a8 to index: hm_dev_consortium_portal
ERROR:libs.es_writer:Error Message: {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"failed to parse field [descendants.metadata.metadata.slide_id] of type [float] in document with id '3ad74c9d10ccf828672b2ba990f915a8'. Preview of field's value: 'V11A19-016'"}],"type":"mapper_parsing_exception","reason":"failed to parse field [descendants.metadata.metadata.slide_id] of type [float] in document with id '3ad74c9d10ccf828672b2ba990f915a8'. Preview of field's value: 'V11A19-016'","caused_by":{"type":"number_format_exception","reason":"For input string: \"V11A19-016\""}},"status":400}

These ["fdbbf05be15b3787b048733fc2b30fa8", "70b282bb6d40e922262e6d1abbf1d329", "9c85b009068cb1daf2ce7e7de274a88b", "90e983da41a140b1cd7b7c9a47f33fd2", "613b1585e3864aabd70bcf09386c53bb", "d7120a251a857291888f27aaf6af069f"] datasets have 'slide_id': '1' which is a number in a string format. And others have values like 'slide_id': 'V11L05-326' .
The ingest_metadata has this 'umi_offset' field and most of them having the value '17' or '16' which are considered as float/number during the Elasticearch mapping. But this 163a9e01b60177840a26965970f947c4 has value 'Not applicable' and it's being mapped to a string/text . This inconsistency is causing conflicts and so it failed to be indexed.
ERROR:libs.es_writer:Failed to write doc of uuid: 3ad74c9d10ccf828672b2ba990f915a8 to index: hm_prod_consortium_portal
ERROR:libs.es_writer:Error Message: {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"failed to parse field [descendants.metadata.metadata.umi_offset] of type [float] in document with id '3ad74c9d10ccf828672b2ba990f915a8'. Preview of field's value: 'Not applicable'"}],"type":"mapper_parsing_exception","reason":"failed to parse field [descendants.metadata.metadata.umi_offset] of type [float] in document with id '3ad74c9d10ccf828672b2ba990f915a8'. Preview of field's value: 'Not applicable'","caused_by":{"type":"number_format_exception","reason":"For input string: \"Not applicable\""}},"status":400}

According to Juan:

There are lots of these cases. Barcode size, UMI size
I don’t have a clear picture of how many of these cases there are. Stephen Fisher would probably have the clearest picture of where this is possible

Sunset:

can they be mapped to strings in all cases? I don't think we use the numbers for any computational actions that will require them as numbers.

John:

Getting these uniformly indexed as keywords will stop things from breaking, but we will need to revisit how we want these to be searched.

So far we noticed the issue with the following offending fields:

transposition_kit_number
library_adapter_sequence
umi_offset
slide_id
sequencing_read_format
sample_indexing_set

After looking into this mapping issue, which should have been investigated since long time ago, I think explicitly map these offending fields to the keyword type is the best. Because

this minimizes the impact to other existing fields that have no conflicts
we don't need to full-text search their values
we can store any data type inside of it
a text field with keyword subfield creates two fields in the mapping, keyword just one record

Actions items:

identify what other fields can be keyword rather than text type with keyword subfield
explicitly map those text fields for search needs, need to discuss with the Harvard team
what fields should be explicitly mapped as date and what as float


Allows for async functions/closures to be registered as routes

Adds tests to match

@amomchilov For your review. I dislike how much code duplication this introduces, but I couldn't figure out a way to reduce it due to the cascading nature of async.

Until then, could you help me understand when a callback should be async?

When the API user wants to create a callback which uses async functions within it, which will be an increasing percentage of functions over time. Without this the caller can't have any route with a reply (or one they want an error to be propagated back from) use async functions because wrapping the code in a Task won't allow for the result (or thrown error) to be returned.

A realistic example could be an XPC service with a route provided a URL to a PDF. The service needs to download and then parse the PDF to extract some data. PDFs are a notoriously exploit vector, so breaking out this component into an XPC service would be prudent. Using async functions to perform the download would be easiest. And there very well could be async functions involved in the data extraction (ex. running ML inference over it to extract text embedded in images).

When the API user wants to create a callback which uses async functions within it, which will be an increasing percentage of functions over time. Without this the caller can't have any route with a reply (or one they want an error to be propagated back from) use async functions because wrapping the code in a Task won't allow for the return value (or thrown error) to be returned.

Ah yes, that makes perfect sense, thanks for the explanation


could not allocate memory error

I got this error when trying to run the first tutorial and I ran successfully the demo of openvino in the documentation, any help will be grateful
and thank you in advance^^

Hi @YoussephAhmed , i'm also facing the same issue, were you able to solve this?

This issue occurs if Openvino 2020.R4 is used.
Using Openvino 2019.R3 works best for me

Yes. im agree with @kausainshah


Allow mapping event types to groups using regexes

Up until now, in order to associate an event type with an event group, we needed to spell out events full name in settings file under appropriate event group category and level.
Some of the providers have hundreds of event types, which makes filling all this information in tedious and error prone. Not to mention that settings file is now one giant pile of event types.
In order to make process of registering event types scale a bit better, this commit adds support for registering a class of event types that match specified regular expressions. Simple example:
:ems:
  :ems_dummy:
    :event_handling:
      :event_groups:
        :addition:
          :critical:
          - dummy_event01_add
          - dummy_event02_add
          :detail:
          - dummy_event03_add
          - dummy_event04_add
          ...
          - dummy_event70_add
          - dm_event_create

This can now be written as
:ems:
  :ems_dummy:
    :event_handling:
      :event_groups:
        :addition:
          :critical:
          - dummy_event01_add
          - dummy_event02_add
          :detail:
          - dm_event_create
          :detail_regex:
          - ^dummy_[0-9]{2}_add$

Regular expression support has been added to all levels, so if there exists a level :lvl, then :lvl_regex is also available.
We took a great deal of care not to break existing code, so non-regex event type mappings take precedence over regular expression matches. For example, in our sample above, dummy_event_02_add gets assigned critical level despite also matching detail regex.
Note that if sets of event types that are matched by regular expressions are not disjoint, then there will be multiple valid event type mappings. In this case, event types that match more than one
group and/or level get assigned an arbitrary one.
@miq-bot assign @gtanzillo
/cc @miha-plesko @agrare @gberginc

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1562414

I haven't read the details, but I wonder if it's better to put an actual Ruby regexp into the yaml, so it can be serialized and deserialized directly (with the side effect of verifying that it's a valid regex)
[1] pry(main)> require 'yaml'
=> false
[2] pry(main)> puts({:detail_regex => /^dummy_[0-9]{2}_add$/}.to_yaml)
---
:detail_regex: !ruby/regexp /^dummy_[0-9]{2}_add$/
=> nil

To add to https://github.com/ManageIQ/manageiq/pull/17772#issuecomment-410750232, you can have a regex with simple chars like ., and we don't want those interpreted as regexes.  If you encode the regex into the YAML that we can have strings with . that are not confused with regexes.

@Fryguy Thanks for valuable feedback. It is greatly appreciated. I implemented most of the enhancements you proposed. I only kept the regular expression precedence lower in order to have a tool to cherry-pick some of the event types into different groups/levels.


As a volunteer, I want to tell the chatbot to respond to other keywords that fall outside of the standard script so I can submit information outside of the normal template.

Description:
Acceptance Criteria:
Definition of Done:

Need list of keywords.
@dalekunce / @danbjoseph

@dalekunce does Blood Services have something like this for their chatbot?

Don't know for either. My initial thoughts: [optional params]

help = display all potential "commands/keywords"
assessment/dana/needs assessment = assessment form
distribution/nfi/cash = distribution question ([who] distributed [what] [when] and [where]) - 4W
report = report for a given location ([where], [when], [disaster type]) "receipt" look and feel

Do we need more? How exhaustive should the list be?

Is this item related to having a generic additional "remarks" type capability or is it related to supporting additional keywords?

there is prompting the volunteer to finish an incomplete submission (not this issue i don't think).
@dalekunce's initial thoughts above seem to break down into 2 categories. but the second bullet point is not clear to me.
1-getting info from the chatbot (help and report/receipt)
2-submitting distribution data. not sure how this would work well in practice. without having them be standard defined questions and options. otherwise aggregating/organizing that data will be problematic.


CloudReader allows choosing the "Add..." button even if it hangs the app

This issue is a Bug
Related issue(s) and/or pull request(s)
None
Expected Behaviour
You shouldn't be able to select an option that doesn't work and hangs the app!
Observed behaviour
Open the CloudReader, select the "+" icon.
Steps to reproduce

Open the CloudReaader
Select the "+" icon
CR opens a dialog and you can choose a book.
App then hangs since adding new books isn't supported.

Test file(s)
None needed.  Any EPUB will do.
Product

Readium cloud reader app

latest development build uploaded at https://readium.firebaseapp.com
*Browser doesn't matter.

Additional information
N/A

Duplicate?
https://github.com/readium/readium-js-viewer/issues/82

In a sense, yes, though 82 is presented more a need to allow people to add books to the CloudReader library.  Let's leave both open for the moment.


New Crowdin updates

Some files were deleted on purpose?

Some files were deleted on purpose?

Yes, they were never part of the project.


0000-restricting-poc-rewards-for-new-cbrs-deployments.md

This Helium Improvement Proposal (HIP) will temporarily remove Proof of Coverage (PoC) rewards for new indoor and outdoor CBRS radios to the Helium 5G Network for six (6) months (180 calendar days) after implementation. If this HIP passes, it will be implemented 30 calendar days after passing.

Closing this PR and creating a new PR to instead charge a CPI fee

Closing this PR and creating a new PR to instead charge a CPI fee


Update pre-reqs.md so that "fist" is spelled as "first"

fixes Issue #2307

Summary
Related issue(s)
Fixes #

/ok-to-test


Update to 7.86.0

This updates to curl 7.86.0
This includes the fix that was causing issues with http2/tls 1.3/Windows 11 that caused the last release to be yanked. I have tested on Windows 11 and it seems to be working now.
Changelog: https://curl.se/changes.html#7_86_0
There are 4 CVE fixes in this release:
CVE-2022-42916: HSTS bypass via IDN
CVE-2022-42915: HTTP proxy double-free
CVE-2022-35260: .netrc parser out-of-bounds access
CVE-2022-32221: POST following PUT confusion
This release also adds support for websockets. However, I did not add any explicit support for that, though.

Thanks!


Can't docker pull ghcr.io/huggingface/text-generation-inference:1.1.1

System Info
docker pull ghcr.io/huggingface/text-generation-inference:sha-5a1512c succeeded
docker pull ghcr.io/huggingface/text-generation-inference:1.1.1 failed

Information

[X] Docker
[ ] The CLI directly

Tasks

[X] An officially supported command
[ ] My own modifications

Reproduction
docker pull ghcr.io/huggingface/text-generation-inference:1.1.1
Expected behavior
Sorry if I am being foolish here. I attempted to run the command as shown in the Quick Tour but encountered issues. So, I tried pulling the images, but unfortunately, I still faced failures.
model=tiiuae/falcon-7b-instruct
volume=$PWD/data # share a volume with the Docker container to avoid downloading weights every run

docker run --gpus all --shm-size 1g -p 8080:80 -v $volume:/data ghcr.io/huggingface/text-generation-inference:1.1.1 --model-id $model

docker pull ghcr.io/huggingface/text-generation-inference:1.1.1

It's stuck here:

https://github.com/huggingface/text-generation-inference/actions/runs/6892130310/job/18749584534

INFO: Downloading bootstrap version 'v1.11.1' of cosign to verify version to be installed...
      https://storage.googleapis.com/cosign-releases/v1.11.1/cosign-linux-amd64
ERROR: Unable to validate cosign version: 'v1.13.1'
Error: Process completed with exit code 1.

It's worth noting, looking at cosign's release pages: https://github.com/sigstore/cosign/releases it looks like v2.2.1 is out and patches a CVE if someone is going to update the cosign job anyway.

This was fixed since.


(bug) Space after the input word can trip the system

(bug) Space after the input word
When a word is typed with a leading or trailing space, it is not recognizing the language.
Strip the spaces on the user's input word before processing the language.

I have fixed this bug.  It will be included when I next commit and do a pull request.


Dependencies macro tries to initialize static vars

Description
Hey!
Seems like the DependencyClient macro tries to initialize static vars within the generated init.
So the following code
@DependencyClient
public struct SimpleDependency {
    static var foo: Int = 42
    var bar: () -> Void
}

generates
@DependencyClient
public struct SimpleDependency {
    static var foo: Int = 42
    @DependencyEndpoint
    var bar: () -> Void
    init(
        foo: Int = 42,
        bar: @escaping () -> Void
    ) {
        self.foo = foo
        self.bar = bar
    }
}

This does not compile for obvious reasons. Is this just an oversight in the macros implementation or should static vars just not be supported?
Checklist

[x] I have determined whether this bug is also reproducible in a vanilla SwiftUI project.
[x] If possible, I've reproduced the issue using the main branch of this package.
[X] This issue hasn't been addressed in an existing GitHub issue or discussion.

Expected behavior
I'd expect that the static var is just ignored in the initializer. However, as I was seeing the issue, I was also searching for something like @DependencyEndpointIgnored to somehow mitigate the issue. Maybe thats also something worth exploring?
Actual behavior
The initializer tries to initialize the static var, which is not possible.
Steps to reproduce
No response
Dependencies version information
No response
Destination operating system
No response
Xcode version information
No response
Swift Compiler version information
swift-driver version: <IP_ADDRESS> Apple Swift version 5.10 (swiftlang-<IP_ADDRESS> clang-15<IP_ADDRESS>)

Hi @BastianKusserow, this can certainly be fixed, but static vars are not safe to use in Swift 6 (on non-global actors at least), and so this really isn't something you should be doing anyway. If you turn on concurrency checks you will get the following warning:

⚠ Static property 'foo' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in Swift 6

If you have any interest in fixing we would happily take a PR, but I'm not sure when we will have the time to look into it.
For now I am going to convert this to a discussion since it is not a top priority for us, so please continue any discussion over there.


Register

@JuliaRegistrator register

Registration pull request created: JuliaRegistries/General/72794
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" c681ccf5c6d0b670a54bd6044779590e1670ef61
git push origin v0.1.0


Problem when installing the Drone CLI

When running the command cargo +nightly install drone from the Drone book, there is an error when compiling drone v0.11.1 :
error[E0061]: this function takes 1 parameter but 0 parameters were supplied
  --> src/heap/trace.rs:71:33
   |
71 |         match self.gen.as_mut().resume() {
   |                                 ^^^^^^
   |
help: expected the unit value `()`; create it with empty parentheses
   |
71 |         match self.gen.as_mut().resume(()) {
   |                                        ^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0061`.

When applying the change suggested, the command works fine.

The installation instruction in the README should maybe be:
cargo +nightly-2019-11-06 install drone to work without #3 .

Thanks for the report. There is Drone 0.12 version coming soon with support for newer nightlies. The issue caused by landing the generator resume arguments feature. This is a long-waited feature that allows us to get rid of libcore-drone wrapper. So a new breaking release is needed.

@valff I think we can close this one. This issue is not present anymore as far as I can tell.

@valff I think we can close this one. This issue is not present anymore as far as I can tell.

Right, closing this.


Remove periods from list in about-your-personal-dashboard#staying-updated-with-activity-from-the-community

Code of Conduct

[X] I have read and agree to the GitHub Docs project's Code of Conduct

What article on docs.github.com is affected?
https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-user-account-settings/about-your-personal-dashboard#staying-updated-with-activity-from-the-community
What part(s) of the article would you like to see updated?

For example, you'll see updates when someone you follow:

Stars a repository.
Follows another user.
Creates a public repository.
Opens an issue or pull request with help wanted or good first issue label on a repository you're watching.
Pushes commits to a repository you watch.
Forks a public repository.
Publishes a new release.

Periods should be removed from this list, as each line is not a complete sentence (per our style guide)
Additional information
No response

@nguyenalex836 Request you to please assign this to me.


Mobile wallet connection

Currently looks like this, maybe this is ok but seems a bit weird

@mk26071980 Will look into the design

https://www.figma.com/file/A0OEqjIWy6jL4Rk4kT8ddr/UX%2FUI_Workflow?node-id=3622%3A28814&t=s8kozfhxbUgYD3Gf-1

 I also think we might slide the modals from the side on the mobile and tablet. Maybe not at this moment, but eventually

Needs copy from J.


net/http: SNI in TLS Handshake should match Request.Host

In net/http, setting Request.Host successfully sets the HTTP Host header in a client request, instructing the remote server which virtual host config to use to service the request. For TLS connections however, the host component of the request URL is exclusively used to set the SNI in the TLS Handshake.
If Request.Url.Hostname() does not match Request.Host, connections to a SNI enabled server will likely fail. The server will likely reject the TLS handshake with unrecognized_name(112) (see: https://tools.ietf.org/html/rfc4366#section-4).
To fix this issue, the SNI of the TLS handshake must match Request.Host.
I have been able to force the desired behavior with the following code - though this requires a discrete Transport for each target virtual host.
// request sent to '<IP_ADDRESS>:443'
req, _ := http.NewRequest("GET", "https://<IP_ADDRESS>/example", nil)

// virtual host set to 'example.com'
req.Host =  "example.com"

// SNI set to 'example.com'
client := http.Client{
	Transport: &http.Transport{
		TLSClientConfig: &tls.Config{
			ServerName:         req.Host, // here
		},
	},
}

client.Do(req)

Side issue: The unrecognized_name(112) TLS error could be added to crypto/tls/alert.go?
Are there any risks I have not considered for this change? Is there an idiomatic solution I haven't considered? Thoughts welcomed! Thanks.

/cc @agl @bradfitz

@cavaliercoder, the https://golang.org/pkg/net/http/#Request.URL docs say:
        // For client requests, the URL's Host specifies the server to
        // connect to, while the Request's Host field optionally
        // specifies the Host header value to send in the HTTP
        // request.
        URL *url.URL
...
        // For client requests Host optionally overrides the Host
        // header to send. If empty, the Request.Write method uses
        // the value of URL.Host. Host may contain an international
        // domain name.
        Host string

Have you tried setting URL.Host instead of Host?

Yes. The request connects to the correct server, but the SNI and Host header are incorrect and the server does not know which certificate and virtual host to serve.
Setting Request.Host solves half the issue: telling the remove server which virtual host to serve. There's a second half to the problem: the SNI also needs to be set during TLS handshake so the remote server knows which certificate to serve.

What are you trying to do?
I know how SNI works and how net/http works, but I don't know what the use case is here. Nobody else has complained in 8 years or so about the behavior. The closest we've ever had is #14404.

I'm writing a tool to stress test and unit test web servers. I can edit /etc/hosts to direct the tests where they belong, but this quickly breaks down when we want to run the same tests against multiple servers from a CI server. It also sucks when testing our CDN staging network whose IPs need rediscovery for every test run.

The typical solution to that is setting one of the various http.Transport Dial fields and overriding how DNS resolution works.
It's fine to have multiple Transports active, as long as you remember to close their idle connections when you're done with them.

Awesome, I'll head down that path and report back. Thanks for your advice!

This would break usage of net/http for domain fronting, an anti-censorship technique specifically relying on sending different hosts in SNI and HTTP headers. Such a use of net/http is not rare: censorship-resistant tunneling software such as Lantern and my own project Geph both use net/http this way.

The following snippet got the job done for me:
dialer = &net.Dialer{
	Timeout:   30 * time.Second,
	KeepAlive: 30 * time.Second,
	DualStack: true,
}

client := http.Client{
	Transport: &http.Transport{
		DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
			// redirect all connections to <IP_ADDRESS>
			addr = "<IP_ADDRESS>" + addr[strings.LastIndex(addr, ":"):]
			return dialer.DialContext(ctx, network, addr)
		},
	},
}

The above http.Client will send all requests to <IP_ADDRESS>, no matter what hostname is specified in a http.Request's URL. The hostname in the URL is used to set the Host request header and SNI name as desired.

Thanks for taking a look at this @bradfitz. Love your work!


Chocolatey package failure

https://chocolatey.org/packages/synctrayzor/1.1.28, the log is https://gist.github.com/choco-bot/7ab52ed8b5df08f56b381bb4b0fd706c.
The relevant bit of the log looks to be
021-02-19 13:11:42,946 1376 [INFO ] - [NuGet] Successfully installed 'dotnetfx <IP_ADDRESS>90930'.
2021-02-19 13:11:42,960 1376 [INFO ] -
dotnetfx v<IP_ADDRESS>90930 (forced) [Approved]
2021-02-19 13:11:43,851 1376 [INFO ] - dotnetfx package files install completed. Performing other installation steps.
2021-02-19 13:11:44,976 1376 [DEBUG] - Contents of 'C:\ProgramData\chocolatey\lib\dotnetfx\tools\ChocolateyInstall.ps1':
2021-02-19 13:11:45,007 1376 [DEBUG] - $version = '4.8'
$arguments = @{
    PackageName = 'dotnetfx'
    Release = 528040
    Version = $version
    ProductNameWithVersion = "Microsoft .NET Framework $version"
    Url = 'https://download.visualstudio.microsoft.com/download/pr/014120d7-d689-4305-befd-3cb711108212/0fd66638cde16859462a6243a4629a50/ndp48-x86-x64-allos-enu.exe'
    Checksum = '9B1F71CD1B86BB6EE6303F7BE6FBBE71807A51BB913844C85FC235D5978F3A0F'
    ChecksumType = 'sha256'
}

Install-DotNetFramework @arguments

2021-02-19 13:11:45,413 1376 [DEBUG] - Calling built-in PowerShell host with ['[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 'C:\ProgramData\chocolatey\lib\dotnetfx\tools\ChocolateyInstall.ps1' -installArguments '' -packageParameters ''']
2021-02-19 13:11:48,382 1376 [DEBUG] - Redirecting Microsoft.PowerShell.Security, requested by ''
2021-02-19 13:11:49,492 1376 [DEBUG] - Attempting to load assembly Microsoft.PowerShell.Security failed:
 Could not load file or assembly 'Microsoft.PowerShell.Security, Version=<IP_ADDRESS>' or one of its dependencies. The system cannot find the file specified.

I'm not entirely sure what it's trying to do here. @TheCakeIsNaOH, any ideas?

@canton7
That is a known issue with the verifier test, it tends to happen with dependencies that take a while to install.
Re-run once or twice, or if that does not work, then an exemption can be added.

Great, thank you!

It's in, thanks a lot for your help!


CreateTree() function, and "Tree" class

Desired API:
local Tree = BridgeNet2.CreateTree({
     TreeMember = BridgeNet2.BridgeConfig({
          InboundMiddleware = { function() end, function() end },
          OutboundMiddleware = { function() end, function() end },
          MaximumRate = 60,
     }),

     RandomBridge = BridgeNet2.BridgeConfig(),

     Namespace = {
          DeepTreeMember = BridgeNet2.BridgeConfig({
               InboundMiddleware = { function() end },
               OutboundMiddleware = { function() end },
               MaximumRate = 30,
          }),
     },
})

This feature will require a deep-search of the passed tree- unfortunately, it will be impossible to strictly type such a feature, as Luau has no keyof operators, and also no type indexing. As such, it'll likely be impossible to completely type this- however, the user should be able to easily type it as ClientBridge<Object>, or ServerBridge<Object>, so that should be okay.
Implementation shouldn't be too difficult- however, as this feature relies on configuration from separate parts of the project (rate limiting & security), it is temporarily blocked.
This is the third-to-last feature required for BridgeNet2's release.

This is not going to be packaged with BridgeNet2's release- there's way too much to think about when it comes to typing.


Proxy support

Hi, is there a way to get proxy support in this crate? So I can proxy the Websocket requests through my proxy?

hi, thanks for the issue. I've read the documentation for isahc and tungstenite. isahc support http_proxy, https_proxy and socks4/5 proxy, so get_voice_list can easily support all proxy types.
Tungstenite doesn't seem to have such support #177 The good thing is that Tungstenite allows us to use our own TCP/TLS stream, and I might be able to establish a proxy connection before starting the websocket handshake.
But it's going to be a busy time starting tomorrow when we have Chinese New Year, so I'll deal with that in a few days.

fixed on #2 .


⚠ Processors has degraded performance

In 4c79c4a, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 77 ms

Resolved: Processors performance has improved in 52913e1.


Refactor startup scripts, envvars for all omero parameter

Refactor the startup-scripts for OMERO.server:

All omero config properties can be set with environment variables
Database setup is separate from starting OMERO.server
Removed OMERO.grid support- this will be added back in a separate dependent repo
Use dumb-init

@dpwrussell In theory this means you could start a backgrounded script which polls localhost to check whether the server is ready before creating a public user, before the final 99-run.sh script is run, avoiding the requirement to restart the server.

I've renamed run-exec.sh to entrypoint.sh

Works as expected.

BTW, I've just realised https://github.com/openmicroscopy/omero-server-docker/blob/master/requirements.yml#L21 means this can't be tagged as production until https://github.com/openmicroscopy/ansible-role-omero-server/pull/12 is tagged

oops...not sure what happened...

I had a typo, accidently did git push ... -d.

I had a typo, accidently did git push ... -d.

That's kinda scary. Good to know.

Updated in response to @joshmoore's comments.
In addition I've switched from loading .omero files from /config/ to /opt/omero/server/config/ as used in https://github.com/openmicroscopy/ansible-role-omero-server/tree/2.0.0-m1
One issue you may want to consider before ansible-role-omero-server is officially tagged 2.0.0: the configuration script /opt/omero/server/config/omero-server-config-update.sh is in the same directory that's used for .omero files /opt/omero/server/config so you can mount .omero files but not the entire directory.

Discussion now points to:

merging in order:

https://github.com/ome/omego/pull/104
https://github.com/openmicroscopy/ansible-role-omero-server/pull/12
this PR

and then considering omero-server the current candidate production image.

--depends on https://github.com/ome/omego/pull/108

This needed to allow installations without a DB to proceed. You can temporarily test this using https://github.com/manics/omero-server-docker/commit/34b1b073930b99ff200af690b5b2af1a15ffb70c

No objections from my side to having uid and gid be ARGs, but in general, then, you could also subclass the image and usermod. More critical from my POV is: what's the expectation when pulling the image from hub?
To your question in particular: I haven't run into a situation where I can't chown the directory with a particular UID before mounting but I could imagine not wanting to if that were to put something in particular at risk. (i.e. I don't trust the 1000 user on the host system in question)

@ dpwrussell I agree with you. The correct way to solve this is to treat the omero-server Docker filesystem as readonly with the exception of defined directories for logs and temp-files which will need to be mounted as volumes. Then you can simply use docker run --user UID ... to set the user OMERO runs as.
The purpose of the last commit is to at make the default omero-server UID well-known as opposed to using whatever useradd picks as the UID.

Though what would be even better is if all OMERO logs went to stdout/stderr, so just /tmp would need to be writeable.

latest is now 5.4. Shall we go with the flow and this repo matches the milestones of the 5.4 series with the intent of releasing this as production with 5.4.0?
cc: @dpwrussell @manics @sbesson @jburel

Re-ran travis to get this green. Merging, untagged. I'd suggest when 5.4.0-m1 is tagged, that someone create a commit changing latest to v5.4.0-m1 and tag that commit which should then be built on hub.
cc: @mtbc


Translate documentation

We should translate the documentation to English to ease collaboration and make the project easier to setup for non-german users.
At the same time we could move to a proper HTML API documentation and fix some formatting issues.

user guide for honeygrove is now translated and updated, user guides for incidentmonitoring and management-console will follow.
User guides and documentation of the architecture and api should be written seperately.


karma run overwrites client.args state

Summary
karma run calls this line lib/middleware/runner.js#L50 which overwrites the state of config.client.args with an empty array. This means that plugins that rely on config.client.args will run when calling karma start, but fail after calling karma run once (even when they are subsequently autorun from the karma start process).
Details
I'm using karma-cljs-test to run my ClojureScript tests. It needs a main function to be provided in config.client.args. I was able to run my tests successfully through the auto runner in karma start but when I called karma run, my tests would fail to run as config.client.args had been overwritten with an empty array. Because config is a mutable object, once I had called karma run once, my tests would fail when being rerun by the karma start autorunner.
Commenting out
config.client.args = data.args

let my tests pass, but this is clearly not a viable solution. One option would be to only set config.client.args if data.args is not an empty array.
This also raises the wider question of why a karma run is setting global mutable state. That behaviour was surprising to me, and I don't think it is intentional.
This behaviour seems to have been introduced in https://github.com/karma-runner/karma/commit/ca4c4d88b9a4a1992f7975aa32b37a008394847b, and relates to https://github.com/karma-runner/karma/commit/27b8d678cdc43f823d2531d25fc548d542dc9078, https://github.com/karma-runner/karma/issues/283, https://github.com/karma-runner/grunt-karma/issues/79, https://github.com/karma-runner/grunt-karma/issues/79, https://github.com/karma-runner/grunt-karma/commit/b658ec9701c7a35673a3011b703e3888364a3733 and https://github.com/karma-runner/grunt-karma/commit/168f7b7a6af02e78e44b87b27553cdb65785221c.

Some introspection into whether or not the objects share properties would be really great.
I'm experiencing a pretty crummy situation right now with karma-browserstack-launcher that involves parameterizing Browserstack access keys.
karma.conf.js:
//...
browserStack: {
  'startTunnel': true,
  'project': 'some_project_name',
  'build': 'some_build_name',
  'rateLimitTimeout': 5000
},
//...

This command, run by Jenkins or some other CI system that wants to pass username/access tokens would look like:
karma start --browserstack.username=my_username --browserstack.accessKey=some_key

Executing this will essentially throw away any configuration that would have been made in karma.conf.js.
The workaround in my situation is to have the CI pass all of the arguments. And then I lose all of the flexibility of having the keys in a configuration file for developers to share.
I'm not sure whether your situation, @danielcompton, is unique to karma run or not, I've only experienced my behavior with karma start and haven't tried karma run.

This sounds like a similar problem of handling input from the command line, although the exact mechanics to fix it will be different.

Thanks @danielcompton for the detailed write up. From looking at this I feel the most sensible option would be to merge the two together (with the options provided from run taking precedence) rather than replacing them. Do you think that would be a good solution?

I feel the most sensible option would be to merge the two together

Yep, I think you're right, that was the conclusion I came to. I think it would also be good to make the Karma config created at karma start immutable, and have karma run make a copy of the config. However that sounds like a much bigger change :)


Can't run gallery app: because flutter_gallery depends on flutter_driver any from sdk, version solving failed

I was able to succeccfully run gallery app before. Now I am having this error
Here is what happened
Thank you!
Upgrading Flutter from /home/zack/flutter...
From https://github.com/flutter/flutter
3cca1a2ec..7a88fbc5f  dev                -> origin/dev

[new branch]          maryx-animated-container -> origin/maryx-animated-container
e6d216cca..faae8bde7  master             -> origin/master
[new branch]          revert-24744-focus -> origin/revert-24744-focus
[new branch]          revert-25305-DaveShuckerow-flutter-attach-test-fix -> origin/revert-25305-DaveShuckerow-flutter-attach-test-fix
[new branch]          revert-25483-update-examples -> origin/revert-25483-update-examples
[new branch]          typo               -> origin/typo
[new tag]             v1.1.1             -> v1.1.1
[new tag]             v1.1.4             -> v1.1.4
[new tag]             v1.1.2             -> v1.1.2
[new tag]             v1.1.3             -> v1.1.3
Already up to date.

Upgrading engine...
Already up-to-date.
Flutter 1.0.0 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 5391447fae (4 weeks ago) • 2018-11-29 19:41:26 -0800
Engine • revision 7375a0f414
Tools • Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
Running "flutter packages upgrade" in flutter_gallery...
Because every version of flutter_driver from sdk depends on file 5.0.6 and flutter_gallery depends on file 5.0.7, flutter_driver from sdk is forbidden.
So, because flutter_gallery depends on flutter_driver any from sdk, version solving failed.
pub upgrade failed (1)
flutter channel beta
Switching to flutter channel 'beta'...
git: Already on 'beta'
git: Your branch is up to date with 'origin/beta'.
zack@zack-Lenovo-ideapad-330-15IKB:~/flutter projects/flutter_gallery$ flutter doctor -v
[✓] Flutter (Channel beta, v1.0.0, on Linux, locale en_US.UTF-8)
• Flutter version 1.0.0 at /home/zack/flutter
• Framework revision 5391447fae (4 weeks ago), 2018-11-29 19:41:26 -0800
• Engine revision 7375a0f414
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at /home/zack/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /home/zack/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[✓] Android Studio (version 3.2)
• Android Studio at /home/zack/android-studio
• Flutter plugin version 31.1.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[✓] VS Code (version 1.29.1)
• VS Code at /usr/share/code
• Flutter extension version 2.21.1
[✓] Connected device (1 available)
• SM G935F • ce11160bbc6cd61c02 • android-arm64 • Android 8.0.0 (API 26)
• No issues found!
zack@zack-Lenovo-ideapad-330-15IKB:~/flutter projects/flutter_gallery$ flutter packages get
Running "flutter packages get" in flutter_gallery...
Because every version of flutter_driver from sdk depends on file 5.0.6 and flutter_gallery depends on file 5.0.7, flutter_driver from sdk is forbidden.
So, because flutter_gallery depends on flutter_driver any from sdk, version solving failed.
pub get failed (1)

@ZackPashkin
In flutter1.0, examples/flutter_gallery depends on file 5.0.6. However, the dependency specified in pubspec.yaml("~/flutter projects/flutter_gallery") is 5.0.7, that's why you meet this error.
So please, change the pubspec.yaml  in your flutter_gallery as below to see if it will be OK:


implement native recording (#1399)

Fixes #1399
TODO

[x] support AV1 tracks
[ ] support VP9 tracks
[ ] support VP8 tracks
[X] support H265 tracks
[X] support H264 tracks
[ ] support MPEG-4 video tracks
[ ] support MPEG-1 video tracks
[ ] support M-JPEG tracks
[X] support Opus tracks
[X] support MPEG-4 audio tracks
[ ] support MPEG-1 audio tracks
[ ] support G722 tracks
[ ] support G711 tracks
[ ] support LPCM tracks
[ ] add tests

Usage
The recording format is fMP4, since it satisfies most requirements:

it is fault tolerant
it can be read by most players and browsers

All parameters are in the configuration file:
# Record streams to disk.
record: no
# Path of recording segments.
# Extension is added automatically.
# Available variables are %path (path name), %Y %m %d %H %M %S (time in strftime format)
recordPath: ./recordings/%path/%Y-%m-%d_%H-%M-%S
# Format of recorded segments.
# Currently the only available format is fmp4 (fragmented MP4).
recordFormat: fmp4
# fMP4 files are concatenation of small MP4 files (parts), each with this duration.
# When a system failure occurs, the last part of a recording is lost.
# Therefore, the part duration is equal to the RPO (recovery point objective).
# Increasing it decreases segment size, decreasing it decreases the RPO.
recordPartDuration: 100ms
# Minimum duration of each segment.
recordSegmentDuration: 1h
# Delete segments after this threshold.
recordDeleteAfter: 24h

Nightly binaries
mediamtx_v1.0.0-33-g2bfdc21_darwin_amd64.tar.gz
mediamtx_v1.0.0-33-g2bfdc21_darwin_arm64.tar.gz
mediamtx_v1.0.0-33-g2bfdc21_linux_amd64.tar.gz
mediamtx_v1.0.0-33-g2bfdc21_linux_arm64v8.tar.gz
mediamtx_v1.0.0-33-g2bfdc21_linux_armv6.tar.gz
mediamtx_v1.0.0-33-g2bfdc21_linux_armv7.tar.gz
mediamtx_v1.0.0-33-g2bfdc21_windows_amd64.zip

Greetings.
A very joyful and significant event. But still, I would like to clarify whether you plan to implement not only fmp4, but also mpegts format, as well as the ability to turn off the audio track, balance recording between mount points (save video files) and the ability to disable recording for some streams?
Thank you, you are the best.

I forgot to ask about the parameter:
recordDeleteAfter: 24h

How to disable deletion?

Hello @pikachu937,

you plan to implement not only fmp4, but also mpegts format

MPEG-TS support can be added in the future, by me or by anyone else through a PR. I chose to focus on fMP4 because it's browser-compatible (while MPEG-TS is not) and since the next step is developing playback API, i would like this API to return browser-compatible videos.

the ability to turn off the audio track

No. If you want to remove audio, you can create a reader that reads from a path, removes audio and republishes the stream to another path.

balance recording between mount points

No, load balancing can be achieved by using multiple instances of the server, while fauly tolerancy can be achieved by deploying the server inside Kubernetes with a storage plugin like Longhorn or GlusterFS or a hardware solution like a SAN. Nowadays load balancing and fault tolerancy are delegated to the infrastructure (K8s), there's no need to natively implement them.

ability to disable recording for some streams

yes, this will be done. The recording system is centralized in order clean up expired recordings regardless of the fact that a path is running or not.

How to disable deletion

we can also add this, even though i don't recommend it.

Hello

MPEG-TS support can be added in the future, by me or by anyone else through a PR. I chose to focus on fMP4 because it's browser-compatible (while MPEG-TS is not) and since the next step is developing playback API, i would like this API to return browser-compatible videos.

it would be very nice to see the implementation of mpegts

No. If you want to remove audio, you can create a reader that reads from a path, removes audio and republishes the stream to another path.

I asked about turning off the audio track when saving, and not when broadcasting.

No, load balancing can be achieved by using multiple instances of the server, while fauly tolerancy can be achieved by deploying the server inside Kubernetes with a storage plugin like Longhorn or GlusterFS or a hardware solution like a SAN. Nowadays load balancing and fault tolerancy are delegated to the infrastructure (K8s), there's no need to natively implement them.

hmm... you propose to outsource this function, but it will work many times faster if implemented (inside the server)

we can also add this, even though i don't recommend it.

I keep records from 7 to 60 days and I myself regulate when to delete them
Will you implement adding work with a database to save metadata on records?


Problems with approval of requests in the admin team

We startet using the request a team app in a customer tenant.
Since a few weeks, we have the problem, that expect one none admin user, no user can approve requests in the admin teams of the app.
We are getting the following error:

It says, sorry something went wrong, please try again.
It also happens with global admin user accounts.
The strange thing is, that with an admin user, i can see and approve all requests in the app itself, but with a none admin user, i can only approve my own requests there. Requests of users are not visible then.
Anyone has an idea for this?
I already checked the permission of the request a team app site and the requests lists.
Everything is fine there.
Kind regards
Christian

@ChristianHoffmannn I think this is actually a Power Automate/Teams bug. A colleague of mine has reported the same issue with an adaptive card/Power Automate flow he built, this is internal to Microsoft and we are seeing it here too.
We've raised this with the Product Group.

@ChristianHoffmannn Link to the issue raised is here: https://github.com/MicrosoftDocs/msteams-docs/issues/7626
Looks like the fix is in test rings and will be pushed publicly towards the end of January, so any time within the next week or two hopefully!

Hey @alexc-MSFT do we need to anything to fix this? It appears that other issue is closed as fixed, but we are still getting the issue in our environment.


Fix We are creative section

Describe the feature
The section is not having uniform design it should be arrenged arround the text properly with uniform distance around the text "we are creative"
Add ScreenShots

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[ ] I'm a VSoC'24 contributor
[X] I want to work on this issue

hi @Utsavladia will let you know about that actually already someone working on it

Already solved


Fix MultiSignature verification for ECDSA keys

Motivation
ECDSA signing aren't working in runtimes with MultiSignature signatures. https://github.com/paritytech/substrate/issues/4498
Solution
Use uncompressed recovery in verify routine.

I think this one is critical issue because Polkadot and Kusama affected. @bkchr

Hey, ty :) I checked the source code and found more places that required fixes and I also added some tests: https://github.com/paritytech/substrate/pull/4502
Nevertheless, ty again!


[L] Public - Hold Timer exit or time out

Description:
As a park visitor, when I try to navigate away from the DUP booking page with a timer, I see a warning so that I know my pass hold will be lost when I leave the page.
Mural link reference of workflow/notes: https://app.mural.co/t/dds5274/m/dds5274/1702399466586/47a2e83a2dc605bac12a96c89a02bdcafcfa3932?wid=0-1712264093757
Acceptance Criteria:
ARE YOU SURE
Given that I am a parks visitor
When I am on the registration page (Contact Information) and I exit or click back mid-way
Then I see a warning message that tells me my hold pass will no longer be held when I leave.
Given that I am a parks visitor
When I am on the registration page (Contact Information) and I refresh the page
Then I see a warning message that tells me my hold pass will no longer be held when I leave.
Note: Not sure if this is what we decided for Refreshing the page. Might have a different thing for Mobile view since the pull down from the top automatically refreshes
TIME'S UP
Given that I am a parks visitor
When I am on the registration page (Contact Information) and I don't complete the form within the time limit
Then I see a message that the timer has run out and my pass has been put back into the booking pool and I need to try and make a new booking.
Development Checklist:

[x] Warning message displayed upon:

[x] user canceling mid-way because they no longer want the pass
[x] user clicks the back button

[x] Note: browser back button takes them back to the home page

[x] If timer times out before user clicks submit the will be sent back to the parks select a pass type page, item being held will return to inventory, a notice will display telling them they were not successful in booking their pass in the allotted time and have lost their pass

[x] text will display - You have not completed your booking within the time allowed, please try again.

[x] they will be returned to the parks select a pass page

[x] if user is successful booking a pass within the allotted time they will be taken to the check out screen and pass is removed from bookable inventory

Figma link: https://www.figma.com/file/2lQW8InOa0lEiUiMeGmeNC/Day-Use-Pass?type=design&node-id=4077%3A6877&mode=design&t=YbmeWNjWNn9tCaMc-1

[x] If user refreshed page during timed session, timer will be cancelled, user will be sent back to parks select a pass page, item being held will be returned to inventory
[x] if user click back button during timed session, a warning will display, if user selects OK they will be returned to the parks select a pass type page, timer will be cancelled and item being held will return to inventory
[x] if user click back in browser during a timed session,  a warning will display, if user selects OK they will be returned to the parks select a pass type page, timer will be cancelled and item being held will return to inventory
[x] Text will display - If you leave this page, you will lose any passes currently being held for you. Are you sure you want to leave?

Figma link: https://www.figma.com/file/2lQW8InOa0lEiUiMeGmeNC/Day-Use-Pass?type=design&node-id=4077%3A7280&mode=design&t=YbmeWNjWNn9tCaMc-1
Dependencies

Blocked by
Blocking

Wireframe(s):
Workflows:
Definition of Ready (Note: If any of these points are not applicable, mark N/A)

[ ] User story is included
[ ] User role and type are identified
[ ] Acceptance criteria are included
[ ] Wireframes are included
[ ] Design / Solution is accepted by Product Owner
[ ] Dependencies are identified (technical, business, regulatory/policy)
[ ] Story has been estimated (under 13 pts)

Definition of Done

In progress:

[ ] Acceptance criteria are tested (Functionality meets the acceptance criteria defined in the ticket)
[ ] UI meets accessibility requirements
[ ] Unit tests are written
[ ] Work is traceable in GitHub
[ ] PR linked to ticket number
[ ] If needed/required - Dev adds flag/label to highlight any migration steps necessary prior to PROD deployment

Code review:

[ ] Code is peer reviewed and has passed CI/CD tests

QA:

[ ] Acceptance criteria are tested (Functionality meets the acceptance criteria defined in the ticket)
[ ] Code is potentially shippable to the production environment
[ ] Functional features have been tested and passed by QA
[ ] UI components tested by designer
[ ] Code is deployed to PROD when moved to 'done' column (unless requested otherwise by PO)

PO Review:

[ ] Acceptance criteria are tested (Functionality meets the acceptance criteria defined in the ticket)
[ ] Reviewed and approved by Product Owner

Notes:

Tested on TEST: Pending

verified that when I click the back option from the Contact information page, I get an alert with the error message "If you leave this page, you will lose any passes currently being held for you. Are you sure you want to leave?".
Verified if I use the browser back option to navigate away from the Contact Information page, I get an alert with the error "If you leave this page, you will lose any passes currently being held for you. Are you sure you want to leave?".
Verified when the user runs out of the time allocated, an alert is displayed to let the user know about it.
Refer to the issues below

I don't get the alert with the confirmation message "If you leave this page, you will lose any passes currently being held for you. Are you sure you want to leave?" when I refresh the page while being on the Contact Information page.

The user message displayed when I try to navigate away from the booking page shows quotations -> Figma has no quotes beside the alert message.
Figma:

Test environment:

The timer starts from 7:12 instead of 7 minutes. if the system clock isn't set to update automatically resulting extra time for some users.

https://github.com/bcgov/parks-reso-public/assets/65190263/b6c3249d-d44e-44ff-a84c-66bfb9699214

When a booking process is cancelled during the 7 minute window, the passes won't revert back to the pool, instead it is held in the background even after user releases them from the booking process.

https://github.com/bcgov/parks-reso-public/assets/65190263/17a2ac74-28e6-4807-8058-68134c49d656

@manuji @meyerdarcie @Dianadec I can answer these:

I don't get the alert with the confirmation message "If you leave this page, you will lose any passes currently being held for you. Are you sure you want to leave?" when I refresh the page while being on the Contact Information page.

Based on what I can find, JavaScript doesn't allow you to change the prompt text when you are performing a navigation away from somewhere within your current site, so whether you type in a new url, close the window, or reload the page, the browser thinks you are navigating away from (and back to) the current site. In these cases the browser has default text that displays, such as 'Changes you have made will not be saved".
Alternatively, when you click 'back', the browser recognizes that the previous page also belongs to the same website, so we are able to intercept that navigation with an Angular guard and display the custom text in that scenario.
TL;DR: this issue isn't impossible to fix but it would require significantly more effort than it's worth to solve (custom guard logic, custom modals, etc).
https://stackoverflow.com/questions/3221161/how-to-pop-up-an-alert-box-when-the-browsers-refresh-button-is-clicked

The user message displayed when I try to navigate away from the booking page shows quotations -> Figma has no quotes beside the alert message.

Again, a browser limitaion. JavaScript alert() may show the text in quotations based on the browser.

The timer starts from 7:12 instead of 7 minutes. if the system clock isn't set to update automatically resulting extra time for some users.

This has been solved - a user can manually set their system time (and by extension their browser) any time. It doesn't change our timeouts, which are synced to UTC. The pass will expire at the correct time whether the front end correctly displays the time or not. If the user has manually set their system clock, that is not something we can control.

When a booking process is cancelled during the 7 minute window, the passes won't revert back to the pool, instead it is held in the background even after user releases them from the booking process.

This is functioning as intended. To prevent slamming our API, we don't listen for events where the user leaves the page or otherwise does not book a pass. Rather, every time a user tries to book a pass, the total number of available passes is decremented. If the pass is not booked, there is a cronjob that looks for expired passes and returns them to the pool. The cron runs about every 10 minutes (I think), so the longest a pass will exist in a state where it needs to be returned to the pool is ~17 minutes, but it will likely be much less than that.
The 17 minute scenario:

(t=0:00) cron fires, returns unclaimed passes to the pool. (t=0:00)
(t=3:03) 3 minutes and a few seconds later, someone puts a pass in the hold timer and then immediately navigates away, losing the held pass. At this point, the pass cannot be booked by anyone.
(t=10:00) 10 minutes after the first cron fires, the cron fires again and returns unclaimed passes to the pool. The pass that was booked in the previous step is not included in the collection of unclaimed passes because the JWT it was held with has not yet hit its 7m expiry.
(t=10:03) a few seconds later, the held pass JWT hits the 7m expiry.
(t=20:00) the cron fires a third time, this time as the held pass is expired, it is returned to the pool. At this point the pass can now be booked again.

@cameronpettit , thank for the detailed explanations, but the 4th issue gives false information to the users. Assume we only have 4 passes remaining and someone try to book 3 passes but then cancels it (won't put back right away to the pool), then the another person comes in and try to book the reming pass and he completes the booking process, to the other users who are looking for a pass will show the user message as "Full" even the facility is not fully booked.
FYI @JLWade  any thoughts about this? In my opinion, I would like to get this fixed so we don't show false information to a user at any point.

Sounds like the pass will be put back into the pool once that 7m timer runs out on it, is that correct? Or does the cancellation action put it back into the pool faster?
@meyerdarcie what do you think?

The design intentionally requires 7 minutes to reinstate a pass. This was deliberated in several meetings, highlighting the reasons we cannot rely on the front-end to reinstate passes. Beyond the 'happy path', we must also take security considerations into account.

I will leave this ticket in QA until a decision is made. Thank everyone!

Thanks @manuji and @cameronpettit - based on the security considerations that @marklise mentions, as well as confirmation that this feature is working as designed, let's move this forward. We can keep close eyes on it with ParkInfo to ensure we're not getting any related feedback from users.

Thank you @meyerdarcie , this ticket is ready for PO review.

Working as intended - moving to done.


Custom types are not correctly transformered for embedded documents

Bug Report

Q
A

BC Break
no

Version
2.1.1

Summary
Let's say we have User document with embedded document Identities. Some of fields in Identities has to be encrypted in the database. To achieve it, the new type was registered and assigned to the appropriate fields.
In the repository class we need to filter by the encrypted field while in code we have it decrypted.
So query builder is used this way:
$passportNumber = 'FB555555';
$qb = $this->dm->createQueryBuilder(User::class);
$qb->field('identifiers.passportNumber')->equals(new PassportNumber($passportNumber));
$qb->getQuery()->toArray();

But the query doesn't find anything because PassportNumberType::convertToDatabaseValue is never called.
Current behavior
PassportNumber is not encrypted because PassportNumberType::convertToDatabaseValue is never called.
It is never called, because \Doctrine\ODM\MongoDB\Persisters\DocumentPersister::convertToDatabaseValue can't see the field in the class as this line of code $this->class->hasField($fieldName) returns false.
How to reproduce
Here is a small code samples (namespaces, use statement and other unnecessary code is omitted):
/**
 * @MongoDB\Document()
 */
class User
{
    /**
     * @MongoDB\Id
     */
    private $id;

    /**
     * @var Identifiers|null
     * @MongoDB\EmbedOne(targetDocument="App\Document\User\Identities")
     */
    private $identities;
}

/**
 * @MongoDB\EmbeddedDocument
 */
class Identifiers
{
    /**
     * @MongoDB\Field(type="passport_number", name="passport_number")
     */
    private PassportNumber $passportNumber;
}

class PassportNumberType extends Type
{
    public function convertToPHPValue($value): PassportNumber
    {
        return new PassportNumber(str_replace('encrypted_', 'decrypted_', $value));
    }

    public function convertToDatabaseValue($value): string
    {
        /** @var $value PassportNumber */
        return 'encrypted_' . $value->value();
    }
}

class PassportNumber
{
    private ?string $id;

    public function __construct(?string $id)
    {
        $this->id = $id;
    }

    public function value(): ?string
    {
        return $this->id;
    }
}

Expected behavior
The value for the custom type in the embedded documents should be processed in the way it is defined in the custom type definition.

Thanks for the report! Unfortunately issue you are experiencing is currently "by design" as query builder always expected database types and needed help with type transformation. This changed a bit with 2.1 when query builder started recognizing simple cases but it's far from being perfect. If you feel like taking a stab at expanding the feature please feel free to make it a feature for 2.2. Probably we still won't be able to cover everything for embeddables (mostly because of discriminator maps and embed many) but it still might be useful.


Polls

Implementation of polls.

Is there anything missing from this PR? I'd like to use this and get rid of my fork.


Make existing syncs respect integration's new sync period configuration faster

Right now, when a sync period is changed for an integration, we wait until the next processSyncChanges Temporal workflow call (currently triggers 1x per minute) to update all existing syncs to the new period. We should make a best-effort call to do it immediately.
This is a follow-up for https://github.com/supaglue-labs/supaglue/issues/552

Migrated to internal project management tool.


PEP8, test fixing, code cleanup

These changes clean up the codebase quite a bit and get the tests in a usable state.
I also removed the 'sync' param since the API already has a native 'async' param that can be used. I think using the native methods work better here since you don't have to rely on the python package to be updated to use them (e.g. there is no 'sync' on the Manifest resource).
I would suggest removing the manifest testing since Shippo has no way of generating test manifests, and this could lead to screwing up production data.

Hi @SteveByerly , thanks for the PR and the time that you spent on it.
Do you mind if I create a separate PR with your commit ac5d45b related to PEP8 to make it clearer ?
For the rest, I will run the tests locally and will merge it to master.
Cheers,
Matt

Hi @mnowik , I removed the debugger - sorry for leaving that in there. I didn't realize PRs were directly tied to branches and I guess my two PRs were really just one. Do you want me to split them up into two branches and resubmit?

@SteveByerly if you don't mind creating 2 PRs. If you don't have the time, I can do it.

@mnowik Wanted to see if there was any feedback/issues with the submitted PRs

@SteveByerly didn't have the time to look at it more in details. I will do it this week, and will ping you when I merge.

@SteveByerly sorry for the delay, I got distracted by another project. I created a helper to merge 190e93071a0c1a320ddc533c1a10babdfa68ef82 your PR and I started creating fixtures for our tests. I will do my best to finish this in the next week