Trufflehog json import error

Bug description
A clear and concise description of what the bug is.
Whenever I try to import truffle hog json file it throws server 500 error.
Logs are provided below
Steps to reproduce
Steps to reproduce the behavior:

Go to 'Engagement'
Click on 'Findings -> Import Scan Result -> Upload json file -> Select Scan type as truffle hog scan'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Json import should be successful
Deployment method (select with an X)

[ ] Kubernetes
[X ] Docker
[ ] setup.bash / legacy-setup.bash

Environment information

Operating System: [e.g. Ubuntu 18.04] debian 10
DefectDojo Commit Message: [use git show -s --format="%h: %s [%ci]"] f93e24ef: removing dev branch and add security section [2020-06-16 23:28:05 +0200]

Sample scan files (optional)
If applicable, add sample scan files to help reproduce your problem.
Screenshots (optional)
If applicable, add screenshots to help explain your problem.
Console logs (optional)
uwsgi_1         | the JSON object must be str, not 'bytes'
uwsgi_1         | Traceback (most recent call last):
uwsgi_1         |   File "./dojo/tools/trufflehog/parser.py", line 73, in parse_json
uwsgi_1         |     json_data = json.loads(str(json_output, 'utf-8'))
uwsgi_1         |   File "/usr/local/lib/python3.5/json/init.py", line 319, in loads
uwsgi_1         |     return _default_decoder.decode(s)
uwsgi_1         |   File "/usr/local/lib/python3.5/json/decoder.py", line 339, in decode
uwsgi_1         |     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
uwsgi_1         |   File "/usr/local/lib/python3.5/json/decoder.py", line 357, in raw_decode
uwsgi_1         |     raise JSONDecodeError("Expecting value", s, err.value) from None
uwsgi_1         | json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)
uwsgi_1         |
uwsgi_1         | During handling of the above exception, another exception occurred:
uwsgi_1         |
uwsgi_1         | Traceback (most recent call last):
uwsgi_1         |   File "./dojo/engagement/views.py", line 583, in import_scan_results
uwsgi_1         |     parser = import_parser_factory(file, t, active, verified)
uwsgi_1         |   File "./dojo/tools/factory.py", line 156, in import_parser_factory
uwsgi_1         |     parser = TruffleHogJSONParser(file, test)
uwsgi_1         |   File "./dojo/tools/trufflehog/parser.py", line 14, in init
uwsgi_1         |     json_data = self.parse_json(line)
uwsgi_1         |   File "./dojo/tools/trufflehog/parser.py", line 75, in parse_json
uwsgi_1         |     json_data = json.loads(json_output)
uwsgi_1         |   File "/usr/local/lib/python3.5/json/init.py", line 312, in loads
uwsgi_1         |     s.class.name))
uwsgi_1         | TypeError: the JSON object must be str, not 'bytes'
uwsgi_1         | Error in parser: the JSON object must be str, not 'bytes'
uwsgi_1         | Internal Server Error: /product/1/import_scan_results
uwsgi_1         | Traceback (most recent call last):
uwsgi_1         |   File "./dojo/tools/trufflehog/parser.py", line 73, in parse_json
uwsgi_1         |     json_data = json.loads(str(json_output, 'utf-8'))
uwsgi_1         |   File "/usr/local/lib/python3.5/json/init.py", line 319, in loads
uwsgi_1         |     return _default_decoder.decode(s)
uwsgi_1         |   File "/usr/local/lib/python3.5/json/decoder.py", line 339, in decode
uwsgi_1         |     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
uwsgi_1         |   File "/usr/local/lib/python3.5/json/decoder.py", line 357, in raw_decode
uwsgi_1         |     raise JSONDecodeError("Expecting value", s, err.value) from None
uwsgi_1         | json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)
uwsgi_1         |
uwsgi_1         | During handling of the above exception, another exception occurred:
uwsgi_1         |
uwsgi_1         | Traceback (most recent call last):
uwsgi_1         |   File "./dojo/engagement/views.py", line 583, in import_scan_results
uwsgi_1         |     parser = import_parser_factory(file, t, active, verified)
uwsgi_1         |   File "./dojo/tools/factory.py", line 156, in import_parser_factory
uwsgi_1         |     parser = TruffleHogJSONParser(file, test)
uwsgi_1         |   File "./dojo/tools/trufflehog/parser.py", line 14, in init
uwsgi_1         |     json_data = self.parse_json(line)
uwsgi_1         |   File "./dojo/tools/trufflehog/parser.py", line 75, in parse_json
uwsgi_1         |     json_data = json.loads(json_output)
uwsgi_1         |   File "/usr/local/lib/python3.5/json/init.py", line 312, in loads
uwsgi_1         |     s.class.name))
uwsgi_1         | TypeError: the JSON object must be str, not 'bytes'
uwsgi_1         |
uwsgi_1         | During handling of the above exception, another exception occurred:
uwsgi_1         |
uwsgi_1         | Traceback (most recent call last):
uwsgi_1         |   File "/usr/local/lib/python3.5/site-packages/django/core/handlers/exception.py", line 34, in inner
uwsgi_1         |     response = get_response(request)
uwsgi_1         |   File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py", line 115, in _get_response
uwsgi_1         |     response = self.process_exception_by_middleware(e, request)
uwsgi_1         |   File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py", line 113, in _get_response
uwsgi_1         |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
uwsgi_1         |   File "/usr/local/lib/python3.5/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
uwsgi_1         |     return view_func(request, *args, **kwargs)
uwsgi_1         |   File "./dojo/product/views.py", line 475, in import_scan_results_prod
uwsgi_1         |     return import_scan_results(request, pid=pid)
uwsgi_1         |   File "/usr/local/lib/python3.5/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
uwsgi_1         |     return view_func(request, *args, **kwargs)
uwsgi_1         |   File "./dojo/engagement/views.py", line 592, in import_scan_results
uwsgi_1         |     return HttpResponseRedirect(reverse('import_scan_results', args=(eid,)))
uwsgi_1         |   File "/usr/local/lib/python3.5/site-packages/django/urls/base.py", line 90, in reverse
uwsgi_1         |     return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
uwsgi_1         |   File "/usr/local/lib/python3.5/site-packages/django/urls/resolvers.py", line 673, in _reverse_with_prefix
uwsgi_1         |     raise NoReverseMatch(msg)
uwsgi_1         | django.urls.exceptions.NoReverseMatch: Reverse for 'import_scan_results' with arguments '(None,)' not found. 1 pattern(s) tried: ['engagement/(?P\
d+)/import_scan_results$']
Additional context (optional)
Add any other context about the problem here.

Hi @eshanaswar, without a sample scan, we aren't able to investigate.


Release 0.2.0-rc.1

0.2.0-rc.1 - 2020-06-01
Changed

Project was renamed from sitemaps to asgi-sitemaps - sitemap generation for ASGI apps. (Pull #2)
Change a options of CLI and programmatic API to fit new "ASGI-only" project scope. (Pull #2)
CLI now reads from stdin (for --check mode) and outputs sitemap to stdout. (Pull #2)

Removed

Drop support for crawling arbitrary remote servers. (Pull #2)

Fixed

Don't include non-200 or non-HTML URLs in sitemap. (Pull #2)

Codecov Report

Merging #3 into master will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master        #3   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            8         8
  Lines          173       173
=========================================
  Hits           173       173

Impacted Files
Coverage Δ

src/asgi_sitemaps/__version__.py
100.00% <100.00%> (ø)

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 d3868d3...a20f99b. Read the comment docs.


How to install in PHP8 Docker alpine:version image?

I tried to install using pecl, curl, pickle and some other suggested ways I found on the internet, but with no success. Is this extension really available for php8?
This work:
 RUN apk --no-cache add \
  php8 \
  php8-curl

But...
 RUN apk --no-cache add \
  php8 \
  php8-ds  #or php8-pecl-ds

Not work.
I tried using this another way. No error occurs, I assume I have it installed, but I can't use the extension.
I don't know if I need to do anything else. I would like some help with that.
&& mkdir -p /usr/bin/php/ext/ds && curl -fsSL https://pecl.php.net/get/ds | tar xvz -C "/usr/bin/php/ext/ds" --strip 1

It works just fine using pecl.
FROM php:8.0-alpine

RUN apk add --no-cache ${PHPIZE_DEPS} && \
    pecl install ds && \
    docker-php-ext-enable ds

I'm using FROM alpine:3.14.
do you know how i can install using this image?

Well you need to use base PHP image obviously. If you want Alpine 3.14 then it's FROM php:8.0-fpm-alpine3.14

Well you still need to install manually from pecl because no official package exists for this extension... So pecl install ds and then add it to php.ini... You will likely need to apk install php8-dev first to use pecl this way.

@jonatansantana did you get this working? Are you still trying to otherwise?

@jonatansantana you might want to have a look at https://github.com/codecasts/php-alpine/

I get the following output when I do pecl install ds in an alpine image.
Build process completed successfully

**Installing '/usr/local/lib/php/extensions/no-debug-non-zts-20220829/ds.so'**
install ok: channel://pecl.php.net/ds-1.4.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=ds.so" to php.ini
...

I don't think ds.so is installed in correct place?!

I think you'd still need to enable the extension, I'm not sure that pecl does that for you. This is otherwise a pecl issue and not a fault of this project, right?


Benzene becomes cyclohexane

Steps to Reproduce

Launch Ketcher
Select the Benzene template
Add the Benzene
Click to the Benzene bond
Click to the common bond

Expected behavior
The structure does not change

Actual behavior
The first benzene becomes cyclohexane

It turned out that the addition of benzene to benzene is incorrect. @AlexanderSavelyev Please write the rules for adding benzene

An update on issue after analysis.
TL;DR: further enhancements and refactoring are needed, so this issue is not likely to be fixed in 2.4 release.
Explanation
In order to fuse aromatic rings we used aromatize/dearomatize functions up until version 2.3
An issue was introduced after we stopped reversing order of operations with this commit. It prevented correct working of Undo/Redo actions for merged aromatic rings.
Currently we avoid this issue by avoiding aromatize/dearomatize cycle altogether, fusing aromatic rings as regular structures:
https://github.com/epam/ketcher/blob/3b9183363aadbecc15dd5f7bcc848401342fe0ca/packages/ketcher-core/src/application/editor/actions/aromaticFusing.ts#L50-L53
, which in turn introduces the issue of Benzene accidentally turning into Cyclohexane on 2nd click on bond.
So, the following work needs to be done:

Stabilization of data exchange with Indigo endpoint in ket format, including molecule autoloader for aromatize/dearomatize: Issue 526 in Indigo
Refactoring of fromAromaticTemplateOnBond action creator to fix issues with operations order in history stack
Handling edge case of structures that lose aromaticity upon fusing, like adding 3rd benzene ring to naphthalene:


Vite plugin logs? Open source of console.log in VSCode (like the inspector in vite-plugin-svelte)

Describe the problem
When I see the log, I have to go into VSCode myself, find the file, the line of code.
And Firefox DevTools Console has a link to that line in that file.
Microsoft Edge has this DevTools function:

But Firefox doesn't.
I thought that if there is an inspector in vite-plugin-svelte, maybe it is possible to do something similar, for Console? For logs?
Describe the proposed solution
The button and shortcut that calls Popup window, above the page, with a list of logs, with url to files in VSCode.
Same as inspector in vite-plugin-svelte for DOM elements.
Just as inspector in vite-plugin-svelte replaces DevTools Inspect, this is to replace DevTools Console.
In the future: WebExtension with a panel that contains these logs.
Alternatives considered
Wait for Firefox to introduce a solution with Microsoft Edge - https://bugzilla.mozilla.org/show_bug.cgi?id=1771862
(so far no response)
Importance
would make my life easier

while this sounds like a feature that could be helpful, it is very generic and not directly related/restricted to svelte.  So i'm sorry but this is out of scope for vite-plugin-svelte.
Could be implemented in a separate vite-plugin-linked-console

If anyone needs it, I found an easy way to do it right now, without a plugin and without browser functionality.
Just add the code to src/app.html, and it works already.
It looks like this:

Just click the url in the console containing /__open-in-editor?file= in it, and VSCode will open what you need.
It works in Firefox, Chrome, Edge, Vivaldi.
I can already say that it is very convenient. :D
I dream that Mozilla will add this to their DevTools in a refined version.
Or Vite plugin to be created, with a separate console that does not have the flaws that are in this script of mine.
Known problems:

The code is asynchronous due to the use of fetch and wasm, making console.log/warn/error/info asnchronous. It seems to me that this is not a problem most of the time, it's just that the logs appear in a desynchronized way, you don't need to call them with await.
When there is no code map for a file, it returns an XHR error in the console (map not loaded. unfortunately, I don't think it's possible to hide this XHR error), then the line and column number may be wrong (but it still links to the right file, just the wrong line). Needed code maps in some places in Svelte, because it seems to be missing.
When the script is enabled, the original links to the browser DevTools Debugger don't work - they all link only to the function associated with my script, because it substitutes every console.log/error/info/warn. I wonder if it can be done better?
Clicking the link to the editor opens a new tab in the web browser, which you have to manually close later (but it's still less work than looking for a line in the file manually). I'm thinking of a little extension for Firefox that detects tabs with /__open-in-editor?file=, and automatically closes them....
The links are quite long. but nothing can be done about it.

I add this code ABOVE %sveltekit.head% in src/app.html, refresh the page in the browser, and done:
<script<EMAIL_ADDRESS><script>
	sourceMap.SourceMapConsumer.initialize({
			"lib/mappings.wasm"<EMAIL_ADDRESS>	});
</script>
<script type="module" async>
	export async function getPos (url, line, column) {
		const res = await fetch(`${url}.map`);
		const mapJson = await res.json();
		const place = await sourceMap.SourceMapConsumer.with(mapJson, null, consumer => {

			const place = consumer.originalPositionFor({
				line: Number(line),
				column: Number(column)
			});
			return place;
		});
		return place;
	}

	function uniConsole (name) {
		const n = `_${name}`;
		window[n] = console[name];
		const prefix = `${location.origin}/__open-in-editor?file=`;

		console[name] = function (...a) {
			try { throw Error(); } catch (err) {
				const stackLine = err.stack.includes("at ") ? (
					err.stack.split("\n")[2].includes("(") && err.stack.split("\n")[2].includes(")") ? (
						err.stack.split("\n")[2].split(")")[0].split("(")[1]
					) : err.stack.split("\n")[2].split("at ")[1]
				) : err.stack.split("\n")[1];

				if (stackLine) {
					const preUri = stackLine.split("@").at(-1).replace(`${location.origin}/`,"").replace(/^fs/, "");
					const path = preUri.split("?")[0].split(":")[0];

					const line = preUri.split("?").at(-1).split(":").at(-2);
					const column = preUri.split("?").at(-1).split(":").at(-1);

					if (path.length>0 && line && column) {
						getPos(`${location.origin}/${path}`, line, column).then(ob=>{
							if (ob.line && ob.column) {
								const { line, column } = ob;
								const target = `${path}:${ob.line}:${ob.column}`;
								window[n](...a, `${prefix}${target}`);
							} else {
								const target = `${path}:${line}:${column}`;
								window[n](...a, `${prefix}${target}`);
							}
						}).catch (error=>{
							const target = `${path}:${line}:${column}`;
							window[n](...a, `${prefix}${target}`);
						});
					} else
					if (path.length>0 && !line && !column) {
						const target = `${path}`;
						window[n](...a, `${prefix}${target}`);
					} else {
						const target = `${stackLine}`;
						window[n](...a, `${prefix}${target}`);
					}
				} else {
					window[n](...a, err.stack);
				}
			}
		}
	}
	uniConsole("log");
	uniConsole("warn");
	uniConsole("error");
	uniConsole("info");
</script>

Latest source-map version - https://github.com/mozilla/source-map/#use-on-the-web


ParsePushService Android crashes on receive push notification w/ null payload string

When a Unity app on Android receives a push notification, an exception is thrown if the payload is null. This can be an issue if the push was sent from another push provider besides Parse.
The error seems to be originating from this code:
https://github.com/ParsePlatform/Parse-SDK-dotNET/blob/master/ParsePush/src/main/java/com/parse/ParsePushService.java#L138-L140
(This bug originated from an external bug report).

Here I fixed that problem and recompiled jar, if payload is null it just escapes function without any crash.
Download: ParsePush.jar


Docker setup is not working

Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.
👇 __ Let's make a quick check before the contribution.
PR Type

[x] Bugfix
[ ] Feature
[ ] Refactoring

Context
Specifying the pnpm version fixes the issue and the docker environment runs as expected

[x] Closes #6428
[ ] Requires deployment <snek/rubick/worker>

Did your issue had any of the "$" label on it?

[x] Fill up your DOT address: Payout

Community participation

[x] Are you at KodaDot Discord?

Screenshot 📸

Copilot Summary

🤖 Generated by Copilot at cd1c7ab
Updated Dockerfile to use the same pnpm version as package.json. This improves the build consistency and reliability.

🤖 Generated by Copilot at cd1c7ab

PNPM_VERSION set
Docker and local match well
A stable winter

pay 30 usd

😍 Perfect, I’ve sent the payout
💵 $30 @ 4.99 USD/DOT ~ 6.012 $DOT
🧗 16faLfsywwNATaEfbH2ah75dn6ZmctQWpMS5G4KFhbmj5hnD
🔗 0xb7a20a1c19a477ccab74dc752374fd27f259ae86fe2f8afd15cd1bd47b0deb13
🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues


Validation for configuration file

It's possible to have bogus settings in the configuration file since it is only checked for certain values.
We should:

Detect options that are placed in the wrong sections.
Detect options that do not exist.

Moved to xml backlog.


conda package build number is not working, always zero (0)

As we are not using annotated tags the conda package build number is always 0
https://github.com/Quansight/omnisci-datascience-installer/blob/master/conda/meta.yaml#L10

it is working now.
To fix the problem it was needed 2 changes:

source need to be configured with git_url
on github actions, in the checkout step, we need to specify fetch-depth: 0 so it will get the entire history for the project.


how about adding component="file" to Field?

Are you submitting a bug report or a feature request?

Feature Request
Other information

Currently, it seems that setting up a file input in redux form requires passing a custom field to a Field component and wiring it up with event listeners.
Since file inputs are pretty common, I was thinking it would be nice to expand the component prop on Field which already supports inputs, selects, and textareas, to also support a file input as well.
I have some free time on my hands and would be happy to put the work in.
Sorry if this has already been proposed, I couldn't find anything about it in the issue tracker.
Thanks! 👋

Duplicate of #1989

@gustavohenke I don't think this is a duplicate. I'm not asking to add examples to the docs, I'm asking to add default file functionality to redux form. Am I misunderstanding that thread?

One could want to store it as whatever a FileReader reads to -- what needs some async love to happen (but could be user-land) --, plus the File object itself.

@seport Definitely encourage your research on this! If there's a sensible default, it'd be an nice feature ;).

I'm up to code it, I just don't know what a sensible default would be that we could agree on. I'd propose saving the multipart file object, but it sounded like there was some contention around that.

Since this thread has been up for a while, I'm thinking about giving it a first pass and getting a PR up as a proposal. Hopefully it could spawn some discussion?


Fails with Safari Credit Card Autofill

Hi, thanks for the awesome component!
It doesn't appear to handle Safari Credit Card Autofill correctly, however. I've created a small demo app to reproduce the problem:
https://github.com/dwbruhn/mask-test
Some initial debugging points to the _onChange method, which isn't really editing the mask.

Just to follow up: If I'm understanding the code correctly, the bug seems to reside in the design that handles all data-adding edits in _onKeyPress and _onPaste, leaving _onChange to handle only Cut operations.
The problem is that Autofill provides the input data only in an onchange event, and _onChange simply discards that data.

So a possible fix would be to remove the assumption that onchange events only involve cut operations and handle actual data changes in _onChange. But note that this would slightly change the behavior of cutting and deleting.


Imagekit loader

It can take some time for the node-server to compile the images. Most of the images are already being stored on Imagekit or another image hosting services. Since we use Imagekit a lot, we can use it to load the images.

This function won't be implemented because Vercel adds optimizations and transformations which are similar to what we can achieve with Imagekit. Overtime the default loader will improve and will maybe outperform Imagekit or any other loader.


Add timeout option to limit the request duration

Added the timeout option, similar to https://docs.sentry.io/clients/java/config/#timeout-advanced
Let me know if something is missing. I implemented tests like the ones for the http_proxy option.

We use multiple different APIs in our application, so we have the need to set the timeouts individual e.g. a working sentry setup resonds in a few hundred milliseconds and it is ok to lose some events vs. our invoice service takes up to a few seconds and we should wait for it.
I still think that this option is useful for this library. For now there is just the http transport and other options are referring to it (http_proxy). Since we cannot wait to use the timeout, I have to find a solution anyways, so feel free to close this PR.

I still think that this option is useful for this library. For now there is just the http transport and other options are referring to it (http_proxy).

Setting the timeout is indeed useful, and maybe the documentation should provide an example of how to do it given that it doesn't seems to be so straightforward. I already explained the reason I'm against adding more options that are useful only in the context of the HTTP transport and that will cease to work as soon as you stop using the default HTTP client provided out-of-the-box from this library

I have to find a solution anyways, so feel free to close this PR.

I already gave you the solution: you can use the HttpClientFactoryInterface (or one of its implementations if it's enough for you) to create your own instance of the HTTP client, configure it however you like and then set it using the transport factory. I'm going to close this issue and I will open a new PR to fix the default values for the timeouts, which are wrong in any case


FEAT - WEBHOOK tracing config

In order to allo XRAY traces

Thanks for your contribution. I changed in your PR to not enable by default the X-Ray tracing on lambda. You need to specifically set "Active" on trace_mode to enable it, to be backward compatible.


Adding Shape with filters (pixelate/blur) not resetting for different image.

Describe the bug
Adding a shape with pixelate or blur option to an image is not resetting after uploading a new image, it is displaying older image pixelate and blur values in shape.
To Reproduce
Steps to reproduce the behavior:

Go to https://nhn.github.io/tui.image-editor/latest/tutorial-example02-useApiDirect
Click on Shape Menu
Add a shape (rectangle)
Select filter submenu (Beside transparent radio button)
Now, Select another image by the click of the Load Button in the top
Click on Shape Menu
Add a shape (rectangle)
Select filter submenu
Shape will show the result of previous image

Expected behavior
It should show the filter with the current image, not the previous image (blur/pixelate).
Screenshots

Result of first image (step 1 to 4)

Result of second image (step 5 to 8)

Desktop (please complete the following information):

OS: [Windows 10]
Browser [e.g. Chrome, Edge, Firefox]

@1shivsharma1
Thank you for the information.
This issue seems to be the same problem as #572
I'll fix it. :)

Hi @lja1018,
Any update on this issue?

Is this issued resolved? Any information? @lja1018

@1shivsharma1 @besartjashari
Sorry. It hasn't been fixed yet.

@sleeping-owl
Sorry. Not yet.

Anything new on this issue? Any workaround?

I'm looking for a solution, too.


Update office-365-network-mac-perf-overview.md

Added some details about managing LAN Subnet locations and managing user-submitted reports @kelleyvice-msft

This PR seems to have silently failed, so I have created a new PR (https://github.com/MicrosoftDocs/microsoft-365-docs-pr/pull/5113) to make the revisions myself to the private repo.


antisticker bug

when I send 3 stickers in group A and then I send 3 stickers in grub B, then I will be kicked in grub B

when I send 3 stickers in group A and then I send 3 stickers in grub B, then I will be kicked in grub B

There's no anti-sticker feature in this bot.

when I send 3 stickers in group A and then I send 3 stickers in grub B, then I will be kicked in grub B

There's no anti-sticker feature in this bot.

Maybe you're using another bot.

Maybe you're using another bot.

Issue closed due to inactivity.

Issue closed due to inactivity.


official colocate join demo does not trigger colocate join

Steps to reproduce the behavior (Required)

CREATE TABLE `tbl1` (
    `k1` date NOT NULL COMMENT "",
    `k2` int(11) NOT NULL COMMENT "",
    `v1` int(11) SUM NOT NULL COMMENT ""
) ENGINE=OLAP
AGGREGATE KEY(`k1`, `k2`)
PARTITION BY RANGE(`k1`)
(
    PARTITION p1 VALUES LESS THAN ('2019-05-31'),
    PARTITION p2 VALUES LESS THAN ('2019-06-30')
)
DISTRIBUTED BY HASH(`k2`) BUCKETS 1
PROPERTIES (
    "colocate_with" = "group2",
    "replication_num" = "1"
);

CREATE TABLE `tbl2` (
    `k1` datetime NOT NULL COMMENT "",
    `k2` int(11) NOT NULL COMMENT "",
    `v1` double SUM NOT NULL COMMENT ""
) ENGINE=OLAP
AGGREGATE KEY(`k1`, `k2`)
PARTITION BY RANGE(`k1`)
(
    PARTITION p1 VALUES LESS THAN ('2019-05-31'),
    PARTITION p2 VALUES LESS THAN ('2019-06-30')
)
DISTRIBUTED BY HASH(`k2`) BUCKETS 1
PROPERTIES (
    "colocate_with" = "group2",
    "replication_num" = "1"
);

2
EXPLAIN SELECT * FROM tbl1 INNER JOIN tbl2 ON (tbl1.k2 = tbl2.k2);

MySQL [test]> EXPLAIN SELECT * FROM tbl1 INNER JOIN tbl2 ON (tbl1.k2 = tbl2.k2);
+--------------------------------------------------------------------+
| Explain String                                                     |
+--------------------------------------------------------------------+
| PLAN FRAGMENT 0                                                    |
|  OUTPUT EXPRS:1: k1 | 2: k2 | 3: v1 | 4: k1 | 5: k2 | 6: v1        |
|   PARTITION: RANDOM                                                |
|                                                                    |
|   RESULT SINK                                                      |
|                                                                    |
|   3:HASH JOIN                                                      |
|   |  join op: INNER JOIN (BROADCAST)                               |
|   |  colocate: false, reason:                                      |
|   |  equal join conjunct: 2: k2 = 5: k2                            |
|   |                                                                |
|   |----2:EXCHANGE                                                  |
|   |                                                                |
|   0:OlapScanNode                                                   |
|      TABLE: tbl1                                                   |
|      PREAGGREGATION: OFF. Reason: None aggregate function          |
|      partitions=0/2                                                |
|      rollup: tbl1                                                  |
|      tabletRatio=0/0                                               |
|      tabletList=                                                   |
|      cardinality=1                                                 |
|      avgRowSize=3.0                                                |
|      numNodes=0                                                    |
|                                                                    |
| PLAN FRAGMENT 1                                                    |
|  OUTPUT EXPRS:                                                     |
|   PARTITION: RANDOM                                                |
|                                                                    |
|   STREAM DATA SINK                                                 |
|     EXCHANGE ID: 02                                                |
|     UNPARTITIONED                                                  |
|                                                                    |
|   1:OlapScanNode                                                   |
|      TABLE: tbl2                                                   |
|      PREAGGREGATION: OFF. Reason: Has can not pre-aggregation Join |
|      partitions=0/2                                                |
|      rollup: tbl2                                                  |
|      tabletRatio=0/0                                               |
|      tabletList=                                                   |
|      cardinality=1                                                 |
|      avgRowSize=3.0                                                |
|      numNodes=0                                                    |
+--------------------------------------------------------------------+
42 rows in set (0.01 sec)

Expected behavior (Required)
colocate join is triggered
Real behavior (Required)
colocate join not triggered
StarRocks version (Required)

You can get the StarRocks version by executing SQL select current_version()
main 156404be5709858d583bd62840fae39453cb7917

we need to insert some data in tbl1 and tbl2 to trigger colocate join


Crypto and openssl error on centos 6.3

=ERROR REPORT==== 30-Dec-2015::14:41:56 ===
The on_load function for module crypto returned {error,
{load_failed,
"Failed to load NIF library: '/data/emqttd/lib/crypto-3.5/priv/lib/crypto.so: symbol EC_KEY_get0_group, version OPENSSL_1.0.1_EC not defined in file libcrypto.so.10 with link time reference'"}}

Please check the openssl version of your centos:
openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013


How to get the ECR repo full path from required-images.txt ?

git clone the repo and make sure the latest required-images.txt  and display-remote-repos.sh are in the ./mirror sub-directory.

$ cd ./mirror
$ bash display-remote-repos.sh

You'll immediate get the full ECR repo path.
$ bash display-remote-repos.sh
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/kope-dns-controller:1.11.0
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/k8s-dns-dnsmasq-nanny-amd64:1.14.10
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/k8s-dns-sidecar-amd64:1.14.10
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/k8s-dns-kube-dns-amd64:1.14.10
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/cluster-proportional-autoscaler-amd64:1.1.2-r2
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/coredns:1.1.3
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/coredns:1.2.6
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/etcd:2.2.1
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/pause-amd64:3.0
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/kube-controller-manager:v1.11.6
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/kube-scheduler:v1.11.6
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/kube-proxy:v1.11.6
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/kube-apiserver:v1.11.6
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io-heptio-images-authenticator:v0.3.0
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/602401143452.dkr.ecr.us-west-2.amazonaws.com-amazon-k8s-cni:v1.3.2
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/quay.io-coreos-flannel:v0.10.0-amd64
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/ottoyiu-k8s-ec2-srcdst:v0.2.0-3-gc0c26eca
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/ottoyiu-k8s-ec2-srcdst:v0.2.2
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/894847497797.dkr.ecr.us-west-2.amazonaws.com-aws-alb-ingress-controller:v1.1.1
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/quay.io-calico-node:v3.4.0
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/quay.io-calico-cni:v3.4.0
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/quay.io-calico-node:v2.6.12
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/quay.io-calico-cni:v1.11.8
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/quay.io-calico-kube-controllers:v1.0.5
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/quay.io-calico-kube-policy-controller:v0.7.0
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/quay.io-calico-calico-upgrade:v1.0.5
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/defaultbackend:1.4
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/quay.io-kubernetes-ingress-controller-nginx-ingress-controller:0.20.0
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/etcd:3.2.18
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/etcd:3.2.24
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/kubernetes-dashboard-amd64:v1.10.1
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release/proxy_init:master-latest-daily
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release/citadel:master-latest-daily
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release/proxyv2:master-latest-daily
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release/galley:master-latest-daily
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release/pilot:master-latest-daily
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release/mixer:master-latest-daily
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release/kubectl:master-latest-daily
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release/sidecar_injector:master-latest-daily
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release/proxy_init:release-1.0-latest-daily
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release/citadel:release-1.0-latest-daily
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release/proxyv2:release-1.0-latest-daily
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release/galley:release-1.0-latest-daily
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release/pilot:release-1.0-latest-daily
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release/mixer:release-1.0-latest-daily
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release/kubectl:release-1.0-latest-daily
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release/sidecar_injector:release-1.0-latest-daily
937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io-kubernetes-helm-tiller:v2.12.3

因为新增了 required-images-mirrored.txt (https://github.com/nwcdlabs/kops-cn/issues/105), 使用方式如下：
# list the real paths from required-images.txt
bash display-remote-repos.sh
# from required-images-mirrored.txt
bash display-remote-repos.sh required-images-mirrored.txt


Unable to connect Supersets to Trino with LDAP enabled.

Hi,
We have a Trino instance with LDAP and HTTPS enabled but we can't seem to get Superset to connect with our Trino instance.
What we did:

Install sqlalchemy-trino into Python Virtual Machine: pip install sqlalchemy-trino
Launch Superset and add a new database using the following connection string: trino://:@192.168.X.X:443/postgresql/public

The error message we keep getting in the log is as follows:
[2021-02-25 20:00:00 +0800] [240613] [WARNING] Error sending message to statsd Traceback (most recent call last):   File "/root/superset_env/env/lib/python3.8/site-packages/gunicorn/instrument/statsd.py", line 127, in _sock_send     self.sock.send(msg) ConnectionRefusedError: [Errno 111] Connection refused
We confirmed the following:

Username and password we use is able to log in to Trino.
Port 443 is open in Superset server to Trino server.

We can't find much documentations online for this issue.

Hello @CollinKendor
Your error message has very little information (only Connection refused). In order to me figure out what happen, could you run this code in your environment:
~$ python
>>> from sqlalchemy import create_engine
>>> from sqlalchemy.sql import text
>>> engine = create_engine('trino://<user>:<pass>@192.168.X.X:443/postgresql/public')
>>> conn = engine.connect()
>>> res = conn.execute(text("SHOW SCHEMAS")).fetchall()
>>> print(res)

Hi @dungdm93 ,
Sorry wasn't too familiar with sqlalchemy in general so was not sure how to get the stacktrace. Below is the error after the engine.connect() line:
`
[root@superset ~]# python
Python 3.8.7 (default, Feb 11 2021, 01:37:18)
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.

from sqlalchemy import create_engine
from sqlalchemy.sql import text
engine = create_engine('trino://:@192.168.X.X:443/postgresql/public')
conn = engine.connect()
Traceback (most recent call last):
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1010, in validate_conn
conn.connect()
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/connection.py", line 411, in connect
self.sock = ssl_wrap_socket(
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/util/ssl.py", line 432, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/util/ssl.py", line 474, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/root/.pyenv/versions/3.8.7/lib/python3.8/ssl.py", line 1040, in _create
self.do_handshake()
File "/root/.pyenv/versions/3.8.7/lib/python3.8/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1125)

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/util/retry.py", line 573, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='<IP_ADDRESS>', port=443): Max retries exceeded with url: /v1/statement (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1125)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2263, in connect
return self._connection_cls(self, **kwargs)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 104, in init
else engine.raw_connection()
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2369, in raw_connection
return self._wrap_pool_connect(
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2336, in _wrap_pool_connect
return fn()
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 304, in unique_connection
return _ConnectionFairy._checkout(self)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 778, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 495, in checkout
rec = pool._do_get()
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 140, in do_get
self.dec_overflow()
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
compat.raise(
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise
raise exception
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 137, in _do_get
return self._create_connection()
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 309, in _create_connection
return _ConnectionRecord(self)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 440, in init
self.__connect(first_connect_check=True)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 664, in __connect
pool.dispatch.first_connect.for_modify(
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/event/attr.py", line 314, in exec_once_unless_exception
self._exec_once_impl(True, *args, **kw)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/event/attr.py", line 285, in _exec_once_impl
self(*args, **kw)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/event/attr.py", line 322, in call
fn(*args, **kw)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 1406, in go
return once_fn(*arg, **kw)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/strategies.py", line 199, in first_connect
dialect.initialize(c)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 311, in initialize
self.server_version_info = self._get_server_version_info(
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy_trino/dialect.py", line 266, in _get_server_version_info
res = connection.execute(sql.text(query)).first()
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
return meth(self, multiparams, params)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement
ret = self._execute_context(
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
self.handle_dbapi_exception(
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1514, in handle_dbapi_exception
util.raise(exc_info[1], with_traceback=exc_info[2])
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise
raise exception
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
cursor.execute(statement, parameters)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/trino/dbapi.py", line 408, in execute
result = self._query.execute()
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/trino/client.py", line 517, in execute
response = self._request.post(self._sql, additional_http_headers)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/trino/client.py", line 339, in post
http_response = self._post(
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/trino/exceptions.py", line 131, in decorated
raise error
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/trino/exceptions.py", line 118, in decorated
result = func(*args, **kwargs)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/requests/sessions.py", line 590, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='<IP_ADDRESS>', port=443): Max retries exceeded with url: /v1/statement (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1125)')))
`

It seems like the SSL cert can't be verified.

This is without LDAP and HTTPS:
[root@superset ~]# python
Python 3.8.7 (default, Feb 11 2021, 01:37:18)
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from sqlalchemy import create_engine
>>> from sqlalchemy.sql import text
>>> engine = create_engine('trino://<username>@192.168.X.X:8080/postgresql/public')
>>> conn = engine.connect()
>>> res = conn.execute(text("SHOW SCHEMAS")).fetchall()
>>> print(res)
[('information_schema',), ('pg_catalog',), ('public',)]
>>>

You could add self-sign CA to your system:

Debian/Ubuntu:

Copy your CA to /usr/local/share/ca-certificates/
sudo update-ca-certificates

CentOS 6+

Enable the dynamic CA configuration feature: sudo update-ca-trust force-enable
Copy your CA to /etc/pki/ca-trust/source/anchors/
sudo update-ca-trust extract

Hi @dungdm93 ,
Trino uses Java Keystore for HTTPS as stated in their documentation: Java Keystore and Truststore.
So I don't have a CA to copy over to my Superset server. Just a .jks file.

@CollinKendor another way trino://<user>:<pass>@192.168.X.X:443/postgresql/public?verify=/path/to/your/ca.crt

@CollinKendor Yeah, I known. .jks is specific for Java.
In order to other system work, you need to convert your CA into PEM format, and add it into SuperSet nodes as well.

@CollinKendor As far as I know, trino also support Keystore in PEM format

ok I tried the following:

Convert jks to pem using the following steps: Convert jks to pem
Then I tried connecting again with the following connection string: trino://<user>:<pass>@192.168.X.X:443/postgresql/public?verify=/superset/path/cert/keystore.pem
I get the following error:

[root@superset ~]# python
Python 3.8.7 (default, Feb 11 2021, 01:37:18)
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from sqlalchemy import create_engine
>>> from sqlalchemy.sql import text
>>> engine = create_engine('trino://<user>:<pass>@192.168.X.X:443/postgresql/public?verify=/superset/path/cert/keystore.pem')
>>> conn = engine.connect()
/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/connection.py:455: SubjectAltNameWarning: Certificate for 192.168.X.X has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.)
  warnings.warn(
/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/connection.py:455: SubjectAltNameWarning: Certificate for 192.168.X.X has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.)
  warnings.warn(
/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/connection.py:455: SubjectAltNameWarning: Certificate for 192.168.X.X has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.)
  warnings.warn(
Traceback (most recent call last):
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/connectionpool.py", line 382, in _make_request
    self._validate_conn(conn)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
    conn.connect()
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/connection.py", line 464, in connect
    _match_hostname(cert, self.assert_hostname or server_hostname)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/connection.py", line 508, in _match_hostname
    match_hostname(cert, asserted_hostname)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/ssl.py", line 420, in match_hostname
    raise CertificateError("hostname %r "
ssl.SSLCertVerificationError: ("hostname '192.168.X.X' doesn't match 'KewMann'",)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/util/retry.py", line 573, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.X.X', port=443): Max retries exceeded with url: /v1/statement (Caused by SSLError(SSLCertVerificationError("hostname '192.168.X.X' doesn't match 'KewMann'")))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2263, in connect
    return self._connection_cls(self, **kwargs)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 104, in __init__
    else engine.raw_connection()
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2369, in raw_connection
    return self._wrap_pool_connect(
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2336, in _wrap_pool_connect
    return fn()
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 304, in unique_connection
    return _ConnectionFairy._checkout(self)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 778, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 495, in checkout
    rec = pool._do_get()
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 140, in _do_get
    self._dec_overflow()
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
    compat.raise_(
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 137, in _do_get
    return self._create_connection()
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 309, in _create_connection
    return _ConnectionRecord(self)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 440, in __init__
    self.__connect(first_connect_check=True)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 664, in __connect
    pool.dispatch.first_connect.for_modify(
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/event/attr.py", line 314, in exec_once_unless_exception
    self._exec_once_impl(True, *args, **kw)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/event/attr.py", line 285, in _exec_once_impl
    self(*args, **kw)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/event/attr.py", line 322, in __call__
    fn(*args, **kw)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 1406, in go
    return once_fn(*arg, **kw)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/strategies.py", line 199, in first_connect
    dialect.initialize(c)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 311, in initialize
    self.server_version_info = self._get_server_version_info(
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy_trino/dialect.py", line 266, in _get_server_version_info
    res = connection.execute(sql.text(query)).first()
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
    return meth(self, multiparams, params)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement
    ret = self._execute_context(
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
    self._handle_dbapi_exception(
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1514, in _handle_dbapi_exception
    util.raise_(exc_info[1], with_traceback=exc_info[2])
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
    cursor.execute(statement, parameters)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/trino/dbapi.py", line 408, in execute
    result = self._query.execute()
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/trino/client.py", line 517, in execute
    response = self._request.post(self._sql, additional_http_headers)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/trino/client.py", line 339, in post
    http_response = self._post(
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/trino/exceptions.py", line 131, in decorated
    raise error
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/trino/exceptions.py", line 118, in decorated
    result = func(*args, **kwargs)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/requests/sessions.py", line 590, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/requests/adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='192.168.X.X', port=443): Max retries exceeded with url: /v1/statement (Caused by SSLError(SSLCertVerificationError("hostname '192.168.X.X' doesn't match 'KewMann'")))

I get the same error after converting the pem file to crt export crt from jks

Interesting, I was able to connect after changing to the following:
[root@superset ~]# python
Python 3.8.7 (default, Feb 11 2021, 01:37:18)
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from sqlalchemy import create_engine
>>> from sqlalchemy.sql import text
>>> import ssl
>>> ssl.match_hostname = lambda cert, hostname: True
>>> engine = create_engine('trino://<user>:<pass>@192.168.X.X:443/postgresql/public?verify=/superset/path/cert/keystore.pem')
>>> conn = engine.connect()
/root/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3/connection.py:455: SubjectAltNameWarning: Certificate for 192.168.X.X has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.)
  warnings.warn(
>>> res = conn.execute(text("SHOW SCHEMAS")).fetchall()
>>> print(res)
[('information_schema',), ('pg_catalog',), ('public',)]
>>>

Stackoverflow reference here: CertificateError: hostname doesn't match

@dungdm93 I tried adding ?verify=\path\to\cert.pem to the connection string in superset but superset return same error.

3. update-ca-trust extract

i have also tried this and it didn't work.

It's because your CA is not valid. Could you give me inspection of your cert:
openssl x509 -in /path/to/cert.pem -text -noout

[root@superset anchors]# openssl x509 -in /etc/pki/ca-trust/source/anchors/trinoCA.pem -text -noout
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            3f:0f:ba:2b:63:3b:58:c4:a7:5a:db:c7:26:f7:20:7e:95:01:86:72
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C = MY, ST = Selangor, L = Klang, O = Kewmann, OU = Trino, CN = presto, emailAddress =<EMAIL_ADDRESS>        Validity
            Not Before: Feb 26 07:32:29 2021 GMT
            Not After : Feb 25 07:32:29 2026 GMT
        Subject: C = MY, ST = Selangor, L = Klang, O = Kewmann, OU = Trino, CN = presto, emailAddress =<EMAIL_ADDRESS>        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                RSA Public-Key: (2048 bit)
                Modulus:
                    00:c2:26:9f:55:b4:05:10:1e:1e:0a:22:a9:a3:ec:
                    30:31:b3:a8:c1:b9:f0:bb:6e:a4:14:25:ab:62:37:
                    4d:d1:c7:6e:ce:44:63:7e:40:0a:df:39:4a:7a:a0:
                    19:0f:a7:2d:46:ce:f3:f2:a5:d6:89:73:e3:cd:b3:
                    19:41:7a:55:ec:99:94:be:c8:c8:bd:eb:fc:5b:33:
                    54:52:45:da:41:95:60:d3:77:ba:55:c6:7e:ee:d0:
                    e0:1c:fd:5f:17:b6:bc:39:83:fd:84:ab:67:b8:a2:
                    48:63:10:5f:a2:7d:57:fb:f5:e1:96:86:df:54:c0:
                    06:3a:5a:cb:99:51:b7:c6:7f:33:87:37:13:8b:d3:
                    e1:f0:dc:f8:9f:8a:71:40:a3:55:6c:90:54:57:83:
                    f3:0d:49:aa:d5:d7:c8:34:18:e3:24:99:54:7a:61:
                    0a:62:91:80:7a:2f:9d:0a:78:2b:06:5a:ae:d7:6f:
                    a9:4d:56:55:5c:d3:bb:3b:c3:56:12:20:47:95:43:
                    3d:71:f6:53:c3:80:49:33:03:80:99:ab:64:7d:5f:
                    95:a0:84:10:00:ed:08:9c:59:85:ce:8d:77:be:7e:
                    36:a7:ca:ed:61:5d:e7:da:57:dc:36:24:22:c6:47:
                    f5:d2:9a:56:f4:10:4f:e1:3a:19:a8:5a:66:28:9e:
                    d3:25
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Subject Key Identifier:
                94:8B:59:18:FC:C1:DF:12:37:CB:A7:61:90:5F:BA:5F:34:A2:EA:2D
            X509v3 Authority Key Identifier:
                keyid:94:8B:59:18:FC:C1:DF:12:37:CB:A7:61:90:5F:BA:5F:34:A2:EA:2D

            X509v3 Basic Constraints: critical
                CA:TRUE
    Signature Algorithm: sha256WithRSAEncryption
         4d:4e:5f:11:30:f5:ab:16:9e:ea:05:90:e7:2a:af:61:92:13:
         27:73:60:3e:78:fe:69:16:2d:d6:d4:24:ad:cf:31:e2:23:c8:
         98:54:4a:73:6b:cd:f6:30:45:c7:e5:6d:bc:d6:19:8e:95:5b:
         96:e3:f2:cd:e8:91:dd:be:4d:06:5f:70:bb:01:db:22:17:85:
         d9:d4:88:a4:3a:76:8a:8a:63:08:aa:16:14:cb:db:36:9e:ff:
         b8:c7:d0:d4:45:92:f1:33:75:81:45:6b:aa:44:50:03:d5:7e:
         70:95:41:6c:f4:60:b5:71:05:a0:f3:81:90:4a:f5:5b:8c:53:
         e9:2f:d8:9c:b1:1a:ec:a8:5c:53:96:5e:f3:5f:ed:8b:4c:fe:
         73:11:4d:50:2e:5b:8e:89:ec:36:1f:5f:82:d9:35:60:28:fa:
         01:ad:95:8c:4f:55:38:1e:c7:2d:b9:77:ee:50:38:99:47:79:
         31:21:f4:37:b5:7e:69:8f:62:47:2d:85:7d:8b:cd:3c:82:7d:
         4a:33:ef:be:c7:e7:4b:6e:6b:eb:8c:c6:e4:d2:ec:c2:57:03:
         cf:1d:d6:13:1e:64:5c:ef:0f:50:06:7c:01:53:eb:4c:d3:20:
         0d:b6:4a:08:4f:7d:22:7c:50:cf:b9:f6:b0:78:c8:63:17:25:
         ca:48:ea:80

@CollinKendor your cert only has Commons Name (CN = presto) and no Subject Alternative Name (SAN).
Both don't match with your endpoint, which is 192.168.X.X
So, please create an other cert with contains your IP 192.168.X.X in either CN or SAN.
P/S: I prefer using domain instead of IP

P/S: I prefer using domain instead of IP

yes but I am not provided with a domain which I can use to unfortunately I need to use IP.
below is the new cert:
[root@superset env]# openssl x509 -in /etc/pki/ca-trust/source/anchors/trinoCA.pem -text -noout
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            50:f6:12:f4:f4:2e:bb:c8:a0:b9:8c:6c:51:f3:a0:20:b7:83:c6:6f
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C = MY, ST = Selangor, L = Klang, O = Kewmann, OU = Trino, CN = 192.168.X.X, emailAddress =<EMAIL_ADDRESS>        Validity
            Not Before: Feb 26 10:23:19 2021 GMT
            Not After : Feb 25 10:23:19 2026 GMT
        Subject: C = MY, ST = Selangor, L = Klang, O = Kewmann, OU = Trino, CN = 192.168.X.X, emailAddress =<EMAIL_ADDRESS>        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                RSA Public-Key: (2048 bit)
                Modulus:
                    00:c2:26:9f:55:b4:05:10:1e:1e:0a:22:a9:a3:ec:
                    30:31:b3:a8:c1:b9:f0:bb:6e:a4:14:25:ab:62:37:
                    4d:d1:c7:6e:ce:44:63:7e:40:0a:df:39:4a:7a:a0:
                    19:0f:a7:2d:46:ce:f3:f2:a5:d6:89:73:e3:cd:b3:
                    19:41:7a:55:ec:99:94:be:c8:c8:bd:eb:fc:5b:33:
                    54:52:45:da:41:95:60:d3:77:ba:55:c6:7e:ee:d0:
                    e0:1c:fd:5f:17:b6:bc:39:83:fd:84:ab:67:b8:a2:
                    48:63:10:5f:a2:7d:57:fb:f5:e1:96:86:df:54:c0:
                    06:3a:5a:cb:99:51:b7:c6:7f:33:87:37:13:8b:d3:
                    e1:f0:dc:f8:9f:8a:71:40:a3:55:6c:90:54:57:83:
                    f3:0d:49:aa:d5:d7:c8:34:18:e3:24:99:54:7a:61:
                    0a:62:91:80:7a:2f:9d:0a:78:2b:06:5a:ae:d7:6f:
                    a9:4d:56:55:5c:d3:bb:3b:c3:56:12:20:47:95:43:
                    3d:71:f6:53:c3:80:49:33:03:80:99:ab:64:7d:5f:
                    95:a0:84:10:00:ed:08:9c:59:85:ce:8d:77:be:7e:
                    36:a7:ca:ed:61:5d:e7:da:57:dc:36:24:22:c6:47:
                    f5:d2:9a:56:f4:10:4f:e1:3a:19:a8:5a:66:28:9e:
                    d3:25
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Subject Key Identifier:
                94:8B:59:18:FC:C1:DF:12:37:CB:A7:61:90:5F:BA:5F:34:A2:EA:2D
            X509v3 Authority Key Identifier:
                keyid:94:8B:59:18:FC:C1:DF:12:37:CB:A7:61:90:5F:BA:5F:34:A2:EA:2D

            X509v3 Basic Constraints: critical
                CA:TRUE
    Signature Algorithm: sha256WithRSAEncryption
         13:31:43:ed:bf:96:d7:bf:0b:24:c5:fd:4e:61:f7:96:f0:25:
         80:ff:c7:d4:8b:69:05:5b:8e:92:61:94:ee:8b:2d:05:c2:da:
         f0:aa:c0:2c:22:63:96:61:d4:7b:01:99:8e:8c:c4:55:bd:55:
         2d:e6:7d:60:75:a7:62:61:dd:98:1c:28:dc:1b:09:20:e3:08:
         b9:0a:5b:6f:74:01:31:a4:71:7c:75:c2:b7:40:e6:0a:bb:6a:
         bc:eb:c2:be:69:dd:81:1d:69:3c:38:43:2c:78:09:e5:bc:f7:
         9c:76:ff:d4:b1:ad:a4:dd:c0:a1:3d:54:6a:68:1d:78:4c:3f:
         80:db:dd:90:a2:e5:da:19:40:23:fc:e6:ed:5c:8e:a8:10:1d:
         74:aa:1f:b3:09:db:d2:f4:75:e6:6f:e8:ae:4d:c2:55:8a:29:
         bd:09:08:1a:38:40:76:72:23:c1:ca:fd:06:8e:aa:17:57:f6:
         d1:75:a7:24:45:44:61:45:1b:45:b3:da:17:8a:8e:9f:1f:fc:
         ad:90:ae:92:52:aa:94:2c:59:ae:e3:9f:d0:2d:55:c8:ee:71:
         5d:81:8f:c0:f0:35:2c:fe:ef:6e:f0:ab:02:c1:80:c5:ef:7c:
         64:17:0b:c5:24:f9:09:4c:1d:71:e3:5b:81:b9:2a:25:3c:c5:
         8b:25:f8:b4

which I have also added to superset server. I restarted the superset and tested again and got the same error message.

@CollinKendor my mistake, IP address MUST be included in the Subject Alternative Name (SAN)
Use could also use some local domain like trino.local  and put it into /etc/hosts

Sorry just curious do i need to specify the cert in gunicorn?

Your cert is used by superset (as client) connect to trino. If you do not want to access to superset via HTTPS then no need to specify the cert in gunicorn.
P/S: And note that, superset's cert and trino's cert might different.


Pre-7 Remotes

made changes to the spec and remotes will handle both scripts and uri and other
see https://github.com/hexbatch/apple-core/blob/74de4ebe827ec619c15721b054b7cab20b7ac887/core-docs/step-3-remotes/remote-overview.md

This also adds in some changes to the attributes in how meta and value is stored. The standard attributes also are being added here. The final pull request will have a working remote stack, that is testable

Adding in the first sight of servers, which will be stubs in this pull, but was added into the spec from previous discussions in the outer layer for communications between instances. Having the api for them to coordinate in the core library is a sound move

Remtote are done, will do the stacks next


Use .detach() instead of .remove() for removing dynamic assocs

From the jQuery docs for .detach():

The .detach() method is the same as .remove(), except that .detach() keeps all jQuery data associated with the removed elements.

Submitting this because we needed to do some extra processing on some data which was set via jQuery's .data().
See also: this Stack Overflow question

Small enough change. Please enlighten me: why did you still need to access data from removed items? Just curious 😜

@nathanvda Thanks! To answer your question, we basically have a <select> mirroring some Cocoon associations, so we stored the primary key of the association as a data attribute on each <option> and on each Cocoon element. So we listen for cocoon:after-remove and de-select the relevant <option>. Certainly not the only way to implement that logic, but it fits our use case


Change input helpers to only accept allowed fields

Closed by https://github.com/luckyframework/web/commit/b1dfbdb5a4cccd3a0e191166c706db4b9a95128e


IA-1944: Frontend - user roles management and changes to users page

Explain what problem this PR is resolving
Add front for user roles creation
Related JIRA tickets : IA-1944
Self proofreading checklist

[x] Did I use eslint and black formatters
[x] Is my code clear enough and well documented
[x] Are my typescript files well typed
[x] New translations have been added or updated if new strings have been introduced in the frontend
[x] My migrations file are included
[ ] Are there enough tests
[ ] Documentation has been included (for new feature)

Changes

Create, edit, delete and user roles list
Link user with ManyToMany relationship with user roles
Add user roles on the userDialog on permissions tab

How to test
User roles

Go to the admin menu
Go to the user roles submenu
Try to add, edit and display user roles list

User page

Go to the admin menu
Go to the user submenu
Link the user to one or multiple user roles in the info tab and save
Edit the user and check the permissions tab

Print screen / video
User roles

User page

Also we can provide a filter on users page to filter users by user roles, but maybe on another ticket

Working on this

@quang-le when you have time take a look. I've apply or the changes requests


Unable to signup for "the last meal slot"

When a meal has set a limit, it appears that we are unable to sign up for the last meal possible.
This was reported to me by our neighbor Hope for our Halloween meal. The signups are listed as "49/50", when she clicked through, she could not sign up, instead she saw the message:

Your Order
You have not signed up for this meal.

So she's puzzled why she can't get that 50th entry. I was puzzled by this as well, and then I replicated it myself, with a meal scheduled for Nov 02 2023. The signups are displaying as "34/35".  I have included a screenshot below showing both the list view for this meal and the detailed view.
I'm making an assumption that the algorithm might be checking "less than" rather than "less than or equal to" when determining whether there's room in the meal. If the meal really is full, then I would have expected to have seen a message state something like "Sorry, this meal is full." Instead, the message is inviting the user to sign up for something that they cannot.

I have found a meal where it's 2 under the limit and I'm unable to signup. I realize that I'm currently less than 24 hours away from this meal, but this was true a couple days ago as well.


Requesting - Copy updates across the journey

What
A list of copy amends

[ ] 1.  Item page - "Access - Not requestable" change to "Access - Can't be requested"

[x] 2. Item page - "Note: Item is in use by another reader. Please ask at Enquiry Desk." change to "Note: Item is in use by another reader. Please ask at Library Enquiry Desk."

[ ] 3. Item page - "Note: This journal needs to be ordered on a manual request slip from the Library Enquiry Desk. If ordering in advance of your visit, email<EMAIL_ADDRESS>change to "Note: You’ll need a manual request slip from the Library Enquiry Desk to order this item. To request it in advance of your library visit, email<EMAIL_ADDRESS>

[x] 4. Account - "on hold." to 'On hold"

[x] 5. Item page - "XX/15 requests remaining" change to "XX/15 items requested"

I believe (2) and (3) come from the Sierra rules for requesting, so we'll need to coordinate those changes with LSS.

@cbowskill Do you have a link for item (3)? I don't think we're providing that copy – I think it's coming directly from the Sierra record.

@alexwlchan here's an example: https://wellcomecollection.org/works/cq7gpuqj
If this is coming from Sierra records I assume it's a case of me working with the library team to change the format within Sierra to reflect here?

Okay, yeah, that's coming from the original Sierra record. You'd need to work with the Collections team – they're responsible for the data in Sierra.
A quick search in the reporting cluster suggests it affects ~19k records; I don't know if they can easily do bulk updates.

@alexwlchan - Just going through old tickets. Point 3 on this sits with Collections to update data in Sierra. What about point 1? (trying to capture any remaining tidy up stories)

I'll try and find this out @cbowskill 🎉


logo carousel links difficult to use

overview
@tusharshahrs called out during ux office hours that he was having difficulty following through links in the homepage logo carousel, several of which link to case studies and youtube content. it seems like while the carousel is auto scrolling that clicking behavior is not respected.
screen recording
takes three clicks to follow the link through

This has changed. Currently the carousel links don't go directly to the case studies, but link to a lower section on the page. TBH i also find that behavior counter-intuitive, but it seems to work consistently, regardless of scroll status. Closing this as fixed.


Route with no name gets the name prefix as name

Laravel Version: 8.47.0
PHP Version: 8.0.7

Description:
When I define a route without a name inside a group with a name prefix, the route is named as the prefix only (instead of no name).
Steps To Reproduce:
Route::name('admin::')->group(function () {
    Route::get('/', function () {
        return view('welcome');
    })->name('dashboard'); // name = admin::dashboard

    Route::get('/foo', fn () => 'foo'); // no name = admin::
    Route::get('/bar', fn () => 'bar'); // no name = admin::
});

➜  bug-route-prefix php artisan route:list
+--------+----------+----------+------------------+---------+------------+
| Domain | Method   | URI      | Name             | Action  | Middleware |
+--------+----------+----------+------------------+---------+------------+
|        | GET|HEAD | /        | admin::dashboard | Closure | web        |
|        | GET|HEAD | api/user |                  | Closure | api        |
|        |          |          |                  |         | auth:api   |
|        | GET|HEAD | bar      | admin::          | Closure | web        |
|        | GET|HEAD | foo      | admin::          | Closure | web        |
+--------+----------+----------+------------------+---------+------------+

It's usually not a problem but if I want to cache my routes:
➜  bug-route-prefix php artisan route:cache
Route cache cleared!

   LogicException

  Unable to prepare route [bar] for serialization. Another route has already been assigned name [admin::].

  at vendor/laravel/framework/src/Illuminate/Routing/AbstractRouteCollection.php:217
    213▕             $route->name($name = $this->generateRouteName());
    214▕
    215▕             $this->add($route);
    216▕         } elseif (! is_null($symfonyRoutes->get($name))) {
  ➜ 217▕             throw new LogicException("Unable to prepare route [{$route->uri}] for serialization. Another route has already been assigned name [{$name}].");
    218▕         }
    219▕
    220▕         $symfonyRoutes->add($route->getName(), $route->toSymfonyRoute());
    221▕

      +19 vendor frames

I can look into a fix but I think it may be a breaking change (somebody could have used this "feature" to have a route named as the prefix inside the group…)

This is expected. Your two last routes are essentially assigned the same name (which you defined on the group). You need to change them into unique names.