Fix branch name

During merge/rebase, I may have accidentally changed the
branch name used when creating the MR. On Gitlab, we need
update/dependency-1.2.0 where as on GitHub we need:
owner:update/dependency-1.2.0.

Removed the whole VCSSpecifics thing


[release-v1.15] [manual:component:github.com/gardener/gardener-resource-manager:v0.21.0->v0.21.1]

*Release Notes:
A problem with long running ManagedResource reconciliations caused by unavailable `APIServices` was fixed.

The `.spec.loadBalancerIP` value for `Service`s is now preserved.

The `CheckDaemonSet` function does now lead to more accurate results.

Similar to #3588

/needs rebase
/lgtm


fix: free() major bug in atchops/ and atclient/

closes #46
- What I did

fixed free() major bug in atchops/ package
fixed free() major bug in atclient/ package
Also added some frees() to some functions that were not freeing variables originally

- How I did it

moved all initialization to the top so that all variables exist in case of an error where they are then freed.

- How to verify it
running REPL:

- Description for the changelog

@JeremyTubongbanua @realvarx FWIW, I'm not sure the goto exit is better for managing memory at this point:
int main(int argc, char **argv) {
  sshnpd_params *params = malloc(sizeof(sshnpd_params));

  // Load default values before parsing from argv
  apply_default_values_to_params(params);
  if (parse_params(params, argc, (const char **)argv) != 0) {
    free(params);
    return 1;
  }

  char* some_other_pointer = malloc(10);
  if(some_other_operation_that_can_error(some_other_pointer) != 0) {
    free(some_other_pointer);
    free(params);
    return 1;
  }

  // ...

  free(some_other_pointer);
  free(params);
  return 0;
}

While very verbose, this pattern makes it clean what memory should be cleaned up and when.

@JeremyTubongbanua @realvarx FWIW, I'm not sure the "goto exit" pattern is better for managing memory at this point:
int main(int argc, char **argv) {
  sshnpd_params *params = malloc(sizeof(sshnpd_params));

  // Load default values before parsing from argv
  apply_default_values_to_params(params);
  if (parse_params(params, argc, (const char **)argv) != 0) {
    free(params);
    return 1;
  }

  char* some_other_pointer = malloc(10);
  if(some_other_operation_that_can_error(some_other_pointer) != 0) {
    free(some_other_pointer);
    free(params);
    return 1;
  }

  // ...

  free(some_other_pointer);
  free(params);
  return 0;
}

While very verbose, this pattern makes it clean what memory should be cleaned up and when.

Yeah, that's a good point. Your way is more efficient, but might be harder to refactor in the long run.
This PR fixes the bug for now though

Yeah, that's a good point. Your way is more efficient, but might be harder to refactor in the long run.
This PR fixes the major breaking bug for now though. We shouldn't run into malloc errors if an error occurs

I think it really depends on how many memory allocations were made, and what the function is doing.

I would also argue that this makes the code look very nice. For example:
int atchops_rsa_encrypt(atchops_rsakey_publickey publickey, const unsigned char *plaintext, const unsigned long plaintextlen, unsigned char *ciphertextbase64, const unsigned long ciphertextbase64len, unsigned long *ciphertextbase64olen)
{
    int ret = 1;

    mbedtls_rsa_context rsa;
    mbedtls_rsa_init(&rsa);

    mbedtls_entropy_context entropy_ctx;
    mbedtls_entropy_init(&entropy_ctx);

    mbedtls_ctr_drbg_context ctr_drbg_ctx;
    mbedtls_ctr_drbg_init(&ctr_drbg_ctx);

    const unsigned long outputlen = 256; // 256 bytes is the result of an RSA
    unsigned char *output = malloc(sizeof(unsigned char) * outputlen);
    memset(output, 0, outputlen);

    // 1. rsa encrypt the plain text
    ret = mbedtls_rsa_import_raw(&rsa, publickey.n.value, publickey.n.len, NULL, -1, NULL, -1, NULL, -1, publickey.e.value, publickey.e.len);
    if (ret != 0)
    {
        goto exit;
    }

    ret = mbedtls_rsa_check_pubkey(&rsa);
    if (ret != 0)
    {
        goto exit;
    }

    ret = mbedtls_rsa_complete(&rsa);
    if (ret != 0)
    {
        goto exit;
    }

    ret = mbedtls_ctr_drbg_seed(&ctr_drbg_ctx, mbedtls_entropy_func, &entropy_ctx, NULL, 0);
    if (ret != 0)
    {
        goto exit;
    }

    ret = mbedtls_rsa_pkcs1_encrypt(&rsa, mbedtls_ctr_drbg_random, &ctr_drbg_ctx, plaintextlen, plaintext, output);
    if (ret != 0)
    {
        goto exit;
    }

    ret = atchops_base64_encode(output, outputlen, ciphertextbase64, ciphertextbase64len, ciphertextbase64olen);
    if (ret != 0)
    {
        goto exit;
    }

    goto exit;

exit:
{
    mbedtls_rsa_free(&rsa);
    mbedtls_ctr_drbg_free(&ctr_drbg_ctx);
    mbedtls_entropy_free(&entropy_ctx);
    free(output);
    return ret;
}
}

I would also argue that this makes the code look very nice. For example:
int atchops_rsa_encrypt(atchops_rsakey_publickey publickey, const unsigned char *plaintext, const unsigned long plaintextlen, unsigned char *ciphertextbase64, const unsigned long ciphertextbase64len, unsigned long *ciphertextbase64olen)
{
    int ret = 1;

    mbedtls_rsa_context rsa;
    mbedtls_rsa_init(&rsa);

    mbedtls_entropy_context entropy_ctx;
    mbedtls_entropy_init(&entropy_ctx);

    mbedtls_ctr_drbg_context ctr_drbg_ctx;
    mbedtls_ctr_drbg_init(&ctr_drbg_ctx);

    const unsigned long outputlen = 256; // 256 bytes is the result of an RSA
    unsigned char *output = malloc(sizeof(unsigned char) * outputlen);
    memset(output, 0, outputlen);

    // 1. rsa encrypt the plain text
    ret = mbedtls_rsa_import_raw(&rsa, publickey.n.value, publickey.n.len, NULL, -1, NULL, -1, NULL, -1, publickey.e.value, publickey.e.len);
    if (ret != 0)
    {
        goto exit;
    }

    ret = mbedtls_rsa_check_pubkey(&rsa);
    if (ret != 0)
    {
        goto exit;
    }

    ret = mbedtls_rsa_complete(&rsa);
    if (ret != 0)
    {
        goto exit;
    }

    ret = mbedtls_ctr_drbg_seed(&ctr_drbg_ctx, mbedtls_entropy_func, &entropy_ctx, NULL, 0);
    if (ret != 0)
    {
        goto exit;
    }

    ret = mbedtls_rsa_pkcs1_encrypt(&rsa, mbedtls_ctr_drbg_random, &ctr_drbg_ctx, plaintextlen, plaintext, output);
    if (ret != 0)
    {
        goto exit;
    }

    ret = atchops_base64_encode(output, outputlen, ciphertextbase64, ciphertextbase64len, ciphertextbase64olen);
    if (ret != 0)
    {
        goto exit;
    }

    goto exit;

exit:
{
    mbedtls_rsa_free(&rsa);
    mbedtls_ctr_drbg_free(&ctr_drbg_ctx);
    mbedtls_entropy_free(&entropy_ctx);
    free(output);
    return ret;
}
}

Yeah, this is a good pattern for this kind of task

@XavierChanth Would it be okay to merge for now since optimization is not our goal and this PR fixes malloc crashing?


Click & open tracking not working

Click & open tracking not working for me.
I've enabled the Fast server according to the documentation. configured the DNS for click subdomain, modify nginx accordingly(to listen only on IPv4), amended postal.yml with the 2nd IP details, enabled Fast server and finally configured a tracking domain. (Postal management IP is an IPv4, Fast server IP is an IPv6 one). after the configuration, I did a stop then start for postal.

when you say its not working, could you clarify which part isn't working?

When I send an email, URL is not being replaced. (I tried sending emails from management UI and from the API)

One more thing, I didn’t figure how Postal track the email opening. I read something about inserting a pixel image in the email body, but didn’t know how to track and find related results.

Check the tracking domains page, make sure that the domain has two ticks and then you can also edit the domain to see that both things are being tracked.
The tracking domain needs to be in the same organization as the credential you're sending from.

let's say I'm using example.com domain, I'm using (click.example.com) as tracking domain with disabled SSL (CNAME is configured correctly according to postal DNS check) and I'm sending from email address<EMAIL_ADDRESS>but still not working.

Tracking is only activated if there is a tracking domain with valid DNS in the same organization as the domain you are using. If it isn't happening, then either the DNS isn't valid or you're using a different organizations credential.

I figured out that I was using an organisation level defined domain (with the same name of my mail server domain), accordingly I changed the tracking domain to the mail server one.
Tracing is working now where I can see if an email is opened (if the pixel image downloaded) and URLs are being converted but cannot reach my click domain (click.mydomain.com) even CNAME is configured accordingly, and I have no firewall. how can I check if fast server if listening properly?
when I curl (click.mydomain.com) at the server, I got (Hello) response, but cannot curl that link from outside.
hint: I changed the (/etc/gai.conf) to make IPv4 as preferred (before doing this, postal wasn't able to send emails), uncomment this line (precedence ::ffff:0:0/96  100)

Update:
I've changed the IPv6 (the fast server IP) to a floating IP (on DigitalOcean) and my tracking domain is responding with (Hello) now. click & open tracking is working perfectly from management UI, URL converting not work when send an email using API with (html_body) parameter. it's only working when use (plain_body) parameter.

Final update:
It's working fine now on both management UI and API, I found an issue with my HTML body.

Hi,
I am also trying to configure IPv6 for tracking. If possible, please tell how you configure nginx ?


[Feature request] Advanced_table field - which allows to specify field type for each column

Hello,
I think it is useful if we are able to specify the type of columns in the table type.
E.g. the price should be number only.

I think for what you want, the repeatable field in 4.1 branch is perfect. It's still beta, very close to launch (i hope) but you can already use it.
Check it out in demo if it matches your needs:
http://demo-beta.backpackforlaravel.com/admin/dummy/create
Going to close this, i don't think we are going to support multiple field types in table field type.
If you feel I am wrong, and be sure that sometime I am, feel free to reopen.
Best,

I can confirm we're not working on this right now - like @pxpm said. We're currently knee-deep in bug fixing Backpack 4.1, so we can get it out the door, thank you for understanding @mamprogr .
But 😄
Now that we've made sure all fields work inside repeatable. It should't be too difficult to create a new advanced_table field (or something), that would allow us to do:
[   // Advanced Table
    'name' => 'options',
    'label' => 'Options',
    'type' => 'advanced_table',
    'entity_singular' => 'option', // used on the "Add X" button
    'columns' => [ // aka fields - 'cause that's what they are actually
        [   // Text
            'name' => 'title',
            'label' => "Title",
            'type' => 'text',
        ],
        [  // Select
           'label' => "Category",
           'type' => 'select',
           'name' => 'category_id', // the db column for the foreign key
           'entity' => 'category', // the method that defines the relationship in your Model
           'attribute' => 'name', // foreign key attribute that is shown to user
        ],
        [   // Checkbox
            'name' => 'active',
            'label' => 'Active',
            'type' => 'checkbox'
        ]
    ],
    'max' => 5, // maximum rows allowed in the table
    'min' => 0, // minimum rows allowed in the table
]

In fact, this sounds awfully familiar with what my initial idea for the matrix field type would be (see #131 ). Which turned into the repeatable field type.
Now... the repeatable field type is nice and all. It'll work great for A LOT more use cases, because there's no limit to how many fields to include in one field group. An advanced_table field, however, would be limited - you can't put in more than 3-5 columns, it'll get too big and too difficult to use.
But. I do see myself wanting a repeatable that looks like a table. I personally would prefer this advanced_table field 95% of the time. Because I rarely need more than a few columns inside a complex field like this. For example, for invoice_items - 3-5 columns.
So let's leave this open, tag it as a feature that we maybe create for 4.1.x. It's not a priority, but it'd be cool - personally I'd love it. If anybody else ends up building it, please share - would really appreciate it.
Cheers!

Thanks for your helpful reply.
By the way, the + New Item in repeatable  is not translated.

What will be the difference between this and the repeatable field? Only the interface change?

What will be the difference between this and the repeatable field? Only the interface change?

Yup 😄


[Feature] Want to add a new Loader into the Loader Section.

Description
Want to add a new Loader into the Loader Section. I am attaching the loader screenshot. Please assign me this issue under JWOC 2024.
Screenshots

Checklist

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

Code of Conduct

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

What name you will provide to this loader @bera474

@Rakesh9100  Rotating Circle Loader.

Go ahead @bera474


v0.11.0-update-deps

[replace]
"cookie:0.11.0" = { git = 'https://github.com/tamakiii/cookie-rs.git', branch = "v0.11.0-update-deps" }

root@5ce7ef80e8c0:/app# cargo update
    Updating crates.io index
error: failed to select a version for `ring`.
    ... required by package `rustls v0.16.0`
    ... which is depended on by `mongodb v0.9.1`
    ... which is depended on by `hello-rust-rocket-mongo v0.1.0 (/app)`
versions that meet the requirements `^0.16.5` are: 0.16.11, 0.16.10, 0.16.9, 0.16.7, 0.16.6, 0.16.5

the package `ring` links to the native library `ring-asm`, but it conflicts with a previous package which links to `ring-asm` as well:
package `ring v0.13.5`
    ... which is depended on by `cookie v0.11.0`
    ... which is depended on by `rocket_http v0.4.2`
    ... which is depended on by `rocket v0.4.2`
    ... which is depended on by `hello-rust-rocket-mongo v0.1.0 (/app)`

failed to select a version for `ring` which could resolve this conflict

[replace]
"cookie:0.11.0" = { git = 'https://github.com/tamakiii/cookie-rs.git', rev = "a520e11987e3e16d8c7cc08ea106dbf6b8ee0acf" }


Speed up CI

Github now provides Actions Usage Metrics at https://github.com/apache/opendal/actions/metrics/usage
In the past 30 days, we have:

The most time consuming jobs are:

I believe we should take some actions to:

build-haskell-doc at docs.yml
test at ci_bindings_ocaml.yml
build-ocaml-doc at docs.yml

So that we can save more times for other jobs.

Thank you @XmchxUp for working on this, let's close since some slowest jobs have been addressed.


new: Fix global bin detection on windows.

Update version to 0.13.1
Fix issue #1673

@sharpepd Just need to fix the formatting. Can run yarn moon check --all to see the errors.

I am not very familiar with this toolchain, but locally, I am getting errors in eslint due to a extension "moon" not being available.
Oops! Something went wrong! :(
babel-preset:lint |
babel-preset:lint | ESLint: 8.57.0
babel-preset:lint |
babel-preset:lint | ESLint couldn't find the config "moon" to extend from. Please check that the name of the config is correct.
babel-preset:lint |
babel-preset:lint | The config "moon" was referenced from the config file in "[...]\moon_dev.eslintrc.js".
So I have made my best guess at the changes and pushed. Fingers crossed!

@sharpepd Hrmmm, maybe do a yarn install to ensure the deps are there?

@sharpepd Hrmmm, maybe do a yarn install to ensure the deps are there?

I did that and still no luck. I cannot see where this "moon" dependency is coming from. It is certainly not found "node_modules". I was kind of hoping that using the moon task for linting, would do the job for me without any further set-up.
I did manage to find the linting errors and apply the fixes. So I hope this time the checks go through.

Awesome, looks good.


python3Packages.srsly: 2.3.1 -> 2.3.2

Motivation for this change
No upstream release notes, seems like it add some bugfixes + Python
3.9 support.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
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 nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

@ofborg build python37Packages.spacy python38Packages.spacy

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/374


2020 Hyundai Kona

I am just wondering if this will work. It is the ultimate version so it has SSC and LKAS. I would like to know if it will work before buying a comma 2 device. If anyone could help me with this I would really appreciate it.
Thank you all for your time!!!

This isn't an issue, please see the supported cars section of the README.

Well I see that the 2019 is on the list but not the 2020? Will the new comma 2 have the right fingerprint for the 2020 version?


Sort-Merge Join

Hi, I read the sort-merge join code. Basically, you first concatenate two tables and copy join columns to row[BLOCK_DATA_SIZE - 8](length is 4) for sorting. and mark row[BLOCK_DATA_SIZE - 4] 1 or 2 to stand for which table this row comes from : the primary or the foreign.
This means you can only sort INTEGER type column and then do the join. However, for BDB3 query, it joins rankings and uservisits table based on pageURL column which is a VARCHAR(100) type. So I think your sort-merge join is not applicable to BDB3 query.

Yep, you're right that the sort-merge code as written assumes merging on an integer column. This could be changed by making the comparison check the type of the column and do, e.g., a string comparison instead.
Our evaluation used the hash join for the BDB3 query. You can see which algorithms each part of the evaluation used by looking at the tests in isv_app/isv_app.cpp. It's a little messy since the choice of algorithm is sometimes made in a parameter passed to the function containing the actual operator code.


docs(new-file): Add contribute rules

ISSUE #58 FINAL
I have removed Husky since it was not used and I have used Conventional Commits to create a rule in the commits.

ISSUE #58 FINAL
I have removed Husky since it was not used and I have used Conventional Commits to create a rule in the commits.

Thank you for the initiative on this, @jaanque ! 🙌 Just a note: Husky and Commitlint are actually functioning as intended, so we don’t need to remove them. Could you please undo the removal and adjust the CONTRIBUTE.md file to reflect the correct usage guidelines? Appreciate your efforts on this task!


Don’tfix

System Info
Trading views… imposing others privacy invalid
Who can help?
Kizza_billionz
Information

[X] The official example scripts
[X] My own modified scripts

Tasks

[X] An officially supported task in the examples folder
[X] My own task or dataset (give details below)

Reproduction
Piching others successor content
Expected behavior
GreatnessKizza_Billionz

This awesome done don’tfix


Deprecate $user_id and $project_id for Currents

See:

https://edgeapi.rubyonrails.org/classes/ActiveSupport/CurrentAttributes.html

In particular this is exactly our issue:

https://youtu.be/lEUkarkROv0?list=PL9wALaIpe0Py6E_oHCgTrD6FvFETwJLlx

Our housekeeping should make this really straightforward.  Target is Rails 5.2.

But see https://ryanbigg.com/2017/06/current-considered-harmful.  Not sure the alternate there is plausible for the number of models/controllers we have, perhaps I'm missing something though.


JAVA-2855: Provide user-friendly way of selecting metrics framework

Motivation:
As of JAVA-2808, the driver can integrate with Micrometer or MicroProfile metrics frameworks (as well as the default DropWizard metrics framework). However, the process to integrate with a non-DropWizard metrics framework requires applications to implement a custom SessionBuilder that returns the desired metrics framework enabled DriverContext. While this method is not overly burdensome, it would be easier for application developers to integrate their desired metrics framework with less code to override driver mechanisms.
Proposal:
This PR adds a configuration option for a MetricsFactory implementation class to enable the desired metrics framework.

We should also revisit the manual now that subclassing the context is no longer necessary, and maybe move it to the regular manual (as opposed to developer docs).
Also cover the fact that Session.getMetrics() only works with Dropwizard.

My last commit has moved the metrics docs from the developer page to the Metrics section in Core.

I know this is from the other PR, and I don't think we discussed it at the time, but I wonder if throwing from MicroProfileMetricsFactory.getMetrics() is the right thing to do. This forces any existing caller to now catch the exception. If someone was using Metrics, it's because they were accessing the Dropwizard metrics programmatically. If those metrics are not available, it makes sense to return an empty optional. The fact that some other metrics are available via another path is not really relevant.

👍  This looks great.
I'm still not keen on the principle, but I agree that we've reached a good solution that is not too invasive. In particular I like how the injectable registry addresses the obsolescence of Session.getMetrics().
I ended up switching to empty optionals instead of throwing exceptions per my previous comment. We still have time to revisit that if there are other opinions.


Unable to publish a proposal

Expected behavior
publish proposal
Actual behavior
failed to publish a proposal with an error ' Oops, wrong proposal format'

Steps to reproduce the behavior
create a simple proposal then click on publish, sign on metamask, meet error

@WUXINYIMiffy thanks for reporting this. For the future when it's something more urgent like this it would be better to ping us on discord.

Copy that. Thanks!


May I ask how could I disable download easyocr model file if my linux server has no internet?

Question
Hi there,
There is one PDF file that I would like to parse all tables in this PDF file with Docling without OCR feature, but, there is no internet of my production Linux server.
How could I disable the download process of OCR model on my production Linux server?
And, I tried to use your sample code as below: but, on my production Linux server, it failed to resolve the huggingface.co domain:
import logging
import time
from pathlib import Path
import pandas as pd
from docling.document_converter import DocumentConverter
_log = logging.getLogger(name)
def main():
logging.basicConfig(level=logging.INFO)
input_doc_path = Path("./tests/data/2206.01062.pdf")
output_dir = Path("scratch")

doc_converter = DocumentConverter()

start_time = time.time()

conv_res = doc_converter.convert(input_doc_path)

output_dir.mkdir(parents=True, exist_ok=True)

doc_filename = conv_res.input.file.stem

# Export tables
for table_ix, table in enumerate(conv_res.document.tables):
    table_df: pd.DataFrame = table.export_to_dataframe()
    print(f"## Table {table_ix}")
    print(table_df.to_markdown())

    # Save the table as csv
    element_csv_filename = output_dir / f"{doc_filename}-table-{table_ix+1}.csv"
    _log.info(f"Saving CSV table to {element_csv_filename}")
    table_df.to_csv(element_csv_filename)

    # Save the table as html
    element_html_filename = output_dir / f"{doc_filename}-table-{table_ix+1}.html"
    _log.info(f"Saving HTML table to {element_html_filename}")
    with element_html_filename.open("w") as fp:
        fp.write(table.export_to_html())

end_time = time.time() - start_time

_log.info(f"Document converted and tables exported in {end_time:.2f} seconds.")

if name == "main":
main()
I used my local PC to download the OCR model (models--ds4sd--docling-models) and python dependencies, then copying the model folder fully and dependencies to production Linux server. (/root/.cache/huggingface/hub/models--ds4sd--docling-models). But, it still needs to download the model.
May I ask any config could be used to disable the download or not?
BR
Kimi

Hi there,
I think that I got the solution based on your sample code to resolve my issue.
Just, set
pipeline_options = PdfPipelineOptions()
pipeline_options.do_ocr = True // False
pipeline_options.do_table_structure = True
pipeline_options.table_structure_options.do_cell_matching = True
doc_converter = DocumentConverter(
    format_options={
        InputFormat.PDF: PdfFormatOption(pipeline_options=pipeline_options)
    }
)

Sorry for your inconvenience
BR
Kimi

hi there,
Sorry for reopening the issue again. Due to the same issue as without internet on my test Linux server.
The docling model has been downloaded and copied to my test Linux server, which located in /root/.cache/huggingface/hub folder.
I just used one sample code as below to parse a PDF file:
from docling.document_converter import DocumentConverter
source = "./1.pdf"  # PDF path or URL
converter = DocumentConverter()
result = converter.convert(source)
print(result.document.export_to_markdown())  # output: "### Docling Technical Report[...]"
But, got an error that my test Linux server has no internet and, could not resolve the huggingface.co domain.

It is appreciated that you could guide me how to configure to load the local model instead of downloading from internet.
BR
Kimi

The default code will check if there is a new version available. To avoid downloading, you should set the artifacts_path argument in the pipeline options. See https://ds4sd.github.io/docling/usage/#provide-specific-artifacts-path


Fix grammatical error.

Fix grammatical issue.

I recommend the closing of this PR since I don't believe it to be lacking clarity. @sftim thoughts?

I'm afraid so @budhirajamadhav.
We are open to thorough reviews and rewrites for any existing page, if that results in an improvement. Fixing actual errors (spelling mistakes, typos, punctuation) is OK when the existing page is obviously wrong, but otherwise please try to avoid proposing trivial edits.
/close


Issue 236: Fix metrics develop macro replacement

What is this PR?
This is a:

[ ] documentation update
[X] bug fix with no breaking changes
[ ] new functionality
[ ] a breaking change

All pull requests from community contributors should target the main branch (default).
Description & motivation
This PR solves the issue detected with derived metrics when working with the metrics.develop macro. Specifically, it was detected that derived metrics with parenthesis on the expression (for example, expression: metric_1/(0.9*metric_2)) could not be calculated adequately. The problem was clearly described in this issue.
The unique change that I propose is to modify the current line 21 of the file macros\variables\get_metric_definition.sql which tries to replace {{metric, }} and ) (among others) from the expression of derived metrics when working with metrics.develop macro.
Checklist

[X] I have verified that these changes work locally on the following warehouses (Note: it's okay if you do not have access to all warehouses, this helps us understand what has been covered)

[X] BigQuery
[ ] Postgres
[ ] Redshift
[X] Snowflake
[ ] Databricks

[ ] I have updated the README.md (if applicable)
[ ] I have added tests & descriptions to my models (and macros if applicable)
[ ] I have added an entry to CHANGELOG.md

Tenets to keep in mind

A metric value should be consistent everywhere that it is referenced
We prefer generalized metrics with many dimensions over specific metrics with few dimensions
It should be easier to use dbt’s metrics than it is to avoid them
Organization and discoverability are as important as precision
One-off models built to power metrics are an anti-pattern

@josepfranquetf do you mind signing the CLA? Once you do so I can get the workflows running to ensure it passes integration tests

Closing out because of #238 where I didn't have to deal with creds issues.


fix: broken build when renderModernChunks=false & polyfills=false

Hi again, this PR cherry-picks https://github.com/vitejs/vite/pull/14346. There's some more information about the bug in https://github.com/vitejs/vite/issues/14324. This repository is a minimal reproduction for testing the bugfix.

Great!


Create mockups for management interface

Use bootstrap to make some quick mockups after we know the functionality.

Going to use the same format as the "relations" panel.


Position.fromLatLng returns a reversed Position object

Since you guys don't have a github repo for the javascript sdk I'm going to start filing issues in this samples project.
A Position object is nothing but a number array of [longitude, latitude]. The atlas.data.Position.fromLatLng() returns an array of [latitude, longitude].
A position on the map is represented [longitude, latitude] as given by this position in the eastern US.

I have a list of geocoordinates and I'll reverse geocode them, but first I'll make my life a little easier and convert them to a position object using Position.fromLatLng(). Problem is the returned Position object is backwards.

When I use this array in the reverseGeocode method I'll get a position in Antarctica instead of the US. It would be great if the fromLatLng method returned the correct Position object. Maybe just create a new one called fromLngLat().

Digging into the source code it appears this error only occurs when you pass in individual values like fromLatLng(lat, lng). However, if you pass in an array with values [lat, lng] or an object with lat/lng, latitude/longitude, y/x properties, it works as intended. This bug appears to have been there since the initial release in 2018 (6 years) and likely went unnoticed as I don't think I've came across anyone passing in the individual values since it takes less code to just make a simple array. I'll log the bug with the team, but would recommend simply reversing your values, wrapping with square brackets to make them an array and not use the fromLatLng function.

Closing this thread as this is not the right place to report issues to any map platform.
For Azure Maps issues, please report issues using one of the following methods in the future:

Raise it for discussion on the Azure Maps forums: https://learn.microsoft.com/en-us/answers/tags/209/azure-maps
Report it in the Azure Portal under your Azure Maps resource by raising a support ticket.


Feature/remove create

For ga4gh/dockstore#1939
Changing create to replace.
Will be rebasing...
GA4GH Validate Test appears to be the only test that breaks with the change.  So need to use the function from CommonTestUtilities.  CommonTestUtilities is in integration test module and don't want to import that so moving the test (and its required files) to integration module instead.  CommonTestUtilities doesn't appear to work when the DockstoreTest.yml is missing in unit tests.  Don't want to change GA4GHValidateTest test type and give it unnecessary confidential data, so moving the function out of CommonTestUtilities and into TestUtility.

Coverage decreased (-4.3%) to 64.627% when pulling 7046849a0c965716155ab6cdaf5433e60cc0bb9e on feature/removeCreate into 3d92d941a78e9e2c94e9c391b556ea969f47e04e on develop.

As discussed, just delete that test in favour of external dredd validator letting us minimize moving other code around.

https://github.com/ga4gh/dockstore/pull/1961


Connection params

@cheikhgwane thanks a lot, I made a couple of minor tweaks and updated the wiki accordingly.


Finalize 0.6

Summary
Fixes #966 .
WIP, as this is likely to be the "wrapping up" PR for the 0.6 release - will be updated as the others are merged, and conflicts to be solved in this PR.

[x] fix sphinx warnings
[x] tweaks to release notes
[x] update hello world example code in Sphinx
[x] bump changelog

Details and comments

Taking the PR out out WIP, manually copying the example from #1018 - please feel free to make changes directly in this PR if further tweaks are needed.


feat: add random video data endpoint

Great work @lauk20, thank you for being a part of the repo 👍 Happy Hacktoberfest


Warnings for EC2  x Inflows restart_instance

I think @AboudyKreidieh uncovered this bug a while ago, but when running EC2 (or is it all0 experiments with Inflows, the experiments get progressively slower, until an experiment of batch size ~ 40000, itr=300 experiment will take 4 days to run instead of <1/2 day

@kjang96 can you clarify what the issue is?

If a user uses inflows, but forgets to set restart_instance = True, their experiment will take a billion years but they won't know why. We should warn them by default if they try to do this


Always fetch index.html and only serve cached version when offline

Currently I place index.html to main assets and it is an external file. When I update it, because service worker script always serve it from the cache so the client will not see the new version.
I think we need an option to specify entry files and always fetch them while online. Only serve the cached version if the fetch failed.

The issue maybe my incorrect configured cache policy that caches service_worker.js forever so browser won't to get new version of it without a force reload.

This sounds like a good point, indeed, changing external files do not affect cache updating at a moment. This makes ServiceWorker more like AppCache, which is not good. But allowing different network strategies for main/additional cache means that AppCache won't support it. So, even if I will be able to correctly manage this issue, then it will work for ServiceWorker (AppCache auto disabled).

@xlc I use it production site, but in my case everything what is passed to offline-plugin is updated on every build, so I have no problem with it. But I see your problem.
The idea of offline-plugin, at a moment of first release, was to satisfy my own needs, i.e. be workable for static web-apps with some API usage. Of course, this doesn't solve all the use cases and also thought recently about similar problem you have encountered. And I can assure you, it's more complex than that you have described.
Unless everything is updated with each build (SW/AppCache update), you will always have version collisions, even if your use cases will be solved, your users may have situation when some files are of old version, and some of new.
One absolute solution is to check everything for version compatibility with SW. And this is big project. I would be good to have it for v3, but I am not sure.
Btw, if your index.html points to something with [hash1] but on server everything is with [hash2], then you will have problems even without SW.
Also, what type of updateStrategy you are using?

Okay, I just checked the SW code and deletion of old caches happens only in activate event, this means that all old pages with old SW are unloaded and only pages which server new SW are active. So if index.html was updated with a build, then for new clients new index.html should be served.

We are using hash updateStrategy. I am very confused about service worker now... Especially refresh in Chrome won't kill the old service worker and only close tab will, I have multiple service worker instance serving different version of the files in different tabs...

Okay, hash strategy is fine. Just update everything with each build and all will work.

I have multiple service worker instance serving different version of the files in different tabs...

SW is guarded agains that and it won't do it unless you coded so. There is only one active SW at a time and new SW (waiting one) doesn't take control of any old pages, it becomes active only when all old pages are closed and old SW is unloaded.
This is how it's coded in this plugin and how it's by default.

@NekR so re what you said in https://github.com/NekR/offline-plugin/issues/24#issuecomment-182790783 basically index.html will not update for an existing user with SW installed, unless browser refreshes SW?
And since we have no control over when SW updates, we're forced to maintain different versions of assets depending on what index.html is being served by SW?

@Hengjie if you do not use optional caches -- your are probably fine. Even more, if  you use only main  cache, then you should have no problems at all.
What I said in that comment is that deletion of old cached assets happens only when new SW becomes active, so while old one is active and may serve old assets -- they are not deleted. This means that if you have released new version, but a user is still on old version (browser didn't activate new SW yet) then user will get all needed assets from cache.
This only works fine if:

You do not have dynamic content in cached assets, e.g. you cache only app shell
You update assets all at one time, e.g. if path of script changed then it should be changed in index.html at a same release

That is what this plugin is for, at a moment.

@xlc Do you have index.html on CDN with a small cache time like a 5 minutes and a SW file without cache time, so your users may be get in situation where index.html is old but SW file is new?

Yes we are using CloudFront CDN have have 5 minutes cache time. Currently we keep the last old version of the files so in case user still getting old index.html, they won't hit 404.

Let's figure out this problem together. I also thought about this situation and how to solve it.
Okay, standard best practice of the web and HTTP caching is:
Keep all previous versions of build on CDN/server, add new versions with a new tag (new folder name for example), only index.html updates directly. Cache to static assets set forever, cache for index.html is set to about 5 minutes.
This works fine until you bring ServiceWorker in game. If ServiceWorker is not cached at all in this situation, then there is chance to get new SW while getting index.html from cache (@xlc and @Hengjie  main concern). In this case index.html will still be referring to old assets, while new SW will remove them from the cache and cache new version. In a best scenario, assets will just be served from server, bypassing SW. In a worst (badly configured SW) -- requests will stuck.
So far, here are some ways I came with, which could solve it:

Set same amount of cache to sw.js (still possibly to get different version of index.html and sw.js because of race?)
Keep version of build inline in index.html and sw.js and compare them on SW load (firing what? updaterequired?)
What about AppCache?

Some CDN allows busting cache on build, so once you add files for new version and update index.html and sw.js then just clear CDN cache.
What about AppCache?

Never cache index.html, 'sw.js' and AppCache related files.

I am also unsure how service worker cache works with browser cache. Because I have expires=max for all js/css/image/font files I am not sure does the cache.addAll will bypass the browser cache or I have to cache bust the urls (add query parameter).

SW doesn't bust HTTP cache by default, this means that developers should do it themselves if they are using cache-first network strategy.
offline-plugin is using cache-first network strategy, but unfortunately I didn't thought about cache-busting writing it. It's now implemented in v3 branch, but in a v2 you probably should do it yourself :(

Okay, with a help of Jake Archibald here are some more suggestions:
Query param on index.html (random value or version of build) works fine for busting HTTP cache and CDN cache (if it's not disabled on CDN). So requesting it in SW with cache-bust param should work, but it won't work in AppCache because AppCache stored files by whole url, e.g. index.html ins't same as index.html?v=2 for it.

Thing which should work for both SW and AppCache:

Cache index.html on CDN for 5 minutes. Never cache SW or AppCache files. Purge CDN's cache of index.html on project's new version deploy.
In SW, use cache-bust query params (e.g. index.html?v=10) to bust HTTP cache (and CDN) when updating. Use ignoreSearch when matching requests in cache.
In AppCache, use plain urls (without query, e.g. index.html). AppCache seems to automagically bust small browser http cache. CDN cache cannot be busted in AppCache (this is why purge CDN cache on build)
Keep all prev version builds on a server in case of some http cache race or AppCache<->CDN versions miss-match.

Hope this helps :)

Turns out AppCache cannot bust even HTTP cache, so if you are using AppCache too -- you have no option other than completely disable cache for index.html. Probably serve it from main server and all other assets from CDN. Since index.html also is cacheable in SW/AppCache, only disadvantage here is that it wont be server from CDN.
Closing this now. Seems to be solved for SW, if something, you may try use v3 branch.

Thanks for the update. I will try v3 branch later when I have free time.

For the record, I had a similar issue; and worked around it by explicitly unregistering the ServiceWorker if I find a version mismatch ( link to relevant file on my project  )
const checkIfAppIsStale = () => {
    if ( !serviceWorkerUnregisterAvailable ) { return; }

    get( `/version.txt?r=${Math.random()}` )
        .then( ( res ) => res.text() )
        .then( ( text ) => {
            if ( text && text.trim() === process.env.VERSION.trim() ) { return; }

            navigator.serviceWorker.getRegistrations().then( ( registrations ) => {
                for ( const registration of registrations ) {
                    registration.unregister();
                }
            } );
        } );
};

checkIfAppIsStale();

Where version.txt is never cached, so any mismatch means that the sw cache is lagging behind, so I kill the sw without mercy :)
Excellent plugin; great time-saver.
Ah before I forget; @NekR: Any ETA on ignoreSearch and other nifty utils being merged to the master?
Cheers,
Volkan.

@v0lkan this issue is pretty old and I'm now sure what it's about tbh. There is responseStrategy: 'network-first' option now which loads assets from the network first and if it fails, loads them from the cache.
I also don't see why there could be problem with cache/SW updates because I and other people do not have them with current version of offline-plugin.
About ignoreSearch, there is no way to specify it but it's automatically applied to all assets generated by webpack. External assets still don't have ignoreSearch and I'm not sure when there will be such functionality.

Got it. — Thanks for the information Arthur.

I also don't see why there could be problem with cache/SW updates because I and other people do not have them with current version of offline-plugin.

Probably due to some weird race condition going on in CloudFront/S3/AWS or somewhere in between.
For what it’s worth, my entry point (index.html) gets served from the cache unless I explicitly kill the service worker (with the above snippet)
It migh very well be a timeout issue, and if I wait long enough, or if I restart chrome or reboot my system etc, it might update itself. — Not sure — If it’s just me who’s (still) having this problem, don’t worry.

For what it’s worth, in my case, my entry point (index.html) was getting served from the (ServiceWorker’s) cache unless I explicitly kill the service worker (with the above snippet)

That's fine, it supposed to work that way. Why do you need to kill it?

It migh very well be a timeout issue, and if I wait long enough, or if I restart chrome or reboot my system etc, it might update itself. — Not sure — If it’s just me who’s (still) having this problem, don’t worry.

I don't think you have any problems here 🙂, just check out this guide https://github.com/NekR/offline-plugin/blob/master/docs/updates.md

I can, of course hack the generated sw.js to do something specific to my use-case, but that would be ugly. — I’ll fork the repo and play it it further if Ihave time, maybe I can come up with a valuable contribution.

I still don't understand what exactly you are trying to do. What is it?

That's fine, it supposed to work that way. Why do you need to kill it?

Because my index.html has changed (because I deployed a new version) but closing all the tabs, killing chrome, and reloading the page, cmd+refreshing the page, refreshing the page… etc… etc… ws still loaded the old index.html. — It might be due to sw.js being cached too, I need to check that.
I’ll checkout the guide, and retry it with a sane mind tonight. — Maybe it’s just gremlins walking in my servers smaking things weirder than they need to be :)

It might be due to sw.js being cached too, I need to check that.

Yes, that's the only possible reason then. Always server sw.js with Cache-Control: no-store.
Let me know if it works or not :-)

Let me know if it works or not :-)

Will do.

So what I did

Used http-server Node.JS global app with 10 seconds cache time
Made sure that I waited 30 seconds between every refresh etc.
Enabled cache from dev tools so that I can keep dev tools open w/o interfering anything
Loaded the page
Index page with alert(1) is displayed (expected)
Updated sw version
Updated index.html; set alert(2)
Closed the tab.
Waited for 30 seconds (just in case)
Opend another tab
pased the link
observed that the page loads new service worker (by checking the version in the source code)
CMD+R
regular refresh
another CMD+R
another regular refresh
CMD+R then CMD+R
(… all other 4 combations of CMD+R and “regular refresh”'; waiting for 30 seconds between each operation

What happened: I still got alert(1) instead of alert(2).
Side notes:

The script that unregistered the service worker worked for me all the time.

There’s a /index.html to / mapping in pathRewrite; I’m starting to suspect that part, though I’m not sure.

I haven’t tried the network-first strategy since it, kind of, defies the purpose of caching (assume you are on a 2G network that barely streams data and you are tring to fetch the asset from the network first; whereas it would have come from the cache in a heartbeat)

I see the the script is refreshing all the assets whose filename has changed. Since index.html is the same, it just does a blind “move asset”

from console log:
[SW]: Changed assets: main
[SW]: Moved assets: main
…
 lots of assets
 …
Asset: Array[2]
    0: "https://byte-sized-tv-web-new-vozcelik.c9users.io/" #this is actually /index.html remapped internally.
    1: "https://byte-sized-tv-web-new-vozcelik.c9users.io/"
sw.js:3 [SW]: Activate event
Delete cache: webpack-offline:0.8.16

So my understanding is, service worker deletes the old cache; creates a brand new cache while moving index.html from the older cache bag, to the newer one.
…
So that’s my case.
For the record again this gist https://gist.github.com/v0lkan/c714a76de48420b264a7db917510f5d9 solves my problem for good.
Though I’m not sure why it’s not working as it’s described in the article. — Maybe it’s something to do with my environment; browser; a company policy on my machine, I don’t know :)

I see the the script is refreshing all the assets whose filename has changed. Since index.html is the same, it just does a blind “move asset”

Nope, it updates an assets if its hash changed, not name. Even if you have different names but the same hash of the file, offline-plugin is being able to detect if that's the same fine, and vice-versa if not.
For external assets that procedure isn't performed because their hashes aren't available.
Anyway, you are just doing thing in a wrong order, this is the correct one:

Used http-server Node.JS global app with 10 seconds cache time
Made sure that I waited 30 seconds between every refresh etc.
Enabled cache from dev tools so that I can keep dev tools open w/o interfering anything
Loaded the page
Index page with alert(1) is displayed (expected)
Updated sw version
Updated index.html; set alert(2)
Reloaded the tab
Waited for SW to update
Closed the tab.
Waited for 30 seconds (just in case)
Opened another tab
Got alert(2) as expected

Also, when we will figure this out we'll be to move to offline-plugin's events: https://github.com/NekR/offline-plugin/blob/master/docs/runtime.md#install-options which should eliminate the need of your snippet.

Let me try with that order.

Okay, so good news :)
It worked as defined.
The reasons of it not working in my former case was that I needed some coffee :)
Seriously though, I was being “clever” by just updating the “version” on the generated sw.js file manually, without touching the hashesMap section which is a hashmap of assets to track.
So when I did my changes through webpack (i.e. changing index.ejs and generating a new index.html etc) with a short-term cached, it worked as expected. — I’ll remove my hack and try again on a more production-like use-case to see if it works okay too.

note I used both cacheStrategy "all" and "updated", and the result was positive 👍

@v0lkan great! Also check this section about offline-plugin events: https://github.com/NekR/offline-plugin/blob/master/docs/updates.md#config, it might be helpful if you wanted to apply updates faster, control them, etc.

Sure I’ll check the config section; since I can attach to events I probably don’t need to use my snippet.
Though, I’ll still use an identical strategy  for the paranoid users who never close their tabs. By definition, service worker will not register itself unless you close all the tabs you know.
Thanks for all the help.
Have a great night.

That's why you may need runtime.applyUpdate() which forces update even if tabs are open. Also there is autoUpdate option for paranoid users who never close their tabs 😉
What I'm trying to say is that there is already a lot of functionality in offline-plugin itself so you probably don't need all your hacks. But well, if those hacks work for you, then that's fine too :-)

Totally agree with that; I love wheel-reinvention, but I’m also a pragmatist ;)  — My hacked saved my day, and I’ll for sure use runtime.applyUpdate() and its sister events etc to make it work “by the book”.
As a tangential note; here how Chrome makes a request to sw.js
curl 'https://bytesized.tv/sw.js' \
	-H 'Referer: https://bytesized.tv/sw.js'
	-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36' \
	--compressed

which means, it will always request the latest and greatest version from the origin server.
So as long as sw.js is not cached on the origin, it will properly update itself.


create dummy clusterprovision for legacy clusterdeployment

If a clusterdeployment was installed prior to the changes that brought clusterprovisions to be, then the clusterdeployment will not have a clusterprovision associated with it. This is not a problem for normal operation. However, if the clusterdeployment is backed up and restored, then the clusterdeployment will lose its infra ID and kubeconfig secret reference, since those are stored in the status. Normally, after a restore, these items--along with others--are copied back into the clusterdeployment from the clusterprovision. So, in order for the clusterdeployment to work after being restored, the controller needs to create a dummy clusterprovision for the clusterdeployment with the pertinent data to be restored.

/lgtm


Upgrade gems and some fixes

Hi,
I'm starting to using your fork, thanks a lot for the effot of maintaing it!
I have updated rails and some other gems. I'm also using ruby 2.5, it works perfectly.
There are some errors running tests though... not sure how to solve yet...
Failed examples:

rspec ./spec/models/issue_trackers/bitbucket_issues_tracker_spec.rb:4 # IssueTrackers::BitbucketIssuesTracker should create an issue on BitBucket Issues with problem params, and set issue link for problem
rspec ./spec/models/issue_trackers/github_issues_tracker_spec.rb:4 # IssueTrackers::GithubIssuesTracker should create an issue on GitHub Issues with problem params, and set issue link for problem
rspec ./spec/models/issue_trackers/mingle_tracker_spec.rb:4 # IssueTrackers::MingleTracker should create an issue on Mingle with problem params, and set issue link for problem
rspec ./spec/models/issue_trackers/redmine_tracker_spec.rb:4 # IssueTrackers::RedmineTracker should create an issue on Redmine with problem params, and set issue link for problem
rspec ./spec/models/issue_trackers/unfuddle_issues_tracker_spec.rb:10 # IssueTrackers::UnfuddleTracker should create an issue on Unfuddle Issues with problem params, and set issue link for problem
rspec ./spec/models/notification_service/flowdock_service_spec.rb:8 # NotificationServices::FlowdockService sends message in appropriate format

Coverage decreased (-0.2%) to 85.3% when pulling ea2007c962c0afe8404d017fa77be6f87caa6d48 on fernandoluizao:upgrade into 085514e286d2f7385172e43e46c79a9bb25f4f37 on cph:master.

Thanks for your work on this, @fernandoluizao!
I tried retracing your steps and upgrading gems more slowly, with bundle update --conservative, to isolate which gems have to be upgraded to get Errbit running on Ruby 2.5. (See #15)
It looks like oj, therubyracer, and devise all have to be upgraded — and that upgrading these three is pretty painless.
This leaves two failing specs in pivotal_labs_tracker_spec.rb. These specs fail with an exception because our version of webmock (1.15.0) isn't compatible with Ruby 2.4+.
Upgrading to the latest 1.x version of webmock doesn't help; but upgrading to either 2.3.2 (~> 2.0) or 3.4.2 (~> 3.0) resolves both exceptions while introducing API changes that break 5 other specs.
I'm open to a couple of paths:

Dropping app/models/issue_trackers/pivotal_labs_tracker.rb (It's implemented based on the pivotal-tracker gem, which hasn't seen a release in 3 years.)
Updating webmock and fixing those specs according to Webmock's breaking API changes

@boblail I'm working to make tests pass. I'm also trying to fix lots of warnings when running tests.
Hopefully tomorrow I wil have everything working.

Tests are green :smile:
There are some warnings... related to deprecated should matchers, and email_spec. I couldn't upgrade email_spec to fix the warning, since one test fails...

Awesome! Thanks, @fernandoluizao!


trying to implement ldita-bootstrap.lunr in the bootstrap ditaot plugin but facing some error

[gen-index-json] Result: 1
[gen-index-json] node:internal/modules/cjs/loader:1325
[gen-index-json]     throw err;
[gen-index-json]     ^
[gen-index-json]
[gen-index-json] SyntaxError: C:\Users\Admin\AppData\Local\Temp\temp20231019184255754\lunr.json: Unexpected token G in JSON at position 38
[gen-index-json]     at parse ()
[gen-index-json]     at Module._extensions..json (node:internal/modules/cjs/loader:1322:39)
[gen-index-json]     at Module.load (node:internal/modules/cjs/loader:1117:32)
[gen-index-json]     at Module._load (node:internal/modules/cjs/loader:958:12)
[gen-index-json]     at Module.require (node:internal/modules/cjs/loader:1141:19)
[gen-index-json]     at require (node:internal/modules/cjs/helpers:110:18)
[gen-index-json]     at Object. (C:\Users\Admin\AppData\Local\Temp\temp20231019184255754\null10407635299677372326:10:19)
[gen-index-json]     at Module._compile (node:internal/modules/cjs/loader:1254:14)
[gen-index-json]     at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
[gen-index-json]     at Module.load (node:internal/modules/cjs/loader:1117:32)
[gen-index-json]
[gen-index-json] Node.js v18.15.0
Error: Lunr.js failed to generate search index

Hi Gurushesh,
Did you figure this out already? I have encountered the same issue, and been trying to debug it.
I suspect this has something to do with the file paths created by the plugin. They contain a mix of forward and backslashes, and when a backslash is combined with a certain letter (G in your case, for me it was S), the JSON parsing fails and the index is not created. It's a case of JSON escape characters.
Here's a screenshot of the invalid JSON file in my test case. You can see that all first level file paths are correct, but more than one level deep all the slashes are backslashes, which the JSON parser tries to interpret as escape characters:

If you want to confirm this, try building a simple test map with topics in only one folder. The build should work ok.

I suspect this is a combination of two things:

Building an index on Windows.
Building an index with deeply embedded folders.

That would leave JSON \ within the link elements, which would be interpreted as escape codes as  @lakokkonen described.
Would a simple ANT <replace>  and/or XSL replace() be sufficient to fix this?  See: https://github.com/infotexture/dita-bootstrap.lunr/compare/develop...jason-fox:dita-bootstrap.lunr:feature/slash
dita uninstall fdita-bootstrap.lunr
dita install https://github.com/jason-fox/fdita-bootstrap.lunr/archive/feature/slash.zip

Since I don't run on Windows, I can't reproduce this test case.

With the fix @jason-fox provided the build doesn't fail.
However, the file paths in preview.json still contain the \, so the JSON contains errors:

In this case, the search is unable to find the topic with the corrupted link. Otherwise the search works OK..

That just requires the same fix to be applied to the other file. see here - try pulling again.

Works like a charm now. The JSON is valid and the search is working.


to_excel with engine='xlwt' doesn't support pandas.tslib.Timedelta

Hello,
to_excel method with engine='xlwt' doesn't support pandas.tslib.Timedelta
import numpy as np
import pandas as pd

idx = pd.date_range('20140101', '20140201')
df = pd.DataFrame(index=idx)
df['col0'] = np.random.randn(len(idx))
s_idx = pd.Series(idx, index=idx)
diff_idx = (s_idx-s_idx.shift(1)).fillna(pd.Timedelta(0))
df['diff_dt'] = diff_idx
df.to_excel("out.xls", engine='xlwt')

it works fine with xlsx files (engine openpyxl or xlsxwriter).
Kind regards

@scls19fr does this work with the plain datetime.timedelta type instead of pd.Timedelta? This might be another case where Timedelta does not quite conform to the timedelta API.

+1


Removing require autoload.php in psgdpr.php and version bumping

Questions
Answers

Description?
The new system requires autoload directly from the CORE, then we should remove require autoload in psgdpr.php

Version bumping as well

Type?
bug fix

BC breaks?
no

Deprecations?
no

Fixed ticket?

How to test?
This should be solve CI error here https://github.com/PrestaShop/PrestaShop/pull/32083

Hello @lartist,
I have tested your PR and it's good for me! :tada:
Thanks!

Thank you @lartist !


[Feature]: Delete old docker containers / node_modules

Is there an existing issue for this?

[X] I have searched the existing issues

Summary
Each time we build a node application, a new docker container is created, with a new node_modules folder. The old containers are kept.
Also when we delete an application, its containers are not deleted either.
As a result, it takes a lot of space in the local disk. So it would be a good idea to give the possibility to delete the old containers.
Why should this be worked on?
Nodes_modules and consequently docker containers use a lot of storage. For servers with little storage space, it would be vital to allow deleting old containers from the coolify dashboard.

I think this is fixed now with v3 and the new scheduler. Could you please review it?
Coolify has a job to clean up docker stuff periodically or manually from the dashboard.

Hello, it does work. Indeed, the button on the homepage delete the excess storage.
Thank you for your wonderful work !


[BUG] SKGLView on MAUI Mac Catalyst is missing a handler

I can’t use SKGLView because its handler is missing. SKCanvasView works fine.
new SKGLView();

Expected Behavior
A working OpenGL view.
Actual Behavior
Runtime error saying no handler found.
Basic Information

Version with issue:  latest
Last known good version:  none
IDE:  VSMPreview
Platform Target Frameworks:

macCatalyst:

Target Devices:

Mac

Yeah... Seems the iOS team deleted that. There is no GL view for mac cat. Not sure what to do. Might need to use metal, but this is slightly different.

Tell them to put it back. Mac Cat supports OpenGL.

OK, looks like Apple has removed GL from Catalyst. FML :-)
So… How about that MAUI SKGpuView That uses Metal on Apple and GL everywhere else? :-)

Hope Skiasharp can have more perfect support😊

platform
ios
android
winui3
maccatalyst

cpu
SKCanvasView
SKCanvasView
SKXamlCanvas
SKCanvasView

gpu
SKGLVIew,SKMetalView
SKGLSurfaceView,SKSurfaceView,SKGLTextureView
✗
SKMetalView

platform
ios
android
winui3
maccatalyst

maui cpu SKCanvasView
✓
✓
✓
✓

maui gpu SKGLVIew
✓
✓
✗
✗

Does it mean that for MAUI we don't have gpu support on WinUI3 and MacCatalyst?
Is it something that is going to change?

Agreed the SkGpuView is a good idea.
On the subject of ios/maccatalyst naming, ios seems to include maccatalyst which is a bit confusing. Perhaps SkiaSharp.Views.Uikit would be more accurate.
Currently this is regulated by:
https://github.com/mono/SkiaSharp/blob/b8efe44ae79614d7c0c0739e7144427912fd166a/source/SkiaSharp.Views/SkiaSharp.Views.Apple/SKMetalView.cs#L18
#if __IOS__
namespace SkiaSharp.Views.iOS
#elif __MACOS__
namespace SkiaSharp.Views.Mac
#endif

And catalyst seems to be IOS. For example https://github.com/mono/SkiaSharp/blob/b8efe44ae79614d7c0c0739e7144427912fd166a/samples/Gallery/Uno.WinUI/SkiaSharpSample.Mobile/SkiaSharpSample.Mobile.csproj#L33
<PropertyGroup Condition="'$(TargetFramework)'=='net6.0-ios' or '$(TargetFramework)'=='net6.0-maccatalyst'">


Add explanation string to jasmine's expect() failure message

The Brackets team does not own or maintain Jasmine
Please direct your feedback to this discussion thread, where the maintainers of Jasmine might actually see it.

This came up during our architecture meeting.
The output of a failing unit test is cryptic. It shows the name of the test and a simple error like "expected false to be true".  You need to scour through the stack report, find the line that caused the error and go to the source to see the error.
It would be nice if we could include a contextually relevant message to the error string.

So I did it for my own for jasmine 2.0 and the related definitely-typed and I've posted it here: https://github.com/davidemannone/jasmine2.0-explained
Here is how to use it: expect(SOMETHING).toEqual(WHAT-EXPECTED).byFailReport("YOUR-CUSTOM-REPORT!");
and this reports only in case of the match fails this: "Expected SOMETHING to be WHAT-EXPECTED. >YOUR-CUSTOM-REPORT!<
For more details read the Readme.Me file.

Closing -- official word from the Jasmine team (https://github.com/jasmine/jasmine/issues/641#issuecomment-54736801) is that this is unofficially supported already -- just pass an extra arg to the matcher (the function called after expect() -- but the preferred "Jasmine way" of accomplishing this is to write your own custom matcher that has enough context to provide a nicer message.

Hy Peter,
I saw it and I've rad all about them on every blog.
For the first: the definitely typed has no other args provided and what about matchers they need variable lenght arguments? There are also some default of them in jasmine.
For the latter: that's ok and surely a good choice, but you have to provide for them costantly and in any test file and "override" any jasmine's default ones, for just printing out a string more that helps localize faster the exactly point of the problem (without starting then a debugging session).
I agree also that in BDD test could/should be treatet such a right way they do not need any other description other than the describe-it paradigm permits, but I think there is too much closure about such a simple feature like add an additional text to what already exists, whitout presenting it as a workaround or as it would be judged as a evil's help. I posted it right to suggest to continue the debate for find-out at least any official-default implementation. My personal opinion is: it would be easier to sopport it properly, extending the paradigm to a describe-it-accurately form, and then it is left to the user decide to use it or not. Could it be simply a choice of the developer to choose if use just one expect clause or many of them in one single Specs and supporting them anyway rightly if something fails?
I made it for me and I found it to be usefull, and I just decided to share it.

Could someone please give me a sample piece of code for configuring jasmine-custom-message with protractor.

@sudharsan94, It may be of help

I am trying to write unit tests using karma and trying to use since block provided by jasmine-custom-message framework to console the failure message.
So I was wondering if I missed something ?.
I did the following:

jasmine (1.3.1) and jasmine-custom-message (0.8.2) are installed using bower
The require('jasmine-custom-message'); in one of my test file *.spec.js is throwing the following error.

ReferenceError: Can't find variable: require```

Issue: ReferenceError: Can't find variable require refers to the karma.conf.js file but not *.spec.js files.

+1

I also think we should show the detail message. Currently it just says expected false to be true and bunch of useless file references like : buildExpectationResult@file:/// ..., expectationResultFactory@file:... , addExpectationResult@file:///C:/Users/, addExpectationResult@file://... in ..file (line 52)
Which is not that helpful.

I also think we should show the detail message. Currently it just says expected false to be true and bunch of useless file references like : buildExpectationResult@file:/// ..., expectationResultFactory@file:... , addExpectationResult@file:///C:/Users/, addExpectationResult@file://... in ..file (line 52)
Which is not that helpful.

Almost 3 years with this opened and we still dont have a custom message for expect :(

This issue is closed AFAICT. Also in the first comment there is written very clearly that Brackets team doesn't own or mantain jasmine.
If the issue is fixed in jasmine 2.0 keep in mind that we are using jasmine 1.3 and upgrading require most probably a complete rewrite of all our tests.


Scrolling issue on React page

Page Scrolling Issue
Description
The page scrolling stops working as soon as the page is fully loaded.
To Reproduce
Steps to reproduce the behavior:

Visit Tw-Elements React.

Inspection
An un-handled exception was thrown. This is the error message: Uncaught TypeError: 'querySelector' called on an object that does not implement interface Element.
Screenshot of the error:

Desktop

OS: Ubuntu
Browser: Firefox
Version: 124.0.1

@iprzybysz Just a heads up, this was almost a huge blocker for considering the library as it prevented me from viewing quite a large amount of the components. Though the error isn't resolve with this it worked as a hotfix: remove the body style overflow: hidden will make the docs fully accessible again.

Hi @zbagley, we will try to fix it as soon as possible.

We've implemented a fix for this issue. You should now be able to scroll through all pages. Please verify if it's working properly.

Tested just now on both MacOS and Windows with firefox and chrome.  I believe this is a FF specific issue - not sure if y'all verified the fix on that browser.

We've tested it on both Linux and Windows systems, and confirmed that it functions correctly across all browsers.

We've tested it on both Linux and Windows systems, and it works on our devices. We've implemented a minor correction and we're going to see if it makes things even better


Special characters in filename causes uploads to fail

Bug report
When upload "望舌诊病.pdf"
Describe the bug

Thanks for the bug report @jet10000! We'll take a look.

@thebengeu @jet10000
As per now for both objectName and  bucketName ,  supabase only allow s3 safe characters as per AWS guideline
 // only allow s3 safe characters and characters which require special handling for now
 // https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html

S3 supports UTF-8 characters in filenames. However, at the moment, we are very strict with which filenames we allow.
I think this is a valid use case to add support for different languages in filenames.
One option is to update the isValidKey function https://github.com/supabase/storage-api/blob/9480891af024396c58045578d16c91778aae67d2/src/utils/index.ts#L76-L80 to allow everything aside from the characters outlined in https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines-avoid-characters

I would love support for å,ä,ö.
Love from Sweden

I would love support for  ´  I can't use words with accents in my images, which is very common in Spanish.

Also ÖÄÜ in german

MacOS generates screenshot names that don't match the pattern in isValidKey. For example, "Screenshot 2024-01-24 at 12.25.39 AM".

Ops! This issue seems easy to fix but have last for 2 year's. Unbelievable!

hi everyone
My solution is base64 encoding when uploading file, demo: https://github.com/ThaddeusJiang/supabase-helpers/blob/main/backup_storage_buckets.ts#L71-L73

This is a big pretty big oversight. At the very least it would be nice if this was documented somewhere

You can upload files using any name (e.g. base64, thx @ThaddeusJiang ), store the original file name in a different table, and then use it when generating the public link:
const {
  data: { publicUrl },
} = supabase.storage
  .from('my_bucket')
  .getPublicUrl(internalFileName, { download: originalFileName })

Source: https://supabase.com/docs/guides/storage/serving/downloads#downloading

As a non-english supabase developer, it is painfull that I can not upload assets other than alphabeta filenames. I hope the supabase teams take this issue with priority, as this issue has not fixed after two years and so many people complains on it.

As this blog post says that Supabase Storage is now S3 compatible. I think only supporting a subset of s3 valid characters for object names is not fully compatible with s3.

came here to see that we cant store UTF-8 as filename... crazy. Not even ISO-8859-1 because german umlauts are easily in there as well. The only hope i guess is the new metadata feature which should arrive soon in the JS lib. Proposals like creating a db table for storing filenames is a non-starter becasue the syncing of storage and db tables is virtually impossible.

I would like to use special characters in names as well. Trying to name images by the patient name and here in Balkans it's common to have čšžć in the first or last name.
Seems odd to me that this hasn't already been addressed.

A user tried to upload a file with a backtick and it threw an InvalidKey error.

Bug report
When upload "望舌诊病.pdf"
Describe the bug

supabase really should study the products from China, this is the product using supabase, but solved the problem of file name. How supabase was unable to solve the problem. Then request and copy it! The address is https://memfiredb.com/

I would like to use special characters in names as well. Trying to name images by the patient name and here in Balkans it's common to have čšžć in the first or last name.
Seems odd to me that this hasn't already been addressed.

https://github.com/supabase/storage/issues/133#issuecomment-2266315005

came here to see that we cant store UTF-8 as filename... crazy. Not even ISO-8859-1 because german umlauts are easily in there as well. The only hope i guess is the new metadata feature which should arrive soon in the JS lib. Proposals like creating a db table for storing filenames is a non-starter becasue the syncing of storage and db tables is virtually impossible.

https://github.com/supabase/storage/issues/133#issuecomment-2266315005

错误报告
上传《望舌诊病.pdf》时
描述错误

supabase really should study the products from China, this is the product using supabase, but solved the problem of file name. How supabase was unable to solve the problem. Then request and copy it! The address is https://memfiredb.com/

我也想在名字中使用特殊字符。尝试用患者姓名命名图像，在巴尔干地区，名字或姓氏中带有 čšžć 是很常见的。
我觉得奇怪的是这个问题尚未得到解决。

supabase really should study the products from China, this is the product using supabase, but solved the problem of file name. How supabase was unable to solve the problem. Then request and copy it! The address is https://memfiredb.com/

德语中还有 ÖÄÜ

supabase really should study the products from China, this is the product using supabase, but solved the problem of file name. How supabase was unable to solve the problem. Then request and copy it! The address is https://memfiredb.com/

您可以使用任何名称上传文件（例如 base64、thx@ThaddeusJiang），将原始文件名存储在不同的表中，然后在生成公共链接时使用它：
const {
  data: { publicUrl },
} = supabase.storage
  .from('my_bucket')
  .getPublicUrl(internalFileName, { download: originalFileName })

来源（用于 URL 访问）：https://supabase.com/docs/guides/storage/serving/downloads#downloading 不幸的是，supabase-js 文档尚未提及这一点：https://supabase.com/docs/reference/javascript/storage-from-getpublicurl

supabase really should study the products from China, this is the product using supabase, but solved the problem of file name. How supabase was unable to solve the problem. Then request and copy it! The address is https://memfiredb.com/

有这方面的新闻吗？我甚至在处理像 这样的字符时也失败了%，这甚至不是 unicode

supabase really should study the products from China, this is the product using supabase, but solved the problem of file name. How supabase was unable to solve the problem. Then request and copy it! The address is https://memfiredb.com/

来这里才发现我们无法将 UTF-8 存储为文件名……太疯狂了。甚至 ISO-8859-1 也不行，因为德语变音符号也很容易出现在那里。我猜唯一的希望是新的元数据功能，它应该很快就会出现在 JS 库中。创建数据库表来存储文件名之类的提议是行不通的，因为存储和数据库表的同步几乎是不可能的。

supabase really should study the products from China, this is the product using supabase, but solved the problem of file name. How supabase was unable to solve the problem. Then request and copy it! The address is https://memfiredb.com/

@thebengeu @jet10000 @alaister 目前，对于objectName和 bucketName，supabase 仅允许按照此处的AWS 指南使用 s3 安全字符
 // only allow s3 safe characters and characters which require special handling for now
 // https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html

supabase really should study the products from China, this is the product using supabase, but solved the problem of file name. How supabase was unable to solve the problem. Then request and copy it! The address is https://memfiredb.com/

Bug report
When upload "望舌诊病.pdf"
Describe the bug

supabase really should study the products from China, this is the product using supabase, but solved the problem of file name. How supabase was unable to solve the problem. Then request and copy it! The address is https://memfiredb.com/

@renjiali It's good for you to fix this problem, but please send a pull request to the upstream project instead of spamming in this issue.
PS: I'm also a chinese in China mainland.

I could understand that the isValidKey function looks like because it would be safe if the system accepts only the alphabet. As I'm Korean, there is no good way to safely convert from the Korean characters(hangul) to alphabet. It would be same for the Japanese characters and Chinese characters too. Are there any specific reasons for the function's regex? If the function accepts the encoded characters from encodeURIComponent function, it would be great.

I've posted the comment to know that there is any conflicts if I change the function isValidKey to accept encodeURIComponent. I'm pretty sure that there is some reason for not accepting it because Supabase team seems to be quite reasonable.
And @renjiali, please DO NOT SPAM. If there is any comment added on this issue, the watchers get the mail for each of the comments.

我可以理解该isValidKey函数的样子，因为如果系统只接受字母表，它会很安全。 因为我是韩国人，所以没有很好的方法可以安全地将韩文字符（hangul）转换为字母表。日文字符和中文字符也一样。 函数的正则表达式有什么特殊的原因吗？如果函数接受来自encodeURIComponent函数的编码字符，那就太好了。

我可以理解该isValidKey函数的样子，因为如果系统只接受字母表，它会很安全。因为我是韩国人，所以没有很好的方法可以安全地将韩文字符（hangul）转换为字母表。日文字符和中文字符也一样。函数的正则表达式有什么特殊的原因吗？如果函数接受来自encodeURIComponent函数的编码字符，那就太好了。

我已经发布了评论，知道如果我将函数更改isValidKey为 accept是否会发生冲突encodeURIComponent。我很确定不接受它肯定是有原因的，因为 Supabase 团队似乎很通情达理。
和@renjiali，请不要发送垃圾邮件。如果对此问题有任何评论，观察者将收到每条评论的邮件。

我可以理解该isValidKey函数的样子，因为如果系统只接受字母表，它会很安全。因为我是韩国人，所以没有很好的方法可以安全地将韩文字符（hangul）转换为字母表。日语和字符中文字符也一样。函数的正则表达式有什么特殊的原因吗？如果函数接受来自encodeURIComponent函数的编码字符，那就太好了。

我已经发布了评论，知道如果我将函数更改isValidKey为接受是否会发生冲突encodeURIComponent。我很确定不接受肯定是有原因的，因为 Supabase 团队似乎很通情达理。
和@renjiali，请不要发送垃圾邮件。如果此问题有任何评论，观察者将收到每条评论的邮件。

Just because you think it's spam doesn't mean anything.  You don't have any facts. I, on the other hand, believe that South Korea has no sovereignty, just as it is stationed by the US father

hi everyone
My solution is base64 encoding when uploading file, demo: https://github.com/ThaddeusJiang/supabase-helpers/blob/main/backup_storage_buckets.ts#L71-L73

Thank you! Your link is broken, but I used btoa() and it's working well!

For anyone else who is running into this issue, here is my snipped for converting filenames to base64 and back:
function base64ToBytes(base64) {
    const binString = atob(base64);
    return Uint8Array.from(binString, (m) => m.codePointAt(0));
}

function bytesToBase64(bytes) {
    const binString = Array.from(bytes, (byte) =>
        String.fromCodePoint(byte),
    ).join("");
    return btoa(binString);
}

const convertFileNameToBase64 = (name) => {
    return bytesToBase64(new TextEncoder().encode(name));
}
const convertBase64ToFileName = (encoded) => {
    return new TextDecoder().decode(base64ToBytes(encoded));
}

Given the amount of attention and requests for this issue to be addressed, I'm surprised that it still hasn't been addressed even after 2 years. I understand that the restriction might be due to security reasons, but it's essentially locking out any non-English speaker (or anyone not building an app in English) from using Supabase for their apps. Even though I'm an English speaker the app I'm currently building is mainly for non-English speakers and their filenames is certainly not gonna be in English so having to force to change their filenames every time before uploading it will be frustrating both me and the users which means I might ultimately have to switch to a different backend service down the road😔.

if you wanna have a very close representation of your passed non-latin filename, you could use something like this i suppose: https://www.npmjs.com/package/remove-accents

@alaister Please help us to solve this issue🙏


reap_playwright_servers - too few arguments to Playwright::Util::request

Hi. I'm finally converting my Selenium tests to Playwright. Thank you!
I tried to run reap_playwright_servers but it gives an error:
Too few arguments for subroutine 'Playwright::Util::request' (got 4; expected at least 5) at /usr/local/bin/reap_playwright_servers line 29.
 at /usr/local/bin/reap_playwright_servers line 29.

It looks like https://github.com/teodesian/playwright-perl/issues/51 added a $host argument. If I add 'localhost' to the  Playwright::Util::request() call in reap_playwright_servers it works fine.
I would be happy to create a pull request but wanted your thoughts.

Please do, I'm happy for any and all pull requests.  I'm busy with a move right now, so you can probably put it together faster than I can.


spec: Implement Datafile

https://paimon.apache.org/docs/master/concepts/specification/
May need refer to java impl since the spec is not clear.

@crrow will be happy on this.


Visualize joints

Like on Gazebo-classic, it should be possible to visualize joints so users can debug their models and simulations.
Joint visualization could be toggled from:

A world's right-click context menu: toggles all joints in the world
A model's right-click context menu: toggles all joints in the model
A joints's right-click context menu

We could also consider adding toggle buttons to an entity's component inspector.
Here's classic's JointVisual implementation as a reference. Different joint types have different visuals.

Done in #961


DataGrid whole red in Highcontrast theme

Describe the bug
The DataGrid control exhibited a uniform red coloration when utilized with the Highcontrast theme.
To Reproduce
WPU UI app gallery download from MS store
Expected behavior
Correctly display in Highcontrast mode
Screenshots
No response
OS version
Windows 10 22H2 and Windows 11 23H2

.NET version
.Netframework 4.8
WPF-UI NuGet version
3.0.5
Additional context
No response

Same error

Describe the bug
The DataGrid control exhibited a uniform red coloration when utilized with the Highcontrast theme.
To Reproduce
WPU UI app gallery download from MS store
Expected behavior
Correctly display in Highcontrast mode
Screenshots
No response
OS version
Windows 10 22H2 and Windows 11 23H2
.NET version
.Netframework 4.8
WPF-UI NuGet version
3.0.5
Additional context
No response

Add this parameter and try it out
Background="{x:Null}"


Export #BSIsubspace Virtual Talks section into a page

As discussed in our May/23rd meeting, let's

move the entire subspace talks section to its own talks.md file
Carlos' update already includes this file. Please, pull the latest update to your local copy first, then update the talks.md file
add item to accordion.yml
Carlos' update already includes this too. Nothing needs to change here.
Remember to sort talks from newest to oldest
Remember to use this string <!--more--> to limit the content to be showed in the preview.
This would probably be like an if statement. If it gets complicated, please skip this part.

DUE BY MAY/30/2022

Done. Would you like me to submit a PR?

Yes, please!

I'm having difficulty creating the PR's. I have the commits made from my own branch in my forked repo. How do I submit a PR with them?


Not working with system Ghidra in Arch Linux

Hi,
either it's not working out of the box with system wide Ghidra in Arch Linux or I simply don't understand the install process. It's unable to find Ghidra installation and when pointed to /opt/ghidra/ it complains with ERROR: Please open Ghidra at least once to fully install dark mode.
Best

try:
sudo python install.py --path /opt/ghidra/ # ERROR: Please open Ghidra at least once to fully install dark mode.
# Then
python install.py --path /opt/ghidra/ # success

I don't know the reason but it works on Manjaro.

Thanks a lot for the workaround. I'll leave this open until fixed I guess.

Thanks a lot for the workaround. I'll leave this open until fixed I guess.

It  has been fixed but not merged into main. See #33

Closed by #33.


Annoying Rouge warnings

Everytime you start the platform, this annoying warnings appear:
warning: already initialized constant Rouge::Lexers::Shell::KEYWORDS
warning: previous definition of KEYWORDS was here
warning: already initialized constant Rouge::Lexers::Shell::BUILTINS
warning: previous definition of BUILTINS was here

Seems it's a Rouge 1.9.1 bug, and it can be fixed by disallowing that version.

@flbulgarelli why are we using a commit-specific version of Rouge?
gem 'rouge', :github => 'jneen/rouge', :ref => 'dbdd4e7d249606543831dba63efc2737b7d6ad90'


400 Bad Request

Hi,
I just installed the component, and have it now communicating, to some degree, with the router. The router is in this case <IP_ADDRESS> and the port is 443
How ever, it is now repeating the following:
`2024-01-23 15:55:43.260 ERROR (MainThread) [custom_components.vyos.router] Unexpected error fetching VyOS - https://<IP_ADDRESS>:443 data: <ClientResponse(https://<IP_ADDRESS>:443/retrieve) [400 Bad Request]>
<CIMultiDictProxy('Server': 'nginx/1.22.1', 'Date': 'Tue, 23 Jan 2024 13:55:43 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '90', 'Connection': 'keep-alive')>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/vyos/router.py", line 203, in _async_update_data
await self.vyos_data.update_devices()
File "/config/custom_components/vyos/router.py", line 134, in update_devices
await static_mapping_co_routine
File "/config/custom_components/vyos/vyosapi.py", line 316, in get_config
raise VyOSApiError(res)
custom_components.vyos.vyosapi.VyOSApiError: <ClientResponse(https://<IP_ADDRESS>:443/retrieve) [400 Bad Request]>
<CIMultiDictProxy('Server': 'nginx/1.22.1', 'Date': 'Tue, 23 Jan 2024 13:55:43 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '90', 'Connection': 'keep-alive')>
2024-01-23 15:56:00.925 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py:423: RuntimeWarning: coroutine 'VyOSApi.get_dhcp_lease' was never awaited
self.headers: CIMultiDict[str] = CIMultiDict()
2024-01-23 15:56:00.926 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py:423: RuntimeWarning: coroutine 'VyOSApi.get_present_arp_clients' was never awaited
self.headers: CIMultiDict[str] = CIMultiDict()
2024-01-23 15:57:05.199 ERROR (MainThread) [custom_components.vyos.router] Unexpected error fetching VyOS - https://<IP_ADDRESS>:443 data: <ClientResponse(https://<IP_ADDRESS>:443/retrieve) [400 Bad Request]>
<CIMultiDictProxy('Server': 'nginx/1.22.1', 'Date': 'Tue, 23 Jan 2024 13:57:05 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '90', 'Connection': 'keep-alive')>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/vyos/router.py", line 203, in _async_update_data
await self.vyos_data.update_devices()
File "/config/custom_components/vyos/router.py", line 134, in update_devices
await static_mapping_co_routine
File "/config/custom_components/vyos/vyosapi.py", line 316, in get_config
raise VyOSApiError(res)
custom_components.vyos.vyosapi.VyOSApiError: <ClientResponse(https://<IP_ADDRESS>:443/retrieve) [400 Bad Request]>
<CIMultiDictProxy('Server': 'nginx/1.22.1', 'Date': 'Tue, 23 Jan 2024 13:57:05 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '90', 'Connection': 'keep-alive')>
2024-01-23 15:58:08.160 WARNING (Recorder) [py.warnings] <string>:21: RuntimeWarning: coroutine 'VyOSApi.get_dhcp_lease' was never awaited
2024-01-23 15:58:08.161 WARNING (Recorder) [py.warnings] <string>:21: RuntimeWarning: coroutine 'VyOSApi.get_present_arp_clients' was never awaited
2024-01-23 15:58:27.130 ERROR (MainThread) [custom_components.vyos.router] Unexpected error fetching VyOS - https://<IP_ADDRESS>:443 data: <ClientResponse(https://<IP_ADDRESS>:443/retrieve) [400 Bad Request]>
<CIMultiDictProxy('Server': 'nginx/1.22.1', 'Date': 'Tue, 23 Jan 2024 13:58:27 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '90', 'Connection': 'keep-alive')>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/vyos/router.py", line 203, in _async_update_data
await self.vyos_data.update_devices()
File "/config/custom_components/vyos/router.py", line 134, in update_devices
await static_mapping_co_routine
File "/config/custom_components/vyos/vyosapi.py", line 316, in get_config
raise VyOSApiError(res)
custom_components.vyos.vyosapi.VyOSApiError: <ClientResponse(https://<IP_ADDRESS>:443/retrieve) [400 Bad Request]>
<CIMultiDictProxy('Server': 'nginx/1.22.1', 'Date': 'Tue, 23 Jan 2024 13:58:27 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '90', 'Connection': 'keep-alive')>
2024-01-23 15:58:28.425 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.11/asyncio/base_events.py:436: RuntimeWarning: coroutine 'VyOSApi.get_dhcp_lease' was never awaited
task = tasks.Task(coro, loop=self, name=name, context=context)
2024-01-23 15:58:28.425 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.11/asyncio/base_events.py:436: RuntimeWarning: coroutine 'VyOSApi.get_present_arp_clients' was never awaited
task = tasks.Task(coro, loop=self, name=name, context=context)

Hello,
Could you give me a little more info on which version of integration you're using, the home assistant version, and the vyos version?

Hi,
the component was installed through HACS today. HA is as follows:
Core 2024.1.5
Supervisor 2023.12.1
Operating System 11.4
Frontend 20240104.0
My Vyos is 1.4.-rc3 so that might explain.  I will try to downgrade.

I've pondered this, and even if you're required to utilize the older version of the integration, that doesn't clarify the issue in your situation.
For debugging reasons, could you attempt invoking the API directly with this command and omit any confidential information?
curl -v -k --location --request POST 'https://<IP_ADDRESS>:443/retrieve' --form data='{"op": "showConfig", "path": ["service", "dhcp-server", "shared-network-name"]}' --form key='MY-HTTPS-API-PLAINTEXT-KEY'

I suppose I managed to downgrade, at least the manifest.json is now stating 2022.8.1. Still the same(?) problem though. At least saying it's a bad request. Below the API dump.
`curl -v -k --location --request POST 'https://<IP_ADDRESS>:443/retrieve' --form data='{"op": "showConfig", "path": ["service", "dhcp-server", "shared-network-name"]}' --form key='MY-HTTPS-API-PLAINTEXT-KEY'
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying <IP_ADDRESS>:443...
* Connected to <IP_ADDRESS> (<IP_ADDRESS>) port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server accepted http/1.1
* Server certificate:
*  subject: CN=localhost
*  start date: Jan  3 21:09:18 2024 GMT
*  expire date: Dec 31 21:09:18 2033 GMT
*  issuer: CN=localhost
*  SSL certificate verify result: self-signed certificate (18), continuing anyway.
* using HTTP/1.1
> POST /retrieve HTTP/1.1
> Host: <IP_ADDRESS>
> User-Agent: curl/7.88.1
> Accept: */*
> Content-Length: 320
> Content-Type: multipart/form-data; boundary=------------------------74701d8cead5feb6
>
* We are completely uploaded and fine
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
< HTTP/1.1 400 Bad Request
< Server: nginx/1.22.1
< Date: Tue, 23 Jan 2024 15:23:47 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 90
< Connection: keep-alive
<
* Connection #0 to host <IP_ADDRESS> left intact
{"success": false, "error": "Configuration under specified path is empty\n", "data":`

I understand now.
The problem stems from the vyos instance not functioning as the DHCP server. This integration relies on data from three origins:

The static-mapping definded in service dhcp-server shared-network-name XXX subnet XXX.XXX.XXX.XXX/XX static-mapping ...
DHCP leases at obtained from show dhcp server leases state all
ARP information from show arp

It didn't occur to me that someone might employ this integration without configuring it as a DHCP server. I can work on a fix soon, but could you please share your specific use case?

Ah, yes. I am making a fresh install here, so I forgot that I am not yet using the router as the DHCP server and haven't enabled it to make sure my configuration works with a static setup first.  So, no real use case for that. Just setting things up one place at a time.

I regard this matter as resolved, as there are currently no intentions to implement a device tracker based solely on ARP
However @mleppanen with the latest release version 2024.1.2, you can now install the most recent iteration of this integration, ensuring that you have access to all the latest features.
If there arias a need for a device tracker based solely on ARP, please create a new issue for it.


banktags: save last opened tab when opening worn items

Closes #10824. This request is in two parts.
Part 1/Commit 1: Addressing the cited issue directly
Diagnosing the problem, I found 3 behaviors:

Opening the "worn items" doesn't change the hidden state of tab interface
Saving the last tag tab happens on the tick
Switching from main bank interface to gear interface and back can be done on the same tick

Therefore the issue is present in these two scenarios:

You click "worn items", a tick happens and you check for hidden: tabs are not hidden, so don't save the last tab; at this point the last tab is forgotten
You click "worn items" and quickly return to main screen before a tick happens: the hidden check doesn't even happen so there's no chance to save the last tab; last tab is forgotten

My proposed fix modifies the definition of the tabs hidden state, and moves the code to save the last tab outside of the tick-controlled function update and into its own function, controlled by onWidgetHiddenChanged.
Part 2/Commit 2: Addressing a related issue found during my testing
Independent of the above work (i.e. reproducible on both master and my first commit), I found that in the following scenario, the saved tag tab gets overwritten:
After selecting a bank tag tab, exit the bank, (log out) and fully close RL client. Relaunch RL, log in and open bank.
My proposed fix adds a boolean to make sure that the code responsible for the error in behavior cannot possibly be run until the bank has been opened once after RL startup. (Short reason: the variable activeTab is not properly assigned (instead it's null) until bank is opened once after startup, which breaks some of the logic. Only after that does the logic with activeTab work properly.)

You can just set the config for the remembered tab on menu entry clicked

If I'm understanding that suggestion right, then I would add an if condition where I check that I click the "Show worn items" button. But just to be clear, it's not just that case that causes the issue, it's clicking on anything that keeps you inside the bank but leaves the main interface that doesn't set the remembered tab correctly (example: clicking the "Show menu" button on the top right section). Which means, to rely on menu option clicked, I have to account for all actions that cause the wrong behavior. (It could very well be just those two buttons, so the fix seems not too extensive.)
And for the record, I did come across a minor bug in the following scenario, using my second commit, and I'll see if adding the suggestion fixes it:
Start with your bank without the incinerator, select a tag tab, then enable incinerator and return to main interface; the incinerator is rendered incorrectly in that there exists a second scroll down button right on top of it (exiting and reentering the bank fixes the render issue)
Edit: the deeper issue is that I seem to be rendering an extra copy of "Scroll up" and "Scroll down" buttons every time I leave and reenter the main bank screen while staying inside the bank. So it's more than a minor bug and I'll deal with that as well.

That was intended.

Latest commits address the points most recently brought up, along with a newly found issue (the incinerator rendering) relating to (and diagnosed because of) my example scenario but not being a side effect of my initial work.
It was a bit hard to diagnose the widget duplication issue; that said, my belief is that, based on my testing, the if condition I chose of checking widget children differentiates between opening the bank (none of upButton, etc. have been created yet - no children), and clicking on "worn items" (per se) and returning to main interface without leaving the bank (upButton, etc. already created but not destroyed due to not leaving bank - yes children). Let me know if there's a scenario that breaks that logic.

Just remove your init you added.

Latest commit removes the init logic from BankTagsPlugin, though I still need to run init somewhere in the case of switching bank interfaces, which leaves menu option clicked, as suggested before. So I added an if block similar to the save mechanism from an earlier commit, with an important addition of an invokeLater in order to make sure the hidden state is given time to change and the init runs as expected (b/c without invokeLater, init returns too early and the remembered tab is forgotten).

This is more what I was thinking, utilizing remembered search. You can just cherry pick this.
https://github.com/raiyni/runelite/commit/e989535899db069798406f503683dfc235f694f0

That patch is an interesting idea, I got a better understanding of remembered search from that, and some logic is improved. After merging with my work, with the independent changes, it practically works well. I did decide to add a couple minor fixes:

To resolve the flickering of panels that sometimes happens if "Hide worn items"/"Hide menu" is clicked, I trigger update upon click; also, invoked later so the panel actually closes first
To resolve a stress test by rapid clicking equipment/menu button, I use two update() calls in that if block; the 1st update() restores the tag tab but leaves activeTab null; at this point, clicking the button again before the next tick forgets the saved tab, so an explicit 2nd update() is needed to accurately set activeTab

I don't see why you would want to invokeLater N times you click with double updates. The case you present isn't something I would consider a valid use case. It seems like you would be creating a race between you clicking, the tick event, and the invokeLater.

If you say the rapid click is not a valid use case, then I won't account for it in code and will take out the second update.
I'd still like to force a single update upon click, since switching panels takes less than a tick and it'd update the tag tab right away. Else, you see the All tab for a split second before the tag tab. If that latter behavior is preferred, I'll take out the force update entirely.

Understandable what you are trying to do. I wonder if what you are trying to achieve is possible without having to invokeLater the update method.

I'm going to say it's not possible without invokeLater because, at the exact moment of click, the interface has not yet changed (you can verify by querying the relevant widgets that the main interface is still hidden). An update at this point just returns early. Ergo, you must wait for the interfaces to switch, hence, invokeLater.

See https://github.com/raiyni/runelite/commit/83c37e414aa0c0a99c4079dd1a5f156297c8be33

I stand corrected. This resolves both points I raised.