Issues when using multiple components on same page because CSS is not scoped

Great module! Having issues using it to draw multiple paths at once because the CSS isn't scoped to current line's class, so it will get modified by the next line. Here's the CSS output:
.mt-true path:nth-of-type( 1 ) {
        opacity:                 0.01;
        stroke-dasharray:        352.7;
        stroke-dashoffset:       352.7;
        -webkit-animation:       mt-true-1 5s ease forwards;
        animation:               mt-true-1 5s ease forwards;
        -webkit-animation-delay: 0s;
        animation-delay:         0s;
}

If the CSS rule were attached to the class specified in "className", there wouldn't be a problem.

I realize after looking into the source that .mt-true is composed using the animate prop's string. This isn't clear in the docs but works fine, so maybe just a clarifying note would work.


App not in AppStore anymore

Hello, I'm from the Netherlands and I don't see the PayForMe app in de iOS appstore anymore.
On my iPhone 14 Pro with iOS 15.5.1 I still have the app, but I tried to download it on another iPhone with iOS 15.5.1 (in The Netherlands) I can't find it.
When I share a link to the appstore it's giving me an error: App is not available in your country or region.

It's a billing problem - I'm working on getting it back on, hopefully today

No problem, thanks for notifying


Inject service into validator (in Angular 14)

I am having the below validator:
export function dateInThePastValidator(control: AbstractControl) {
  const coreDatetimeService = InjectorInstance.get<CoreDatetimeService>(CoreDatetimeService);
  const controlDate = new Date(control.value);
  const nowDate = coreDatetimeService.getLocalDate();
  if (controlDate.getTime() < nowDate.getTime()) {
    return { dateInThePast: true };
  }
  return null;
}

which is being registered in app module

which works fine with the application.
But updating from Angular 13 to v 14, the recommended approach is to use inject (https://codereacter.medium.com/why-angular-14s-new-inject-function-is-so-amazing-ac281e7148d1 or https://dev.to/this-is-angular/always-use-inject-2do4)
if I use inject like below:
  const coreDatetimeService = inject(CoreDatetimeService);

instead of
  const coreDatetimeService = InjectorInstance.get<CoreDatetimeService>(CoreDatetimeService);

I am getting the following error in the console, and the component with the formly form/validation does not work, in the place where the validator is used:

inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with EnvironmentInjector#runInContext.
Is there still a way to use inject and get a working validator?

see https://github.com/ngx-formly/ngx-formly/issues/2551#issuecomment-714727118


[Feature] Scaffold ViewComponent

This may be in the works. I didn't see an item for it, so I thought I would add one. In Visual Studio it would be nice to have -> Add New Item -> .Net Core -> ASP.NET -> MVC ViewComponent that would add a folder, ViewComponent Class, and .cshtml page for us.

This issue was moved to aspnet/Scaffolding#360


Add rocksetAddDocs command, hovers, command keybinds to rscode

Added document-adding command.
On running the command, a dropdown with all user's workspaces will be opened, followed by one with all collections in that workspace. The document is then added.

Hovers
Info about SQL functions can now be found when hovered over.

Keybinds
Default keybinds are now specified in package.json.

Please let me know if there are too many callbacks or try/excepts. I don't know TS/JS too well, so I'm very open to making improvements to this code.

@scottwmorris any review or feedback? No rush, take your time.

Tysm for the review @scottwmorris. Just added a few commits addressing your feedback.

Thanks for the review @scottwmorris.
I used map instead of forEach in my latest commit, https://github.com/rockset/rockset-js/pull/19/commits/437da4e48b59ab97a5a2392e3f42bd6e1d3cd98f.
After running eslint packages/**/*.ts, no relevant errors were found:
bash-3.2$ eslint packages/**/*.ts
Oops! Something went wrong! :(
ESLint: 7.27.0
ESLint couldn't find the config "oclif" to extend from. Please check that the name of the config is correct.
The config "oclif" was referenced from the config file in "packages/cli/.eslintrc.js".
If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

@gadhagod I think there are still lint errors here. From the root of rockset-js, you should be able to run yarn lint. you should make sure you have a recent version of yarn installed (1.22.X I think). you might need to run yarn first to install dependencies

Sorry for the delay @scottwmorris (busy end of school). I went back to this and fixed all lint errors but one:
bash-3.2$ eslint src/*.ts

rockset-js/packages/rscode/src/extension.ts
  240:37  error    Each then() should return a value or throw  promise/always-return

✖ 6 problems (1 error, 5 warnings)

I'm not sure what to do with this error since I'm not familiar with ESLint (or linters in general, I'm a noob). I was wondering if you could take a look at this when you have time.

@gadhagod it looks there are some merge conflicts here now, but let me know when those are fixed and you are ready to merge and i will do so

@scottwmorris fixed conflicts.

@gadhagod I'm still seeing "this branch cannot be rebased due to conflicts". you may have to squash these into one commit manually before I can merge

TODO:

allow for yaml document bodies
make rocksetAdd command activation event
solve conflicts

@scottwmorris there doesn't seem to be any conflicts now

@gadhagod our build/lint pipeline is failing now: https://github.com/rockset/rockset-js/actions/runs/929362827
do you want to try to fix in another PR? LMK. I can fix otherwise

Hmmm... those errors were now showing up when I linted. Sorry for the hassle, I'll see why that happened.

@scottwmorris Ah I see the errors now, I had some wacky version of eslint or something. Most of them were fixable using the --fix flag, but there are two errors that need some more attention. Sorry!

@scottwmorris fixed in https://github.com/rockset/rockset-js/pull/24.


Serendipity crashed page

Hiya, congrats on the polished project and the readable code.
I tried out Serendipity; it crashes my Roam: unresponsive page and high cpu usage, for as long as I can wait (had to uBlock roamjs.com to be able to access my database again). Tried with default settings and either {all} or a specific page under includes.

oh this is really bad. Is your graph particularly large? Not really clear where it would become unresponsive, but I could see some places where it could be slow. Would you be free for a call some time tomorrow so I could take a look at it running on your graph?

Yes, sent you a DM on twitter

Made some performance enhancements but still haven't solved the core issue, which is that we'll need to be able to query from web workers/in the background. In any case, should be much faster now for the core use cases


GCM push plugin not calling register function in IOS

I have installed plugin for Android and IOS both. For Android Its working but in IOS , its not calling register function so I am unable to get registration id in IOS.

I've been investigating this and I it is calling the register function, it is also getting the token from google, but it is not passing that to cordova plugin handler or the plugin handler is not passing to javascript.


libmediapipe_c.dll error and EntryPointNotFoundException

System information

OS Platform and Distribution (e.g., Linux Ubuntu 20.04, WSL2): Windows 10 Pro
Target (e.g. desktop cpu, android arm64): desktop
Bazel version: 3.7.2
Python version: 3.7.4
GCC/G++ version: 5.1.0
Unity version: 2019.4.18.f1

Describe the problem
Error using your hand tracking mediapipe unity plugin in my code. I obtained libmediapipe_c.dll error and EntryPointNotFoundException when I tryed to solve it.
Steps to reproduce the issue
MediaPipe Hello World runs without problems. Then I installed other dependencies and ran make cpu PYTHON_BIN_PATH="C://Python37//Python.exe" obtaining the following

Then, I opened my project in Unity, which includes your code for mediapipe hand tracking in an existing work. I got the following error when I played the run button in the editor

Subsequentely I copied the libmediapipe_c.dll in my_project/Assets/MediaPipe/SDK/Plugins from my_project/C/bazel-out/x64_windows-opt/bin/mediapipe_api . Then I checked Load on startup in the plugin inspector and click Apply button.
Finally, I restarted Unity and I got the following error

Loooking forward to your reply.
Best Regards,
Monica Gruosso

Please pull the latest commit and run python build.py build --desktop cpu --include_opencv_libs -v.
Now you can import this plugin as a local package.


Change "sample" to "reference"

@steven-bellock , is that discussed in SPDM WG?

Yes, we can discuss it today.


How can I write the BUILD file in Bazel to successfully reference SQlite.swift?

I'm using Bazel to manage projects. How can I write the BUILD file in Bazel to successfully reference SQlite.swift?

@zyvv Checkout this article, it can help you to integrate it with Bazel. Feel free to update the documentation in a PR if you find a working solution.
https://chuckgrindel.com/swift-packages-in-bazel/


ValueError: Too large work array required -- computation cannot be performed with standard 32-bit LAPACK.

Dear Scipy community,
I am trying to run an SVD on a large matrix and I get the following error:

ValueError: Too large work array required -- computation cannot be performed with standard 32-bit LAPACK.

My code:
import numpy as np
from scipy.linalg import svd

a = np.ones((30000,30000))
u,s,vh = svd(a)

import sys, scipy, numpy; print(scipy.__version__, numpy.__version__, sys.version_info)

returns:

('1.1.0', '1.15.4', sys.version_info(major=2, minor=7, micro=15, releaselevel='final', serial=0))

I would expect to be able to run an SVD on a 30000 by 30000 matrix.
import platform
platform.architecture()

returns:

('64bit', '')

UPDATE:
It seems that svd(a, lapack_driver='gesvd') works, however I do not understand why the standard svd(a) with the deafult driver gesdd fails.

gesdd uses the divide and conquer approach (see Gu and Eisenstat 1995) for the SVD after the matrix has been reduced to bidiagonal form, which has much higher memory requirements than the implicit QR algorithm used in gesvd for the same problem.
You can see from the MKL gesdd documentation application notes the required working array size. For m=n=30000, this exceeds the 32-bit integers used in the BLAS/LAPACK interface.

Thanks for the details.
For n=m=30000 as dimensions of a matrix a the following seems to run without error:
u,s,v = svd(a, lapack_driver="gesvd")
I am not aware of MKL's or OpenBLAS' ILP64 LAPACK/ScaLAPACK directly, or Elemental. Could you guide me a bit around me?

Yes, gesvd will work because the QR algorithm it uses for the bidiagonal SVD stage does not require as much working space.
Since the QR algorithm is much slower than the bidiagonal divide and conquer (BDC) of gesdd, I suggested the alternatives for using BDC if you really wanted to use it. Otherwise, you can continue to use gesvd.
For shared memory systems:

LAPACK/LAPACKE through MKL with 64-bit ints, or OpenBLAS built with INTERFACE64=1. Other vendors may offer 64-bit interfaces as well (Cray etc.) (Fortran/C)
Eigen through the BDCSVD implementation (C++)

For distributed memory systems, using MPI:

ScaLAPACK, again with 64-bit ints (Fortran/C)
Elemental, built with 64-bit ints and backed by a BLAS/LAPACK implementation built with 64-bit ints, as above (C++)

As @AidanGG mentioned, this is a property of the underlying method of how the SVD is computed. I'll close this issue but please feel free to continue the discussion.

One possibly dumb question: if I switch to  MKL with 64-bit ints, or OpenBLAS built with INTERFACE64=1, would scipy directly use it without any modifications and it'd solve the Too large work array required  error or not?

I believe that according to this issue https://github.com/numpy/numpy/issues/5906 it will not, but someone more knowledgeable than me regarding how numpy and scipy work will have to confirm.


Types as any??

What is the point of using typescript if every return is any??? I might make a PR.

In version 0.4.1, types are works fine. Can you upgrade to the latest and try again?


python311Packages.aiosql: 9.1 -> 9.2

Diff: https://github.com/nackjicholson/aiosql/compare/refs/tags/9.1...9.2
Changelog: https://github.com/nackjicholson/aiosql/releases/tag/9.2
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 280980 run on x86_64-linux 1

2 packages failed to build:

oterm
oterm.dist

6 packages built:

python311Packages.aiosql
python311Packages.aiosql.dist
python311Packages.aiosql.doc
python312Packages.aiosql
python312Packages.aiosql.dist
python312Packages.aiosql.doc

Result of nixpkgs-review pr 280980 run on aarch64-linux 1

2 packages failed to build:

oterm
oterm.dist

6 packages built:

python311Packages.aiosql
python311Packages.aiosql.dist
python311Packages.aiosql.doc
python312Packages.aiosql
python312Packages.aiosql.dist
python312Packages.aiosql.doc


Ignore browser field when bundling in library mode

Describe the bug
use vite to build a lib for nodejs
The  source code in axios is like below:
function getDefaultAdapter() {
  var adapter;
  if (typeof XMLHttpRequest !== 'undefined') {
    // For browsers use XHR adapter
    adapter = require('../adapters/xhr.js');
  } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
    // For node use HTTP adapter
    adapter = require('../adapters/http');
  }
  return adapter;
}

After building. The result bundle is not correct.  Http adapter is resolved as xhr.
function getDefaultAdapter() {
  var adapter;
  if (typeof XMLHttpRequest !== "undefined") {
    adapter = xhr;
  } else if (typeof process !== "undefined" && Object.prototype.toString.call(process) === "[object process]") {
    adapter = xhr;
  }
  return adapter;
}

Then i got the error: UnhandledRejection ReferenceError: XMLHttpRequest is not defined
Reproduction
https://github.com/Sara2009/vite-require
System Info
"vite": "^2.9.13",

Used Package Manager
yarn
Logs
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

vite does not support require

I think the require here is still valid as it's used within a dependency (axios). Looks like the issue here is that axios specifies a browser field which Vite respects, which changed the http import to xhr.
Looks like library mode is focused on browser targets at the moment which caused this bug. It should be agnostic and leave it as is.

set resolve.browserField to false will indicate Vite to ignore browser filed when resolving packages. I think it's enough for bundling universal bundles. 🤔

set resolve.browserField to false will indicate Vite to ignore browser filed when resolving packages. I think it's enough for bundling universal bundles. 🤔

Now the resolve.browserField field is marked as deprecated, but the behavior of mainFields configured as [ "node", "module", "jsnext:main", "jsnext" ] is inconsistent, is there any solution?

Vitest and SSR seem to avoid this problem, so it must be possible. Any ideas?

Vitest uses rollup directly :-(
https://github.com/vitest-dev/vitest/blob/main/packages/vitest/rollup.config.js
Too bad, because vite has a lot better DX than rollup, and the ecosystem is growing.

That said, setting build.ssr to true and ssr: { noExternal: true } works for me. It doesn't import browser versions of dependencies.
working example:
export default defineConfig(({ mode }) => ({
  ssr: { noExternal: true },
  build: {
    ssr: true,
    lib: {
      entry: ['src/index.ts', 'src/bin/cli.ts'],
      formats: ['cjs'],
    },
    target: 'node18',
    outDir: 'build',
    sourcemap: true,
    minify: mode === 'production' && 'esbuild',
    rollupOptions: {
      external: [
        // Ideally, import node modules as node:module-name
        /^node:/,
        // List any modules that can't be bundled here
        'assert',
        'buffer',
        'child_process',
        'constants',
        'crypto',
        'dns',
        'events',
        'fs',
        'fs/promises',
        'http',
        'http2',
        'https',
        'module',
        'net',
        'os',
        'path',
        'process',
        'querystring',
        'readline',
        'stream',
        'string_decoder',
        'timers/promises',
        'tls',
        'tty',
        'url',
        'util',
        'worker_threads',
        'zlib',
      ],
    },
  },
}))

I think this is already resolved by config:
If you build a browser-targeting library, use the default config. If you build a node-targeting library, remove browser from resolve.mainFields.
I only wish there were a more explicit way to specify that one is building a node library. build.target is just not suitable imho.


Input specification does not have .field ,how can i specify inputs in the input field of forms in version 4.1?

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

private static InputSpecification getInputSpecification() {
InputSpecification input = new InputSpecification();
input.inputField(InputType.TEXT, new Identification(How.name, "user")).inputValues("admin");
input.inputField(InputType.TEXT, new Identification(How.name, "pass")).inputValues("secret");
return input;
}
this is how we can do it in version 4.1.

Identification is how you identify the target web element. It could be things like "xpath" or "id". Here is the identification class in crawljax.
Here is an example usage.
	FormInput username = loginForm.inputField(InputType.TEXT, new Identification(How.name, "user"));
	username.inputValues("admin");


Can we use comments to insert comments into the table template

In GitLab by @nwalczak on Oct 7, 2019, 10:29
To help tell users how to use the table.
Maybe make it as a checkbox in the table creation dialog.

In GitLab by @nwalczak on Oct 11, 2019, 08:04
It looks like this is possible, although it might not be as straight forward as one might wish.
I found a post that has some explanation here: https://webapps.stackexchange.com/questions/47732/google-apps-script-copy-document-comments
There's a link in there that leads here: https://developers.google.com/drive/api/v3/manage-comments
That google developer post mostly contains the information needed, although the stackexchange post could also be helpful.

In GitLab by @nwalczak on Oct 14, 2019, 15:07
It looks like this got more complicated... The comment creation function that I need to use is only available in v3 of the Drive API, however it looks like the advanced library feature of GAS will only allow me to use v2 of the Drive API.  It's still possible to use the Drive REST API manually by making URL Fetch calls, but it's more of a headache.  I'm going to move this to the next milestone.

In GitLab by @nwalczak on Oct 14, 2019, 15:07
removed assignee


[Pick 2.0](segment iterator) fix shrink non-char column coredump

Proposed changes
Pick from (#36275)

run buildall


[Bug Report] Issues updating in docker

Bug Description
Replacing the .jar file with v0.3.6 results in reports that I'm still running 0.3.4
Steps to Reproduce

Synology docker
Updated docker image from registry
Manually replaced .jar file in /data with JMusicBot-0.3.6.jar
Start docker container

Expected Result
Update the bot
Debug Output
System Properties:
  java.version = 11.0.13
  java.vm.name = OpenJDK 64-Bit Server VM
  java.vm.specification.version = 11
  java.runtime.name = OpenJDK Runtime Environment
  java.runtime.version = 11.0.13+8
  java.specification.version = 11
  os.arch = amd64
  os.name = Linux

JMusicBot Information:
  Version = 0.3.4
  Owner = redacted
  Prefix = .
  AltPrefix = null
  MaxSeconds = 0
  NPImages = false
  SongInStatus = false
  StayInChannel = false
  UseEval = false
  UpdateAlerts = true

Dependency Information:
  JDA Version = 4.2.1_253
  JDA-Utilities Version = 3.0.5
  Lavaplayer Version = 1.3.75

Runtime Information:
  Total Memory = 479
  Used Memory = 33

Discord Information:
  ID = redacted
  Guilds = 3
  Users = 3

### Additional Info

_No response_

### Checklist

- [X] I have looked for information about this [within the documentation](https://jmusicbot.com/)
- [X] I have searched for similar issues [on the issues page](https://github.com/jagrosh/MusicBot/issues?q=is%3Aissue)
- [X] I am running the latest version of the bot: ![Release](https://img.shields.io/github/release/jagrosh/MusicBot.svg)

Based on the Version & Dependency Infos in the debug output, you are indeed still running 0.3.4. Please ensure you actually downloaded the latest version & updated the Docker image/container appropriately.


Added Windows prebuilds for Node 16 LTS

Description

Builded windows prebuilds for node.js 16 using command in prebuilds/README.md
Motivation and Context
Node 16 is active LTS starting from 26th October 2021.
With prebuilds it is not necessary to install c++ build tools on target machine.

How Has This Been Tested?

Newly created prebuild for windows copyed to node_modules/zookeeper/prebuilds directory on machine without c++ build tools. Application using zookeeper module started without error.
Types of changes

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

Checklist:

[x] I have read the code of conduct.
[x] I have read the contributing guide.
[x] I have updated the documentation accordingly (if applicable).

Thank you @miroslavpokorny!
I will review this as soon as possible.

Hello again @miroslavpokorny!
I will create a separate pull request for this, including binaries for Mac OS X.
As a maintainer I will create new binaries for security reasons. But I have added you as a co-author and will of course also add your name to the changelog. I hope it is okay doing this way!
Thank you again for making a pull request, much appreciated!

Here's the Co-authored-by commit: https://github.com/yfinkelstein/node-zookeeper/commit/049ccd809ce3602f4a3de30d845b9b69381160aa
And the changelog: https://github.com/yfinkelstein/node-zookeeper/blob/master/CHANGELOG.md#v-500-2021-12-06


Update XCC toolchain docs and toolchain configuration files

Contrary to all other toolchains, the xcc toolchain had a hardocded
installation path. Replace this with XTENSA_TOOLCHAIN_PATH so users can
install in different locations.
Update instructions to match latest SDK and avoid installation in system
folders using sudo.
Fixes #13680

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@e88752f). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #13697   +/-   ##
=========================================
  Coverage          ?    52.3%
=========================================
  Files             ?      307
  Lines             ?    45350
  Branches          ?    10464
=========================================
  Hits              ?    23721
  Misses            ?    16877
  Partials          ?     4752

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e88752f...acb9bac. Read the comment docs.

Still seeing license issues after following these directions:

hmm, no clue, works for me on multiple systems.

Still seeing license issues after following these directions:

hmm, no clue, works for me on multiple systems.

@galak can you check whether the network interface naming is the older scheme (eth0, eth1, etc.) or the newer scheme (enp0s2 etc.)? The Flexlm license manager only works with eth0, eth1 naming...
@nashif we should add this to the doc.

@galak can you check whether the network interface naming is the older scheme (eth0, eth1, etc.) or the newer scheme (enp0s2 etc.)? The Flexlm license manager only works with eth0, eth1 naming...
@nashif we should add this to the doc.

Yes, this was related to the issue.  We should add something about eth0, and if you don't have eth0 when you setup the dummy interface, that the mac address needs to match the license file.  Which is what was causing me issues.

Yes, this was related to the issue. We should add something about eth0, and if you don't have eth0 when you setup the dummy interface, that the mac address needs to match the license file. Which is what was causing me issues.

I am not going to mention how to workaround the license checker in the docs, this is out of scope for the document and might get us in trouble.


SmartEdit contract for slots [depends on 296]

See #296 for all details. We're doing #296 first to figure out how to generate the directive, and then apply that to this one.
This ticket is for implementing the contract for slots.
Acceptance criteria:

In browser inspector, we can see the smartedit classes appearing as per the spec.

There is a slot contract, treated same as components.

There is no contract for slots
https://wiki.hybris.com/pages/viewpage.action?spaceKey=CxM&title=SmartEdit+Contract+for+Storefronts+-+1811#SmartEditContractforStorefronts-1811-HTMLMarkupContract

Example:
<smartedit-element
   class="smartEditComponent"
   data-smartedit-component-id="Section1Slot-Homepage"
   data-smartedit-component-type="ContentSlot"
   data-smartedit-catalog-version-uuid="electronicsContentCatalog/Staged"
   data-smartedit-component-uuid="eyJpdGVtSWQiOiJTZWN0aW9uMVNsb3QtSG9tZXBhZ2UiLCJjYXRhbG9nSWQiOiJlbGVjdHJvbmljc0NvbnRlbnRDYXRhbG9nIiwiY2F0YWxvZ1ZlcnNpb24iOiJTdGFnZWQifQ==" data-smartedit-element-uuid="c4ee82b2-6a20-4bb8-969f-071e9de0febc"
   ... >

PR: https://github.com/SAP/cloud-commerce-spartacus-storefront/pull/703


engge is no longer necessary, it was merged in ScummVM

Engge is now part of ScummVM. The old repository is no longer maintained, so very recommended to remove it and use ScummVM 2.9.0 instead.

Ah thanks for the heads up. I'll take a look at that soon.

I swapped to using scummvm for the game, let me know if you run into any issues. Thanks!


Simplify customizing button widths for certain locales.

Today, you can subclass any layout provider and override the size information for any action.
However, subclassing is tedious and pretty complicated. I would instead like to have a new locale-specific width provider type that should be injected in the iPhone and iPad layout provider.

I'm moving this to 4.3 since 4.2 has many things that I would like to release.


Update benchmark docs

With the 0.28.0 release Time api has changed, Time#now has been deprecated. Use Time#local or Time#utc. Both will work as it is used only to measure a time span.

Furthermore, benchmarks should be relevant. There's no sense about comparing a Ruby gem against a Crystal shard... If you need to benchmark something, just do it with direct HTML parsing competitors.


Find All References scopes

Add the ability to set a "scope" for Find All References and Rename.
VS has a dropdown:

Originally reported at https://github.com/microsoft/vscode-cpptools/issues/4102

Related Stack Overflow question: How to I limit the scope of "Find All References" searches in Visual Studio Code?


Fix monitor tags deletion

⚠⚠⚠ Since we do not accept all types of pull requests and do not want to waste your time. Please be sure that you have read pull request rules:
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:

[x] I have read and understand the pull request rules.

Description
Fixes #5442 (another fix has been made regarding comments on this issue, aka https://github.com/louislam/uptime-kuma/issues/5442#issuecomment-2556748007. I suggest you to check the video to see what was happening).
This was happening from a while, and was related to an invalid variable (using tag.id instead of tag.tag_id). Works fine for existing tags and new tags.
Type of change
Please delete any options that are not relevant.

Bug fix (non-breaking change which fixes an issue)
User interface (UI)

Checklist

[x] My code follows the style guidelines of this project
[x] I ran ESLint and other linters for modified files
[x] I have performed a self-review of my own code and tested it
[ ] I have commented my code, particularly in hard-to-understand areas (including JSDoc for methods)
[x] My changes generates no new warnings
[ ] My code needed automated testing. I have added them (this is optional task)

@Ionys320, it's still the case that when I remove one tag, all the tags disappear. However, when you click save, the tag is removed, and the existing tags reappear. It's a strange bug.

@Ionys320, it's still the case that when I remove one tag, all the tags disappear. However, when you click save, the tag is removed, and the existing tags reappear. It's a strange bug.

Hi @homelab-alpha, can you try using docker run --rm -it -p 3000:3000 -p 3001:3001 --pull always -e 'UPTIME_KUMA_GH_REPO=Ionys320:fix-tags-ui' louislam/uptime-kuma:pr-test2 ? It's fixed at my point, the no-deleted tags remains. If you're able to reproduce the bug on the test container, it may help a lot!


minor fixes while debugging CESM driver

I'm going to do a full refactor of vic_init.c this weekend and the changes shown below are just a temporary fix. The rest of the changes in this PR are specific to the CESM driver.

So do you want to wait on merging till after the refactor of vic_init()?

@bartnijssen -

So do you want to wait on merging till after the refactor of vic_init()?

Looking at it this morning, I don't think its going to require quite the refactor I was originally expecting.  I'll just include it here since I have a few other related changes in vic_init.

@bartnijssen and @tbohn - it sounds like this PR is exposing some of the skeletons in VIC's parameter closet. The point of this PR was to fix a few small bugs in the initialization in the image driver and the scope has already extended further than I originally intended. So if there are other issues that we want to raise, I suggest we do so but not as part of this PR.

Not sure I understand the "parameter closet" comment. Do you mean how we specify and account for bare soil or actual parameter values in VIC?

OK - going to merge - any remaining comments can be dealt with separately as needed.


[r] ids to coords as read args

Issue and/or context:
#741, #686
Changes:
ids -> coords for read methods
Notes for Reviewer:
Nothing else ... 👋

Codecov Report
Base: 70.37% // Head: 59.01% // Decreases project coverage by -11.37% :warning:

Coverage data is based on head (58ac399) compared to base (3047a5c).
 Consider uploading reports for the commit 2838680 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #748       +/-   ##
===========================================
- Coverage   70.37%   59.01%   -11.37%
===========================================
  Files          67       40       -27
  Lines        3555     1576     -1979
===========================================
- Hits         2502      930     -1572
+ Misses       1053      646      -407

Flag
Coverage Δ

python
?

r
59.01% <ø> (ø)

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

Impacted Files
Coverage Δ

apis/python/src/tiledbsoma/util.py

apis/python/src/tiledbsoma/constants.py

apis/python/src/tiledbsoma/factory.py

apis/python/src/tiledbsoma/experiment.py

apis/python/src/tiledbsoma/dataframe.py

apis/python/src/tiledbsoma/measurement.py

apis/python/src/tiledbsoma/general_utilities.py

...is/python/src/tiledbsoma/tiledb_platform_config.py

apis/python/src/tiledbsoma/util_scipy.py

apis/python/src/tiledbsoma/types.py

... and 17 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


metrics collection support

cc @travisperson @guseggert

Is there a reason we're only providing access to Block events? Also, why can't users of this library not use a tracer to get access to these events?

The current tracer writes to a file and it also a lot more low level than the high level actions we are tracking with the metrics object.
We could add custom tracer support (as an object), but it would still not get nice high level metrics as "service foo was blocked X times".

Also, we are only tracking metrics for block events as these are the ones that are actually interesting from an operations point of view. Having a metrics that says "133713371337 memory reservations have been allowed" is not all that interesting.

It's useful to know the proportion of reqs that are blocked since that's independent of host size (although maybe we can get the denominator elsewhere?).

@guseggert you want Allow metrics as well? We can add this, just didn't think it would be all that useful.
@travisperson opinions on the matter?

Added allow metrics.


What are our six sections of the day?

Here's my stab at one way we might break up the 2 hours. What do you think?

Part One

iPython interpreter/notebook
pandas

What is a series? What is a dataframe?
How do I read in data?
How can I clean data?

A hands-on exercise

Part Two

pandas

More cleaning and transposing of tables
aggregating, groupbys, sorting

plotting your data in simple bar charts, line graphs and scatter plots
More hands-on exercise

Let's generalize the very first piece, instead of IPython, let's do "intro to the tools".  I'm thinking something along the lines of:

Quick note on Anaconda and conda
Creating an environment to work in (conda create -n work anaconda)
Launching ipython and ipython notebook

That would cover 15 - 20 minutes of material and hands on, then start working with pandas.  I think there's a ton of material we can do here.  Maybe break it down into a series of "here's how you do X, Y, and Z.  Now go find some interesting information out."  We could build progressively thorughout the class, then for the last 15 - 30 minute block we could start ramping up on plotting inside the notebook.
Thoughts?

Side note, this blog post and the followup has some examples of things you do with Excel and how to do them in pandas with a great jumping off into territory that's not so easily covered by a spreadsheet.

I will admit I know next to nothing about conda and have only used Anaconda a bit. I think it's great to introduce folks to it as one way to manage packages and envs, as long as we acknowledge a lot of people use iPython and notebooks in general even without Anaconda.
I think your idea for the outline is fine. Can you flesh it out a bit for both sessions in general? I'm starting to feel the looming clock ticking and not sure how we can get started. I'd love to have the sections defined and one of our names assigned to each part so I can start coding a few pieces.
And I'm assuming we'll have the whole thing laid out in a notebook or series of notebooks, right? Can we shoot for, say, Monday or Tuesday, as a deadline to have it all done?

I will admit I know next to nothing about conda and have only used Anaconda a bit. I think it's great to introduce folks to it as one way to manage packages and envs, as long as we acknowledge a lot of people use iPython and notebooks in general even without Anaconda.

Agreed.  I want to mention them as just basically "anaconda is the easiest way to get the scientific stack up and running on any platform and conda lets you reproduce your work really easily so other's can work with your code."  Not a focal point, just something to touch on.

And I'm assuming we'll have the whole thing laid out in a notebook or series of notebooks, right? Can we shoot for, say, Monday or Tuesday, as a deadline to have it all done?

That sounds doable.  I'll take a stab at a little more of an outline tomorrow, maybe in README form against this repo with slots for us to drop in notebooks and/or markdown files (as appropriate) for the sections then we can figure out how to divvy everything up from there.

Awesome. This sounds like we're on the same page. If you can put that README together, I'll put my name next to a few sections and get cracking.
Thank you!

Closing in favor of PRs


Conflicting docs for ImageMaxRewritesAtOnce=0

Our docs say:

Do not set this option to 0 to disable image optimization – that just adds computational overhead during page load. Disable recompress_images or the related filters instead.

While our default configuration (pagespeed.conf.template) says:

Bound the number of images that can be rewritten at any one time; this
avoids overloading the CPU.  Set this to 0 to remove the bound.

The relevant code has been rewritten recently as part of the controller work ( @hillsp ) and it looks to me like the new code follows what the default config says, not the docs:
CentralController* RewriteDriverFactory::CreateCentralController(
    NamedLockManager* lock_manager) {
  return new CompatibleCentralController(
      default_options()->image_max_rewrites_at_once(), statistics(),
      thread_system(), lock_manager);
}
...
WorkBoundExpensiveOperationController::WorkBoundExpensiveOperationController(
    int max_expensive_operations, Statistics* stats)
    : bound_(max_expensive_operations),
      counter_(bound_ > 0 ? stats->GetUpDownCounter(kCurrentExpensiveOperations)
                          : NULL) {}
...
bool WorkBoundExpensiveOperationController::TryToWork() {
  bool can_work = true;
  if (counter_ != NULL) {
    // We conservatively increment, then test, and decrement on failure.  This
    // guarantees that two incrementors don't both get through when we're within
    // 1 of the bound, at the cost of occasionally rejecting them both.
    // TODO(cheesy): If Statistics ever improves its atomicity gurantees, we
    // should just use the value returned by Add().
    counter_->Add(1);
    can_work = (counter_->Get() <= bound_);
    if (!can_work) {
      counter_->Add(-1);
    }
  }
  return can_work;
}

The online docs are incorrect; @huibaolin is going to fix them.

Doc has been updated. Now we're advertising "-1" for unlimited number of image rewrites. We also have added a note that "0" is equivalent to "-1".

Hello,
It seems that there is still something wrong :
https://groups.google.com/forum/#!topic/mod-pagespeed-discuss/D93W3Zaycp0
Thanks,
Eric


Getting unauthorized when refreshing token if multiple authentication provider are registered

I'm trying to create an oauth2-enabled auth server which is able to authenticate users with two authentication providers: the former is in-memory (for default user-passwords) the latter is an external LDAP server (by now i'm using the example from gs-authenticating-ldap-complete).
I'm able to successfully retrieve an access token for any user, but i'm only able to use the refresh token for retrieving a new token for any user that is registered in the LDAP server. While everything is fine if I try to refresh an in-memory user's token, with the LDAP ones I get: 401 Unauthorized {   "error": "unauthorized",   "error_description": "ben" } where "ben" is the user id.
As far as I know (after some debugging) the exception occurs in DefaultTokenServices.java:150.
In the following I report the configuration classes I'm using.

@Configuration
@EnableWebSecurity
@Order(6)
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

    @Bean
    public TokenStore tokenStore() {
        return new InMemoryTokenStore();
    }

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.authorizeRequests().anyRequest().authenticated().and().csrf().disable();
    }

    @Configuration
    protected static class DefaultUsersAuthConfiguration extends GlobalAuthenticationConfigurerAdapter {

        @Override
        public void init(AuthenticationManagerBuilder auth) throws Exception {
            auth.inMemoryAuthentication().withUser("admin").password("admin").roles("ADMIN").and().withUser("guest")
                    .password("guest").roles("USER");
        }

    }

    @Configuration
    protected static class LDAPAuthConfiguration extends GlobalAuthenticationConfigurerAdapter {

        @Override
        public void init(AuthenticationManagerBuilder auth) throws Exception {
            auth.ldapAuthentication().userDnPatterns("uid={0},ou=people").groupSearchBase("ou=groups")
                    .userDetailsContextMapper(new MyLdapUserDetailsMapper()).contextSource()
                    .ldif("classpath:test-server.ldif");
        }

    }

    protected static class MyLdapUserDetailsMapper extends LdapUserDetailsMapper {

        @Override
        public UserDetails mapUserFromContext(DirContextOperations ctx, String username,
                Collection<? extends GrantedAuthority> authorities) {
            final UserDetails originalUser = super.mapUserFromContext(ctx, username, authorities);

            final Set<GrantedAuthority> newAuth = new HashSet<>(originalUser.getAuthorities());
            newAuth.add(new SimpleGrantedAuthority("ROLE_EXTRA_ROLE"));

            return new User(originalUser.getUsername(), originalUser.getPassword(), originalUser.isEnabled(),
                    originalUser.isAccountNonExpired(), originalUser.isCredentialsNonExpired(),
                    originalUser.isAccountNonLocked(), newAuth);
        }

    }

}

@Configuration
@EnableAuthorizationServer
public class OAuth2Config extends OAuth2AuthorizationServerConfiguration {

    @Autowired
    private TokenStore tokenStore;

    @Override
    public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
        clients.inMemory().withClient("acme").secret("acmesecret")
                .authorizedGrantTypes("password", "refresh_token", "client_credentials")
                .scopes("read", "write", "openid").autoApprove(true);
    }

    @Override
    public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
        endpoints.tokenStore(tokenStore);
    }

    @Configuration
    @EnableResourceServer
    protected static class ResourceServerConfiguration extends ResourceServerConfigurerAdapter {

        @Autowired
        private TokenStore tokenStore;

        @Override
        public void configure(HttpSecurity http) throws Exception {
            // @formatter:off
            http.authorizeRequests().antMatchers("/me").authenticated();
            // @formatter:on
        }

        @Override
        public void configure(ResourceServerSecurityConfigurer resources) throws Exception {
            resources.tokenStore(tokenStore);
        }
    }

}

I'm using spring-boot 1.3.2.RELEASE. What am I missing?

I ran into a similar problem recently with multiple authentication providers.  Your problem stems from the registration of the default user details service.  The InMemoryUserDetailsManagerConfigurer will register a user details service but the LdapAuthenticationProviderConfigurer does not (even if it did, you can't have two).
I don't remember the exact details but when using the refresh token, the userDetailsService is used to load the user.  This is done so that a check can be performed to see if the user's account is still enabled, not locked, etc.  Since the user details service only searches in in memory user store, the refresh token request fail for the ldap users.
To get around this issue, I created a user details service that queried both authentication providers in the same order that the ProviderManager queried them.  This might not be the ideal solution but it worked for me.

Can anyone confirm whether quintonm's solution is the recommended approach? I'd rather get DefaultTokenServices to use the AuthenticationManager that has my custom AuthenticationProvider, but maybe I'm going about this the wrong way.

Any update about this?
I'm in the same situation. The solution proposed by @quintonm works.... but I don't know if it's the only way.

Yes, I can confirm that it works.
I defined a custom UserDetailsService for composing multiple UserDetailsServices and I passed it to the AuthorizationServerEndpointsConfigurer.
@Configuration
public class OAuth2RefreshConfig {

	@Bean
	public MyUserDetailsService userDetailsService() {
		return new MyUserDetailsService();
	}

	public static class MyUserDetailsService implements UserDetailsService {

		private List<UserDetailsService> uds = new LinkedList<>();

		public MyUserDetailsService() {
		}

		public void addService(UserDetailsService srv) {
			uds.add(srv);
		}

		@Override
		public UserDetails loadUserByUsername(String login) throws UsernameNotFoundException {
			if (uds != null) {
				for (UserDetailsService srv : uds) {
					try {
						final UserDetails details = srv.loadUserByUsername(login);
						if (details != null) {
							return details;
						}
					} catch (UsernameNotFoundException ex) {
						assert ex != null;
					} catch (Exception ex) {
						ex.printStackTrace();
						throw ex;
					}
				}
			}

			throw new UsernameNotFoundException("Unknown user");
		}

	}

}

...

@Configuration
@EnableAuthorizationServer
public class OAuth2Config extends OAuth2AuthorizationServerConfiguration {

	@Autowired
	private MyUserDetailsService myUserDetailsService;

	...

	@Override
	public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
		endpoints.tokenStore(tokenStore).authenticationManager(authenticationManager)
				.userDetailsService(myUserDetailsService);
	}
}

Then I attached the InMemoryUserDetailsService and LdapUserDetailsService to the custom one.
@Configuration
	protected static class DefaultUsersAuthConfiguration extends GlobalAuthenticationConfigurerAdapter {

		@Autowired
		private MyUserDetailsService uds;

		@Override
		public void init(AuthenticationManagerBuilder auth) throws Exception {
			auth.inMemoryAuthentication().withUser("admin").password("manager").roles("ADMIN").and().withUser("guest")
					.password("guest").roles("USER").and().getUserDetailsService();

			uds.addService(auth.getDefaultUserDetailsService());
		}

	}

	@Configuration
	protected static class LDAPAuthConfiguration extends GlobalAuthenticationConfigurerAdapter {

		@Autowired
		private MyUserDetailsService uds;

		@Override
		public void init(AuthenticationManagerBuilder auth) throws Exception {
			auth.ldapAuthentication().passwordCompare().passwordAttribute("userPassword").and()
					.userDnPatterns("uid={0},ou=people").groupSearchBase("ou=groups")
					.userDetailsContextMapper(userDetailsMapper()).contextSource().ldif("classpath:test-server.ldif");
		}

		@Bean
		public UserDetailsService ldapUserDetailsService() {
			final DefaultSpringSecurityContextSource contextSource = new DefaultSpringSecurityContextSource(
					"ldap://<IP_ADDRESS>:33389/dc=springframework,dc=org");
			contextSource.afterPropertiesSet();

			final FilterBasedLdapUserSearch userSearch = new FilterBasedLdapUserSearch("", "uid={0}", contextSource);
			final LdapUserDetailsService service = new LdapUserDetailsService(userSearch);
			service.setUserDetailsMapper(userDetailsMapper());
			uds.addService(service);

			return service;
		}

		@Bean
		public LdapUserDetailsMapper userDetailsMapper() {
			return new MyLdapUserDetailsMapper();
		}

	}

We know that it works. We want to know if it is the recommended solution.

That's the point. This solution works (I already wrote my own), but I would like to know if there is a different way to do that.
Because for me it's a bit tricky. You have to configure the same in two different places and you have to "hack" the user detail services.
It doesn't sound straitforward for me.
@dsyer Is there any other option?

@dsyer No update on this issue?
I have 2 (but can be more) different AuthenticationProviders and because I use refresh_token setting, the framework requires UserDetailsService to be provided. As it is now, it's not straightforward to provide different UserDetailsService implementation when using custom Authentication Providers.

Composing a specialized UserDetailsService with 2 (or more) UserDetailsService delegates that are ultimately associated with different AuthenticationProvider's is not the ideal or recommended solution IMO. It's more complicated then it should be.
I'm going to put together a sample of the original configuration from @conteit to reproduce the issue and than try to come up with a solution that is much easier to configure.
Back shortly...

Thank you. I'll wait for you sample.
I can provide some additional information about my setup/requirements.
For example, the configuration from @conteit loops through the Authentication Providers(implicitly through the UserDetailsServices) and stops at first match. This is not fine for my setup as I need to authenticate against specific Authentication Provider based on some additional information.
Problem: How to choose the Authentication Provider?
Possible solution(s):
- Authentication Provider with supports() method for a MyCustomUsernamePasswordAuthenticationToken - the issue here is the creation of MyCustomUsernamePasswordAuthenticationToken (it can be done with a CustomResourceOwnerPasswordTokenGranter but only works for "password" grant type; for "implicit" grant type the authentication is done before TokenGranter). I was "inspired" by https://github.com/spring-projects/spring-security-oauth/issues/813
Maybe my setup is going in the wrong direction, so any suggestion is welcomed.

I looked at the possibility of simplifying the configuration and unfortunately it's not that easy after all.
Although auth.inMemoryAuthentication() and auth.ldapAuthentication() are the AuthenticationProvider's registered with the AuthenticationManager, the LdapAuthenticationProvider does not collaborate with a UserDetailsService to find a User. However, the auth.inMemoryAuthentication() ultimately exposes a UserDetailsService and is the default one configured with the Authorization Server.
When the Authorization Server is configured it creates an instance of PreAuthenticatedAuthenticationProvider and registers it with a new instance of AuthenticationManager. This instance is the one that is used by DefaultTokenServices when re-authenticating the user (in the session) during a refresh_token flow.
A PreAuthenticatedAuthenticationProvider is used in cases where the user already has been authenticated with the system so a minimal re-authentication check occurs at different points during the session, as in the case of the refresh_token flow, to ensure the user session hasn't expired for example.
So the main issue here is that the LdapAuthenticationProvider does not collaborate with (or expose)  a UserDetailsService, however, the PreAuthenticatedAuthenticationProvider relies on a UserDetailService indirectly via UserDetailsByNameServiceWrapper.
This is why @conteit had to create another UserDetailsService bean of type LdapUserDetailsService in the LDAPAuthConfiguration.
Although the solution from @conteit and @quintonm results in extra configuration that the framework really should take care of for you, it works as an interim solution.
FYI, the Spring Security team is currently working on a new implementation of OAuth2 that will eventually replace the current OAuth2 framework. I'm not sure if we will be adding this update as it touches on a few different places and is a major change. We are mainly in maintenance mode. However, I will put this in the backlog to keep track. Of course PR's are always welcome as well.

@jgrandja Thank you for your spent on investigating this issue.
Anyway, your investigation does not touch the custom AuthenticationProvider implementations. I can also mention another limitation of the refresh_token flow and PreAuthenticatedAuthenticationProvider: it tries to uniquely fetch a user by username, but the whole purpose of a custom AuthenticationProvider is to add custom(maybe complex) logic that finds a valid user.
For example, in my setup, my AuthenticationProvider uses a custom sql query to find a user and after this it returns and stores a unique ID of the user that is used in other processes. Unfortunately, unless we map that id to the username/login field, there is no other way to make UserDetalsService work with PreAuthenticatedAuthenticationProvider.

@EmilIfrim You can use JdbcDaoImpl for your custom sql query impl for fetching users instead of rolling your own.
The UserDetailsService sole responsibility is to find/load a user from the backing-store. Whether this is JDBC (JdbcDaoImpl), LDAP (LdapUserDetailsService), or a custom implementation for a more complicated backing-store.
The AuthenticationProvider's leverage a UserDetailsService just to load the user and then it applies post-processing checks on the current state of the User to ensure the user's account is not expired for example.
This is the intended design of the collaboration between the AuthenticationProvider and UserDetailsService. It promotes clear assignment of responsibilities and more importantly reuse.
Mixing up the loading of a user directly in a custom AuthenticationProvider would not allow for reuse and may result in more code than necessary in the custom AuthenticationProvider.
I believe there is always room for improvement and that is the case here as well. But as mentioned, there would be some major changes requiring careful thought in order to solve this issue. We may get to it in the backlog.

@jgrandja just asked the question on stackoverflow but found this discussion which relates to my case. So will also post the question here.
In my application I am trying to unite ActiveDirectory authentication with OAuth2 refresh tokens.
I was able to successfully authenticate via ActiveDirectoryLdapAuthenticationProvider. I have also provided my custom implementation of LdapUserDetailsMapper that populates the UserDetails with some custom attributes taken from ActiveDirectory. Key thing here is that these attributes have a confidentialty flag set on them and are only available to the user itself (i.e. authenticated user could read the values of these attributes for himself but not for the others). These attributes are stored in Authentication object and are used by an application in a context of an authenticated user.
Things get tricky when I try to add refresh tokens to the picture. Refresh tokens require me to implement a UserDetailsService where I have to provide new UserDetails having just a user name. This is not feasible due to confidentialty flag. Even if I have some master account in my application with the ability to browse ActiveDirectory I will not be able to retrieve the confidential attributes.
So I would rather prefer to provide more atomic implementations like the function that checks if the user is still active or the function that provides a renewed set of user authorities. Unfortunately I did not find this level of atomicity in Spring Security. So it looks like for refresh tokens I have to provide an implementation of UserDetailsService.
If I have to provide new user details I would like to have an access to  previous user Authentication object. In this case I will check the user and if it is still active I will copy all the confidential information from previous Authentication. The problem is that it does not seem to be available. At the moment when UserDetailsService::loadUserByUsername() is called SecurityContextHolder.getContext() does not contain the user authentication. Authentication is also not available from UserDetailsService API - I only get the user name. At the same time user's Authentication object is present just one stack frame up in UserDetailsByNameServiceWrapper class:
	public UserDetails loadUserDetails(T authentication) throws UsernameNotFoundException {
		return this.userDetailsService.loadUserByUsername(authentication.getName());
	}

The least thing I want to do here is to implement some in-memory storage for all user confidential information to be used whenever I need to provide new UserDetails. I already have all the required information in user authentication managed by Spring and doing this on my end seems to be just surplus.
And here comes question list:

If you feel that I am doing something terribly wrong from the perspective of application security architecture, please tell me
Is there a way to tell Spring during refresh token procedure to use previous UserDetails object so that application could just answer the question if the user is still active and should be issued a new access token (and not provide the UserDetailsService at all)?
Is there a way to get previous user Authentication object during the call to UserDetailsService::loadUserByUsername() so that I could use it as a source of confidential info?
Is there some other approach that I do not see at the moment to add refresh tokens to my application?

Update:
From the discussion above, I believe that the answer tho the Q1 is "No". And it looks like with Q2 I could write my own implementation of AuthenticationUserDetailsService which has the authentication but I am not sure how to plug this implementation into Spring infrastructure.
Will be grateful for your comment.

Hi @masm22. To help with question 1 and 2, below is a custom configuration that will allow you to hook into the refresh_token grant and provide your own behaviour or delegate to  super to proceed with current behaviour. It will also allow you to access the user Authentication so you can read your custom (confidential ) attributes.
@Configuration
@EnableAuthorizationServer
public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdapter {

        .....   // other config

	@Autowired
	private ClientDetailsService clientDetailsService;

	@Override
	public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
		endpoints.tokenServices(this.customTokenServices());
	}

	private DefaultTokenServices customTokenServices() {
		DefaultTokenServices tokenServices = new CustomTokenServices();
		tokenServices.setTokenStore(new InMemoryTokenStore());
		tokenServices.setSupportRefreshToken(true);
		tokenServices.setReuseRefreshToken(true);
		tokenServices.setClientDetailsService(this.clientDetailsService);
		return tokenServices;
	}

	private class CustomTokenServices extends DefaultTokenServices {
		private TokenStore tokenStore;

		@Override
		public OAuth2AccessToken refreshAccessToken(String refreshTokenValue, TokenRequest tokenRequest) throws AuthenticationException {
			OAuth2RefreshToken refreshToken = this.tokenStore.readRefreshToken(refreshTokenValue);
			OAuth2Authentication authentication = this.tokenStore.readAuthenticationForRefreshToken(refreshToken);

			// Check attributes in the authentication and
			// decide whether to grant the refresh token
			boolean allowRefresh = true;

			if (!allowRefresh) {
				// throw UnauthorizedClientException or something similar

			}

			return super.refreshAccessToken(refreshTokenValue, tokenRequest);
		}

		@Override
		public void setTokenStore(TokenStore tokenStore) {
			super.setTokenStore(tokenStore);
			this.tokenStore = tokenStore;
		}
	}
}

The other thing I want to point out for your information is line 146 (in master) DefaultTokenServices.refreshAccessToken(String refreshTokenValue, TokenRequest tokenRequest)
has the following code:
		OAuth2Authentication authentication = tokenStore.readAuthenticationForRefreshToken(refreshToken);
		if (this.authenticationManager != null && !authentication.isClientOnly()) {
			// The client has already been authenticated, but the user authentication might be old now, so give it a
			// chance to re-authenticate.
			Authentication user = new PreAuthenticatedAuthenticationToken(authentication.getUserAuthentication(), "", authentication.getAuthorities());
			user = authenticationManager.authenticate(user);
			Object details = authentication.getDetails();
			authentication = new OAuth2Authentication(authentication.getOAuth2Request(), user);
			authentication.setDetails(details);
		}

The user is being re-authenticated. Possibly something you may want to do in your custom implementation.

@jgrandja The hint about using is a huge help.
    @Autowired
    private ClientDetailsService clientDetailsService;
    :
        DefaultTokenServices tokenServices = ...
        :
        tokenServices.setClientDetailsService(this.clientDetailsService);

@jgrandja I have tried your example but I got
java.lang.IllegalStateException
Caused by: org.springframework.beans.factory.BeanCreationException
Caused by: org.springframework.beans.BeanInstantiationException
Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException
I there something to do to fix it?

Hi @masm22. To help with question 1 and 2, below is a custom configuration that will allow you to hook into the refresh_token grant and provide your own behaviour or delegate to super to proceed with current behaviour. It will also allow you to access the user Authentication so you can read your custom (confidential) attributes.
@Configuration
@EnableAuthorizationServer
public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdapter {

        .....   // other config

	@Autowired
	private ClientDetailsService clientDetailsService;

	@Override
	public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
		endpoints.tokenServices(this.customTokenServices());
	}

	private DefaultTokenServices customTokenServices() {
		DefaultTokenServices tokenServices = new CustomTokenServices();
		tokenServices.setTokenStore(new InMemoryTokenStore());
		tokenServices.setSupportRefreshToken(true);
		tokenServices.setReuseRefreshToken(true);
		tokenServices.setClientDetailsService(this.clientDetailsService);
		return tokenServices;
	}

	private static class CustomTokenServices extends DefaultTokenServices {
		private TokenStore tokenStore;

		@Override
		public OAuth2AccessToken refreshAccessToken(String refreshTokenValue, TokenRequest tokenRequest) throws AuthenticationException {
			OAuth2RefreshToken refreshToken = this.tokenStore.readRefreshToken(refreshTokenValue);
			OAuth2Authentication authentication = this.tokenStore.readAuthenticationForRefreshToken(refreshToken);

			// Check attributes in the authentication and
			// decide whether to grant the refresh token
			boolean allowRefresh = true;

			if (!allowRefresh) {
				// throw UnauthorizedClientException or something similar

			}

			return super.refreshAccessToken(refreshTokenValue, tokenRequest);
		}

		@Override
		public void setTokenStore(TokenStore tokenStore) {
			super.setTokenStore(tokenStore);
			this.tokenStore = tokenStore;
		}
	}
}

The other thing I want to point out for your information is in DefaultTokenServices.refreshAccessToken(String refreshTokenValue, TokenRequest tokenRequest)
has the following code:
		OAuth2Authentication authentication = tokenStore.readAuthenticationForRefreshToken(refreshToken);
		if (this.authenticationManager != null && !authentication.isClientOnly()) {
			// The client has already been authenticated, but the user authentication might be old now, so give it a
			// chance to re-authenticate.
			Authentication user = new PreAuthenticatedAuthenticationToken(authentication.getUserAuthentication(), "", authentication.getAuthorities());
			user = authenticationManager.authenticate(user);
			Object details = authentication.getDetails();
			authentication = new OAuth2Authentication(authentication.getOAuth2Request(), user);
			authentication.setDetails(details);
		}

The user is being re-authenticated. Possibly something you may want to do in your custom implementation if need be.

Thanks @jgrandja, Now refresh token mechanism is working. but it is throwing NullPointerException for an invalid refresh token.

Maybe it will help someone:
It appears that:
       // in org.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider
       @Override
	public Authentication authenticate(Authentication authentication) throws AuthenticationException {
		...
		UserDetails user = this.userDetailsContextMapper.mapUserFromContext(userData, authentication.getName(),
				loadUserAuthorities(userData, authentication.getName(), (String) authentication.getCredentials()));
		...;
	}

uses a different mechanism to load the authorities which is different than:
        // in org.springframework.security.ldap.userdetails.LdapUserDetailsService
        @Override
	public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
		...
		return this.userDetailsMapper.mapUserFromContext(userData, username,
				this.authoritiesPopulator.getGrantedAuthorities(userData, username));
	}

Therefor I had to do the following in addition to @conteit's solution to make sure that authorities are loaded correctly in refreshToken flow:
        @Bean
        public UserDetailsService ldapUserDetailsService() {
            final DefaultSpringSecurityContextSource contextSource = new DefaultSpringSecurityContextSource(
                    "ldap://localhost:8389/dc=springframework,dc=org");
            contextSource.afterPropertiesSet();

            final DefaultLdapAuthoritiesPopulator defaultLdapAuthoritiesPopulator =
               new DefaultLdapAuthoritiesPopulator(contextSource, "ou=groups");
            defaultLdapAuthoritiesPopulator.setGroupSearchFilter("(uniqueMember={0})");
            final FilterBasedLdapUserSearch userSearch = new FilterBasedLdapUserSearch("", "uid={0}", contextSource);
            final LdapUserDetailsService service = new LdapUserDetailsService(userSearch, defaultLdapAuthoritiesPopulator);
            service.setUserDetailsMapper(ldapUserDetailsMapper());
            multiUserDetailsServiceWrapper.addService(service);
            return service;
        }


Status and toggle command

I've on my own setup extended clipctl to also have the commands:

status: Whether disabled or enabled.
toggle: Toggle between disabled and enabled.

It's currently a bit hacky but if you find this interesting and I can open a PR to add these commands and discuss how to do this in the best way.

I think status sounds fine, but what's the use case for toggle? :-)

I think status sounds fine, but what's the use case for toggle? :-)

In my case I put an icon in my status bar showing it's status and I can either click on it or using a key-combination to toggle the status. This might be a specialised need though and a toggle command can easily be created if status exists.

In my case I put an icon in my status bar showing it's status and I can either click on it or using a key-combination to toggle the status. This might be a specialised need though and a toggle command can easily be created if status exists.

Sounds reasonable, in which case I think both are fine. Feel free to send a PR :-)

Sounds reasonable, in which case I think both are fine. Feel free to send a PR :-)

Cool, I might cleanup some things first and open a PR in the coming days :+1:

Cool, I might cleanup some things first and open a PR in the coming days :+1:

@cdown See PR #152. Let me know what you think :)

@cdown See PR #152. Let me know what you think :)


Improve support for Linux shells under Windows

Currently we make certain assumptions depending on the OS which are incorrect when running tasks in *nix shells under Windows (e.g. bash, Linux SubSystem, ...). These are:

path separator
folder paths

We should improve this.

//cc @weinand

We looked into this together with Debug and this is quite some work to do it right and therefore needs some planning to when this can happen in a milestone. Keeping on deck.

We just announced remote development with VS Code, Check out the blog post for details https://code.visualstudio.com/blogs/2019/05/02/remote-development


Upgrade luxai_s2 dependency to v2.1.9 to resolve InvalidRequirement error

When I run
import jux.env

I get the following error:
Traceback (most recent call last):
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3039, in _dep_map
    return self.__dep_map
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2835, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 35, in __init__
    parsed = parse_requirement(requirement_string)
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 64, in parse_requirement
    return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 82, in _parse_requirement
    url, specifier, marker = _parse_requirement_details(tokenizer)
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 120, in _parse_requirement_details
    specifier = _parse_specifier(tokenizer)
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 209, in _parse_specifier
    tokenizer.consume("WS")
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/contextlib.py", line 120, in __exit__
    next(self.gen)
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/_tokenizer.py", line 183, in enclosing_tokens
    self.raise_syntax_error(
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/_tokenizer.py", line 163, in raise_syntax_error
    raise ParserSyntaxError(
pkg_resources.extern.packaging._tokenizer.ParserSyntaxError: Expected closing RIGHT_PARENTHESIS
    opencv-python (>=3.) ; extra == 'all'
                  ~~~~^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/jux/env.py", line 7, in <module>
    from luxai_s2 import LuxAI_S2
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/luxai_s2/__init__.py", line 2, in <module>
    from .version import __version__
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/luxai_s2/version.py", line 3, in <module>
    __version__ = pkg_resources.require("luxai-s2")[0].version
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 956, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 820, in resolve
    new_requirements = dist.requires(req.extras)[::-1]
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2755, in requires
    dm = self._dep_map
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3041, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3051, in _compute_dependencies
    reqs.extend(parse_requirements(req))
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3104, in __init__
    super(Requirement, self).__init__(requirement_string)
  File "/home/dfcorbin/miniconda3/envs/luxai_s2/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 37, in __init__
    raise InvalidRequirement(str(e)) from e
pkg_resources.extern.packaging.requirements.InvalidRequirement: Expected closing RIGHT_PARENTHESIS
    opencv-python (>=3.) ; extra == 'all'

According to this (closed) issue on the Lux-Design-S2 repository, the issue has been fixed for luxai_s2 v2.1.9 (which was true when I tested it on my system). However, it seems that the latest version of  jux still depends on luxai_s2 v2.1.0. Could this be updated so that the error may be resolved?

fixed in v2.1.1


Implementation with NextCloud

I'm trying to code the backend and use NextCloud as the frontend. But I didn't realize that they aren't compatible with each other. When I start a test wsgidav server with
wsgidav --host=<IP_ADDRESS> --port=3000 --root=/Users/sunnylo/Downloads/tmp --auth=anonymous

I couldn't even upload files, download files from nextcloud, it seems that wsgidav isn't supporting nextcloud's WebDAV protocol?

This line starts a local WebDAV server on your client. How is this related to NextCloud, and what errors do you see?


Sudden problem with Selenium Java version on Ubuntu Trusty

At some point yesterday all our tests started failing because of the Java version:
[12:05:41] Starting 'wct:local'...
Installing and starting Selenium server for local browsers
----------
selenium-standalone installation starting
----------

---
selenium install:
from: https://selenium-release.storage.googleapis.com/3.0/selenium-server-standalone-3.0.1.jar
to: /home/hugo/code/cloudsim/cloudsim-widgets/node_modules/selenium-standalone/.selenium/selenium-server/3.0.1-server.jar

---
chrome install:
from: https://chromedriver.storage.googleapis.com/2.24/chromedriver_linux64.zip
to: /home/hugo/code/cloudsim/cloudsim-widgets/node_modules/selenium-standalone/.selenium/chromedriver/2.24-x64-chromedriver

---
firefox install:
from: https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz
to: /home/hugo/code/cloudsim/cloudsim-widgets/node_modules/selenium-standalone/.selenium/geckodriver/0.11.1-x64-geckodriver

---
File from https://chromedriver.storage.googleapis.com/2.24/chromedriver_linux64.zip has already been downloaded

---
File from https://selenium-release.storage.googleapis.com/3.0/selenium-server-standalone-3.0.1.jar has already been downloaded

---
File from https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz has already been downloaded

-----
selenium-standalone installation finished
-----
Exception in thread "main"
java.lang.UnsupportedClassVersionError: org/openqa/grid/selenium/GridLauncherV3 : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:803)

    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)

    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)

    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)

    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

    at java.security.AccessController.doPrivileged(Native Method)

    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)

    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

[12:05:43] 'wct:local' errored after 1.42 s
[12:05:43] Error: Selenium server did not start.Another Selenium process may already be running or your java version may be out of date.

On another computer, we upgraded the Java version to 8 and now the tests pass for Chrome 56, but there are new errors for Firefox 49. It would be great to go back to using an earlier Java version.
I'm not sure if the problem was caused by some change in wct or if it comes from upstream. Please close this issue if the problem wasn't introduced here, and in that case, it would be great if you could point me to whom I should be bugging instead.
Thanks!

@ryantmer, thanks for referencing the issue. Adding "wct-local": "2.0.12" as a dev dependency also solves the issue for us - for chrome. Firefox 49 still doesn't work, but it used to.

wct-local 2.0.12 also overrides the firefox driver version to 0.11.1 (if not overriden it will be 0.10.0)
  "selenium-overrides": {     "drivers": {       "firefox": { "version": "0.11.1"

+1
We're also seeing this and are looking for a fix.
wct-local didn't fix it for us :(

The same problem rises when you create a component with polymer CLI polymer init (element - A blank element template) and right after that run polymer test.
(MacOS Sierra with java version "1.7.0_71", node v7.0.0, polymer-cli 0.17.0)
Looks like we really need configuration for selenium to have control over its installation and fixing its own problems not related to wct.
https://github.com/Polymer/web-component-tester/issues/403

So, intrigued by the fact that the Google team can still work on the paper elements in their Travis CI server (e.g. https://travis-ci.org/PolymerElements/paper-input/jobs/172163606). I decided to replicate the environment in my Docker container:

Ubuntu: 14.04.5 LTS (Trusty)
Node: 6.7.0
NPM: 3.10.3
WCT: 5.0.0 (which picks<EMAIL_ADDRESS>Chrome 54
Firefox 49
Java: 1.8.0_111 (Oracle JDK)

And all works fine. But had the same error with the default Java 7.

Thanks a lot that solved my problem!

@bashmish I used selenium-server-standalone-2.45.0.jar for safari, thats the most recent version that works for me,  for others browsers, I can used latest, right now using selenium-server-standalone-3.0.1.jar, on java8, and just calling -Dwebdriver.chrome.driver in this order: java -jar -Dwebdriver.gecko.driver=geckodriver.exe selenium-server-standalone-3.0.0-beta2.jar

@joaovieira - can you please post your Dockerfile?
I am trying to create a Docker container for WCT and running into problems.


Possible to add time and coord on other commands?

Possible to add time and coord on other commands like /pr near?
not sure if I did it wrong but it wasnt showing up unless I use /pr i and click on the block

pr near is a short-cut command so it currently doesn't support flags. It would be possible to allow this though, so I'll leave it open for work.

Pls add /pr rb X Y Z so that u can rollback an specific position BY CONSOLE :)