Workflow get request returns unexpected workflow after unlinking subject set from workflow

[EDIT 2023-02-03 per @mcbouslog ] Originally opened in Panoptes-Front-End. Transferred to panoptes because we believe this might be a workflow caching issue. With a successful request to unlink a subject set from a workflow, the db reflects the link destroyed, but an immediate subsequent get request returns a workflow that still includes the subject set link (unexpected). The same workflow get request 5 minutes later does not include the subject set link (as expected).
Original comment as opened in PFE...
Expected behavior
If you unlink a subject set on the project builder's workflow editor page, the set should no longer be linked and the tick box remain unchecked.
Current behavior
If you unlink a subject set on the project builder's workflow editor page, then reload the page (within ~5 min), the tick box is reticked.  However, if you try to untick the box again, a console error appears: Couldn't find SubjectSet with 'id'=73874 [WHERE "subject_sets_workflows"."workflow_id" = $1]
When simultaneously tracking subject_sets_workflows entries in the Panoptes DB, it appears that the untick action successfully unlinks the subject set, however the cached state of the page has not been updated so the tickbox is re-checked on reload.  Interesting, the caching not only affects the project builder web interface, but also the state of the workflow links field from the Python client.
Also: it appears that if a second subject set is linked, the state is updated -- i.e., the unlinking of the first subject set is correctly reflected on the workflow editor page (and Client/API response) after reload.
Steps to replicate

Link a subject set via a workflow editor page
Unlink the subject set
Reload the page -- the unlinked subject set's tick box will be ticked again

Additional Comments
It is possible the issue is not one having to do with PFE, but rather Panoptes in how it is caching responses (as evidenced by similar behavior shown by Python Client) -- worth investigating that backend aspect early on.

This could be due to the Rails upgrades that have been undergone.
See: https://www.bigbinary.com/blog/rails-5-allows-updating-without-updating-timestamps
Cached_serializer utilizes resource's updated_at for serializer_cache_key. See https://github.com/zooniverse/panoptes/blob/4698c5d6e41a6c627a8b1d927f49671d931ddffd/app/serializers/concerns/cached_serializer.rb#L18
We did see something similar in update_links where we had to touch the resource  [Rails 4.2] (now in Rails 5 updated to set the updated_at time and saving the resource.
See:
https://github.com/zooniverse/panoptes/blob/master/lib/json_api_controller/updatable_resource.rb#L32-L35
We could do the same thing in destroy_links https://github.com/zooniverse/panoptes/blob/4698c5d6e41a6c627a8b1d927f49671d931ddffd/lib/json_api_controller/updatable_resource.rb#L43
(
Tested locally by first disabling the cached_serializer flipper to find out it was the updated_at within cached_serializer. Then remembering seeing something like this when upgrading to Rails 5.
)

Closed with #4108


Added Microsoft Edge browser support

I have added support for MicrosoftEdge now in the DriverFactory.cs as well and added a couple of tests to cover it. You will need IE driver and MicrosoftWebDriver in your bin folder to be able to run these new tests.

Thanks


Add warning for running download/import images

Issue #, if available:
Description of changes:
Testing (if applicable): hugo serve and verified the warning are rendered correctly
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/lgtm

/approve


Can you help me to build a client-server architecure with HE?

Hi, I'm trying to build a client-server architecture with your pyhelibrary. In particular, I want to build a framework which enables client to send encrypted data and server which contains a CNN to process this data and then it returns encrypted results. Then the client receive these encrypted results and decrypt them with its private key. Following your example in 09_Neural_network_MNIST.ipynb , how can I write the server and client script in python?
Until now I write the server which create the context based on my CNN, but I don't know how to export this context to client. I found get_public_function() method but there isn't any documentation about that.
`
import pyhelayers
he_run_req = pyhelayers.HeRunRequirements()
he_run_req.set_he_context_options([pyhelayers.DefaultContext()])
he_run_req.optimize_for_batch_size(8)

nn = pyhelayers.NeuralNet()
nn.encode_encrypt(["/home/buono/ObjDct_Repo/models/trained_models/lenetfomo.onnx"], he_run_req)

context = nn.get_created_he_context()

pub_functions = context.get_public_functions()
print('Public functions:',pub_functions)

`

It is simpler to start on the client side, create the encrypted model and context, and then export the encrypted data to the server.
You can follow the example here https://github.com/IBM/helayers-examples/blob/main/python/notebooks/02_Neural_network_fraud_detection.ipynb
Which details what part of the setup is done on the client side (or trusted environment, as it is called in the demo) and the part done on the server side.
Also, it shows to to serialized data from one side in preparation of sending it the the other side, and how to de-serialized it on the other side.
There are also more complicated scenarios where the client side initializes the context (to get the secret key) and then sends the public keys to the server, and the server encrypts the model with the user's public key. I suggest you start with the simpler scenario above, and if needed we can explain how to migrate to the second one.

Thanks for the answer but I want to create a client-server environment as it is done in this figure:

where client encrypts data, send encrypted data to the server which process encrypted data and returns an encrypted results. Then the client decrypt it. How can I migrate to second scenario?

Sure. I'll send here an example tomorrow.

The example below sketches what's needed to support the case the server has the model in the plain, and the client generates the keys and sends encrypted data queries.
If you want to build a robust system please see our contact details: https://ibm.github.io/helayers/contact.html
#!/usr/bin/env python

import pyhelayers
import utils
from pathlib import Path

print('Imported pyhelayers version ',pyhelayers.VERSION)

# You can change these variables to point to your own model
# and data files.
# Also, you can see how this model was created and trained in folder data_gen
INPUT_DIR = Path(utils.get_data_sets_dir()) / 'net_fraud'

X_H5 = INPUT_DIR / 'x_test.h5'
Y_H5 = INPUT_DIR / 'y_test.h5'
MODEL_JSON = str(INPUT_DIR / 'model.json')
MODEL_H5 = str(INPUT_DIR / 'model.h5')

batch_size=4096

# 1. Server side: load model and prepare it for work under encryption
print("Loading model and preparing on server side")
hyper_params = pyhelayers.PlainModelHyperParams()
plain = pyhelayers.PlainModel.create(hyper_params, [MODEL_JSON, MODEL_H5])
he_run_req = pyhelayers.HeRunRequirements()
he_run_req.set_model_encrypted(False)
he_run_req.set_he_context_options([pyhelayers.HeContext.create(["HEaaN_CKKS"])])
he_run_req.optimize_for_batch_size(batch_size)
profile = pyhelayers.HeModel.compile(plain, he_run_req)
# prepare settings json to send to client so they can create the keys properly
profileStr=profile.to_string()

# 2. Client side
# Receives profileStr
print("Creating keys on client side")
client_profile=pyhelayers.HeProfile()
client_profile.from_string(profileStr)
# Creates context with keys
client_context = pyhelayers.HeModel.create_context(client_profile)
# Save the context. Note that this saves all the HE library information, including the
# public key, allowing the server to perform HE computations.
# The secret key is not saved here, so the server won't be able to decrypt.
# The secret key is never stored unless explicitly requested by the user using the designated
# method.
context_buffer = client_context.save_to_buffer()

# 3. Server side
print("Encoding model on server side.")
server_context=pyhelayers.load_he_context(context_buffer)
nn = pyhelayers.NeuralNet(server_context)
nn.encode(plain, profile)
print("Preparing encoder to send to client")
model_io_encoder = pyhelayers.ModelIoEncoder(nn)
model_io_encoder_buf= model_io_encoder.save_to_buffer()

# 4. Client side
print("Encrypting data on client side.")
plain_samples, labels = utils.extract_batch_from_files(X_H5, Y_H5, batch_size, 0)
print('Loaded samples of shape',plain_samples.shape)
# Load io encoder
client_model_io_encoder=pyhelayers.load_io_encoder(client_context,model_io_encoder_buf)
encrypted_samples = pyhelayers.EncryptedData(client_context)
client_model_io_encoder.encode_encrypt(encrypted_samples, [plain_samples])
encrypted_samples_buf=encrypted_samples.save_to_buffer()

# 5. server side
print("Prediction on server side.")
server_encrypted_samples=pyhelayers.load_encrypted_data(server_context,encrypted_samples_buf)
enc_predictions = pyhelayers.EncryptedData(server_context)
nn.predict(enc_predictions, server_encrypted_samples)
enc_predictions_buf=enc_predictions.save_to_buffer()

# 6. client side
print("Decrypt on client side")
client_enc_predictions=pyhelayers.load_encrypted_data(client_context,enc_predictions_buf)
plain_predictions = client_model_io_encoder.decrypt_decode_output(client_enc_predictions)
print('predictions',plain_predictions)
accuracy=utils.assess_results(labels, plain_predictions)
if (accuracy<0.9):
    raise Exception("Accuracy too large")

great! thank you I'll try this on my environment

Thank you for the example, but it raises the following error:
nn.encode(plain, profile,numpy_list) TypeError: encode(): incompatible function arguments. The following argument types are supported:     1. (self: pyhelayers._pyhelayers_cppwrappers.HeModel, plain: pyhelayers._pyhelayers_cppwrappers.PlainModel, profile: pyhelayers._pyhelayers_cppwrappers.HeProfile, inputs: List[numpy.ndarray[numpy.float64]] = []) -> None     2. (self: pyhelayers._pyhelayers_cppwrappers.HeModel, streams: List[bytes], files: List[str], he_run_req: pyhelayers._pyhelayers_cppwrappers.HeRunRequirements, hyper_params: pyhelayers._pyhelayers_cppwrappers.PlainModelHyperParams = <pyhelayers._pyhelayers_cppwrappers.PlainModelHyperParams object at 0x7fbfc2afdcf0>, inputs: List[numpy.ndarray[numpy.float64]] = []) -> None     3. (self: pyhelayers._pyhelayers_cppwrappers.HeModel, files: List[str], he_run_req: pyhelayers._pyhelayers_cppwrappers.HeRunRequirements, hyper_params: pyhelayers._pyhelayers_cppwrappers.PlainModelHyperParams = <pyhelayers._pyhelayers_cppwrappers.PlainModelHyperParams object at 0x7fbfc297b530>, inputs: List[numpy.ndarray[numpy.float64]] = []) -> None
Can you help me?

Ok I tested it and it works, thank you <3


Error while trying to retrieve a list of pools using latest cardano-node master via cardano-wallet API

I downloaded latest master build of cardano-wallet for Mac and Linux (e.g. https://hydra.iohk.io/build/4676806), then compiled latest cardano-node (master branch) as of 3 Nov.
./cardano-wallet version
2020.10.13 (git revision: c9690481e35c9d8f422c80ea8bc0293a758eb6ac)
~/.cabal/bin/cardano-node version
cardano-node 1.22.1 - linux-x86_64 - ghc-8.6
git rev 964811d
Once cardano-node was started and in sync:
cardano-cli shelley query tip --mainnet
{
"blockNo": 4900702,
"headerHash": "6305240b33aff2452ca0d64ce74105b8b0875ef69139035852ef75efc6d3e4aa",
"slotNo": 12793240
}
and wallet was also in sync:
[cardano-wallet.pools-engine:Info:36] [2020-11-02 23:25:44.14 UTC] Applying blocks [12793253 ... 12793253]
I attempted to get a pool list via wallet API:
curl http://localhost:8090/v2/stake-pools?stake=100000000000
at which point I received the following response:
{"code":"past_horizon","message":"Tried to convert something that is past the horizon (due to uncertainty about the next hard fork). Wait for the node to finish syncing to the hard fork. Depending on the blockchain, this process can take an unknown amount of time."}
More detail is available at the pastebin location:
https://pastebin.pl/view/4ef66d1d

This is most likely because the cardano-node was still syncing through the Byron era at the time of attempting to list pools. In such case this message is expected. Please wait until cardano-node and cardano-wallet are fully synced and then list pools again.
You'll know that cardano-wallet is fully synced when:
curl http://localhost:8090/v2/network/information | jq .sync_progress.status

"ready"

Also, please note that latest (master) cardano-node may not always be compatible (yet) with the latest cardano-wallet (master). Please check the compatibility matrix.

Thanks piotr - the cardano-node was definitely in sync with the mainnet, as evidenced by the cardano-cli shelley query tip and comparing with the main Shelley explorers. I will try out your network/information command as well as check the matrix - thanks.

see also: https://github.com/input-output-hk/cardano-node/issues/2067
This is probably because 1.22.1 is 'aware of' Mary and Allegra eras, that are after Shelley. So Shelley no longer is the last era of Cardano and the wallet is mistakenly interpreting errors from the time interpreter as being "past the horizon".

@stakelovelace stick to 1.21.1 until we're done with: https://github.com/input-output-hk/cardano-wallet/pull/2245

Thanks for the heads up, will keep an eye on the referenced issue until that merge is complete.

@KtorZ downloaded latest cardano-wallet buid from Hydra, ran it against 1.23 release node, for some reason 757 entries returned even though cardano-wallet standard output said "Fetched pool data from node tip using LSQ. Got 1343 pools in the stake distribution, and 1374 pools in the non-myopic member reward map.". Any ideas?

Note that the wallet is not integrated with 1.23, though I wouldn't expect any issue in that area.
Was the stake pool background worker fully synced with the network (you can see this from the logs on the standard output)?

curl http://localhost:8090/v2/network/information | jq .sync_progress.status
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
100   390    0   390    0     0  30000      0 --:--:-- --:--:-- --:--:-- 30000
"ready"
[cardano-wallet.pools-engine:Info:36] [2020-12-03 09:19:17.13 UTC] Applying blocks [15420866 ... 15420866]
[cardano-wallet.network:Info:14] [2020-12-03 09:19:17.13 UTC] Query getAccountBalance took 0.001747298s
[cardano-wallet.network:Info:14] [2020-12-03 09:19:17.13 UTC]   delegations = fromList []
rewards = fromList []
[cardano-wallet.network:Info:21] [2020-12-03 09:19:17.14 UTC] Query GetEraStart took 0.013913633s
[cardano-wallet.network:Info:21] [2020-12-03 09:19:17.15 UTC] Query GetCurrentPParams took 0.001733702s
[cardano-wallet.network:Info:21] [2020-12-03 09:19:17.15 UTC] Query GetUpdateInterfaceState took 0.001297955s
[cardano-wallet.api-server:Info:67] [2020-12-03 09:19:29.20 UTC] [RequestId 2] [GET] /v2/stake-pools?stake=10000000000000
[cardano-wallet.network:Info:67] [2020-12-03 09:19:31.27 UTC] Query GetStakeDistribution took 2.061688317s
[cardano-wallet.network:Info:67] [2020-12-03 09:19:31.27 UTC] Will query non-myopic rewards using the stake<PHONE_NUMBER>0000
[cardano-wallet.network:Info:67] [2020-12-03 09:19:40.01 UTC] Query GetNonMyopicMemberRewards took 8.746500684s
[cardano-wallet.network:Info:67] [2020-12-03 09:19:40.02 UTC] Query GetCurrentPParams took 0.007781648s
[cardano-wallet.network:Info:67] [2020-12-03 09:19:40.02 UTC] Fetched pool data from node tip using LSQ. Got 1346 pools in the stake distribution, and 1377 pools in the non-myopic member reward map.
[cardano-wallet.api-server:Info:67] [2020-12-03 09:19:41.17 UTC] [RequestId 2] 200 OK in 11.970102557s
curl http://localhost:8090/v2/stake-pools?stake=10000000000000 > x.out
cat x.out | jq . | grep ticker | wc -l
778

Well, you're counting the number of pools that have metadata, not the total number of pools!

Over 1200 pools that aren't retired have metadata, I am not sure I understand your point... my own pool (AAA) is not being included in the returned data and it clearly has metadata.

So the issue seems to be specifically the metadata information is returned for a subset of pools, while the actual number of ids returned seemed okay. I've never used any SMASH-related urls when running wallet locally or when invoking the API call so not sure what's going on there (i.e. how I can end up with half of the pools with tickers and half without)

@stakelovelace many pools are serving metadata different from what they said to have registered. The wallet does check whether metadata registered on-chain matches the metadata served by pools servers. If the hash does not match, the metadata is considered invalid and is not stored.


Changing this to self in emscripten post

This fixes some small issues I had with webworkify and tinyworker; it doesn't change functionality when being run as-is.

Thanks!


Remove active mds solution from alert

Running more than one active MDS is not tested as of now.

/hold


Feedback

Thanks so much for these exercises! They're really useful.
I'd love if there were suggested solutions somewhere. I'm moderately experienced in Typescript, but self-taught; even if I can find a solution to the exercise, I often wonder if there's a "better way." It would be interesting to see the solution you came up with for the exercises.
Thank you again.

This repo contains a 'solutions' branch with answers to each question. They're very helpful!

Oh, that's perfect! Thank you so much, @snsie !


Consider adding "aria-" attributes

Environment

react-advanaced-form: 1.3.0

What
I suggest to consider adding aria- attributes.
Why
Accessibility.
How

Read about the current approach to aria- attributes.
Add the tags, if found necessary.

Most of the aria- attributes reside on the field component directly, which implementation, including the layout, is completely open to the end developer. This task may involve to read which things can be set on the Form itself, since that is the only component which layout is hard-coded from the library side.

Having read through multiple ARIA-related articles, I haven't found anything which is designed to be put into <form> element directly. All form ARIA attributes are rather put into fields, which are in full control of the end developer.
What makes sense to do is to add ARIA attributes to react-advanced-form-addons library, to have up-to-standards fields.

I think form element is semantic enough on its own, so it doesn't need anything :)

@Vidlec Yes, I agree. There isn't much to set on the form component in terms of accessibility. That, however, can (and I think should) be done on fields. Since those aren't the part of the repository yet, I think this issue is not relevant at the moment. Thanks for the input.


datePicker value on modal (aside)

I have the following datePicker within an aside modal:
                <datepicker
                  ref="datepicker"
                  placeholder="Select Date..."
                  v-model="dep.date"
                  :options="{
                    enableTime: true,
                    minDate: rules.minDate,
                    maxDate: rules.maxDate,
                    onChange: function() { $v.trip.priceTables.$each[i].departures.$each[depi].date.$touch() },
                  }"
                ></datepicker>

For new dep objects the dep.date gets set correctly, however when I try to load an existing dep object its dep.date value is not shown in the field.
I've confirmed that dep.date has a value by putting
{{ dep.date }}
 next to the field in the template, and it correctly shows 2017-03-28 12:00 however the field is not set to this value via v-model.
If I inspect the datepicker via its ref it does actually have a value set though, so it's just not rendering properly. I tried calling redraw() on the instance with no luck.
I found that if I added
{{ dep.date }}
 before the field while the modal was open, and hit save on the .vue file, it triggered a refresh that showed the value in the field correctly, so I think that confirms it's the value being set while the modal is not visible that's the issue.
Is there a way to tell components within another component to redraw/refresh when the parent becomes visible?

This seems similar to #44

Solution: add v-if="dep.date" attribute.
Reason: the dep data is loaded asynchronously (from Firebase) and so you don't want to create/render the datepicker component until that is available -- otherwise you end up with the problem I had where the field appears blank (as it doesn't re-render when dep.date gets set (and the ready/value events for the flatPickr don't fire when this data gets set either).


USB Serial initialization

Great library, all very clear for a simple application.   However I've ran into a problem attempting to read/write modbus over serial over usb.  I am using a Pro Micro clone.  At the PC end I am using qmodmaster.
I can't quite track it down and I was hoping you could shed some light on it.
I have cut down your ModbusRTUSlaveExample.h code so that it just writes a couple of values to the Input Registers and to the Holding Registers, also the one coil is connected to the internal led.
I am not using software serial as i want to use the hardware usb serial. e.g.
ModbusRTUSlave modbus(Serial);
It all works perfectly providing i adopt the following magic spell-

Plug in arduino to USB port on PC
Open serial port monitor in Arduino IDE
Close serial port monitor
Connect with qmodmaster
Poll the registers.  All works and the coils work too.

If I miss steps 2 and 3 then the qmodmaster will connect to the port  and I can see the tx/rx leds blink once, but attempting to read or write results in a timeout (even if I extend the timeout period to 1second)
I have tried different serial speeds and configurations with the modbus.begin statement to no avail.   I also tried putting in a Serial.begin statement which didn't help either.
Any ideas please?
Thanks

I am not familiar with qmodmaster. I sounds like the issue is on the computer side. If you find clear evidence that the library itself is causing the issue, let me know, otherwise I can't really help you.
Sorry,


should be new_delete_type_mismatch=0?

[Enter feedback here]
should be new_delete_type_mismatch=0?

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: d70ca275-507f-5463-5c1c-ee561efd3963
Version Independent ID: c90172ef-57b2-9f22-4541-97b13dcca120
Content: Error: alloc-dealloc-mismatch
Content Source: docs/sanitizers/error-alloc-dealloc-mismatch.md
Product: visual-cpp
Technology: cpp-tools
GitHub Login: @TylerMSFT
Microsoft Alias: twhitney

Hi, I'm not sure what your feedback means here. I assume you are referring to setting the ASAN_OPTIONS environment variable. We wouldn't set it to 0 since we are trying to turn it on. Are you saying the flag is wrong?
Reopen with clarification if I've missed the point.

I apologize for the confusion. I just identified a mistake in the document. the correct key to toggle the feature should be "new_delete_type_mismatch" instead of "alloc_dealloc_mismatch".   I am using VS2019 and 2022.

Thanks for the clarification. I don't think it's a mistake in the doc. I use alloc_dealloc_mismatch to turn on the error and it works as advertised.  The new_delete_type_mismatch is a different error, described in this topic


files "missing" from repo but they really aren't

Lately I've been getting the message a lot that a given plugin or theme has no manifest.json, main.js, or theme.css or whathaveyou, but the repo clearly has those in the root directory, and they are properly named. I even just got that notification for one of the beta plugins I had already successfully installed after BRAT tried to update the plugin.
I've encountered this error probably 6 times just today.

e.g. https://github.com/yan42685/obsidian-clever-search

Hi there,
The problem with the example repo is that while it does have manifest in the root, it doesn't have a release in the repo corresponding to the release version in manifest.json.
BRAT first reads manifest.json to get the release version, then downloads that release.
This is a mistake many devs make when starting Obsidian development. Obsidian also can't download the plugin unless there is a corresponding release.
This is one of the values of BRAT; in effect, BRAT is showing the repo is not configured correctly.
Warm regards.

Is this not related to https://github.com/TfTHacker/obsidian42-brat/issues/71 ?
Despite your explanation I do find it strange that I have only started to encounter this error recently. Am I imagining things? Or could an update to BRAT have broken something?

It is absolutely possible an update broke something 😃.
However, in the case of the repo you gave as an example, the manifest.json has a release identifier, but there is no published release with that identifier, so nothing can be downloaded. It might be that you succeeded earlier with a previous release before the developer made a change to the manifest.json in the meantime. It is common for developers to make a change to manifest.json even though they haven't published a release. But this will also break Obsidian's ability to download the plugin.
Can you provide me with some other repo's for me to examine?


Add workshop section to the homepage

Add banner about workshops to the homepage

Current dependencies on/for this PR:

main

PR #25   👈

This stack of pull requests is managed by Graphite.


feat(over window): range frame support - frontend part

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Just a DRAFT, will request for review when finished.
Checklist

[ ] I have written necessary rustdoc comments
[ ] I have added necessary unit tests and integration tests
[ ] I have added test labels as necessary. See details.
[ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features #7934).
[ ] My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
[ ] All checks passed in ./risedev check (or alias, ./risedev c)
[ ] My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)

[ ] My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

[ ] My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

https://github.com/risingwavelabs/risingwave/pull/14648


Can we see if a game has cards when we redeem it?

It would be cool if asf would tell you that game that you redeemed using !redeem has cards

Too expensive request, out of the scope, would kill Steam when redeeming 50+ keys, ASF automatically starts farming anyway, and if you need it you can restart module with !farm and check status with !status.


VarInt/VarLong Encode and Decode Optimizations

Aims to improve upon VarInt/VarLong Encode and Decode procedures (#208).

Performance improvement of VarInt::encode on my machine. The original version was running at about 39ns.

I tried a similar encode approach on VarLong and it resulted in some regression probably because it requires the use of many u128 bitwise ops.

The code is not mine, I must have removed some comments during refactoring.
It comes from https://github.com/as-com/varint-simd/, specifically
https://github.com/as-com/varint-simd/blob/0f468783da8e181929b01b9c6e9f741c1fe09825/src/encode/mod.rs#L71

Performance improvement of VarLong::encode on my machine. The original version was running at about 40ns.

I tested branchless approaches to VarInt::decode and VarLong::decode and saw either no improvement or regression.

Have you tried the technique described in "how fast can you encode a varint"?

Yes, I think the performance the author gained was mostly due to java inefficiencies.
Here is the rust implementation's performance:

Here is the rust implementation's performance:

Can you include this code (and the old VarInt VarLong functions) in the criterion benchmarks?
Don't forget to mark this PR as "ready for review" if it is finished.

Can you include this code in the criterion benchmarks?

I have since written a more optimized version of what I had previously benched. It's still based on how fast can you encode a varint?.
Here's the performance:

Here's the code:
fn encode(&self, mut w: impl Write) -> anyhow::Result<()> {
    if (self.0 as u32 & (0xffffffff << 7)) == 0 {
        w.write_u8(self.0 as u8)?;
    } else if (self.0 as u32 & (0xffffffff << 14)) == 0 {
        let val = (self.0 as u32 & 0x7F | 0x80) << 8 | (self.0 as u32 >> 7);
        w.write_u16::<BigEndian>(val as u16)?;
    } else if (self.0 as u32 & (0xffffffff << 21)) == 0 {
        let val = (self.0 as u32 & 0x7F | 0x80) << 16 | ((self.0 as u32 >> 7) & 0x7f | 0x80) << 8 | (self.0 as u32 >> 14);
        w.write_u24::<BigEndian>(val)?;
    } else if (self.0 as u32 & (0xffffffff << 28)) == 0 {
        let val = (self.0 as u32 & 0x7F | 0x80) << 24 | (((self.0 as u32 >> 7) & 0x7f | 0x80) << 16)
        | ((self.0 as u32 >> 14) & 0x7F | 0x80) << 8 | (self.0 as u32 >> 21);
        w.write_u32::<BigEndian>(val)?;
    } else {
        let val = ((self.0 as u64) & 0x7f | 0x80) | ((self.0 as u64 >> 7) & 0x7f | 0x80) << 8
            | ((self.0 as u64 >> 14) & 0x7f | 0x80) << 16 | ((self.0 as u64 >> 21) & 0x7f | 0x80) << 24
            | ((self.0 as u64 >> 28) & 0x7f) << 32;
        w.write_all(unsafe { val.to_le_bytes().get_unchecked(..5usize) })?;
    }
}

I even tried going as far as to bypass rusts arithmetic checks using u32::wrapping_add etc. And didn't achieve any real performance gains. :/
But 5% is still a fair amount, I guess.

Thanks for taking the time to check. Btw arithmetic checks only happen in debug mode so wrapping_add is equivalent to + in release mode.


add optional jwt guard to get set by id

Codecov Report

Merging #68 (a464dbc) into main (e6b96de) will increase coverage by 0.68%.
The diff coverage is 60.00%.

@@            Coverage Diff             @@
##             main      #68      +/-   ##
==========================================
+ Coverage   97.09%   97.77%   +0.68%
==========================================
  Files          53       53
  Lines         723      720       -3
  Branches       81       84       +3
==========================================
+ Hits          702      704       +2
+ Misses         18       14       -4
+ Partials        3        2       -1

Impacted Files
Coverage Δ

...c/auth/strategies/optionalJWT/optionalJWT.guard.ts
100.00% <ø> (+75.00%)
:arrow_up:

src/set/set.service.ts
95.32% <50.00%> (-3.69%)
:arrow_down:

src/set/set.controller.ts
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 e6b96de...a464dbc. Read the comment docs.


[bug] V2 invalid args value for command set_size: invalid value: map, expected map with a single key

Describe the bug

In the latest version, I used setSize and setMinSize, and passed in new LogicalSize and new PhysicalSize and it didn't work.
	const currentWindow = getCurrent();
	await currentWindow.setSize(new LogicalSize(400, 200));
	await currentWindow.setMinSize(new PhysicalSize(100, 100));

Reproduction
No response
Expected behavior
No response
Full tauri info output
[✔] Environment
    - OS: Windows 10.0.22631 X64
    ✔ WebView2: 126.0.2592.113
    ✔ MSVC: Visual Studio 生成工具 2022
    ✔ rustc: 1.79.0 (129f3b996 2024-06-10)
    ✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 20.14.0
    - pnpm: 9.3.0
    - npm: 10.7.0

[-] Packages
    - tauri [RUST]: 2.0.0-beta.24
    - tauri-build [RUST]: 2.0.0-beta.19
    - wry [RUST]: 0.41.0
    - tao [RUST]: 0.28.1
    - @tauri-apps/api [NPM]: 2.0.0-beta.6
    - @tauri-apps/cli [NPM]: 2.0.0-beta.10

[-] App
    - build-type: bundle
    - CSP: script-src 'self' 'unsafe-eval'; font-src https://fonts.gstatic.com http://tauri.localhost; img-src 'self' asset: http: https: data:; connect-src ipc: http://ipc.localhost ws: http://tauri.localhost; style-src 'unsafe-inline' 'self'; media-src 'self' asset: http: https: data:; default-src 'self' asset: http://asset.localhost https://www.google-analytics.com
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: Vue.js
    - bundler: Vite

Stack trace
No response
Additional context
No response

Please try updating @tauri-apps/api (and while you're at it @tauri-apps/cli too) to the latest version too. beta.6 is quite old and should be the reason for this error (it sends the old format to the new tauri version)

Please try updating (and while you're at it too) to the latest version too. beta.6 is quite old and should be the reason for this error (it sends the old format to the new tauri version)@tauri-apps/api``@tauri-apps/cli

Is it the cargo.toml in the project? I am now
tauri = { version = "2.0.0-beta.24", features = [ "protocol-asset", "devtools"] }

Please try updating (and while you're at it too) to the latest version too. beta.6 is quite old and should be the reason for this error (it sends the old format to the new tauri version)@tauri-apps/api``@tauri-apps/cli

Thank you so much


Files in OneDrive file picker dialog cannot be selected if the width of browser has changed to small size

Reproduce steps:
a) open http://isdk.dev.live.com/dev/isdk/ISDK.aspx?category=scenarioGroup_core_concepts&index=0#
b) click run button
c) Change the width of browser to small size
Result:
The files in file picker dialog cannot be selected. Please see the attached screenshot.
Expect Result:
The files should can be selected.

Thanks @benjaminliugang for reporting this issue.    It's a known issue that we are tracking in our backlog.

@benjaminliugang - take a look at the updated JavaScript Picker/Saver SDK at https://dev.onedrive.com/sdk/javascript-sdk.htm.   It supports different browser window sizes.


Verifier application not working

I want to be able to verify the credential issued as the UI suggests but the "Verify Credential" button doesn't do anything !

I'll have to look at this again.  As I recall, another verifier docker image needs to start, and I'm not sure it does.  PRs #67 and #70 implement the functionality.
Note that this app was built in just a couple of days, used for some demos and then not followed up on. It was done before the proof of vaccination approach was finalized, and their was demand for such a credential. When the work restarted, the Smart Health Card approach was used instead of VCs.


perf(ripple): md ripple effect does not affect layout

Short description of what this resolves:
Before:

After:

Changes proposed in this pull request:

Pure transform-based animation without touching left/top css properties.

Ionic Version: 2.x

Did you mix up the before and after labels? The before one looks like it'd be the improved one. Awesome

@mlynch ouch! yes, I mixed them up.
fixed!

@adamdbradley do you want me to resolve the merge conflicts? do you want to merge this?


GitHub issue fixes

Docs Build status updates of commit d7fd0ee:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/create-packages/Symbol-Packages-snupkg.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Docs Build status updates of commit bfaed1d:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/create-packages/Symbol-Packages-snupkg.md
:white_check_mark:Succeeded
View

docs/create-packages/Symbol-Packages.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Doc: Improve handling of build when documentation is not enabled.

When documentation is not enabled, echo a message to that effect rather than having the doc build fail in a cryptic manner.
Also, don't build man pages during make install if documentation is not enabled.

[approve ci autest]

[approve ci docs]


Create Class database table (3)

Decide what goes in model

The wiki page with the tentative 2017-2018 schedule may be helpful when deciding what should be in the table.
https://github.com/CSC322-Grinnell/curricular-planning/wiki/Draft-Schedule-2017-2018


Fix explanation transforms for Mapping Transformers

The Mappings version of the one-hot encoder transformers have outdated explanation transform methods; these should be updated to the most accurate versions.

This has since been fixed


Per-Monitor v2 DPI awareness

Note: This PR should be merged before #1368 (which updates WDL to a newer commit).
Adds support for Windows 10 Creators Update (1703)'s new Per-Monitor v2 DPI awareness mode.
Fixes #1264.

:x: Build sws 315-master failed (commit https://github.com/reaper-oss/sws/commit/c03cdb5ffc by @cfillion)

Looking at your code I just discovered (and reading about) parameter pack/variadic templates. :open_mouth:

:white_check_mark: Build sws 315-master completed (commit https://github.com/reaper-oss/sws/commit/c03cdb5ffc by @cfillion)

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Visual Studio 2019, ARCH=x64

build/BuildUtils/SWS_Template.ReaperLangPack
build/BuildUtils/whatsnew.html
build/reaper_sws-x64.pdb
build/sws-<IP_ADDRESS>-Windows-x64-hidpi-c03cdb5f.exe

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Ubuntu1804, ARCH=i686

build/sws-<IP_ADDRESS>-Linux-i686-hidpi-c03cdb5f.tar.xz

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Visual Studio 2019, ARCH=x86

build/BuildUtils/SWS_Template.ReaperLangPack
build/BuildUtils/whatsnew.html
build/sws-<IP_ADDRESS>-Windows-x86-hidpi-c03cdb5f.exe
build/reaper_sws-x86.pdb

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Ubuntu1804, ARCH=aarch64

build/sws-<IP_ADDRESS>-Linux-aarch64-hidpi-c03cdb5f.tar.xz

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Ubuntu1804, ARCH=x86_64

build/sws-<IP_ADDRESS>-Linux-x86_64-hidpi-c03cdb5f.tar.xz

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Ubuntu1804, ARCH=armv7l

build/sws-<IP_ADDRESS>-Linux-armv7l-hidpi-c03cdb5f.tar.xz


LocalProxy dunder attributes

Update LocalProxy dunder methods to mostly match the Python data model, fixes #1754, and add tests for each.
Remove Python 2 dunder methods.
Directly proxy most dunder methods mentioned in the data model, with the following exceptions:

Indirectly proxied:

__new__, __init__ - Available provided you're instantiating your class in the standard way, by calling the class. proxy() defers to proxy.__call__(), which defers to cls.__call__(), which in turn defers to __new__ and __init__ as usual.
__getattribute__ - Proxy attributes defer to proxy.__getattr__, which defers to the getattr built-in, which in turn defers to __getattribute__ (if present).

Not added:

__del__ - The destruction of a proxy shouldn't be linked to the destruction of the proxied object.
__slots__ - I'm not sure if overriding this would mess up Python internals.
__name__ - LocalProxy seems to use __name__ for something else, and I didn't want to break it.
__init_subclass__ - It's probably a bad idea to inherit from a proxied class.
Augmented arithmetic assignments (__iadd__, etc.) - This is doable for mutable classes that return self from these operations (eg. list), but will add confusion in all other cases (eg. int).
Asynchronous dunder methods - I don't have enough async experience to write tests for these methods.

Not mentioned in data model top-level:

__dict__ - Surprisingly, __dict__ isn't mentioned at the top level in the data model. Added before __dir__.
__class__ - Not mentioned at top-level. Added to make isinstance(proxy, cls) behave the same as isinstance(obj, cls). Added before __instancecheck__.
__next__ - Used for iterators (as opposed to iterables). Added after __iter__.
__copy__, __deepcopy__ - Strictly speaking not part of the data model, but copy is part of the standard library. Kept at end of dunder attributes.

I found some more dunder attributes in the Python index. I didn't add these directly, but some of them seem to work anyway, so I added tests for them.

Function attributes: __doc__, __qualname__, __module__, __defaults__, __code__, __globals__, __closure__, __annotations__, __kwdefaults__, __self__, __func__.
Class attributes: __mro__, __bases__, __subclasses__.

Other dunder attributes that could be added are:

Metaclass related attributes - Seems like a bad idea to proxy a metaclass.
Module attributes - Seems like an even worse idea to proxy a module.
Various constants in sys and op - Of all the modules you could proxy, sys is probably the worst.
Exception attributes, pickle, pathlib, and weakref - Probably worth adding, but I can't be bothered to add tests for them.

If we assume that the index is comprehensive, then that concludes all possible dunder attributes.

Nice. I was working on this too, but I like this descriptor approach more. I did run into some subtleties with the __radd__ etc. methods, I'll have time to leave a review later.

Nice indeed! I’d completely missed #1754, and in #1767 had only coincidentally noticed a fraction of what had to be done here while working on something else. So thanks for the much more complete solution! It looks like at least the local test flakiness I tried to address in #1767 hasn’t come back yet (correct me if I’m wrong). Hopefully that’s fixed now but I’ll keep keeping an eye on it.

Here's my branch. I don't have enough time to thoroughly review this, but briefly:

__r{op}__ methods need more fallback logic. If they aren't defined, or if they are but return NotImplemented, try the regular op with reversed arguments.
__pow__ needs to handle ternary form. Needs to work even if the proxied object's __pow__ only accepts two arguments. __rpow__ and __ipow__ don't handle ternary but accept the argument.
I left certain method names commented out as I wasn't sure if they should be implemented.
I didn't implement __get__, etc. for the same reason you didn't implement metaclass related things, it didn't seem right to use a proxy as a descriptor.
Don't proxy data attributes if they're handled by __getattr__. I don't think __dict__ needs to be proxied, but I'd have to try it.

@jab I noticed no test flakiness while writing this PR.
@davidism

I think the Python internals should deal with __r{op}__ fallbacks correctly. Can you provide a test where one of my __r{op}__ methods fail?
Your conclusion for __i{op}__ matches mine, but I decided against it as the proxied object might not return it's own self, leading to unexpected behaviour, without throwing an exception. Further, if you're proxying an immutable object, what are you expecting to happen? Perhaps instead of returning the result, it returns a proxy of the result?
If I remember correctly, my version of three-arg pow worked with the proxy in the first argument, but not in the second or third. I didn't bother digging too deeply into it, as that's still better than the previous version.
I can understand where you're coming from with __get__. You probably shouldn't proxy a descriptor, but it happened to work when I tried it, so I left it in.
I agree with you on that last point. I thought I'd caught all such attributes, by writing tests for them, and seeing if they still passed with the appropriate attribute commented out; but I guess I missed one.

I'm on my phone, can't type much for a while.
You already have a few lambdas for r-ops, I think they demonstrate the issues. Try proxying ints and strings and trying different op combinations.
For i-ops I meant return the proxy, ignoring what the op returns.

I'm having a hard time reviewing this. It seems to be trying to be way too clever in some places, possibly to support methods as well as a __getattr__ which might return methods? I'm not sure. It also no longer raises RuntimeError when the proxy isn't bound.

I ended up cleaning up my branch, as well as updating it with your descriptor idea. I'll be referring to all the tests you wrote too. I've added you as co-author on the commits so you still get credit for the work you did. Continuing this in #2016.

I ended up cleaning up my branch, as well as updating it with your descriptor idea. I'll be referring to all the tests you wrote too. I've added you as co-author on the commits so you still get credit for the work you did. Continuing this in #2016.


x/mobile: Process crashed as JNI exception isn't cleaned before next call.

What version of Go are you using (go version)?
go1.8.3
(
gomobile version +0f31740 Wed Apr 19 17:20:05 2017 +0000 (android); androidSDK=[removed]/platforms/android-26
)
What operating system and processor architecture are you using (go env)?
linux/amd64
cross complied to
android/arm
What did you do?
Calling Java function from go part of android app(with interface), and an unchecked exception was thrown at Java side.
This is the abridged version of original crash log:
07-15 21:00:20.352 2854-2854/? A/DEBUG: Abort message: 'art/runtime/java_vm_ext.cc:410] JNI DETECTED ERROR IN APPLICATION: JNI CallStaticVoidMethod called with pending exception java.lang.IllegalStateException: Already closed'
07-15 21:00:20.352 2854-2854/? A/DEBUG:     x0<PHONE_NUMBER>000000  x1<PHONE_NUMBER>0027c8  x2<PHONE_NUMBER>000006  x3<PHONE_NUMBER>000000
07-15 21:00:20.352 2854-2854/? A/DEBUG:     x4<PHONE_NUMBER>000000  x5<PHONE_NUMBER>000001  x6<PHONE_NUMBER>000000  x7<PHONE_NUMBER>000000
07-15 21:00:20.352 2854-2854/? A/DEBUG:     x8<PHONE_NUMBER>000083  x9<PHONE_NUMBER>02fc80  x10<PHONE_NUMBER>deffa0  x11<PHONE_NUMBER>df00e0
07-15 21:00:20.352 2854-2854/? A/DEBUG:     x12<PHONE_NUMBER>000000  x13  0000007fa1344000  x14<PHONE_NUMBER>000000  x15<PHONE_NUMBER>000000
07-15 21:00:20.352 2854-2854/? A/DEBUG:     x16  0000007fa1336568  x17  0000007fa12c92fc  x18  0000007fa1347f50  x19  0000007f81433500
07-15 21:00:20.352 2854-2854/? A/DEBUG:     x20  0000007f81433440  x21<PHONE_NUMBER>00000b  x22<PHONE_NUMBER>000006  x23  0000007f823f4400
07-15 21:00:20.352 2854-2854/? A/DEBUG:     x24  0000007f979afc80  x25<PHONE_NUMBER>000000  x26  0000007f9dcec000  x27<PHONE_NUMBER>000000
07-15 21:00:20.352 2854-2854/? A/DEBUG:     x28  0000007f823f4400  x29  0000007f814328e0  x30  0000007fa12c6a98
07-15 21:00:20.352 2854-2854/? A/DEBUG:     sp   0000007f814328e0  pc   0000007fa12c9304  pstate<PHONE_NUMBER>000000
07-15 21:00:20.357 2854-2854/? A/DEBUG: backtrace:
07-15 21:00:20.357 2854-2854/? A/DEBUG:     #00 pc<PHONE_NUMBER>069304  /system/lib64/libc.so (tgkill+8)
07-15 21:00:20.357 2854-2854/? A/DEBUG:     #01 pc<PHONE_NUMBER>066a94  /system/lib64/libc.so (pthread_kill+68)
07-15 21:00:20.357 2854-2854/? A/DEBUG:     #02 pc<PHONE_NUMBER>0239f8  /system/lib64/libc.so (raise+28)
07-15 21:00:20.357 2854-2854/? A/DEBUG:     #03 pc<PHONE_NUMBER>01e198  /system/lib64/libc.so (abort+60)
07-15 21:00:20.357 2854-2854/? A/DEBUG:     #04 pc<PHONE_NUMBER>4336c0  /system/lib64/libart.so (_ZN3art7Runtime5AbortEv+324)
07-15 21:00:20.357 2854-2854/? A/DEBUG:     #05 pc<PHONE_NUMBER>136f78  /system/lib64/libart.so (_ZN3art10LogMessageD2Ev+3176)
07-15 21:00:20.357 2854-2854/? A/DEBUG:     #06 pc<PHONE_NUMBER>30f248  /system/lib64/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+2080)
07-15 21:00:20.357 2854-2854/? A/DEBUG:     #07 pc<PHONE_NUMBER>30f6c8  /system/lib64/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+116)
07-15 21:00:20.357 2854-2854/? A/DEBUG:     #08 pc<PHONE_NUMBER>142d34  /system/lib64/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+144)
07-15 21:00:20.357 2854-2854/? A/DEBUG:     #09 pc<PHONE_NUMBER>149be4  /system/lib64/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE.constprop.116+6088)
07-15 21:00:20.358 2854-2854/? A/DEBUG:     #10 pc<PHONE_NUMBER>15c8f0  /system/lib64/libart.so (_ZN3art8CheckJNI11CallMethodVEPKcP7_JNIEnvP8_jobjectP7_jclassP10_jmethodIDSt9__va_listNS_9Primitive4TypeENS_10InvokeTypeE+948)
07-15 21:00:20.358 2854-2854/? A/DEBUG:     #11 pc<PHONE_NUMBER>15d72c  /system/lib64/libart.so (_ZN3art8CheckJNI20CallStaticVoidMethodEP7_JNIEnvP7_jclassP10_jmethodIDz+160)
07-15 21:00:20.358 2854-2854/? A/DEBUG:     #12 pc<PHONE_NUMBER>4f8038  /data/app/org.kkdev.v2raygo-1/lib/arm64/libgojni.so (go_seq_inc_ref+80)

I have successfully reproduced this crash. Try this binary apk(built with debug enabled):
app.zip
Reproduced log:
https://gist.github.com/xiaokangwang/8d7f5aefd98d7c52c644b4c815097eb5
Reproduce code:
Go part of reproduce
https://github.com/xiaokangwang/gomobilecrashreproducego
Java part of reproduce
https://github.com/xiaokangwang/gomobilecrashreproducejava
What did you expect to see?
Handle this situation gracefully, for example a API for dealing with unchecked exception, it can be:

a chan receiving unchecked exception if none is defined, the default handing comes in.
a runtime setting for defining what to do in this situation(quit or let it go)
a warn message at console/log if no policy is defined and an exception was thrown.

What did you see instead?
Just crash, and destabilize entire app.
This issue also have been spotted at https://github.com/ethereum/go-ethereum/issues/14437, but seems to be ignored.
Original discovered as my app's service crash frequently and render it unusable.

Why not return an error from the Java to the Go side? That way, the exception will be converted to a Go error automatically.

Some errors are triggered by Android or codes that outside developer's control. The only solution I found was use try and catch at all Java interface in hope that exception won't cause a crash.


Review other hardening resources for missing tweaks

[ ] NSA Linux Hardening guides (2y old now)
[ ] RHEL 9 official hardening Docs (PDF)
[ ] Oracle Linux 9 Security tips (don't seem very in depth)
[ ] Oracle 8 Hardening guide PDF (somehow nothing found for Oracle 9
[ ] Oracle: administering SELinux
[ ] Oracle: working with Secureboot
[ ] Fedora hardening guides (on archive.org, probably because outdated)

just check what's already fully integrated or irrelevant

[ ]  NSA Linux Hardening guides (2y old now)
[ ]  RHEL 9 official hardening Docs (PDF)
[ ]  Oracle Linux 9 Security tips (don't seem very in depth)
[ ]  Oracle 8 Hardening guide PDF (somehow nothing found for Oracle 9
[ ]  Oracle: administering SELinux
[ ]  Oracle: working with Secureboot
[ ]  Fedora hardening guides (on archive.org, probably because outdated)

just check what's already fully integrated or irrelevant

Please only open issues for specific hardening suggestions. Linking documentation is not helpful. If there's something specific in them that secureblue is missing, cut specific issues for each one. Otherwise do not do so.

this could belong into a wiki then, as I think having a list of good documents can be really helpful for research
https://www.chromium.org/chromium-os/chromiumos-design-docs/system-hardening/
another one

this could belong into a wiki then, as I think having a list of good documents can be really helpful for research
https://www.chromium.org/chromium-os/chromiumos-design-docs/system-hardening/
another one

maintaining a wiki of security-related documents is completely out of scope for this project.


Add guidance on how we test GOV.UK

https://trello.com/c/fRihmgQ8/266-add-top-level-guidance-about-where-we-write-tests-on-govuk
Depends on: https://github.com/alphagov/smokey/pull/965
👉 Rendered version
This is the culmination of:

RFC 128, which was really a new testing strategy ^1.
Work to improve individual documentation ^2^4.

All together we now have a complete picture of how we test GOV.UK,
which this new manual summarises.
This ability to describe how we test GOV.UK is the first step towards
making it better, as agreed in RFC 128 ^6. The next step is to look
at the culture of testing we have in each team and agree what we need
to do to meet these new standards.

@kevindew thanks for the thorough review 💯.
I think I've now addressed all your comments and this is ready for another look.


WIP: Fix more Scrutinizer issues

Coverage remained the same at 98.021% when pulling 91e958052e2bc3d5aa65fc3abe72daecc268a146 on CyberiaResurrection:MoreScrutinizerFixen into 1a90f515c36abd725b22debfcd4ab46b3ce825e1 on Algo-Web:master.

Coverage remained the same at 98.021% when pulling 91e958052e2bc3d5aa65fc3abe72daecc268a146 on CyberiaResurrection:MoreScrutinizerFixen into 1a90f515c36abd725b22debfcd4ab46b3ce825e1 on Algo-Web:master.


Updates charms using orc8r_base_db

Description
Uses orc8r_base_db changes from this PR for all the charms using the library.  We also make the corresponding changes in the bundle.

orc8r-accessd
orc8r-configurator
orc8r-ctraced
orc8r-device
orc8r-directoryd
orc8r-lte
orc8r-policydb
orc8r-smsd
orc8r-state
orc8r-subscriberdb
orc8r-subscriberdb-cache
orc8r-tenants

Checklist

[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have made corresponding changes to the documentation.
[ ] I have added tests that validate the behaviour of the software.
[ ] I validated that new and existing unit tests pass locally with my changes.
[ ] Any dependent changes have been merged and published in downstream modules.
[ ] I have bumped the version of any required library.

Approved (assuming CI passes)

Currently, we're blocked by this postgres bug. itests fail when we remove postgres and redeploy it, it gets stuck in awaiting cluster start. I've talked to Marcelo, he's struggling to reproduce the issue, the only fix found was to patch the k8s endpoints, which I think is outside the scope of these PRs.
We've discussed in the daily setting the affected tests to xfail until the issue is fixed. Besides, main-branch tests are passing because we're not testing this behavior, just itests for individual charms are failing.
Let me know if that works and I push the corresponding changes.

Approved (assuming CI passes)

Currently, we're blocked by this postgres bug. itests fail when we remove postgres and redeploy it, it gets stuck in awaiting cluster start. I've talked to Marcelo, he's struggling to reproduce the issue, the only fix found was to patch the k8s endpoints, which I think is outside the scope of these PRs.
We've discussed in the daily setting the affected tests to xfail until the issue is fixed. Besides, main-branch tests are passing because we're not testing this behavior, just itests for individual charms are failing.
Let me know if that works and I push the corresponding changes.

I agree with setting the tests to xfail. On my side, I was able to reproduce the issue by doing juju remove-application postgresql-k8s --force --no-wait. I am not sure those particular steps are supposed to be working however, as they probably don't let the charm run its cleanup.


Need quotes for update_interval and update_interval_when_expecting config values

Describe the bug
update_interval and update_interval_when_expecting config values are rendered without quotes what leads to the parsing error:
    update_interval = 1m
    update_interval_when_expecting = 2s

Unexpected character, expected only whitespace or comments till end of line
Adding quotes like below solves the problem
    update_interval = "1m"
    update_interval_when_expecting = "2s"

Additional info
terraform-aws-gitlab-runner v7.13.0

Arrgh, that's true.


Change in client_key path in v2.4.0

In the latest release, this line was added, which now forces the push jobs client to look for the client key in /etc/chef/secure.  However, my client key has always been stored in /etc/chef, and previous versions of the push job client have worked.  This prevents the push jobs service from starting.
I wouldn't expect a breaking change like this in a 2.x.0 bump, but maybe my stuff is not configured according to standards.  Can you add some clarification to this change please?

I'm pretty sure this is a regressions... @manderson26 thoughts?
-s

I also bumped into this on a CentOS 6.6 node using push-jobs cookbook v2.4.0

Fixed in cookbook version 2.4.1


Create a Radar Chart

A radar chart is a way of showing multiple data points and the variation between them.
Project will take inputs from the user and plot a radar chart in canvas.

@joshi-kaushal  go ahead .

I have made a PR please have a look


Added basic passing test only for retrieving test git action

Fix for #39

All warnings of analyzer causes workflow to stop

That's fine now. But we can't close the issue. Remove related issue then.


Query

Hi, is this tool usable as a stand alone utility without an aws account?
What would be the pre requisites for 1) an individual 2) an organization?
Kindly help.
Sorry for raising this as an issue.
Couldn't find a q&a section.
Thanks in advance!

Hello,
Thank you for reaching out. This tool can be used without an AWS account. For using the tool, you just have to abide by the licensing requirements stated here:
https://github.com/aws/cta/blob/main/LICENSE
Please let us know if you have any questions using the tool. Thanks again for reaching out.


other

System information

OS Platform and Distribution (e.g., Linux Ubuntu 20.04, WSL2):windows
Target (e.g. desktop cpu, android arm64):cpu
Bazel version:3.7.2
Python version:3.9
GCC/G++ version:
Unity version:
Android NDK version (if building for Android):
Xcode version (if building for iOS):

I edit  third_party/opencv_windows.BUILD and WORKSPACE.
Because my opencv is 4.5.3

but when I build python build.py build --desktop cpu --include_opencv_libs -v

Any error in my modification?

You also need to change SHA256, because bazel caches archives (or you can simply remove this line).
https://github.com/homuler/MediaPipeUnityPlugin/blob/b8ea5c1fb0b5f0eeebb5de731147d2db46a76e23/WORKSPACE#L231
Please note that some features does not work with OpenCV 4.x.


PP-9812  "authorisation_mode": "agreement" requires "agreement_id"

When creating a new payment, if "authorisation_mode": "agreement", require an "agreement_id" (which must have a string value).
Conversely, if any other "authorisation_mode" is specified (or none at all), reject the request if it contains an "agreement_id".
(The latter change will prevent surprising things happening if both "set_up_agreement" and "agreement_id" are specified.)
with @sfount
Depends on #1507

Closing: we’re incorporating these changes into #1507.


revert: deduplicate max effective square size

Closes https://github.com/celestiaorg/celestia-app/issues/3336 by reverting #3294
Opens https://github.com/celestiaorg/celestia-app/issues/2267
Testing
I observe a consensus failure if I reboot celestia-app on main. I don't observe a consensus failure if I reboot celestia-app on this branch after the revert.

do we know what the exact cause is? is the refactor fundementally flawed, or is it just some simple state thingy?
I know its just a nice to have, so perhaps we shelve it for a while, but naively without looking into it, it seems like we could have the refactor w/o the the state issues?

Yeah I would kind of like to have an idea of why this failed instead of simply blindly reverting it

I was planning on investigating it after getting main back to a functional state


Add hard subtitles automatically

Hi, it would be nice to have an option to automatically add the hard subtitle

No it would be not. Most people don't like hard-coded subtitles. Its fine just the way it is now.

I'm closing it now because the feature was added, next build has a fix that prevents more than one hardcoded subtitle being added.


Ensure email parameters for SES are valid

reply_to: must have an email address; the value cannot be empty if this parameter is used
name: set @name (used in email message template) to nil instead of a blank string, which causes a small rendering bug in the email body (i.e. a comma , may be printed even if no name is provided)

@mcumcu @matthewford I think we can also add permitted params or form validation to feedbacks controller


Bug with lines

Hey,
I don't know if it's the resize or the select plugin that causes this issue, but (even with the older version) have the issue that after I am trying to select a Line, I get an "Uncaught TypeError":

It happens with and without the "deepSelect" option.

My fault. I wrote something like [value1.x] - value2.x instead of [value1.x - value2.x].
It was a mistake in svg.select.js which is fixed in 1.0.1

Yep, seems to be fixed +1

But there seems to be a different, new issue:
The handlers for resizing seem to disappear when using deepSelect: true when I resize the line so it is horizontal:
http://puu.sh/iwbGd/646dbe0832.png (before)
http://puu.sh/iwbKO/0a2306ff4a.png (after)

Your code please ;)

There you go: https://jsfiddle.net/bb3m5w8e/

Fixed in 1.0.2 - still an svg.select.js - issue ;)


Clean funcs for runJobs

What changes were proposed in this pull request?
I think we should clean the funcs in runJobs too.
How was this patch tested?
Jenkins tests.
Please review https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark before opening a pull request.

Ah good catch. Merging this


Update projects.json (Page not found fix)

OpenKruise project url leads to Page not found error

Hi @AugustasV! Thanks for the update, but project data is pulled from the CNCF landscape, so you'll need to submit a PR to the landscape repo to update any project data.
After that PR is merged, there is a bot that runs every night to create the PR to fix it here.
So, I'm going to close this PR - let me know if you have any issues making the update in the landscape repo.


🚀Feature Request: Creating password protected database file

Creating a password protected MSAccess database is a common need, manually creating a template database file and copying for every need is not a good way to do.
import msaccessdb
msaccessdb.create(r'C:\path\to\new.accdb', pwd='example)

To create a password-protected database from scratch you need to use the Access Database Engine, Access DAO (Data Access Objects), and pywin32. In other words, you don't need to use this package at all.
"""
requires: pip install pywin32
"""
import win32com.client

# ACE.DAO constants
dbLangGeneral = ";LANGID=0x0409;CP=1252;COUNTRY=0"
dbVersion120 = 128
dbEncrypt = 2

db_path = "C:/Users/Gord/Desktop/secrets.accdb"
db_password = "example"

dbe = win32com.client.Dispatch("DAO.DBEngine.120")
dbe.CreateDatabase(db_path,
                   dbLangGeneral + ";pwd=" + db_password,
                   dbVersion120 + dbEncrypt)


Remove repetitive link

But that's the joke...

Sorry, I got it, but there was no way to make sure it was :-D. Thanks for the great content anyway!


Need to clean-up the additional lookups too

Without this line, the additional lookups keep links to the previous object

I can't see any major issue with it, I am just unsure where this code is actually used
Do you have any examples?

A few Compara adaptors are using the FullIdCache. I don't understand why but the Compara was inserting adding an object twice to the cache, and the error was that get_by_additional_lookup() would fail since the additional lookups contain two references to the same object.

I think I can add a test to fullIdCaching.t to show the problem

I have added a test to fullIdCaching.t
If you run the amended test on the original version of FullIdCache.pm, it will fail

that would be much appreciated

Last time I checked, Compara was indeed the sole user of the ID-caching mechanism

I think the changes are ok, but the generally legibility of the FullIdCache is quite poor. This type of functionality is tough to debug at the best of times, and it's just not self-explanatory.


Add the cluster-monitoring annotation

According to https://github.com/openshift/enhancements/blob/master/enhancements/olm/olm-managed-operator-metrics.md
adding this label will make the ocp console add the monitoring label to
the namespace, and prometheus will be able to scrape our pods.

/retest

/lgtm


Revert "Add chainerx.fmod"

Reverts chainer/chainer#7624

pfnCI, test this please.

Jenkins CI test (for commit 5ffdf5474b8b55c0864e97a073bd3c32605da63a, target branch master) failed with status FAILURE.


Instance view status on LinuxVirtualMachine

What problem are you facing?
LinuxVirtualMachine does not use VM status to deduce whether the machine is running or not so it does not react in case of a VM being stopped (does not start it).
How could Official Azure Provider help solve your problem?
Integrate with https://learn.microsoft.com/en-us/rest/api/compute/virtual-machines/instance-view?view=rest-compute-2023-10-02&tabs=HTTP#instanceviewstatus to monitor VM status and react if it differs from the status defined in MRs.

The response will include a statuses array that contains the current status of the VM. Look for a status with "code": "PowerState/running" to confirm that the VM is running
(c) Coplilot but obvious in the link above

I also ran into this while testing the provider capabilities before adoption.
It would be great to see this implemented.


Ruby: create "v1.rb" pattern into gax template

This (version).rb is a pattern to simplify the require statement for Ruby.
I've hand-written this for existing APIs like https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-pubsub/lib/google/cloud/pubsub/v1.rb, but packman should generate files like this automatically.

Cc: @swcloud, @Landrito , @geigerj


half-0.3

half-0.3 (Edward Kmett<EMAIL_ADDRESS>@ekmett) is out of bounds for:

[ ] OpenGLRaw-<IP_ADDRESS> (>=<IP_ADDRESS> && < 0.3). haskell-opengl. @ekmett @svenpanne. Used by: library
[ ] gl-0.8.0 (==0.2.*). Edward Kmett<EMAIL_ADDRESS>@ekmett. @RyanGlScott. Used by: library

I've just uploaded OpenGLRaw <IP_ADDRESS> with a relaxed version bound for half to Hackage.

I've revised gl-0.8.0 on Hackage to allow half-0.3.


Typescript Error

Hello,
I'v been trying to wrap a Popper with react-onclickoutside
and type script is giving me an error.
[tsl] ERROR in /home/alex/labs/movieRate/src/components/Popper/index.tsx(134,31)
      TS2345: Argument of type 'typeof BasePopper' is not assignable to parameter of type 'ComponentClass<iProps & InjectedOnClickOutProps & HandleClickOutside<any>> | StatelessComponent<i...'.
  Type 'typeof BasePopper' is not assignable to type 'ClickOutComponentClass<iProps & InjectedOnClickOutProps>'.
    Type 'BasePopper' is not assignable to type 'Component<iProps & InjectedOnClickOutProps, ComponentState, never> & HandleClickOutside<any>'.
      Type 'BasePopper' is not assignable to type 'Component<iProps & InjectedOnClickOutProps, ComponentState, never>'.
        Types of property 'props' are incompatible.
          Type 'Readonly<{ children?: ReactNode; }> & Readonly<iProps>' is not assignable to type 'Readonly<{ children?: ReactNode; }> & Readonly<iProps & InjectedOnClickOutProps>'.
            Type 'Readonly<{ children?: ReactNode; }> & Readonly<iProps>' is not assignable to type 'Readonly<iProps & InjectedOnClickOutProps>'.
              Property 'disableOnClickOutside' is missing in type 'Readonly<{ children?: ReactNode; }> & Readonly<iProps>'.

I dont really get it as it seems to te be an props incompatibility issue
Here is the code :
https://gist.github.com/blaadje/ded2509370449e21e09141f10e3bfd40
If you guys have any idea.
Thanks

I have this working in a react 16.2 typescript project, but I'm getting this same error in a new 16.3 project, not sure what's going on but I would love to use this in 16.3.

Seems to be the same for me :S

From what I see in the type definition, the props should actually have the type:
export type Props = YourProps & InjectedOnClickOutProps & HandleClickOutside<any>;

Hi,
@bogdan-zaharia-hs trying this above which seems to be the good thing to do, still throws the same thing.
Pretty annoying as for now i have to modify react-onclickoutisde type definition file manually to make it works.
Any suggestion to make it works?

Yeah: if you have to "manually modify the type definition", feel free to submit a PR, since you're already doing the work anyway =)

@blaadje Until we have a solution could you share which part are you modifying?


Terminal sequences no longer working

Does this issue occur when all extensions are disabled?: Yes

Version: 1.70.0-insider
Commit: 9925e5d4d3d355758cd09d26868f0c12a0006828
Date: 2022-07-11T12:21:25.342Z (10 hrs ago)
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: <IP_ADDRESS>-electron.0
OS: Darwin x64 21.6.0
Something changed in Insiders between Friday and now: ⌥+backspace and ⌘+backspace now render their corresponding sequences in text rather than actually sending them, e.g. typing asdf ⌥+backspace results in:

Actually pressing ⌃+w does delete a word. I haven’t changed any settings and the behavior I get from iTerm2 and Terminal.app hasn’t changed. VS Code’s terminal was working as I expect throughout last week.

I broke this in https://github.com/microsoft/vscode/pull/154567, will fix today


Type checker error with actonc build build order

Acton Version
<IP_ADDRESS>21<IP_ADDRESS>
Steps to Reproduce
With mod1.act:
class Super:
    pass

class Sub(Super):
    def __init__(self):
        pass

and mod2.act
from mod1 import Super, Sub

def fun() -> Super:
    return Sub()

build with actonc build
Expected Behavior
The build to succeed.
Actual Behavior
We get the error:
Building project in /home/ddjoh/workspaces/act-test-1
  Compiling mod1.act for release
   Finished compilation in   0.063 s
  Compiling mod2.act for release

ERROR: Error when compiling mod2 module: Type error
 3:14-18
  |
3 |def fun() -> Super:
  |             ^^^^^
Cannot infer mod1.Sub < mod1.Super

We can workaround this by building only mod1.act first and then secondly mod2.act. E.g:
$ actonc mod1.act
Building project in /home/ddjoh/workspaces/act-test-1
  Compiling mod1.act for release
   Finished compilation in   0.060 s
$ actonc mod2.act
Building project in /home/ddjoh/workspaces/act-test-1
  Compiling mod1.act for release
   Already up to date, in    0.000 s
  Compiling mod2.act for release
   Finished compilation in   0.057 s

Isn't this the same or related to #837!?

Seems like its' exactly the same. I already have a fix, but it's buried in the deactorizer branch -- which is COMING UP! :-)

@ddjoh can you check if this bug is still happening on latest main branch now that the new deactorizer is merged?

I have attempted to reproduce this and failed. I think it is fixed with #1020, so closing this.