Adopt CouchDB as a service

Impact of the new feature
WMCore in general
Is your feature request related to a problem? Please describe.
From the CouchDB discussion we had today, we agreed that:

we should stop relying on our customized CouchDB build (including custom Erlang build)
thus, relying on standard CouchDB package/docker image

we need to migrate to token-based authentication, already supported by CouchDB

adopt the CERN SSO token mechanism, or OICD (better decide on only one technology if possible)
stop depoloying CouchDB in CMSWEB VMs, and start migrating to a cluster providing CouchDB as a service (maintained by CMSWEB/Panos?)

these changes will make a future service upgrade much easier, with the adoption of standard packaging and centralized/kubernetes based deployments.
Describe the solution you'd like
Once we have WMCore using the latest stable CouchDB (3.x) - still using our RPM-based system - and everything is deployed to production and stable; we can then start investigating how to start migrating our services to a specific cluster providing CouchDB as a Service, running behind APS which supports both token and X509 authentication.
We still have to discuss whether we tackle both projects at the same time:

migration to CouchDB as a service; and
migration to token based authentication

this and other details can be discussed in the future. And this issue will be updated accordingly.
There is still much to be discussed and planned with this, so see this ticket as a placeholder for the moment.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
For reference, here is a nice investigation and proof of concept that Valentin came up with:
https://github.com/dmwm/WMCore/issues/8853#issuecomment-1030681584
and here is further details about an initial setup that Panos made available, for CouchDB AAS:
https://its.cern.ch/jira/browse/CMSKUBERNETES-59

Just a FYI. Given that this will likely rely on a kubernetes cluster running this service, I just came across this documentation with some tweaks for Erlang (to avoid killing all resources and so on):
https://adoptingerlang.org/docs/production/kubernetes/

@vkuznet Valentin, this issue is still not clear to me whether it will be up in our list for Q2 or not, as we are still processing the feedback from the stakeholders and evaluating which issues need further discussion and/or subtasks.
There are a few that I am sure that will be marked as High prio for Q2 though, such as:
https://github.com/dmwm/WMCore/issues/11194
https://github.com/dmwm/WMCore/issues/11349
https://github.com/dmwm/WMCore/issues/11538
https://github.com/dmwm/WMCore/issues/10401
it would be great if you could take one of those instead.


make the contact,About and login pages responsive :

As we have done with the home page, we should make contact, about and login pages responsive and
mobile screen friendly.
make the navbar collapsing in a small screen and, place properly all the contents of those 3 pages

Yeah! I'll assign this issue to you. Good luck! But try to create a file called navbar.html. navbar.css.  So that wherever we want we can easily call it.

Yes i will do that

Hey @naim16031988
I checked out the link you given. I saw that About, Login, Request New Tool pages aren't look responsive. Even the navbar also not collapsed. Can you please check it out?


Expose position name in MDAEvent

This PR expose in theMDAEvent the position name stored in the Position class used in MDASequence.
Used in https://github.com/tlambert03/napari-micromanager/pull/180.

Lemme know when this is not wip

Lemme know when this is not wip

@tlambert03 not WIP :)

@tlambert03 I updated also the tests. Now it is not wip anymore.


Fix AnimationPlayer snap mode dropdown behaviour

Right now the dropdown is only enabled when there's no animation loaded, when it should be the opposite.
Bugsquad edit: Fixes #28044.

Thanks!


feature: title smart contract and frontend

What does the PR do?
This PR implements a title smart contract using the create-soroban-dapp template.
Checklist of what you did

[x] Implemented the title smart contract.
[x] Implemented the require_auth and address management feature.
[x] Implement checks to ensure only allowed addresses can update the title.
[x] Unit test the title contract to ensure it works as expected.

Test Screenshot

Smart contract and require_auth implementation looks good, tests run well but only tests what is suppose to happen.
Frontend implementation is poor, the deployed smart contract was not even tested, im missing the ability to add allowed or remove allowed users from the frontend or even initialized the contract, there is no admin in it nor any allowed users, the frontend is just a copy/paste of the greeting component. not working
Smart contract looks good

Yeah, I saw the challenge late. I see the deadline was already due.


Security Vulnerability in tf-encrypted Secure Random Module

Description:
I have identified a critical security vulnerability in the random number generation module in tf-encrypted.
When the types of seed, minval, and maxval differ, the module generates a constant value instead of random numbers.
Example:
In the following example, the result (res) is always a constant tensor of [-128, -128] (even the seed is changed), instead of a uniformly random tensor within the specified range.
import tensorflow as tf
from tf_encrypted.operations.secure_random.secure_random import secure_random_module

seed = tf.constant([-27587587, -1632666452, -218620675, -1537614956,<PHONE_NUMBER>, -1805869028, -74859994, -1320420251], dtype=tf.int32)
shape = (2,)
minval = tf.constant(-128, dtype=tf.int8)
maxval = tf.constant(127, dtype=tf.int8)

res = secure_random_module.secure_seeded_random_uniform(
    shape,
    seed,
    minval,
    maxval,
    name=None,
)
print("res = ", res)  # Output: [-128, -128]

Impact:
This vulnerability directly affects secure comparison protocols in aby3,  making them insecure. Below is a call stack showing how this vulnerability can be triggered:
Call Stack:

File "~/tf-encrypted/./test_rss_eq.py", line 142, in <module>
    test(args.secret, 1)
  File "~/tf-encrypted/./test_rss_eq.py", line 128, in test
    result = prot.equal(x, 0)
  File "~/tf-encrypted/tf_encrypted/protocol/protocol.py", line 117, in cache_nodes
    result = func(self, *args, **kwargs)
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3.py", line 1684, in equal
    return self.dispatch("equal", x, y)
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3.py", line 2038, in dispatch
    return func(self, *args, **kwargs)  # pylint: disable=not-callable
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3.py", line 3053, in _equal_private_public
    return _equal_zero_private(prot, x - y)
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3.py", line 3064, in _equal_zero_private
    msb = prot.msb(pack)
  File "~/tf-encrypted/tf_encrypted/protocol/protocol.py", line 117, in cache_nodes
    result = func(self, *args, **kwargs)
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3.py", line 1561, in msb
    return self.dispatch("msb", x)
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3.py", line 2038, in dispatch
    return func(self, *args, **kwargs)  # pylint: disable=not-callable
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3.py", line 3920, in _msb_private
    return _bit_extract_private(prot, x, x.backing_dtype.nbits - 1)
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3.py", line 3908, in _bit_extract_private
    carry = prot.carry(operand1, operand2, pos=i - 1)
  File "~/tf-encrypted/tf_encrypted/protocol/protocol.py", line 117, in cache_nodes
    result = func(self, *args, **kwargs)
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3.py", line 1724, in carry
    return self.dispatch("carry", x, y, pos)
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3.py", line 2038, in dispatch
    return func(self, *args, **kwargs)  # pylint: disable=not-callable
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3.py", line 3579, in _carry_private_private
    return _carry_computation(prot, x, y, pos)
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3.py", line 3611, in _carry_computation
    P = Ps[0] & Ps[1]
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3_tensors.py", line 327, in __and__
    return self.bitwise_and(other)
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3_tensors.py", line 320, in bitwise_and
    return self.prot.and_(self, other)
  File "~/tf-encrypted/tf_encrypted/protocol/protocol.py", line 117, in cache_nodes
    result = func(self, *args, **kwargs)
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3.py", line 1488, in and_
    return self.dispatch("and", x, y)
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3.py", line 2038, in dispatch
    return func(self, *args, **kwargs)  # pylint: disable=not-callable
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3.py", line 3161, in _and_private_private
    a0, a1, a2 = prot._gen_zero_sharing(
  File "~/tf-encrypted/tf_encrypted/protocol/aby3/aby3.py", line 957, in _gen_zero_sharing
    f00 = factory.sample_seeded_uniform(
  File "~/tf-encrypted/tf_encrypted/operations/secure_random/secure_random.py", line 109, in seeded_random_uniform
    res = secure_random_module.secure_seeded_random_uniform(

Let me know if further information is needed or if I can assist in testing a patch.
Credit
Guopeng Lin (Fudan University)

@GuopengLin Thanks for the issue. It is fixed in #901. Hasn't been merged, but please apply the fix and let us know whether it works.

Thanks, it is fixed.


Address dead links

Fixes https://tigera.atlassian.net/browse/DOCS-1318

This PR is related to this one.

This PR addresses changes that have been explained here.


Handle variable length APNS device tokens

APNS device tokens are not fixed at 32 bytes in length.  This patch packs/unpacks the structs we use for the binary APNS protocol to use dynamic token lengths.  Unit tests for /calendarserver/push/ pass.  I'm running full tests now.

Seems good; works in my manual testing.
I think the reason Travis did two builds of this is: one for the push (I must have configured it to build all branches) and another for the pull request. The PR one timed out, but that's not super surprising given that the test suite takes kind of a while to run, and would likely be subject to resource contention with other VM guests. I should probably split the tests into smaller chunks, which could then run in parallel.

Looks OK to me.


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_5e1fyrgben/clone/recipe/meta.yaml:15: pip_install_args: pip install should be run with --no-deps.
ERROR: /tmp/abs_5e1fyrgben/clone/recipe/meta.yaml:20: missing_wheel: For pypi packages, wheel should be present in the host section
WARNING: /tmp/abs_5e1fyrgben/clone/recipe/meta.yaml:40: missing_description: The recipe is missing a description
ERROR: /tmp/abs_5e1fyrgben/clone/recipe/meta.yaml:40: missing_dev_url: The recipe is missing a dev_url
ERROR: /tmp/abs_5e1fyrgben/clone/recipe/meta.yaml:40: missing_documentation: The recipe is missing a doc_url or doc_source_url
Errors were found

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_01z6fuhk72/clone/recipe/meta.yaml:15: pip_install_args: pip install should be run with --no-deps.
ERROR: /tmp/abs_01z6fuhk72/clone/recipe/meta.yaml:20: missing_wheel: For pypi packages, wheel should be present in the host section
ERROR: /tmp/abs_01z6fuhk72/clone/recipe/meta.yaml:40: missing_dev_url: The recipe is missing a dev_url
ERROR: /tmp/abs_01z6fuhk72/clone/recipe/meta.yaml:40: missing_documentation: The recipe is missing a doc_url or doc_source_url
WARNING: /tmp/abs_01z6fuhk72/clone/recipe/meta.yaml:40: missing_description: The recipe is missing a description
Errors were found


Improvements for PDF document management and user experience in LLM chat

First of all, thank you for the excellent work on RagApp. I'm currently integrating it into my stack, and I've noticed a few areas where I'd like to fine-tune the experience before presenting it to end users. My goal is to make sure the application is as user-friendly as possible so that, if they find it useful, they can start using it regularly.
Areas for Refinement:
PDF Document Management:
When uploading PDF files in the admin panel, I'm unsure of the best practices for formatting these documents to ensure optimal results within RagApp. Could you provide some recommendations or guidelines for this?
Event Display in Chat:
The "Show events" feature in the chat is very insightful, but I believe it might be overwhelming for an end user. I've been manually hiding these events by modifying files and placing them in the 'Patch' folder. It would be helpful to have a more straightforward way to manage this, perhaps with an option to toggle these events on or off.
Node Content Linking:
Currently, the node content links (the numbers pointing to "Node content") direct users to the entire document instead of the specific paragraph. This might be confusing or overwhelming for end users. I believe a more precise linking method would enhance the user experience.
Final Questions Accuracy:
The final questions generated by the LLM are great, but I have some doubts about their accuracy. I would appreciate having the ability to review, modify, or even hide these questions as needed.
Expected Outcome: I am seeking advice on how to best format PDF documents for integration into RagApp and suggestions on how to streamline the user interface to make it more intuitive for end users. Ultimately, I want to ensure that the application is polished and user-friendly before introducing it to clients.

@Rauljauregi, thanks for your suggestions. It's usually best to create one issue per topic. Here are my thoughts:

PDF Document Management:
You get the best results using LlamaParse

Event Display in Chat
needs to be restructured as part of adding multi-agents

Node Content Linking
yes, we'll need that in create-llama first, feel free to open a ticket at github.com/run-llama/create-llama/issues

Final Questions Accuracy
Let's work on this in this ticket. It makes sense to turn it on/off in the UI and be able to modify the associated system prompt


chore: add  'inherit' color to color functions

This PR adds inherit to the color functions as PR #601 introduced this new color.

Codecov Report

Merging #632 (791d50b) into main (ebd5f1d) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #632   +/-   ##
=======================================
  Coverage   88.16%   88.16%
=======================================
  Files          57       57
  Lines        4850     4850
  Branches     1032     1032
=======================================
  Hits         4276     4276
  Misses        311      311
  Partials      263      263

Impacted Files
Coverage Δ

src/lib/utilities/handler.ts
68.92% <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 ebd5f1d...791d50b. Read the comment docs.


Watch mode doesn't work on windows

Hi! Watch mode doesn't work on windows.
os: windows 10
webpack: 3.8.1
nunjucks-webpack-plugin: 4.0.0

example

Hi @webmarkelov do you have an example of how I could read my templates automatic and generate them without specifying them manually in webpack.config?
thanks

No, I don’t have. I think it imposible the plugin expects an array with data.

PR welcome!

Hi @webmarkelov do you have an example of how I could read my templates automatic and generate them without specifying them manually in webpack.config?
thanks

Install and run this


Colab Notebook not working (and fix)

Notebook shows that model cannot be found.

I fixed it by changing the command to:
!python app.py --base-url $base_model --ft-ckpt-url $finetuned_model --share

instead of
!python app.py --base_url $base_model --ft_ckpt_url $finetuned_model --share

(that is, replace underscore with hyphen)

Can you raise a PR?

Sure

PR made: https://github.com/deep-diver/LLM-As-Chatbot/pull/61


fix regression #1971

Description
This PR fixes regression #1971 introduced by intel_extension_for_transformers==1.4
Notes for Reviewers
workaround implementing late import in LoadModel method in BackendServicer class.
Signed commits

[X] Yes, I signed my commits.

petals error seems unrelated, merging

petals error seems unrelated, merging

I saw it but seems unrelated to me also.


Do not add code splitting bundles into manifest

I want to use require.ensure for separating some large modules as DLL.
But webpack-manifest-plugin add it into manifest
so chunks are loading immediately

There are many cases for knowing all built files that came out of webpack, so it seems to me that this should be made an option allowing non-initial chunk reports to be turned off.

yep, I agree,
me PR was optional initially
Can you name the flag?
I proposed this one: omitDll: true

That's certainly succinct. More verbose but possibly more obvious would be omitNonInitialChunks or omitNonEntryChunks

I personally prefer to reduce the number of options we add (the reason I closed #43 ), and have this:
filter: ({chunk, file}) => {
  return chunk.isInitial();
}

But if you think that should be added then fine ;)

in other words, do you propose to make this behaviour default in next major version and recommend to use chunk-manifest-webpack-plugin for chunks handling?
correct me, please

Yes make it default and use filter to filter out unneeded ones


Disable cachedLang

I need to disable the cached language and only use the language from url, browser or first in config.
As far as I can see you did the work for that already in master but it is not in the latest npm package.
Do you have an estimation, when it will be published?
As always: Thanks for this awesome repository!

@Chuvisco88 Hopefully new version will be ready by end of month.
There are some breaking changes so I want to push as much as I can into the next version.
Thanks for the support.

Good to know. Just tell me if there is anything I can help you with

Solved with https://github.com/Greentube/localize-router/commit/79322db626d55cd10345a07d469206cd3faf93f9

Works superbly, thanks!


Wrong warn adminchat message & "You are now a moderator" messages patch

When I warned him, this was the message displayed on adminchat:

Also when I /mod'd him he got this message: ChatColor.GREEN + "You are no longer a moderator"

whoops thanks :)

Also, @CaptainElliott, permissions don't seem to work. Le issue


Organizations for Client Credentials

🔧 Changes

Added default_organization to GET/POST/PATCH /api/v2/clients/{id}
Support query param identifiers for GET /api/v2/organizations/{org_id}/client-grants
Support query param grant_ids for GET /api/v2/resource-servers
Support query param q for GET /api/v2/clients

📚 References

🔬 Testing
Added tests to query using the query string and validated the response.

📝 Checklist

[ ] All new/changed/fixed functionality is covered by tests (or N/A)
[ ] I have added documentation for all new/changed functionality (or N/A)

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.61%. Comparing base (b6f1206) to head (9cf2217).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #432   +/-   ##
=======================================
  Coverage   95.60%   95.61%
=======================================
  Files          47       47
  Lines        8006     8020   +14
=======================================
+ Hits         7654     7668   +14
  Misses        235      235
  Partials      117      117

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


NodalDisplacement lists duplicate information

NodalDisplacement lists duplicate information (see node 9 below). This may cause confusion. I think we should remove duplicate info in the NodalDisplacement component in Grasshopper.
There might be other results that behave in the same way.
Nodal displacements, Load comb.: ULS
ID	Node	ex	ey	ez	fix	fiy	fiz	Comb.
[-]	[-]	[m]	[m]	[m]	[rad]	[rad]	[rad]	[-]
Bottom.1.1	9	-0.013	0.000	-0.042	0.000	0.016	0.000	ULS
Bottom.1.1	7	-0.013	0.000	-0.042	0.000	0.016	0.000	ULS
Bottom.1.1	8	-0.013	0.000	-0.042	0.000	0.016	0.000	ULS
Bottom.2.1	9	-0.013	0.000	-0.042	0.000	0.016	0.000	ULS

@xRadne Do you mean that it is listing the same node, 9, twice?

Yes, and I understand that it's for convenience for a human reading the .csvfile. But I think it is inconvenient when creating a script to map the nodal displacent results to each FEA bar object as an example.
I think it is possible to limit the results to only one row per node using the options in the bsc files.

I think this might be a question for BP. When listing nodal displacements, I agree, you are expecting nodal displacements and not any information about which bar or shell that node belongs to. If you are interested in bar och shell displacements there are bar displacement and shell displacement results. In general I am an opponent of culling or modifying the data from FEM-Design - I would rather let the user do that. So I think it is worthwhile investigating why BP is listing the information like this first.

https://strusoft.fogbugz.com/f/cases/121840/Nodal-displacements

BP will continue to group by object causing this to happen.