[Feature]: fetch products from Vendure

How the project can be improved?
Currently there are ways to fetch single product (with custom fields) and multiple products (using search query but without custom fields)
The purpose of this task is to have a possibility to fetch multiple products with custom fields by using products query from Vendure.
As there is an ongoing architectural change to all VSF integrations that will probably be applied to this project as well I would recommend to follow it for this and future composables/functionality.
The main idea of the architectural change is to get rid of composables package and write composables as a part of the theme.
So this new useProducts composable should be a part of theme/composables and fetch data directly from the API-Client. So, the API-client part does not change at all.
Example of usePaymentProviderMock theme composable:
// theme/composables/usePaymentProviderMock/index.ts

import { sharedRef } from '@vue-storefront/core';

// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const usePaymentProviderMock = () => {
  const status = sharedRef(false, 'usePaymentProviderMock-status');

  return {
    status
  };
};

The new useProducts composable should look something like this:
// packages/api-client/src/api/getProducts/index.ts

import gql from 'graphql-tag';
import productQuery from './productQuery';
import { CustomQuery } from '@vue-storefront/core';
import { Context, ProductParams, Product, GetProductsResponse, RequestDataStructure } from '../../types';
import { NO_CACHE_FETCH_POLICY } from '../../helpers/constants';

const getProducts = async (context: Context, params: ProductParams, customQuery?: CustomQuery): Promise<GetProductsResponse> => {
  const productVariables = {
    ...params
  };

  const { products } = context.extendQuery(
    customQuery, { products: { query: productsQuery, variables: productVariables } }
  );

  const request = await context.client.query<RequestDataStructure<'products', Product>>({
    query: gql`${products.query}`,
    variables: products.variables,
    fetchPolicy: NO_CACHE_FETCH_POLICY
  });
  return request;

};

export default getProduct;

Also the grapqhl query. You can replace the query I created with more appriopriate one.
// packages/api-client/src/api/getProducts/productsQuery.ts

import gql from 'graphql-tag';

export default gql`
  query products {
  products {
    items {
      id
      customFields
    }
  }
}
`;

Add aprioppriate types to vuestorefront-community/vendure/packages/api-client/src/types/API.ts
What are the acceptance criteria?

[ ]

Additional information
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Thanks for the issue! i'm working on it atm!

Awesome @qwexvf
I have assigned you! If you have any questions please let me know.

Closed the PR as this feature can be implemented as an extension instead of a whole new composable.


addMetaSchema fails for json-schema-draft-04

What version of Ajv are you using? Does the issue happen if you use the latest version?
Using 5.5.2, tried to upgrade to 6.12.4
This works for 5.5.2 but fails for 6.12.4
const ajv = require('ajv');
const metaSchema = require('ajv/lib/refs/json-schema-draft-04.json');

ajv.addMetaSchema(metaSchema); // Fails for 6.12.4

Error message is: no schema with key or ref "http://json-schema.org/draft-04/schema#"
Stacktrace
      Ajv.validate (node_modules/ajv/lib/ajv.js:93:19)
      Ajv.validateSchema (node_modules/ajv/lib/ajv.js:174:20)
      Ajv._addSchema (node_modules/ajv/lib/ajv.js:307:10)
      Ajv.addSchema (node_modules/ajv/lib/ajv.js:137:29)
      Ajv.addMetaSchema (node_modules/ajv/lib/ajv.js:152:8)

In json-schema-draft-04.json, if I change property "id" to "$id" on line 2 it works.

@MorganPersson There is an option schemaId that controls which IDs are used - please see readme.
Please bear in mind that v7 (beta to be released in September) will have no draft4 support, so I recommend migrating the schemas instead.


Embedded menu resize delay

Resize the browser (height) -> the application menu resizes "delayed" -> transition
Maybe we should disable transitions in design mode

transitions are disabled in designer mode


Configure and enable watchdog just before jumping to the application firmware

This PR enables the watchdog just before jumping to the application bootloader. In case of issue with the new firmware, and if this firmware does not refresh it, the watchdog will reset the CPU, allowing MCUBoot to rollback to the previous version of the firmware.
This PR will help prevent the user from bricking their device by uploading a non-working firmware via the OTA.
Note that if this PR is merged, the application firmware will have to refresh the watchdog register periodically (max delay is ~7 seconds).
Here is the code to refresh the watchdog:
NRF_WDT->RR[0] = WDT_RR_RR_Reload;

Yep merged thanks!
How would we test this hmmm....

I did test it by building a custom bootloader that does not refresh the watchdog :)
This is how I found this issue : generate the DFU file with the standalone firmware (built to start @0x0 instead of 0x8000). The bootloader jumps, but the vector table is incorrect and ... cpu does nothing. In this case, the watchdog will reset and mcuboot will rollback.

Here is a test scenario. It uses 2 new files (I had to compress them into ZIP files for Github...):

bootloader_with_watchdog.zip : the bootloader built from this PR
dfu-BAD.zip : A DFU file generated from the standalone version of InfiniTime (https://github.com/JF002/Pinetime/releases/download/0.7.1/pinetime-app.bin). This firmware is built to run from offset 0x0 and won't run correctly when flashed at offset 0x8000 by OTA.

Using the current version of the bootloader (https://github.com/JF002/Pinetime/releases/download/0.7.1/bootloader.hex)

Flash the bootloader and the image of InfiniTime 0.7.1 (https://github.com/JF002/Pinetime/releases/download/0.7.1/pinetime-mcuboot-app-image.hex)
Reset and notice that it's working fine
OTA the dfu-BAD.img firmware
Reset
Notice that the screen displays the boot logo, and that the firmware does not run, the system is locked and there is no way to reset the CPU.

Using the new version of the bootloader (bootloader_with_watchdog.img)

Flash the new bootloader and the image of InfiniTime 0.7.1 (https://github.com/JF002/Pinetime/releases/download/0.7.1/pinetime-mcuboot-app-image.hex)
OTA the dfu-BAD.img firmware
Reset
Notice that the bootloader displays the boot logo, take some time, then the screen blinks (it's the reset from the watchdog) and finally, the original firmware runs again, meaning that MCUboot reverted to the old firmware. Victory :+1:

Great Job! :-) Wonder if we should use the Logo Loader as a simple test case, since it's a really simple firmware.
And we should recruit some beta testers to help with Regression Testing whenever we update the bootloader (since it's so mission critical).

Hypnos is now compatible with this watchdog.

Awesome! :-)


Add record fields for ContextBuilder

This is in order to manipulate ContextBuilders after creation. I need this for distortion testing.
There is a drawback in exposing Seq, a somewhat non-standard container, on a public API, but I'm sure it supports all the usual typeclasses. The alternative would be to change that to list, I don't know what the cost will be.

Seq is from containers, which is about as standard as it gets.

Do we do PVP differently from the standard? from A.B.C the standard calls A.B major and C minor.

Yeah, first version is major, second is minor. You're right that this isn't quite what the PVP says: I'll note it in the style guide.


⚠ ClamAV has degraded performance

In aec0a7a, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 60 ms

Resolved: ClamAV performance has improved in da29df0.


Feature/node refactor cleanup

Purpose/Changes

Move nodeCategories.json to static so it is requireable.
Let users pick category from the onboarder's create project

Side effects
None

The select input looks a little too large to me.

Using the appropriate Bootstrap class, e.g. form-control, should fix this.

Why are there both ---None-- and Uncategorized options?

Pass finished. :ear:

Also, can you add "Category: .." to the project header in this PR?

^ Once the above two items are addressed, this is good to merge.

@samchrisinger Can you pls address the failing test?


Remove implicit dependency on time 0.1

chrono, by default, depends on an old version of time, which has a RUSTSEC: https://github.com/emilk/egui/security/dependabot/7
egui doesn't use chrono, but egui_extras does as does egui_demo_lib. It would be nice to replace it with pure time 0.3 use, or use achrono without the oldtime feature it has.
It's worth noting that next release of chrono seem to have removed the dependency on time completely, so maybe this will sort itself out in time

hello,
I'm currently writing a frontend app using egui,  that uses hifitime internally (https://crates.io/crates/hifitime).
At some point I will need to port the datepicker to use it.
Are you interested in modular datetime backends for this issue ? (not sure of the feasibility, I'll look into it tomorrow).
I think that can allocate time next week to implement chrono/time/hifitime behind different feature flags and make a pull request.

@emilk are you interested in my previous proposal ?

@Massou31 yeah, it sounds nice!


Combine jurisdiction functional tests

Change description
Combine jurisdiction functional tests

@linusnorton I've combined all of the nightly tests into one separate nightly test


13875 NOB emits valid upon loading a save

Issue #: /bcgov/entity#13875
Description of changes:

Upon resuming a save NOB emits valid on saved changes

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the business-filings-ui license (Apache 2.0).

I checked this ticket on Edit Ui, but it's not showing an error after saving the draft. I wonder if this ticket is for Create UI.

Good catch. Yes, the ticket refers to a registration (Create UI).

I checked this ticket on Edit Ui, but it's not showing an error after saving the draft. I wonder if this ticket is for Create UI.

Yes it does for registration filings, I never changed the ticket, I'll do that thanks for the reminder!


Save transactions in database

This is the first step of https://github.com/wizardsardine/liana/issues/56#issuecomment-2183063784.
The poller will now save transactions in our own database. These transactions are selected based on the deposit and spend transactions of coins. Only the txid and transaction itself are saved, with the corresponding block height and time taken from the coins table.
In a couple of follow-up commits, I've replaced some RPC calls to bitcoind with DB queries.

I think list_missing_txids may fetch a too big batch of txids. I was thinking maybe it is better to loop over list_txids: https://github.com/wizardsardine/liana/blob/master/src/database/mod.rs#L148 from current time to genesis block timestamp, and for unconfirmed transactions use the coins(&[Status::Unconfirmed], ...)

Perhaps yes, although in that case, we should probably also do the same for the coins() method, as the max number of missing txids should be of a similar order to the total number of coins in the DB.

I used a loop to get the missing txids using ROW_NUMBER() as it seemed the simplest way. Most of the time, we don't expect there to be many missing values, only when the transactions table is initially populated for an existing wallet or perhaps if the poller has not been run for a long time.

Sorry If I was unclear, my point was to fetch missing txids and store transactions by batch in order to not keep a whole set in memory.

Ah I see, yep that makes sense, will change it.

In fact, i am thinking that we do not need to paginate txids to do that, just fetch 20 txids from the coins table where the txid is not in the txid field of the table transactions, fetch their raw tx with bitcoind then store them in transactions table and repeat until no txids are fund.

I couldn't quite do it like this in the end as there's a chance we won't be able to retrieve the transaction from bitcoind, and so the loop might have continued forever. Instead, I get all missing txids in one query still, but then retrieve chunks of transactions at a time so that we don't store them all in memory at once. As the transactions are larger than txids, and we already store the same order of coins in memory as there are txids, I felt it was fine to do it this way.

Of course this means you need access to transactions at the time of the migration. I'm still thinking about ways to reduce ugliness of doing that.

Perhaps we could add a migration step in Poller::new() around the same place we call looper::maybe_initialize_tip(&bit, &db).

Alright, so here is how i think we should proceed:

Separate migration from the SQLite database constructor
When setting up SQLite at init, first poll the database version before proceeding with any migration
If the database version is one for which Bitcoin transactions weren't stored in DB, query them from bitcoind
Only then proceed with the SQLite migration and pass the Bitcoin transactions which need to be stored

At the expense of making the code less encapsulated and a bit harder to follow, this gives us two nice robustness properties:

If any Bitcoin transaction is missing (which should never happen :tm:) the migration will fail.
For any utxo in DB its transaction is always in DB too.

I've implemented this on this branch: https://github.com/darosior/liana/commits/pr_1180. Feel free to take anything from there, of course.

Thanks for the updated approach and code.
I wonder whether for such migrations that need to query the DB (to get the txids in the present case), we should first migrate the DB to the most recent version, then query the DB, and then apply the final migration. Although I don't think it would cause any problems in the present case, the DB query used in the current code base may not always be compatible with the user's DB version.
Perhaps this could be done by passing the bitcoind connection to maybe_apply_migrations instead of the transactions themselves?

I think we should strive to make migrations atomics: your database is either fully compatible with the previous version or the next version. For instance with what you suggest a user could use Liana version N+1 with a database created with Liana version N, apply the first migration, for whatever reason encounter an error a crash or just stop the application before applying the second migration, and be stuck on a database which can neither be used by Liana version N nor by Liana version N+1.
If the existing query methods on the SQLite connection struct were not appropriate to an old database we could just write a custom one for this purpose.

Perhaps this could be done by passing the bitcoind connection to maybe_apply_migrations instead of the transactions themselves?

I precisely tried to avoid entangling the Bitcoin and Database modules.

Sorry, I wasn't clear in my description. I didn't mean that the migration from DB versions 4 to 5 would be split in two separate steps. Each migration from one DB version to the following would still be atomic.
So the function migrate_v4_to_v5 would still perform all changes on the DB. But instead of receiving the txs, it would instead get these from bitcoind as an initial step within the function.
But I agree that keeping in mind the potential need to modify DB queries for previous DB versions should be sufficient. Indeed, that could still be required using my approach if version N - 1 is different.
I'll proceed using your code and start adding it into this PR.

Does bitcoind's watchonly wallet keep transactions that are no longer in the best chain or were never confirmed and are no longer in the mempool?

Yes.

I've now updated it to use foreign key constraints from the coins to transactions tables and to retrieve transactions as part of the migration.

I've written a unit to specifically exercise the migration from v4 to v5, including the failure case: https://github.com/darosior/liana/commit/c9c82f2b06183b149825da8a9a861f20bc214dc8.
It only trips on the last check which compares the transactions from DB with the transactions created in the test because i think your list_wallet_transactions returns duplicates. See https://github.com/wizardsardine/liana/pull/1180#discussion_r1700312663.

The failing test may be due to the spend_txid having multiple different block infos, whereas list_wallet_transactions assumes that a given txid can't have inconsistent block info in the coins table.

The failing test may be due to the spend_txid having multiple different block infos, whereas list_wallet_transactions assumes that a given txid can't have inconsistent block info in the coins table.

Ah, good catch. Fixing it now.

I think I've now made all the requested changes.

Tested migrating from v4.0, v5.0 and v6.0 using the migration functional test.

Tested by upgrading a mainnet wallet. No issue.

ACK 3953a0b29e4d8dba45074a7d351be6c8cea6ecfc

re-ACK bf1e90e0fa7f357dc5fb20c12e454f58433dd898

Thanks for the review and additional commits :smiley:

Thanks for bearing through the many iterations!
-------- Original Message --------
On 8/2/24 12:25 PM, Michael Mallan  wrote:

Thanks for the review and additional commits 😃
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: @.***>


Storage domain in multiple data centers - fix

Status of storage domain that is attached to multiple data centers is
correctly merged. Previously it failed with 'Cannot convert undefined or
null to object'.

This change is

I have tested it and it works as expected.


Vectorize generate guid

Mirroring changes
I've made some changes to NextGuid and NextSequentialGuid to improve their performance. These changes include vectorizing the functions, which has resulted in a speed improvement of 10-15%. As NextGuid is frequently called in MassTransit, this small improvement should add up.
Also added some simple assertion tests to ensure that the changes do not break any existing functionality. Additionally, I've made some minor code improvements.
See original pr for more details.

It appears that ArraySegment<Guid> NextGuid(Guid[] ids, int index, int count) generates an array of SequentialGuid. Is this intentional?

I don't believe it was intentional, likely an oversight.

It doesn't look like it isn't used inside this repo, should I rename it?

You're welcome to rename it, yes. I think I added it for a test and never used it.


Navbar items are not equally distanced [Style]

What's the style idea?
We need to improve the navbar of the home page , the items are not equally spaced to each other .

Checklist

[X] I have checked the existing issues.
[X] I follow Contributing Guidelines of this project.
[X] I am a GSSoC'24 contributor.

Code of Conduct

[X] I agree to follow this project's "Code of Conduct".

@Rupalpy Fix it ASAP


Fixing a flaky auth test case

Following 2 test failures have been observed in the master branch in some environments (mainly Google Cloud Build).
Step #3:   2 failing
Step #3:
Step #3:   1) Auth
Step #3:        createCustomToken()
Step #3:          should be eventually rejected if a cert credential is not specified:
Step #3:      AssertionError: expected [Error: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.; Please refer to https://firebase.google.com/docs/auth/admin/create-custom-tokens for more details on how to use and troubleshoot this feature. Raw server response: "{"error":{"code":401,"message":"Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.","status":"UNAUTHENTICATED"}}"] to have a property 'code' of 'auth/invalid-credential', but got 'auth/internal-error'
Step #3:
Step #3:
Step #3:   2) TenantAwareAuth
Step #3:        createCustomToken()
Step #3:          should be eventually rejected if a cert credential is not specified:
Step #3:      AssertionError: expected [Error: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.; Please refer to https://firebase.google.com/docs/auth/admin/create-custom-tokens for more details on how to use and troubleshoot this feature. Raw server response: "{"error":{"code":401,"message":"Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.","status":"UNAUTHENTICATED"}}"] to have a property 'code' of 'auth/invalid-credential', but got 'auth/internal-error'

The test case assumes that createCustomToken() will fail when a service account is not available. But in GCP managed environments, this will discover a service account ID and try to call  the IAM service. This operation fails with a permission error (UNAUTHENTICATED), which causes the test to fail.
This PR fixes the test case by forcing the service account discovery to fail via a sinon stub.

@rsgowman in this case the actual error is coming from the IAM service (since the test invokes the IAM signBlob endpoint with fake credentials). And our existing Auth implementation is not designed to handle OnePlatform error codes like UNAUTHENTICATED, so it's falling back to auth/internal-error as a last resort. We can certainly look into handling these errors a little better in the future.


https://teavm.org/docs/tooling/maven.html broken

Please check this page, it seems broken:
https://teavm.org/docs/tooling/maven.html
It ends with:
targetType – what code to generate. Following options are supported:
JAVASCRIPT
WEBASSEMBLY
WEBASSEMBLY_WASI
C

I checked it, what's wrong with the buildType option?

Sorry, it was my reading error. It's okay.


ci: testnet prod sync

Description
testnet prod sync

Type of change

[ ] Docs change / dependency upgrade
[x] Configuration / tooling changes
[x] Refactoring
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Requires changes in customer code

High-level change(s) description - from the user's perspective

Related Issue(s)
Fixes
Related pull request(s)

Commits are too much, not reviewing actually. Approving the changes


How is the relation extraction done for FUNSD/XFUN dataset?

I went through the papers for both LayoutLM/v2 and LayoutXLM. I don't understand how the relation extraction part of the FUNSD/XFUN dataset is tackled. Can someone please guide me on how to go about it? What method can be used to train the model for relation extraction?

you have an example here:
https://github.com/microsoft/unilm/blob/master/layoutlmft/examples/run_xfun_re.py


Update link and condition in AzurePortalSigninfromanotherAzureTenant.yaml

Updated link, as noted by @timpailthorpe.

Also, I think this rule does not currently work. Now there is a column called AADTenantId, that may be equal to ResourceTenantId, but not TenantId.
This rule was created by @petebryan , please, could you review the different TenantId columns?

@aprakash13 - the latest range list is always here - https://www.microsoft.com/download/details.aspx?id=56519.  We should look at a method of auto-updating the list.


Stop double closing SerializeBatchDeserializeHostBuffer host buffers when running with Spark 3.2

Closes https://github.com/NVIDIA/spark-rapids/issues/3416
This PR fixes a bug that we don't seem to have been hitting until Spark 3.2.0.
SerializeConcatHostBuffersDeserializeBatch.close closes all of its instances of SerializeBatchDeserializeHostBuffer which in turn causes the underlying HostMemoryBuffer instances to be closed. SerializeConcatHostBuffersDeserializeBatch.close then also tries closes the underlying HostMemoryBuffer instances, causing the Close called too many times issue.
I added debug logging to both close methods and did not see them get called with earlier Spark versions, so maybe this code was only getting called in certain contexts where the existing code is safe? I feel like I may be missing something here.
Here is the output with Spark 3.2.0 demonstrating that the problem described in https://github.com/NVIDIA/spark-rapids/issues/3416 is now resolved.
I ran mvn verify with the default Spark version and did not see any additional host memory leaks reported.
[BENCHMARK RUNNER] [q58] Iteration 0 took 17242 msec. Status: Completed.
[BENCHMARK RUNNER] [q58] Iteration 0 took 17242 msec. Status: Completed
[BENCHMARK RUNNER] [q58] Saving benchmark report to tpcds-adhoc-q58-1631195118537.json
21/09/09 13:45:36 INFO RapidsBufferCatalog: Closing storage
21/09/09 13:45:36 INFO BlockManagerInfo: Removed broadcast_48_piece0 on <IP_ADDRESS>:39771 in memory (size: 72.5 KiB, free: 34.0 GiB)
21/09/09 13:45:38 INFO BlockManagerInfo: Removed broadcast_25_piece0 on <IP_ADDRESS>:39771 in memory (size: 34.1 KiB, free: 34.0 GiB)
21/09/09 13:45:38 INFO BlockManagerInfo: Removed broadcast_42_piece0 on <IP_ADDRESS>:39771 in memory (size: 34.1 KiB, free: 34.0 GiB)
21/09/09 13:45:38 INFO BlockManagerInfo: Removed broadcast_32_piece0 on <IP_ADDRESS>:39771 in memory (size: 34.1 KiB, free: 34.0 GiB)
21/09/09 13:45:38 INFO BlockManagerInfo: Removed broadcast_28_piece0 on <IP_ADDRESS>:39771 in memory (size: 2.1 MiB, free: 34.0 GiB)
21/09/09 13:45:38 INFO BlockManagerInfo: Removed broadcast_39_piece0 on <IP_ADDRESS>:39771 in memory (size: 34.1 KiB, free: 34.0 GiB)
21/09/09 13:45:38 INFO BlockManagerInfo: Removed broadcast_36_piece0 on <IP_ADDRESS>:39771 in memory (size: 354.0 B, free: 34.0 GiB)
21/09/09 13:45:38 INFO BlockManagerInfo: Removed broadcast_37_piece0 on <IP_ADDRESS>:39771 in memory (size: 354.0 B, free: 34.0 GiB)
21/09/09 13:45:38 INFO BlockManagerInfo: Removed broadcast_24_piece0 on <IP_ADDRESS>:39771 in memory (size: 34.1 KiB, free: 34.0 GiB)
21/09/09 13:45:38 INFO BlockManagerInfo: Removed broadcast_30_piece0 on <IP_ADDRESS>:39771 in memory (size: 34.1 KiB, free: 34.0 GiB)
21/09/09 13:45:38 INFO BlockManagerInfo: Removed broadcast_41_piece0 on <IP_ADDRESS>:39771 in memory (size: 361.0 B, free: 34.0 GiB)
21/09/09 13:45:38 INFO BlockManagerInfo: Removed broadcast_43_piece0 on <IP_ADDRESS>:39771 in memory (size: 34.1 KiB, free: 34.0 GiB)
21/09/09 13:45:38 INFO BlockManagerInfo: Removed broadcast_45_piece0 on <IP_ADDRESS>:39771 in memory (size: 34.1 KiB, free: 34.0 GiB)
21/09/09 13:45:38 INFO BlockManagerInfo: Removed broadcast_31_piece0 on <IP_ADDRESS>:39771 in memory (size: 34.1 KiB, free: 34.0 GiB)
21/09/09 13:45:38 INFO BlockManagerInfo: Removed broadcast_38_piece0 on <IP_ADDRESS>:39771 in memory (size: 354.0 B, free: 34.0 GiB)
21/09/09 13:45:38 INFO SparkContext: Invoking stop() from shutdown hook
21/09/09 13:45:38 INFO SparkUI: Stopped Spark web UI at http://<IP_ADDRESS>:4040
21/09/09 13:45:38 INFO MapOutputTrackerMasterEndpoint: MapOutputTrackerMasterEndpoint stopped!
21/09/09 13:45:38 INFO MemoryStore: MemoryStore cleared
21/09/09 13:45:38 INFO BlockManager: BlockManager stopped
21/09/09 13:45:38 INFO BlockManagerMaster: BlockManagerMaster stopped
21/09/09 13:45:38 INFO OutputCommitCoordinator$OutputCommitCoordinatorEndpoint: OutputCommitCoordinator stopped!
21/09/09 13:45:38 INFO SparkContext: Successfully stopped SparkContext
21/09/09 13:45:38 INFO DiskBlockManager: Shutdown hook called
21/09/09 13:45:38 INFO ShutdownHookManager: Shutdown hook called
21/09/09 13:45:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-447dbf7f-547f-4bfe-bc0b-15ffb7224840
21/09/09 13:45:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-b0257414-42d3-4325-b675-724ab6bc2ae2

@revans2 Could you review this when you get a chance? This PR does fix the issue I am seeing but I am nervous that there is something I am not understanding here which caused us to write the original code the way it was.

build


feat(components): Add page

Add the components page markdown and updates the snaps

Looks good :+1: We might need to flag the mobile differences on https://design-system.service.gov.uk/components/ (page links and back to top link) but that should be a separate issue if we need to make changes anyway.


Render pod and container cpu usage as percentage of a cpu

Fixes #23

Codecov Report

Merging #24 into master will increase coverage by 0.9%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master      #24     +/-   ##
=========================================
+ Coverage   44.66%   45.57%   +0.9%
=========================================
  Files          10       10
  Lines         300      305      +5
  Branches       33       34      +1
=========================================
+ Hits          134      139      +5
  Misses        163      163
  Partials        3        3

Impacted Files
Coverage Δ

src/kubetop/test/test_textrenderer.py
100% <ø> (ø)
:arrow_up:

src/kubetop/_textrenderer.py
81.81% <100%> (+0.86%)
:arrow_up:

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 bb9d995...6b32952. Read the comment docs.


Updating example script with permenant dev URL

Change Summary
Quick update to make the API example scripts more helpful
Overview
Updated URL for API
Updated Files

scripts/sds_api.py

Updated urls

Yes, I meant to close this review! Thanks for the reminder.


Mail doesn't send.

Describe the bug
Copied my SMTP settings from Thunderbird (works properly there), set up the .env variables properly and I'm still getting: Email confirmation required but the system could not send the email. Contact the admin to ensure email is set up correctly.
Steps To Reproduce
Steps to reproduce the behavior:

Go to 'Sign up' and enter all fields.
Click on 'Create Account'

Expected behavior
Bookstack to properly send e-mails.
Actual behavior
Bookstack warns that it couldn't send an e-mail.
Your Configuration (please complete the following information):

Exact BookStack Version (Found in settings): BookStack v0.25.2
PHP Version: PHP 7.1.27
Hosting Method (Nginx/Apache/Docker): Docker

Additional context
 - MAIL_DRIVER=smtp
- MAIL_HOST=mail.*****************
- MAIL_PORT=587
- MAIL_FROM=wiki@*****************
- MAIL_FROM_NAME=Wiki
- MAIL_USERNAME=wiki@*****************
- MAIL_PASSWORD=*****************
- MAIL_ENCRYPTION=tls

Did you fix this issue? I am having the same problem, is there a solution? Any help would be greatly appreciated.


data race in the ThreadCache::SetMaxSize (was: data race in the ThreadCache::SetMaxSize)

in the function ThreadCache::IncreaseCacheLimitLocked, when one thread call the function  next_memory_steal_->SetMaxSize(next_memory_steal_->max_size_ - kStealAmount);
it operate other thread's member "size_left_", this maybe not thread safety

I'm new to tcmalloc, if there's any mistake in what I say below, please point it out...
I think the problem do exist. I checked the code, and size_left_ is not protected, but it is critical region indeed.
size_left_ is accessed in Allocate and Deallocate and other functions. Those functions don't hold pageheap_lock_, and I can't find any functions in the call stack that would hold this lock either. It doesn't make sense to hold lock when call Allocate and Deallocate in threadcache, that's an important reason of high performance.
Besides, when thread cache has to hold a lock to avoid contention or sync, does this lock has to be pageheap_lock_?

Thanks very much for pointing this out. You're right.
size_left_ is recent optimization that I added on top of change I made to google-internal version. And I clearly missed the fact that we'd be updating it more race-fully. We also don't have much (if any) reviewers like you who are able to spot problems. Google-internal version is different enough (mostly due to per-cpu caches mode) that I don't bother malloc experts from Google.
There was always formally data race setting max_size_, but it was harmless and intentional. max_size_ was mutated under lock and only read racefully. size_left_ we're updating from both locations.
I can undo that optimization tomorrow or so (my current time zone is London). But if you have few minutes yourself and eager to contribute something, please consider fixing it yourself. We just need to revert size_left_ back to size_ I think.
Thanks again for spotting and letting everyone know.

It has been one of my long term plans to experiment with a per-cpu version of tcmalloc, so it is exciting to hear that it has already been done. Are there plans for that internal google work to be merged into the public facing gperftools?

I just got some time and try to fix this bug.
And I have made a PR#930
Please review and give comments, thank you

@alk I think  revert size_left_ back to size_ is just ok, thanks for your answer.
@Jianbo-Yang  I think your code is ok. compare to older version, your implementation seems miss the "bitwise-or trick" in function ThreadCache::Deallocate, you can compare with older version to see difference. I'm not sure if the trick can take obviously testable change for speed in running time in all cpu platform, but it exist long time, and at least in assembly instruction view, it save the instructions for fast path Deallocate commonly.

@jingel thank you for you comments.
You'are right. I miss the bitwise-or trick while reverting size_Left_ to size_. I focused on logic but ignored this optimization.
I have made another commit and the fix is in the PR#930 now. The build and test passed.
Thanks again

Merged and making release. Thanks a lot!


Doesn't create .npmrc files

Our current setup with docker-solidus relies on .npmrc files in the site's repo. For some reason, even though the .npmrc file exists in the template, it's not being cloned on slush solidus. This might be related to the issue here: https://github.com/gulpjs/gulp/issues/1523

Judging by the info here: https://docs.npmjs.com/files/npmrc#files
We might have to manually create an .npmrc file after initializing a new repo, and manually set permissions to 0600 before running npm install. I'm surprised we haven't run into any issues with this before now. cc @joanniclaborde @pushred

Have you tried setting an NPM_TOKEN env variable before running your script?

The issue was that npm i -g ./slush-solidus was skipping .npmrc, so by the time slush solidus was run, that file was already missing. Fixed by https://github.com/SparkartGroupInc/slush-solidus/commit/4674837a592563a8cd09a6c4d3c980961e4d0d95


Dynamically rename a class

Is it possible to dynamically rename a class?

It is:
http://php.net/manual/en/function.runkit-method-redefine.php

@JoyceBabu I can add this feature at least for user classes, but we need to figure out how it should affect the class' objects, the class' succesors, their objects, code lines which use the class and so on.

I have a similar use-case for testing purposes. I want to dynamically unload a class if it's already loaded into memory and then use class_alias() to alias another class to the same name. If I could rename the class with runkit, then, presumably, I wouldn't need to unload it.


Shouldn't there be a setup.py file?

 I'll look into using setup.py though - I've never seen it done that way.

Done! You can look at the latest release which contains a setup.py file and the newest version of the game.
Open another issue if there's problems with the setup.py. I got it working on my computer.

Cool!


Add Submission Form; fixes #2

This PR includes a 'new submission' modal form (click the + to the right of the search box).
Validation is on client + server. You'll need to specify two more environment variables for deployment: MAIL_TO and MAIL_FROM for the to and from fields (Please review methods.js).

Nice! Small remark, when having my (Chrome) browser non-fullscreen the modal gets truncated. While you can scroll down, this is non obvious on OSX since it hides scrollbars by default.

Good point. Do you think a subtle fadeout would do the job?

Not sure what the best UX way is to deal with that... GMail is implementing
their own scrollbars, which seems overkill as well.
On Fri, Nov 20, 2015 at 5:04 PM, Chris Hitchcott<EMAIL_ADDRESS>wrote:

Good point. Do you think a subtle fadeout would do the job?
—
Reply to this email directly or view it on GitHub
https://github.com/EtherCasts/state-of-the-dapps/pull/8#issuecomment-158443880
.

This is what it looks like in #13


Adjust two headings on "Everyday Types" page

These headings ("bigint" , "symbol") must be one step larger

Thanks!


TypeError when using timezone-aware as RELATIVE_BASE

With this snippet:
# dateparser==0.7.0  ( also reproduces on master branch )
import dateparser
import datetime
import pytz

settings = { "RELATIVE_BASE":  datetime.datetime.now().replace(tzinfo=pytz.timezone("Europe/Paris")) }

for input_ in ( "2009-06-01T10:00:00+09:00", "yesterday", "July 5th"):
    print (input_, dateparser.parse(input_), dateparser.parse(input_, settings=settings))

"2009-06-01T10:00:00+09:00" or  "yesterday" work as expected, but "July 5th" cause a TypeError: can't compare offset-naive and offset-aware datetimes, that is raised here

Added a comment in this related issue: https://github.com/scrapinghub/dateparser/issues/679 linking to a draft PR with a possible workaround.

this issue is fixed now with https://github.com/scrapinghub/dateparser/pull/881 right? I'm able to just do
>>> u = dateparser.parse('July 5th')
>>> u
datetime.datetime(2021, 7, 5, 0, 0)


What happen when user change their password?

If we join offline domain then when user expire and change their password how they connect to AD server?

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

ID: 216e2f1d-d2f1-4ca3-656f-65d39a3ecc02
Version Independent ID: 74610b82-13d0-ca7a-ca20-baeaaa85ea5c
Content: DirectAccess Offline Domain Join
Content Source: WindowsServerDocs/remote/remote-access/directaccess/DirectAccess-Offline-Domain-Join.md
Product: windows-server
Technology: remote
GitHub Login: @eross-msft
Microsoft Alias: lizross

#assign:IngridAtMicrosoft
gh issue comment 5312 -b #assign:IngridAtMicrosoft

We hugely appreciate your contribution, feedback, and support to our technical documentation.
We’ve phased out GitHub Issues on this repository as the feedback mechanism for content and have replaced it with a new feedback system. For more information see, Content User Feedback. As part of this rollout, we are migrating your issue where our team will use your comments to improve the documentation experience. Unfortunately, this does mean you won't be able to access this issue after the migration is complete.
All issues will be migrated by Thursday 29th August 2024.
Once again, thank you for your valuable feedback, we hope you’ll continue to contribute using our new feedback system.


feat: Move orch. update module to this repo and add inventory script.

Changelog: Title
Ticket: MEN-6997

The payload files have not changed since their last review, so it's only necessary to review the README and the file placement.


Fix docker images build to handle old linux distributions

Fix #269
Issue

GPG signature expired.
W: GPG error: http://deb.debian.org jessie-updates InRelease: The following signatures were invalid: KEYEXPIRED<PHONE_NUMBER>
W: GPG error: http://deb.debian.org jessie Release: The following signatures were invalid: KEYEXPIRED<PHONE_NUMBER>

Debian jessie is now an archived distribution.

@alquerci could you please rebase?

@thirsch rebased.
And build test passes without cache.
docker-compose build --no-cache

@thePanz it rebased on master branch and ready to merge.
Build test passes without cache.
docker-compose build --no-cache

Rebased on master branch


SPD Assumptions

Instead of bringing in aspect of A.CREDENTIAL_REVOCATION you should better think of necessity of obligatory objective attestation and require separation of authentication and authorisation to make clear that in spite of authorisation request requestor gets only suitable authorisation with afterwards authentication respective authorisation or attestation. This is missing here and unfortunately in practice more often, too.

Consider this with next round of updates as far as clarity goes, but likely not changing this particular assumption at this time (consider for next update).

Are you proposing deferring SFRs specific to credential revocation until the next round of updates?  I'm okay with that.

Yes, at this time I don't want to open up authentication vs authorization for review as I think that is a larger topic for later.


[ST-1975] Upgrade lita

@change/pack-starters @change/squad-starter-growth
The version of lita was updated, with this update we also changed the bundler version and the version that redis uses
The main change on redis was that the exists function now returns an integer, so we changed for exists?
This PR includes changes from erik/subteams_and_bots which was the one being used for production changebot, so we might as well take those changes to master

need to merge it into erik/subteams_and_bots branch


LCFS - FSE input form refinements

Description:
Refinements for the Fuel Supplier Entry (FSE) system to improve user experience and data accuracy:

Modify postal code validation to ignore spaces entered by the user. The error message should display as: “Please enter a valid postal code.”
Update the duplicate function so that it does not duplicate the Serial number or Latitude/Longitude. Ensure validation checks that Serial numbers are unique.
Adjust the default date of supply to avoid triggering an error, allowing users to proceed without selecting a date range. Ensure the default date range does not cause any errors.
Ensure the Latitude/Longitude fields maintain consistent alignment. Keep the display aligned to the right even when editing, or left-align only if it’s the only way to maintain consistent alignment.
Add predictive text functionality for the Manufacturer field using existing data.

Purpose and Benefit to User:
These changes will streamline data entry, reduce errors, and enhance the overall user experience in the FSE system. By improving validation, alignment, and adding predictive text, users will find it easier to enter accurate data quickly and efficiently.
Acceptance Criteria:

[ ]  Given I am a user entering a postal code, when I type a space, then the system ignores the space and checks for a valid postal code, showing the error message “Please enter a valid postal code” only if it’s invalid.
[ ]  Given I am a user using the duplicate function, when I duplicate an entry, then the Serial number and Lat/Long fields are not duplicated, and the system ensures that the Serial number remains unique.
[ ]  Given I am a user working with the default date of supply, when I proceed without interacting with the fields, then the system does not trigger an error, and the default date range is saved as expected without issues.
[ ]  Given I am a user editing the Latitude/Longitude fields, when I begin editing, then the alignment remains consistent (either right-aligned or left-aligned based on the chosen default).
[ ]  Given I am a user entering the Manufacturer field, when I start typing, then predictive text suggestions appear based on existing data, helping me quickly select the correct entry.

Development Checklist:

[x] Modify postal code validation to ignore spaces and update the error message.
[x]  Update the duplicate function to exclude Serial number and Lat/Long from duplication and enforce unique Serial numbers.
[ ]  Adjust the default date of supply to ensure no errors occur without selecting a date range, default full calendar year should be saved.
[x]  Ensure consistent alignment for Latitude/Longitude fields during display and editing.
[ ]  Implement predictive text functionality for the Manufacturer field, pulling suggestions from existing FSE data.

I still get an error if I add a new line and go directly to enter a serial number and then move to the next field for Manufacturer, the default date range gets highlighted in red with an error message: Dates of supply from field required. It is cleared by clicking in the cell but it would be nice if you didn't have to interact with the cell at all and the default date range would be accepted.

There doesn't appear to be predictive text on the Manufacturer field, if I type 'Cha' it should be giving predictive text for Chargepoint.


Fix dangling phi bug from loop-unroll

When unrolling the following loop:
%const0 = OpConstant ...
%const1 = OpConstant ...
...
%LoopHeader = OpLabel
%phi0 = OpPhi %float %const0 %PreHeader %phi1 %Latch
%phi1 = OpPhi %float %const1 %PreHeader %x    %Latch
...
%LoopBody = OpLabel
%x = OpFSub %float %phi1 %phi0
...

the loop-unroll pass sets the value of %phi0 as %phi1 for the second
copy of the loop body. For example, the second copy of
%x = OpFSub %float %phi1 %phi0 will be
%y = OpFSub %float %x %phi1.
Since all phi instructions for inductions will are removed after the
loop unrolling, %phi1 will be a dead dangling phi. This CL keeps the
phi value from the previous loop iteration to map instruction operands
to the phi value instead of using phi.
For example, the second copy of %x = OpFSub %float %phi1 %phi0 will be
%y = OpFSub %float %x %const1 because the value of %phi1 from the
first loop iteration is %const1.

This will fix https://github.com/microsoft/DirectXShaderCompiler/issues/3685

I removed my previous change (the code change in the initial commit) and added some code in LoopUnrollerUtilsImpl::CloseUnrolledLoop as we discussed offline.
Mainly, the code replaces the dangling phis with their initial values when closing the unrolled loop.
The partial unrolling concept is unclear to me. I am not sure this will generate the partial unrolling correctly.


Adding XML ChangeTagName recipe

as discussed @jkschneider

Hi @nmck257, the changes look good.
I'm curious if you discussed how to handle the potential of tag conflicts in Maven. I.E. a parent tag may be <plugins> and is allowed to contain multiple <plugin> tags, but in other cases like <groupId> a tag may only exist once.


[bug] Documentation/Example Code Mismatch for Derive Address Functions

Bug Report
Current behavior:
The example code for derived key functions suggests that the functions return keys, but they appear to return addresses instead, as they return the result of calling dogecoin_hdnode_get_p2pkh_address -- which returns a Base58-encoded address.
Expected behavior
Given the names of these functions, I think returning addresses is correct and intended behavior, so the example code should be updated. (A previous version of my bindings relied on returning keys, not addresses, but I'm happy to correct this.)
Should functions exist to return derived keys? I have no current use for them.

Thanks! Agreed, I'll take a look and update the example.
Account level public keys in BIP44 are useful for deriving addresses separate from the private key.


Presign URL support

Added support to share private files using presign URLs
All file URLs will now be routed via CDN so made changes to getURL to return appropriate URLs
Description

Related Issue

Motivation and Context

How Has This Been Tested?
unit test, manual tests
Screenshots (if appropriate):
Types of changes

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

Checklist:

[ x] I have signed the Adobe Open Source CLA.
[x ] My code follows the code style of this project.
[x ] My change requires a change to the documentation.
[ x] I have updated the documentation accordingly.
[ x] I have read the CONTRIBUTING document.
[ x] I have added tests to cover my changes.
[x ] All new and existing tests passed.

lgtm


HBASE-26249 Ameliorate compaction made by bul…

…k-loading files
HBASE-25213 introduced the idea of trigger compaction after bulk load.
This issue makes two changes of the idea,

use requestSystemCompaction instead, which is with NO_PRIORITY as same as CompactionChecker;
do not repeatedly add CompactionRunner for the same store, to avoid repeatedly compact one store in a short time. This is important for regionservers with hundreds of regions.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
0m 26s
Docker mode activated.

But on the API design, do we really need to expose isUnderCompaction method? What about just add a flag to indicate whether to still request compaction if the store is already under compaction? As the name of the interface is CompactionRequester...

This is a good idea, I will add a flag to replace the isUnderCompaction method, thanks @Apache9

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
0m 33s
Docker mode activated.


Fixing how the request is interpreted.

Fixing how the request is interpreted.
When google captcha api returns {'success': null, 'error-codes':null}, is when the captcha was verified successfully.
When the return value is {'success': false, 'error-codes': something} is when the verification fails.

I believe this should be resolved in the new v1.1 However, with the new contribution process in place, please feel free to submit again if you spot something. I'm watching for incoming PRs now.


Adding more structs to packet_types.py

Please, add structs, describing tile update, tile liquid update, tile damage update, etc.

This is a non-prority. With the fact that StarryPy is already slow enough to not be usable on a server with more that 20 concurrent players, adding in the additional packet-parsing overhead for packet types that are non-essential to its function strikes me as an unnecessary additional burden.
If someone else wants to take up this task, I am more than happy to review their code and consider it for inclusion, but I am hard pressed to see its net-benefit at this time.


enhancementenhance log msg of finding be policy failure

Proposed changes
Issue Number: close #16960
Problem summary
Enhance the errmsg of finding be policy failure
Checklist(Required)

[ ] Does it affect the original behavior
[ ] Has unit tests been added
[ ] Has document been added or modified
[ ] Does it need to update dependencies
[x] Is this PR support rollback (If NO, please explain WHY)

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run p0

run buildall

run p0

run buildall

run p0

run p0

run p0


Field values must be hashable

Fields of record or union tag must accept only hashable values.  For example, a Python code generated from the following IDL:
record test ({bigint} a);

currently can take values that aren't hashable e.g.:
>>> v = Test(a=frozenset([1, 2, 3]))
>>> hash(v)
-3553164928370265785
>>> v2 = Test(a={1, 2, 3})
>>> hash(v2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/.../test/__init__.py", line 56, in __hash__
    return hash((self.a,))
TypeError: unhashable type: 'set'

Expected behavior would be e.g.:
>>> v = Test(a=frozenset([1, 2, 3]))
>>> hash(v)
-3553164928370265785
>>> v2 = Test(a={1, 2, 3})
Traceback (most recent call last):
  ...
TypeError: a must be hashable

Fix on https://github.com/spoqa/nirum/pull/123


Help Board - Location Filter is not displaying only location selected  *** will add details tomorrow****

Help Board - Location Filter is not displaying only location selected

Thanks for logging this issue @dabartlett, but this is not an issue, there just aren't any posts besides yours in Vegas. The next close ones are Irvine and Anaheim, which are both in California.

Also, the way it works is that it will display all posts of the location you selected, if there are no posts, then it will display any other posts that are near to that location, and if not, then it will display posts that are worldwide.


fix the bug about the param num_update in optimizer.py v2

Hi,  @piiswrong  @mli
I don't know how to resolve that conflict, so I pull the request again  https://github.com/dmlc/mxnet/pull/5060

I'm going to close the PR since there is no activity for more than 2 months. But please feel free to re-open it and update with the master.


[1.18.2] Update Buildscript

They should still work though? Im a little bit worried about merging buildscript changes like this (especially on branches that are even older than this) as it may have unintended side effects?
I appreciate the effort, but without any obvious benefit I don't believe its worth the time. The time could be much better spent improving the mainline buildscript?
Please let me know if you think otherwise.

Im going to close this PR as I dont think its something we want to do. I would be more happy to backport specific changes if/when required.


Question: why are you not translating names ?

Thanks for this awesome tool.
I'm working on a glossary rework and wondering why you are not translating names ?
For example looking at this Evil Mage from lmop we see that his nalme, spells, item are not translated

I suspect this is because of tags likes {@spells mage hand} that are used to make the links and sadly there is no proper id in the docs ?
Maybe we could translate names and tags in the exact match is in the glossary ?
Nicolas

I imagine you closed this issue because the name could not be translated, hence why you did a PR to add a glossary ? I too, would like to know why the titles can't be translated 🤔

Hello @QuentinWidlocher
It's been a while but if I recall well , yes,  translating the name was super tricky.

it is used in the url
it is used in tags and tags can have a very very very wide variety of format.

The 5etoolstranslated project was also no longer working (look at the actions, it did not translated anything new in a while) so I worked on a complete rework - that I never released because of work...
I could deep dive again but basically the idea was

reworked the DeepL module that no longer worked
keep the glossary system
added a tag parser and tag were translated only from glossary (by tags i mean the @{keyword something| something2...} syntax
added logic to translated more key (but maybe too much)
also added imperial to metric conversion

The result were globally very nice but

in french it was sometime "overtranslated". For example the Aid spell in glossary was causing the verb aid  to be replace in every sentence (that's how deepL glossary works)
prone to break in case the (extra complicated) 5etool language and parsing broke.
Also The translated site was too big to be deployed with the language switch so there was 1 deployment per lang (and I got b*nned several times :)). The official 5etools site might have reached this limit too, I was in touch with Giddy about it.

It you are interested ping here I'll follow back on X.


Use specification stubs with RubyGems 2.1+ when constructing the local i...

...ndex
\c @indirect @tenderlove

(This could probably do with some profiling on a RubyGems install that has lots of gems to see if it's really an improvement)


fix: simplified tags

:tada: This PR is included in version 1.1.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


rofi-pass: 1.5.2 -> 1.5.3

Motivation for this change
Update rofi-pass to the last version
Things done

[X] Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
Built on platform(s)

[X] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[X] Tested execution of all binary files (usually in ./result/bin/)
[X] Fits CONTRIBUTING.md.

Nox
no configure script, doing nothing
installing
post-installation fixup
patching script interpreter paths in /nix/store/6z1d8gyqnb9xk14ffly0qwl14qwnrhx2-rofi-pass-1.5.3/bin
/nix/store/6z1d8gyqnb9xk14ffly0qwl14qwnrhx2-rofi-pass-1.5.3/bin/rofi-pass: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/4sp0sc2wxas7213x59smrwhliqmhc5yk-bash-4.4-p12/bin/bash"
/nix/store/6z1d8gyqnb9xk14ffly0qwl14qwnrhx2-rofi-pass-1.5.3
Result in /tmp/nox-review-4x65ate8
total 4
lrwxrwxrwx 1 nequi users 59 Nov  4 11:04 result -> /nix/store/6z1d8gyqnb9xk14ffly0qwl14qwnrhx2-rofi-pass-1.5.3


Validating data store should compare against externalQueryString

Currently the validating data store compares against the prepared query, which is wrong, because it should compare against the query defined by the user. The placeholder ? should be used in the asserting query only for the values that are directly binded after the preparation.

@ivansenic : I poked around the related code a bit, but unfortunately, I did not see how using Query.toString() vs. queryStringForPreparation (current behaviour) is going to help with testing APIs that use the QueryBuilder.
Currently, queries constructed via the QueryBuilderImpl get their pre-set parameters automatically extracted into ? placeholders. Essentially, at the DataStore level, those "known" parameters look the same as the parameters bound after query construction (i.e. by calling Query.bindValues()).
User-provided parameters are currently passed to QueryBuilderImpl methods at query construction time. Post-creation bind variables are not used, at least by Docs API code, which is the only module that validates constructed queries, AFAIK.
Did you mean this issue to drive the refactoring of the Docs API production and test code to actually use explicit bind markers?

So consider a situation where you build and bind a query in the following way:
dataStore.queryBuilder().
....
  .where(BuiltCondition.of("first", Predicate.EQ, "v1")
  .where("second", Predicate.EQ)
  .build()
  .bind("v2");

I would expect to write it like this in a test:
withQuery(
        TABLE,
        "SELECT .. WHERE first = 'v1' AND second = ?",
        "v2")

Right now it's possible only to do smth like:
withQuery(
        TABLE,
        "SELECT .. WHERE first = ? AND second = ?",
        "v2")

So matching first = 'v1' is impossible and thus missed.

@ivansenic : your example is great, but what I meant to say is that existing code that uses ValidatingDataStore does not use that kind of bind workflow. Currently all values are bound as .where("second", Predicate.EQ, "v2")... at least as far as I can tell.

So matching first = 'v1' is impossible and thus missed.

It should be possible, unless there's a bug. You match it as:
withQuery(TABLE,  "SELECT .. WHERE first = ? AND second = ?", "v1", "v2")

Since all values are actually extracted from the CQL string by the QueryBuilder, there is little difference in runtime. The CQL string that has first = 'v1' is not actually used in runtime, IIRC, it is provided only for debugging, AFAIK.

To clarify my points: I think we can support differentiating the v1 and v2 case in test code, but it's extra work and I'm not sure it is actually critical, given that the QueryBuilder automatically extracts bind variables and we do not build CQL strings "by hand". WDYT?

So withQuery(TABLE,  "SELECT .. WHERE first = ? AND second = ?", "v1", "v2") this is not working.. Only v2 is recognized as binded value.. Maybe it s a bug..
It's not critical, but in my AbstractSearchQueryBuilder and sub-classes I am using prebuilt BuiltConditions and I can not verify completely the CQL.

@ivansenic : Do you have a particular test code snippet that fails?


Url.RouteUrl can be simpler for common patterns.

This is a common pattern:
dinner = await _repository.CreateDinnerAsync(dinner);
var url = Url.RouteUrl("GetDinnerById", new { id = dinner.DinnerId }, Request.Scheme, Request.Host.ToUriComponent());

Context.Response.StatusCode = (int)HttpStatusCode.Created;
Context.Response.Headers["Location"] = url;
return new JsonResult(dinner);

I find
var url = Url.RouteUrl("GetDinnerById", new { id = dinner.DinnerId }, Request.Scheme, Request.Host.ToUriComponent())

mixing two things and a little tedious. The last part
Request.Scheme, Request.Host.ToUriComponent())

is kind of administrivia. Can we make it more like?
var Url.RouteUrlFull("GetDinnerById", new { id = dinner.DinnerId });

or
var Url.RouteUrlAbsolute("GetDinnerById", new { id = dinner.DinnerId });

What about if that method returned a builder kinda like UriBuilder that you could then use to get the full url?
var urlBuilder = Url.RouteUrlAsBuilder("GetDinnerById", new { id = dinner.DinnerId });
var full = urlBuilder.ToFull();

So like this?
 var myString = Url.RouteUrlAsBuilder("GetDinnerById", new { id = dinner.DinnerId }).ToFull();

Or
 var myString = Url.RouteUrlAsBuilder("GetDinnerById", new { id = dinner.DinnerId }).ToAbsolute();

Still seems like a lot of moving parts to do something I'm gonna do ALL DAY LONG.

var myString = Url.RouteUrlAsBuilder("GetDinnerById", new { id = dinner.DinnerId }).ToFull(); is much better

@rustd But why do I need to RouteUrlAsBuilder? What's the Builder? What's wrong with RouteUrlAsAbsolute and don't even bother with the ToFull. The ToString is implied.

This does feel a bit tedious...  I'd almost want the scheme and host to default to the values the current request came in on.  Most of the time, I think these values would stay the same from one request to the next

Add an extension method in your code to remove repetitive tediousness?

WebApi had this feature named link - We should bring it back:
From WebApi code
    public class UrlHelper
    {
        // lots of other methods here
        // ......
        //

        public virtual string Link(string routeName, object routeValues)
        {
            return Link(routeName, new HttpRouteValueDictionary(routeValues));
        }

        /// <summary>
        /// Creates an absolute URL using the specified route and route data.
        /// </summary>
        /// <param name="routeName">The name of the route to use for generating the URL.</param>
        /// <param name="routeValues">The route data to use for generating the URL.</param>
        /// <returns>The generated URL.</returns>
        [SuppressMessage("Microsoft.Usage", "CA2234:PassSystemUriObjectsInsteadOfStrings", Justification = "It is safe to pass string here")]
        public virtual string Link(string routeName, IDictionary<string, object> routeValues)
        {
            string link = Route(routeName, routeValues);
            if (!String.IsNullOrEmpty(link))
            {
                link = new Uri(Request.RequestUri, link).AbsoluteUri;
            }

            return link;
        }
   }

Fantastic.
On Fri, Feb 6, 2015 at 9:42 AM, Yishai Galatzer<EMAIL_ADDRESS>wrote:

WebApi had this feature named link - We should bring it back:
From WebApi code
public class UrlHelper
{
    // lots of other methods here
    // ......
    //

    public virtual string Link(string routeName, object routeValues)
    {
        return Link(routeName, new HttpRouteValueDictionary(routeValues));
    }

    /// <summary>
    /// Creates an absolute URL using the specified route and route data.
    /// </summary>
    /// <param name="routeName">The name of the route to use for generating the URL.</param>
    /// <param name="routeValues">The route data to use for generating the URL.</param>
    /// <returns>The generated URL.</returns>
    [SuppressMessage("Microsoft.Usage", "CA2234:PassSystemUriObjectsInsteadOfStrings", Justification = "It is safe to pass string here")]
    public virtual string Link(string routeName, IDictionary<string, object> routeValues)
    {
        string link = Route(routeName, routeValues);
        if (!String.IsNullOrEmpty(link))
        {
            link = new Uri(Request.RequestUri, link).AbsoluteUri;
        }

        return link;
    }

}
—
Reply to this email directly or view it on GitHub
https://github.com/aspnet/Mvc/issues/1966#issuecomment-73280244.

--
Scott Hanselman
Donate to fight diabetes: http://hnsl.mn/fightdiabetes

3d30fd653ec2e9d44296a4c62a274e578da145fe

I like where this is going but having similar methods for 'Action' (controller and action name) and 'Content' (images and static content) would be really useful too. Places where I currently use AbsoluteContent:

Atom/RSS feeds require absolute URL's to images (There is a way to specify a base URL but it's buggy in FireFox). See my ASP.NET MVC 6 Boilerplate example.
Creating a dynamic OpenSearch.xml file which contains absolute URL links to images. See my ASP.NET MVC 6 Boilerplate example
Open Graph URL's are also required to be absolute.

I currently have the following extension methods to do this in the ASP.NET MVC 6 Boilerplate Framework NuGet package:
namespace Boilerplate.Web.Mvc
{
    using System;
    using Microsoft.AspNet.Http;
    using Microsoft.AspNet.Mvc;

    /// <summary>
    /// <see cref="UrlHelper"/> extension methods.
    /// </summary>
    public static class UrlHelperExtensions
    {
        /// <summary>
        /// Generates a fully qualified URL to an action method by using the specified action name, controller name and
        /// route values.
        /// </summary>
        /// <param name="url">The URL helper.</param>
        /// <param name="actionName">The name of the action method.</param>
        /// <param name="controllerName">The name of the controller.</param>
        /// <param name="routeValues">The route values.</param>
        /// <returns>The absolute URL.</returns>
        public static string AbsoluteAction(
            this IUrlHelper url,
            string actionName,
            string controllerName,
            object routeValues = null)
        {
            string scheme = Context.HttpContext.Request.Scheme;
            return url.Action(actionName, controllerName, routeValues, scheme);
        }

        /// <summary>
        /// Generates a fully qualified URL to the specified content by using the specified content path. Converts a
        /// virtual (relative) path to an application absolute path.
        /// </summary>
        /// <param name="url">The URL helper.</param>
        /// <param name="contentPath">The content path.</param>
        /// <returns>The absolute URL.</returns>
        public static string AbsoluteContent(
            this IUrlHelper url,
            string contentPath)
        {
            HttpRequest request = Context.HttpContext.Request;
            return new Uri(new Uri(request.Scheme + "://" + request.Host.Value), url.Content(contentPath)).ToString();
        }

        /// <summary>
        /// Generates a fully qualified URL to the specified route by using the route name and route values.
        /// </summary>
        /// <param name="url">The URL helper.</param>
        /// <param name="routeName">Name of the route.</param>
        /// <param name="routeValues">The route values.</param>
        /// <returns>The absolute URL.</returns>
        public static string AbsoluteRouteUrl(
            this IUrlHelper url,
            string routeName,
            object routeValues = null)
        {
            string scheme = Context.HttpContext.Request.Scheme;
            return url.RouteUrl(routeName, routeValues, scheme);
        }
    }
}


dubbo with sentinel  && @dubbotransported

Which Component
Dubbo
Describe the bug

the 0.9.0 version uses @dubbotransported () to find that it does not appear to have been invoked through Dubbo because the service provider's RpcContext.getContext (). getUrl () is always null

if used Sentinel and @FeignClient at the same time, fallback will be ineffective, remove Dubbo will return to normal, but hystrix no problem

To Reproduce
Steps to reproduce the behavior:
to Scenario 1:
@FeignClient(value = "demo-service",fallback = UserServiceMock.class)
@DubboTransported()
public interface TestService{
    @PostMapping("/api/user/hello")
    String login(@RequestBody LoginUserDto userDto);
}

@Service
@RestController
public class DubboTestService implements TestService {

   @Override
   public String login(LoginUserDto userDto) {
       return RpcContext.getContext().getUrl() + "[echo]:" + userDto.toString();
   }
}

to Scenario 2:
implementation ("org.springframework.cloud:spring-cloud-alibaba-dubbo:sentinel:0.9.0.RELEASE")
implementation ("org.springframework.cloud:spring-cloud-starter-alibaba-sentinel:0.9.0.RELEASE")

feign:
  sentinel:
    enabled: true

Maybe it is not compatibility with Sentinel.
I will check it soon.


OpenBSD support

I'd like to see OpenBSD support.
I tried compiling on OpenBSD-current, but it would not compile correctly. I'm open to trying to fix this myself, but I'll need guidance on the rust front.
Also this might be a simple fix, so I'm asking you first.
   Compiling tracing v0.1.40=======>     ] 27/32: ad_event, tracing-attributes
error[E0277]: the trait bound `DefaultSystem: system::System` is not satisfied
  --> src/editor/mod.rs:94:6
   |
94 | impl Editor<DefaultSystem> {
   |      ^^^^^^^^^^^^^^^^^^^^^ the trait `system::System` is not implemented for `DefaultSystem`
   |
help: this trait has no implementations, consider adding one
  --> src/system.rs:16:1
   |
16 | pub trait System: fmt::Debug {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `Editor`
  --> src/editor/mod.rs:58:8
   |
56 | pub struct Editor<S>
   |            ------ required by a bound in this struct
57 | where
58 |     S: System,
   |        ^^^^^^ required by this bound in `Editor`

error[E0277]: the trait bound `DefaultSystem: system::System` is not satisfied
   --> src/editor/mod.rs:101:10
    |
101 |     ) -> Self {
    |          ^^^^ the trait `system::System` is not implemented for `DefaultSystem`
    |
help: this trait has no implementations, consider adding one
   --> src/system.rs:16:1
    |
16  | pub trait System: fmt::Debug {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `Editor`
   --> src/editor/mod.rs:58:8
    |
56  | pub struct Editor<S>
    |            ------ required by a bound in this struct
57  | where
58  |     S: System,
    |        ^^^^^^ required by this bound in `Editor`

error[E0599]: the function or associated item `new_with_system` exists for struct `Editor<DefaultSystem>`, but its trait bounds were not satisfied
   --> src/editor/mod.rs:102:15
    |
56  | pub struct Editor<S>
    | -------------------- function or associated item `new_with_system` not found for this struct
...
102 |         Self::new_with_system(cfg, plumbing_rules, mode, log_buffer, De...
    |               ^^^^^^^^^^^^^^^ function or associated item cannot be called on `Editor<DefaultSystem>` due to unsatisfied trait bounds
    |
   ::: src/system.rs:67:1
    |
67  | pub struct DefaultSystem;
    | ------------------------ doesn't satisfy `DefaultSystem: system::System`
    |
note: if you're trying to build a new `Editor<DefaultSystem>`, consider using `Editor::<DefaultSystem>::new` which returns `Editor<DefaultSystem>`
   --> src/editor/mod.rs:96:5
    |
96  | /     pub fn new(
97  | |         cfg: Config,
98  | |         plumbing_rules: PlumbingRules,
99  | |         mode: EditorMode,
100 | |         log_buffer: LogBuffer,
101 | |     ) -> Self {
    | |_____________^
note: trait bound `DefaultSystem: system::System` was not satisfied
   --> src/editor/mod.rs:108:8
    |
106 | impl<S> Editor<S>
    |         ---------
107 | where
108 |     S: System,
    |        ^^^^^^ unsatisfied trait bound introduced here
note: the trait `system::System` must be implemented
   --> src/system.rs:16:1
    |
16  | pub trait System: fmt::Debug {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `DefaultSystem: system::System` is not satisfied
   --> src/editor/mod.rs:102:9
    |
102 |         Self::new_with_system(cfg, plumbing_rules, mode, log_buffer, De...
    |         ^^^^ the trait `system::System` is not implemented for `DefaultSystem`
    |
help: this trait has no implementations, consider adding one
   --> src/system.rs:16:1
    |
16  | pub trait System: fmt::Debug {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `Editor`
   --> src/editor/mod.rs:58:8
    |
56  | pub struct Editor<S>
    |            ------ required by a bound in this struct
57  | where
58  |     S: System,
    |        ^^^^^^ required by this bound in `Editor`

Some errors have detailed explanations: E0277, E0599.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `ad-editor` (lib) due to 4 previous errors

By copying the linux block in src/system.rc and renaming it openbsd, I can compile and use successfully.
The only thing that doesnt seem to be working is the double click selection expansion and I just tested that it worked on my void linux laptop.

xclip -selection clipboard -o works on OpenBSD so I dont think it's related to that.

I think this is specific to the OpenBSD xterm. I downloaded a different terminal (alacritty) and the double click expansion works fine there.

Well I'll be playing with this on OpenBSD for the time being so if I see anything that's within my capacity to handle I'll send pull requests. I fully understand the status of the project.

That's kind of you to offer but my point is more that as and when things break on platforms other than Linux during this stage of the project I won't be guaranteeing support for those platforms. Like I said, I have no way of verifying BSD specific changes myself so I won't be able to review or merge PRs of that nature.
Once the project is more mature and there is less churn in the internals of the code base I should be able to sort out which platforms are supported (and how I will support them). Ideally there shouldn't be any OS specific logic in ad that would cause problems like this but that's not something I can say one way or the other at the moment.


Add support for out-of-band VLAN IDs on afpacket sources.

The Linux kernel supports VLAN offloading, which will strip off VLAN headers before passing the packet data up to the capture layer. This results in the odd situation where the data presented to the capture layer is not what was actually visible on the wire.
For those who needed visibility into the VLAN layer, the afpacket.OptAddVLANHeader option was provided. When set, a synthetic VLAN header is created and copied over. While this works and provides a more accurate view of the data on the wire, it is slow (as noted in the documentation of the option, sometimes by an order of magnitude).
This commit augments the gopacket.CaptureInfo structure by adding a VLAN field that stores the VID (VLAN ID) of the packet if it was provided out-of-band by the capture mechanism. If it was not provided, this field defaults to -1 (it should not default to zero, as it is possible to have a zero VID, which is used for priority tagging).
This provides a fast mechanism to access VLAN information for those who need it while retaining the afpacket.OptAddVLANHeader mechanism for those who need it.

I signed it!

Perhaps it would be better to have a sice of interface{}s in the returned CaptureInfo that are "ancillary data" or something? It could be populated with, for example, afpacket.AuxDataVLAN or something that could be discovered at runtime.That would keep it generic but allow extra information should the capture layer be able to provide it.
This would be analogous to the ancillary data on UNIX domain sockets.

Hey, sorry for the slow response, just coming back from a vacation.
I like the idea of ancillary data.  So I'm guessing it would be something like this:
func (c *CaptureInfo) AddAncillary(a interface{}) { ... }
func (c CaptureInfo) Ancillary() []interface{} { ... }

And it would be used like this:
for _, a := range ci.Ancillary() {
  switch v := a.(type) {
    case afpacket.AncillaryVLAN:
      log.Printf("vlan ID %d", int(v))
  }
}

@gconnell I've switched to a more generic "ancillary data" mechanism now in my branch. Currently it's simply a slice of interface{} that can be appended to by the packet provider; I can switch to using accessor methods if you think that's better. Please let me know.


is it possible to drag item from one grid to another grid ?

Using dragging from outside grid example, could we use grid item to be draggable to another grid ?

I used this proof of concept from @ni-ra from this thread to accomplish this.
It's a bit hacky but the performance for me was quite a bit better than using the isDroppable functionality added in 0.17.1.
The tl;dr of what you'd need to do using his method is this:

Remove item from original grid
trigger "mouseup" event on original grid
Add item to new grid (at the bottom probably? I think this can be anywhere)
trigger "mousedown" event on the newly added item in the new grid
override the getBoundingClientRect method once on the newly added item to move it to be at the location of your mouse pointer

@bwenzinger Thanks


PVC Density/Stress

Type of change

[ ] Refactor
[X] New feature
[ ] Bug fix
[ ] Optimization
[ ] Documentation Update

Description
Add an experiment that creates a lot of Pods with corresponding PVCs that supports the default dynamic storage provisioning in a computing environment.
gist of kube-burner standard output log
This software experiment would be aided by something like a PVC or PV latency calculation, similar to the pod latency calculation.
Related Tickets & Documents

Related Issue #427
Closes #427

Checklist before requesting a review

[x] I have performed a self-review of my code.
[x] If it is a core feature, I have added thorough tests.

@rsevilla87 Any concerns around this PR?


Add from field to notification

I believe from is a reserved word in python so the parameter can't be named from. There is also a 64 character limit for the from property in HipChat's API and passing a string larger would cause this to fail. Maybe take the first 64 characters if the input is larger than 64 characters.


No labels with GPU-Card Name in dcgm-exporter

Hi!.
There is one of the method that we can take GPU Card name instead of id-card in dcgm-exporter metrics?
That's difficult to identify video card by gpu-id, especially on GPU Computing servers with several GPU-cards.
By example:
DCGM_FI_DEV_SM_CLOCK{gpu="1", UUID="GPU-b073f628-caec-ea37-d0c5-9a85536a2454"} 135
Better way:
DCGM_FI_DEV_SM_CLOCK{gpu="Teslav100-1", UUID="GPU-b073f628-caec-ea37-d0c5-9a85536a2454"} 135

Hi @vizdrag !
I had the requirement as this issue, so modified it.
result:
DCGM_FI_DEV_SM_CLOCK{gpu="1",UUID="GPU-b073f628-caec-ea37-d0c5-9a85536a2454",device="Teslav100-1",Hostname="8e21d3ebf589"} 135


akonadi_folderarchive_agent is not found in kdepim

/share/akonadi/agents/folderarchiveagent.desktop exists and points to akonadi_folderarchive_agent
Because akonadi_folderarchive_agent cannot be found, kmail will block the ui with a message that says that akonadi is not optional. The details dialog says 'no resource agents found' and the $HOME/.local/share/akonadi/akonadi_control.error says 'Executable "akonadi_folderarchive_agent" for agent "akonadi_folderarchive_agent" could not be found!'.
This is an issue for current master (kde 4.14.1).

(triage) @vandenoever Can you still reproduce that?

No response, so close @zimbatm.


Parameter unless failed on Exec Live-update

Using puppet 3.8.1, the error occurs because the exec resource does not fully-qualify the path the sysctl.

Sorry for the delay in noticing this issue. Are you referring to https://github.com/halyard/puppet-sysctl/blob/master/manifests/entry.pp#L21-L22 ?

If I'm understanding correctly, this PR should address this: https://github.com/halyard/puppet-sysctl/pull/2

This should be fixed in 2.0.2


Beacon sensor problem

So, I'm not getting the split xyz option for the beacon sensor, and having it is crucial for one of my builds.

If you check the "output world position" checkbox, it will already output the coordinates as three numbers. Why you would need this is beyond me, though, since working with coordinates in vector form is much easier than using them as three numbers.


Convert to Hugo

Description
Does anyone want to try converting this template to hugo?

Yes, I do. But I am still a newbie web developer. Currently my blog using Jekyll + Chirpy theme has more than one thousand articles. It takes more than 100 sec. to build my site.

When using Jekyll, I use the Chirpy theme. Then I switched to Hugo and developed my own theme, which borrows heavily from Chirpy's design.
Visit here to see how effective it is: https://blog.hentioe.dev/
My blog theme is currently not open source, and maintaining an open source Hugo theme is exhausting. You can star or watch the Hentioe/hugo-tranquil-theme repository to let me know that someone is looking at it and I'll have ideas for open source.


Richer content in the modal dialogs

The content for the modal dialogs is controlled by yaml files in data/projects.  However, in the description field, I can't seem to figure out how to add anything other than text.  Specifically, I want to be able to add audio/video content to the projects using the html5 audio/video tags.  The description field in the yaml files doesn't seem to accept anything other than one line of text.  How can I add audio/video to projects?

You can add some basic markup if you wrap the description with a quote, as long as there's no quotes in your content it will allow basic html. This won't help with your question, but it does allow for paragraphs, formatting and headers etc.


Update const.py for battery charge and discharge values

Adding: "battery charge power" and "battery discharge power" to simplify integration into homeassistant 2021.9.
Taken from https://github.com/mchwalisz/pysenec/blob/master/pysenec/init.py ;-)

While waiting for that change, one can create own values from senec_battery_state_power
template:
  - sensor:
    - name: solar_battery_discharge
      unit_of_measurement: W
      # invert discharge, and return values if > 0
      state: >
        {% set x = states('sensor.senec_battery_state_power') | float * -1 %}
        {{ max( x, 0.0 ) }}
sensor:
  - platform: filter
    name: "solar_battery_charge"
    entity_id: sensor.senec_battery_state_power
    filters:
      - filter: range
        lower_bound: 0

This introduces solar_battery_discharge and solar_battery_charge which can again used with the Riemann sum integral plugin to create working measurements of the battery.

@mchwalisz I just upgraded to 1.0.1 but the PR did not make it into it. I double checked with the zip download.

It made it to master, no release yet.

Obviously :-/ sorry, I was under the impression that a new release would also integrate the PRs waiting.. But what's the reasoning? I would imagine people are waiting for the possibility to integrate easily and since it's just 2 LOC why not release?


Testing of GridPro component

Hi Martin,
We are evaluating GridPro and one of the things we're looking at is testing.  GridPro allows cell editing through a double-click.  I see in Grid.kt code for clicking a cell Renderer (i.e. _clickRenderer).  I started to model an approach after what you have there.
By default the GridPro column renderer is ColumnPathRenderer (which doesn't supply a Component).  I was thinking that once I get the component I could fire two click events.  I'd prefer a solution where I don't have to change the default renderer of GridPro.
Will I need to use a ComponentRenderer and call createComponent and fire click events for this component in order to enter into edit mode for a cell?  Suggestions appreciated.
Thanks

Hi, hmm, it could be that GridPro listens for some double-click event which even bypasses the renderers altogether. Please let me take a look at the GridPro sources - perhaps there is an easier way to show the editor from the server-side.
If I understand correctly, the task is just to open an editor for a particular row, is that correct? Then we should be able to target individual editor components and click the "Save" button from server-side.

Yes.  The desired behavior would be to double-click to edit.  Then change a value and close the editor (loss of focus) and commit the value to the component's model.  Thanks for checking!

I was able to get something working here
        BeanItem item = _get(gridWrapper.grid(), 0)
        item.setStringField("some changed value")

        JreJsonObject jsonObject = new JreJsonObject();
        jsonObject.set("key", new JreJsonString("1"))
        ComponentUtil.fireEvent(grid, new GridPro.CellEditStartedEvent<BeanItem>(grid, false, jsonObject, "col2"))
        gridWrapper.getListedItems().collect { it.stringField } == ["some changed value"]
``` with some hardcoded key/path values.

So this approach works, but not ideal.
        GridPro grid = (GridPro) gridWrapper.root
        JreJsonObject jsonObject = new JreJsonObject();
        jsonObject.set("key", new JreJsonString("1"))
        jsonObject.set("col2", new JreJsonString("some changed value"))

//        ComponentUtil.fireEvent(grid, new GridPro.CellEditStartedEvent<BeanItem>(grid, false, jsonObject, "col2"))
        ComponentUtil.fireEvent(grid, new GridPro.ItemPropertyChangedEvent<BeanItem>(grid, false, jsonObject, "col2"))
        gridWrapper.getListedItems().collect { it.stringField } == ["some changed value"]

Thank you. Initial work has been done in 74f06dbdaa7c08198140f73aa4814a2a78215270 but we need to also support invoking of the ItemUpdaters for individual columns, to also test those. Right now I'm thinking about simply adding extension property to Grid.Column such as column._gridPro._checkbox(true) or something along those lines, but please feel free to suggest alternative API.

The support for mocking inline Grid Pro editor has been added; please see the readme on how to use it: https://github.com/mvysny/karibu-testing/tree/master/karibu-testing-v10
Just let me know if there is something more needed for a proper GridPro testing.


Allow use of local logo file from host

Portainer’s ability to include your own custom logo is limited to files hosted online. I have started using Portainer on offline IoT devices and would like to be able to add a custom image file.
I have an NGINX container running on the same docker network but it doesn’t seem to resolve http://nginx/path/to/my/file.png
The restrictions in the URL field won’t allow <IP_ADDRESS>.
I have tried the NGINX container IP address, and docker network address.
Using thehostname.local seems to work, but the hostnames on the devices are variable.
I made an assumption that Portainer pulls the logo on each load rather than stores it locally after the initial add? Otherwise I could add the logo online and then be able to use it offline without issue, although is a little hacky.
If there are any other ideas on how to work around this it would be much appreciated.
Alternatively, the feature request would be to allow for one of the above approaches to work, or for the ability to inject a logo file on build.

If portainer supports file protocol even better.  file:///path/to/image/file.png

Hey, thanks for bringing this up. Unfortunately, we don't currently have any plans to enhance custom logo capabilities going forward.


Test the new Ploutos branch.

Testing for https://github.com/NLnetLabs/ploutos/pull/117

This passes, and so does https://github.com/NLnetLabs/routinator/actions/runs/11554862854.


Explore emscripten options to compile oniguruma to shave size

ATT @alexdima but also @fabiospampinato @jaynetics
#165506 was not possible before because Textmate grammars aggresively lean on \G (think conditional/loop block declarations).
Now that there is a non-greedy validation mode, it's now feasible to build both gems as WASM and try to lean on js_regex as much as possible.
The original proposal likely meant we would have needed to shell out to both. That comes with perf cost.
With jaynetics/js_regex#18, we can quite quickly determine if the regex is JS-ready so we won't be hurting perfs.
Also keenly aware we have a resource drought for performance.. need to think carefully about bringing in new code paths when it comes to TM tokenization & grammar parsing.

Throwing something out there - I agree with "we will therefore continue shipping the oniguruma regex library". However there is a significant cost to instantiating onig.wasm and even calls to its bindings.
Are we blocked from using the V8 memory hack in "vscode-oniguruma" package?

However there is a significant cost to instantiating onig.wasm and even calls to its bindings.

@M00TSDNS How are you measuring this cost? Could you please share more about what you have observed? What is the v8 memory hack?

I wrote textmate-languageservice library which adds 300-400ms to any library activation time due to onig.wasm and non-streaming compiler cost. I reckon non-streaming compiler is the bigger cost, but [citation-needed]
RE: V8 hooks, seems they forked and rewrote onig sources to export V8 internals and make things 2-3 times faster. But this means locking in any tech debt and perf regressions

I wrote textmate-languageservice library which adds 300-400ms to any library activation time due to onig.wasm and non-streaming compiler cost. I reckon non-streaming compiler is the bigger cost, but [citation-needed]
RE: V8 hooks, seems that node-oniguruma forked and rewrote onig sources to rely on V8 internals and make things 2-3 times faster. But this means locking in any tech debt and perf regressions

@M00TSDNS This project used to use node-oniguruma (which is a native node module providing JS bindings for oniguruma). We replaced it with vscode-oniguruma in 2020 which resulted in good speed improvements. See https://github.com/microsoft/vscode/pull/95958
I do not observe 300-400ms loading times for vscode-oniguruma in vscode. I observe times <1ms:

Is that using fetch aka proper way or uint8array + non-streaming?

This issue speculates that oniguruma is slow and that translating regexes to native JS regexes will slow that slowness. I don't believe that. Over the years, virtually all of the performance problems are caused by poorly written regular expressions, which are slow the evaluate regardless of the regex engine. Here is an example of what I mean -- https://github.com/jeff-hykin/better-cpp-syntax/issues/579 . Virtually all problems I ran into had a regex leading to catastrophic backtracking as their root cause.

That's interesting. So this cuts the issue down to "drop a fairly large dependency" ...
There are many bigger & better feature requests in VS Code than this.
If we are at perf saturation with our regexes, is dropping 1 dependency valuable enough to make an exploration and log time on?

vscode-oniguruma takes up 480KB of disk space in VS Code installations (around 150KB when zipped in the installer). It is not dead-weight that we should remove, it is a component playing a critical role in supporting TM grammars and, thus, making source code tokenized and themed.
Perhaps you can find some ways to reduce the size of vscode-oniguruma, maybe by tweaking build options in https://github.com/microsoft/vscode-oniguruma/ . I know the underlying oniguruma library has support for a lot of encodings, maybe it is possible to build it in such a way that only UTF16/UTF8 support is available, thus shaving some size.

It'd be interesting to run some regex benchmark with native regexes and with vscode-oniguruma and collect some actual measurements, I suspect oniguruma will be significantly slower.
Like JS regexes are usually jitted, and a wasm module can't jit itself as far as I know (without shenanigans that I guess vscode-oniguruma is probably not doing), it should be a different level of performance. Looking at the benchmark table for QuickJS one can see that V8 regexes execute almost 4x faster than in V8 --jitless, like same engine, but no JIT. Unless regexes in V8 --jitless are grossly unoptimized, which is possible I guess, who is vscode-oniguruma supposed to perform ~4x better than that? If I had to guess I would bet that vscode-onigiruma is closer to the performance of V8 --jitless than of proper V8, and it possibly even underperforms that.

@fabiospampinato I agree. But there are some subtleties and some different things that we're pursuing which might have a lot more impact in VS Code.

when evaluating a TM grammar, most of the times you end up with a string (the current line), an offset, and a TM state with a list of regexes. To continue, you need to evaluate all regexes and find the one which matches closest to the given offset. That's a loop over all the regexes, searching each of them, and finding the closest which matches to the offset. This is slow. Because oftentimes you end up searching for regular expressions which do match, but which never end up being the ones which are closest. Take as example a very simple language that supports strings (without escapes) and line comments (e.g. "[^"]+" and \/\/.*). Regardless of the order those regexes are written in, there are inputs which cause unnecessary computation e.g. "hello (1MM chars...) //world" or // "hello (1MM chars...) world". To evaluate which regex wins, you run both of them over the 1MM char string. K. Kosako was kind enough and added special API for us (see https://github.com/microsoft/vscode-oniguruma/blob/716aeaa229e4ae2e3b0057377b55743e9a3e995b/src/onig.cc#L241-L247) where we can pass in a set of regexes and they are all searched at the same time, returning the first one which matches. Evaluating all these regexes in a set as supported by oniguruma might be faster than evaluating all regexes natively in a loop.

we are working on moving most of the tokenization off the UI thread. This is almost complete and is now behind a setting while we iron out any remaining bugs. See https://github.com/microsoft/vscode/pull/174443

we have explored and will continue looking into TreeSitter. See https://github.com/microsoft/vscode/pull/161479

@alexdima

🤯 That's awesome! And it highlights the strength of the current approach, the regex engine is simply implemented in userland, it could have any custom feature. Maybe some low-level feature that could be used to implement something like that with JS regexes too could be proposed, it could be interesting, but I don't really see this shipping anytime soon, if ever. It's unclear to me how big of a difference this feature makes in practice though 🤔
That's cool, but the amount of work needed to match a grammar doesn't decrease.
That's interesting also, and it might deliver a big improvement for most people, since I guess most people use the most common languages, for which there are probably grammars for TreeSitter.

What about only including the Ruby flavor of regex in that compilation process?

js regex doesn't have the same feature set as oniguruma
there is no replacement for capture group recursion (subroutines) \\g<1>. (which is not the same as (?R) in other regex flavors)
does not support atomic groups (?>...) which disables backtracking of the group
no extended mode. which ignores all whitespace and allows comments defined with #
no If-Then-Else conditional groups (?(condition...)true...|false...)
no absent groups (?~|...|...)
no nested character classes [a-z[^f-j]]

there are more differences as listed here, although some of the differences in that list are specific to older JS versions compared with Onigmo, not Oniguruma.
i'm not sure how relevant these differences are, as hardly anyone uses these advanced regexp features.

Hey @alexdima, this issue might need further attention.
@zm-cttae-archive, you can help us out by closing this issue if the problem no longer exists, or adding more information.

@alexdima what if we filter regexes by which ones produce a match on that line? Also filter by full document match? Could be a strong optimisation

Hey @alexdima, this issue might need further attention.
@zm-cttae-archive, you can help us out by closing this issue if the problem no longer exists, or adding more information.

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


Why normalize_scale is set to 4.0?

I found in the https://github.com/google/tirg/blob/c58daa066d8af1a5b3de1a0ef6d112519ddda611/img_text_composition_models.py#L42, the normalize_scale is set to 4 at the beginning. It is interesting because the performance will drop a lot if I set the scale to other number like 1.0.
I wonder why it is important and why 4 is an ideal number.
Thanks!

great question, this number affect the scale of the logits (input to the logistic function https://en.wikipedia.org/wiki/Logistic_function), if you look at the logistic function, the logits must be big enough to cover the whole 0-1 output range (but if it's too big it could land into the flat gradient zone)
I just found experimentally 4.0 works, you can make it a learnable weight, though optimizing that could be more difficult. Finally I've seen similar implementation where people did make it work with 1.0 I'm not sure how

Thank you for your reply. I wanted to replace it with torch.nn.functional.normalize at first, but the result shows it is not as simple as I thought.


Items in contenteditable div are sometimes set as next-to-last

Problem:
Items in contenteditable div are sometimes set as next-to-last, even if the cursor was set at the end.
Reproduce:

Go to https://ned.im/wdt-emoji-bundle/#apple
Select the contenteditable div
Set the cursor to the right end of the line
Select multiple Emojis
Notice that your last selected emoji is the next-to-last item in your div

Note:
Seems not to happen for input fields.
Setup:
Google-Chrome Version 60.0.3112.113 (Official Build) Ubuntu 16 (64-Bit)

Oh yeah, we should update the caret position after emoji select 👍

@needim fixed in https://github.com/needim/wdt-emoji-bundle/pull/45 with better approach