Add imagemagick engine

I find the diffs imagemagick produces much easier to work with.
See http://stackoverflow.com/questions/5132749/imagemagick-diff-an-image for examples.
This engine behaves a bit differently than the perceptualdiff engine. It leaves the new screenshot around only if there are differences. When there's no differences, an existing differences image from an earlier run is deleted. It also uses cmp at first to quickly skip unchanged screenshots.

Thanks a lot for this. I'd love to add Imagemagick support. It'd be easier if we had test though. Do you think you could add some as part of this PR?
I realize that the perceptualdiff backend doesn't have tests either. We should add some too, but that's of course outside the scope of this PR.

Sorry, I'm not using this anymore. Feel free to close.

No worries. Leaving this ticket open as it's a useful feature I hope can be merged at some point. Hopefully some tests can be added.

@mbertheau So I have written some tests for this and could merge it soon. However, I first wanted to ask you, what is the purpose of the cmp_cmd command? Isn't compare_cmd all that needs to be executed? Thanks!

@jphalip I believe cmp was much faster at recognizing files that are the same than compare. For that reason I first tried cmp, and when the files were equal, I could return that result quickly. If they weren't the same, I used compare to get a difference metric.

@mbertheau Ok, I see. Is cpm supposed to be part of Imagemagick itself? I've installed Imagemagick via brew install on my Mac, but that seems to only give me compare, not cmp.

cmp is part of diffutils on Ubuntu. I don't know about OS X, sorry :)

@mbertheau Ok, I see, thank you :)   I don't think we can assume that all users will have cmp available, so we should probably leave that out. I'll try to push the feature with tests soon.


"CUDA error: invalid argument" on model test for vit_h_14

We got the following error on the CI:
___________________ test_classification_model[cuda-vit_h_14] ___________________
Traceback (most recent call last):
  File "/work/test/test_models.py", line 732, in test_classification_model
    _check_input_backprop(model, x)
  File "/work/test/test_models.py", line 226, in _check_input_backprop
    out[0].sum().backward()
  File "/work/ci_env/lib/python3.8/site-packages/torch/_tensor.py", line 488, in backward
    torch.autograd.backward(
  File "/work/ci_env/lib/python3.8/site-packages/torch/autograd/__init__.py", line 197, in backward
    Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
RuntimeError: CUDA error: invalid argument
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

This error only happened on vit_h_14 model in cuda device (the cpu is fine). Also I cannot reproduce the error on AWS cluster machine. Seems like this error is either machine or environment dependent and likely to be pytorch-core issue.
Note: I have tried running the test with CUDA_LAUNCH_BLOCKING=1 but the error trace seems pretty similar (see here):
___________________ test_classification_model[cuda-vit_h_14] ___________________
Traceback (most recent call last):
  File "/work/test/test_models.py", line 725, in test_classification_model
    _check_input_backprop(model, x)
  File "/work/test/test_models.py", line 225, in _check_input_backprop
    out[0].sum().backward()
  File "/work/ci_env/lib/python3.8/site-packages/torch/_tensor.py", line 488, in backward
    torch.autograd.backward(
  File "/work/ci_env/lib/python3.8/site-packages/torch/autograd/__init__.py", line 197, in backward
    Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
RuntimeError: CUDA error: invalid argument
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

cc @pmeier @seemethere @atalman @osalpekar

I opened https://github.com/pytorch/vision/pull/7218 to skip this test.
This is quite bad, but I don't know how to solve it right now. I can't reproduce it on the AWS cluster either. I suspected that it could be a CUDA version issue: it passes on AWS cluster with CUDA 11.6, while our CI is 11.7 and https://github.com/pytorch/vision/pull/7214 shows that it also fails on  CI x 11.8. But I can't tell whether  CI x 11.6  also fails, and I can't tell whether AWS x 11.7 fails either.
This could be a CUDA issue, or an upstream core issue. At this point and with all of what we have to do for the release (https://github.com/pytorch/vision/issues/7217), our last resort is to skip the test as done in #7218.
CC @atalman @malfet , just letting you know that this might be a core or CI issue, I'm just unable to tell at this point.

I just tried today's cu118 nightly torch and latest vision. The test seems to be able to pass
Command:  pytest test/test_models.py::test_classification_model[cuda-vit_h_14] -v
test/test_models.py::test_classification_model[cuda-vit_h_14] PASSED
Also, looking into what is blocking https://github.com/pytorch/vision/pull/7221

Tried cu117 as well. I cannot reproduce it either.
pytest test/test_models.py::test_classification_model[cuda-vit_h_14] -v
====================================================================================================== test session starts ======================================================================================================
platform linux -- Python 3.10.10, pytest-7.3.1, pluggy-1.0.0 -- /conda/envs/vision_7143_cu117/bin/python3
cachedir: .pytest_cache
configfile: pytest.ini
plugins: mock-3.10.0
collected 1 item
test/test_models.py::test_classification_model[cuda-vit_h_14] PASSED                                                                                [100%]
================================================================================================ 1 passed, 4 warnings in 25.36s ============================================================================================pip list |grep torch
pytorch-triton     2.1.0+46672772b4
torch              2.1.0.dev20230417+cu117
torchaudio         2.1.0.dev20230417+cu117
torchvision        0.16.0a0+b78d98b        /weiwangmeta/repos/vision

We should test landing https://github.com/pytorch/vision/pull/7221

Blocked by https://github.com/pytorch/vision/issues/7515
This should no longer be an issue. See the test signals for #7221

#7515 was resolved. but the test signal is still showing red for one case: https://github.com/pytorch/vision/actions/runs/4729419633/jobs/8405697987?pr=7221
Continuing the investigation...

Reproduced on an A10G (sm86).

In summary, this issue could be reproduced on a SM86 GPU (like the one used by CI A10G), but not SM80 GPU (like A100).

Re-confirming a100 (SM80) passes
(test_vision_on_A100) weiwangmeta@gh-ci-gcp-a100-8:~/vision$ pytest test/test_models.py::test_classification_model[cuda-vit_h_14] -v
====================================================================================================== test session starts ======================================================================================================
platform linux -- Python 3.10.10, pytest-7.3.1, pluggy-1.0.0 -- /home/weiwangmeta/miniconda3/envs/test_vision_on_A100/bin/python3
cachedir: .pytest_cache
rootdir: /home/weiwangmeta/vision
configfile: pytest.ini
plugins: mock-3.10.0
collected 1 item
test/test_models.py::test_classification_model[cuda-vit_h_14] PASSED


Finished up to Mega

All the Desc are done up to mega, I left Generic alone since you guys just fixed Firewall and Saint Shield. :)

Travis tests have failed
Hey @AshleyPikachu,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.
Node.js: 7.7

     npm test

><EMAIL_ADDRESS>test /home/travis/build/Lycanium-Z/Pokemon-Showdown
> eslint --cache . && tsc && mocha

/home/travis/build/Lycanium-Z/Pokemon-Showdown/mods/digimon/moves.js
  2194:3  error  Parsing error: Unexpected token onPrepareHit

✖ 1 problem (1 error, 0 warnings)

npm ERR! Test failed.  See above for more details.

Travis tests have failed
Hey @AshleyPikachu,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.
Node.js: 7.7

     npm test

><EMAIL_ADDRESS>test /home/travis/build/Lycanium-Z/Pokemon-Showdown
> eslint --cache . && tsc && mocha

/home/travis/build/Lycanium-Z/Pokemon-Showdown/mods/digimon/moves.js
  3226:3  error  Parsing error: Unexpected token onPrepareHit

✖ 1 problem (1 error, 0 warnings)

npm ERR! Test failed.  See above for more details.

Travis tests have failed
Hey @AshleyPikachu,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.
Node.js: 7.7

     npm test

><EMAIL_ADDRESS>test /home/travis/build/Lycanium-Z/Pokemon-Showdown
> eslint --cache . && tsc && mocha

/home/travis/build/Lycanium-Z/Pokemon-Showdown/mods/digimon/moves.js
  3475:3  error  Duplicate key 'priority'  no-dupe-keys

✖ 1 problem (1 error, 0 warnings)

npm ERR! Test failed.  See above for more details.


publicuser has the cdb_dataservices_client in the search_path

From: https://github.com/CartoDB/cartodb/issues/14283

You are right

As explained offline, I wasn't right :sweat_smile:
1.- For organization users behavior doesn' change.
2.- For non-organization users, the build path for database_public_username will prepend public, which is not a problem.
Back to acceptance, sorry for the noise.

Acceptance:
Search path of the public user before the deploy: [{"search_path":"\"$user\",public,cartodb"}],
Search path of the public user after the deploy: [{"search_path":"public, cartodb, cdb_dataservices_client, public"}]
I'm not sure about why $user is dropped and replaced by cartodb. I'm not 100% sure whether this is fine or not. cc @javitonino

I think there isn't a problem.
Form the docs about search_path:

If one of the list items is the special name $user, then the schema having the name returned by SESSION_USER is substituted, if there is such a schema and the user has USAGE permission for it

This what we are doing on the build_search_path method

The default value for this parameter is "$user", public

$user is a default value, but we are removing it for every user (less the publicuser, until now).

I am going to make some test too to be more confident.


Add "snabb ps"

Lol thanks for catching that.  Do you think "snabb ps" is the right name?  Should we add any other output formats in the first version?  (Surely in the end we should prefer names over PIDs, right?)

I think names are quite important, I think most people will want to be referring to names over PIDs. With that said, until we add giving the lwaftr instances a name, I don't think it's as important.
I do think we probably should add the name attribute soon though.

LGTM


Miaoli County Taiwan Addresses

http://ja.miaoli.gov.tw/arcgis/rest/services/Miaoli/miaoliDpDynamic_B/MapServer/1

@justinelliotmeyers, I've added about half counties in Taiwan (https://github.com/openaddresses/openaddresses/pulls?utf8=✓&q=is%3Apr author%3Asergiyprotsiv ), but if you find others (or a good source for Taichung), would be great!

Was fixed in #2910


data-turbo="false" not working with forms

The documentation suggests this works with links only, but it appears that data-turbo="false" does not work with forms:
<form method="post" action="..." data-turbo="false">...
When testing it appears forms are submitted through Turbo regardless of this attribute.
https://turbo.hotwire.dev/handbook/drive#disabling-turbo-drive-on-specific-links
Is there a good workaround for this? I need to be able to disable Turbo for some specific forms.

Is this issue resolved by https://github.com/hotwired/turbo/pull/3?

@seanpdoyle looks like it could be. For now I'm looking at a custom Stimulus controller to intercept form submit as a temp workaround.

I believe this issue can be closed now. Use any release onward from dev-builds/latest, as #3 has now been merged.

I believe this issue can be closed now. Use any release onward from dev-builds/latest, as #3 has now been merged.


[Bug]: Gap UI issue in the canvas

Is there an existing issue for this?

[X] I have searched the existing issues

Description
I am seeing an UI issue in the canvas. Here is the screenshot for it - https://share.cleanshot.com/CpzJ7Qwx
There is a gap between the sidebar right border and the canvas. If I use the app background as "white", then of course this issue is not visible. But if I use the app background as any other color then this gap is visible in preview and deploy mode as well.
This gap is present in both the left and right side of the canvas which makes the UI look a bit bad. It would be great if this issue can be fixed., of course,
Steps To Reproduce
No steps really.
Public Sample App
No response
Environment
Production
Issue video log
No response
Version
Cloud & Self - Hosted 1.9.19

Looking forward to getting this issue fixed. This might be a small fix but will improve the look and feel of the deployed apps in appsmith.

@narhzih Please correct the app version to - Appsmith Community v<IP_ADDRESS>

Is this really an issue?


Integration with dbt tests does not show details of failed test

Describe the bug
Integration with dbt tests does not show details of failed tests. Tests were invoked via dbt-rpc server.
To Reproduce
Steps to reproduce the behavior:

Follow this instructions: https://datahubproject.io/docs/generated/ingestion/sources/dbt
Recipe file:

source:
  type: "dbt"
  config:
    # Coordinates
    # To use this as-is, set the environment variable DBT_PROJECT_ROOT to the root folder of your dbt project
    manifest_path: "${DBT_PROJECT_ROOT}/target/manifest.json"
    catalog_path: "${DBT_PROJECT_ROOT}/target/catalog.json"
    #sources_path: "${DBT_PROJECT_ROOT}/target/sources_file.json" # optional for freshness
    test_results_path: "${DBT_PROJECT_ROOT}/target/run_results.json" # optional for recording dbt test results after running dbt test
    # Options
    target_platform: "snowflake" # e.g. bigquery/postgres/etc.

datahub ingest -c ./dbt-recipe.yml

Expected behavior
A clear and concise description of what you expected to happen.
Should be able to see details of the failed tests and  proper count numbers
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

OS: WSL2/Ubuntu 22.04
Browser: Chrome
Version: Latest

 cd /mnt/c/work/datahub
 conda create -n datahub python=3.8
 conda activate datahub
 python3 -m pip install --upgrade pip wheel setuptools
 python3 -m pip install --upgrade acryl-datahub
 datahub version
 datahub docker quickstart

Additional context
Add any other context about the problem here.

@zhyzhkea the pass/fail status should be showing up in the UI, and it appears it is. I believe the graph view has also been updated to show more data / more accurately.
What additional details were you looking for from the test?


check for None in optax update

This commit should address the problem, reported in #87, that was introduced by a change in jax 0.4.31 and another one in optax a while back.

Tested on python3.10 with jax 0.4.26 and optax 0.2.2 and on python3.13 with jax 0.4.34 and optax 0.2.3


Error: Can't resolve 'crypto' --> in browser.js

This issue occurred while running my Angular 7 application using 'npm run start'. I tried multiple ways to resolve, but none didn't worked.
Tried this:
https://stackoverflow.com/questions/66437032/node-modules-instagram-private-api-dist-repositories-request-js-crypto-could

I believe import('crypto') inside solver.js might be causing the issue.
I tried with both Angular 7 and Angular 13 Projects, none of them worked, it's throwing same error on compilation/ build. But for Angular 13 Project, when I used the suggestion provided in the above stackoverflow link, it worked.


on refresh, balance header shows incorrect numbers

Describe the bug

total atom balance calculation is off
no delegations card appears even though there are delegations

To Reproduce

log in with ledger
refresh the page
see total atom balance displayed with same number as "available"
"no delegations" card appears even though there are delegations

Expected behavior

i expect to see the correct atom total
expect to see my delegations

Additional context

re-rendering the page resets the data to be correct

Seems fixed on develop

not exactly. still showing 0.0000 for a second or two and then available balances for both total and available and then it updates to the correct balance...

So should we only show the balance once wallet and delegation have been loaded?

yeah, should be -- before 0.


[AnyHashable] Eliminate the _AnyHashableProtocol hack.

Now that we have the ability to write extensions where one of the type
parameters is equivalent to a concrete type, eliminate
_AnyHashableProtocol and provide AnyHashable-specific behavior for
Dictionary (where Key == AnyHashable) and Set (where Element == AnyHashable) rather than employing the Key: _AnyHashableProtocol
hack.
Fixes standard library ABI FIXME's #35, #37, #39.

@swift-ci please smoke test and merge

Looks like this exposed a SIL printer bug... oops

@slavapestov , are you planning to look into the SIL printer issue?

I can take a look, sure. I think I know what it is.

It's printing out a generic signature:
<AnyHashable where AnyHashable == AnyHashable>

Which is valid but very much not what we want ;)

@DougGregor Yeah, the SIL printer wants to map type parameters to archetypes for some reason, I think to recover names because it starts with canonical type parameters. I've wanted to refactor this, to fix this very issue. Surprised it hasn't come up before.

Fix is still not quite done, but it's coming along: https://github.com/slavapestov/swift/commit/3e031ff95b25c7a971064e4053f5586e3d0611d5

Hi Doug, I rebased this and merged it as part of https://github.com/apple/swift/pull/5266. Thanks again!


Felix should validate profile/endpoint/tag IDs

The data model schema defines the valid range of characters but felix doesn't seem to police them.  It should police that only characters that are valid in the data model are used.
Not catastrophic since it is an internal interface but better safe than sorry.
Assigning to Peter as he did a lot of the validation routines (but anyone could take this on).

Actually, I think the right approach here is that for IDs containing any invalid characters, we should just hash them using the uniquely_shorten function (which would then need to be renamed).

I vote for just not allowing invalid characters.  Anything else feels like solving a problem we don't yet have.


Feature/add ibeaconscanner mock

Create a ScanService interface.
Move scanning for ibeacons from IBeaconScanner to ScanService.
UI test by using a mock ScanService (so it can run on emulators without bluetooth).
Update SonarQube configuration.
Small code improvements & added documentation.
Update dependencies & build tools.

Regarding the failed travis-ci test. Sometimes our running UI tests get killed due to insufficient memory or to long running. In chat with travis-ci to see if they can help us with that.


Add files via upload

@sneha2180 Thanks for contributing. i don't find any description of the problem which you have solved. Please follow contributor guidelines. Also, create an issue for the problem which you are trying to solve.

@sneha2180 Please take action soon. I will be closing open issues on 24 October


fix: Warm up Orchestrator build cache from previous Composer session

Description
If there are embeddings (in .blu files) from a previous Composer session, we can use them to warm up the Orchestrator LabelResolversCache. This dramatically speeds up subsequent build times in a cold Composer session.
If Orchestrator isn't used, the warmup does nothing.
Task Item
closes #6481

Coverage increased (+0.1%) to 52.406% when pulling 63de49d8710d6caa102c237a818c37400110ef3e on tachou/orchColdBootOptimization into 0ac0af894d0475e46adc9d2a2ef25e434f4284a3 on main.

By code session, we mean, maybe it was closed before, right? If for a hot session, we will just memorize that in memory, is that correct?

By code session, we mean, maybe it was closed before, right? If for a hot session, we will just memorize that in memory, is that correct?

Yes, that is right. This cache warmup is for a user who has trained Orchestrator in a previous session, then closed Composer, then re-opened it.  In the same hot session, we use the existing in-memory cache logic.

Tested it and LGTM


Release 1.24

What type of PR is this?

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

/approve

/lgtm

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 79.98%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
15872

Relevant Lines:
19845

💛  - Coveralls


Implement WordPress core management: install/config

I'll change the minimum number of reviewers to 2 in line with the contributing guide

Weird that it can be merged with just 1 approval?

I think because the target branch sidecar is not a protected branch, only main is.

Weird that it can be merged with just 1 approval?

I think because the target branch sidecar is not a protected branch, only main is.

I see, it still might be worth waiting for 1 more review anyway, pretend the sidecar branch is main 😉


Change iOS logging directory to use /Library/Caches

Since the content of the documents directory is part of the iCloud backup, log files should not be stored in there by default any more. This commit changes it to store the log files in /Library/Caches directory instead by default.

Perhaps this should be an option. I worry that if I simply merge this pull request, I'll have another issue next week where someone is prompting me to change it back...

How about using enum/boolean flag for DDFileLogger initialization?

Having a initializer flag sounds good to me, but the question still remains. What should be the default. In my experience most developers don't really think about the consequences involved using a specific framework and this will lead to most having the logs in the iCloud synced folders and even leaving this in for production. I suggest setting the default to the library caches folder and let them initialize optionally to the documents folder.

+1, I'd love Caches to be the default

Caches sounds like a more reasonable default. For those who would prefer to use an alternative logs directory, there are multiple options.
First, DDLogFileManagerDefault has a simple initWithLogsDirectory: which can be used.
Also, one can take over complete control of the log files by implementing the DDLogFileManager protocol.


Small updates to examples/basic_usage/README.md

Separate commands from output
Remove $ prompts allowing commands to be easily copy/paste-able

@gpucibot merge


A different way to display clusters on the side pane - have lots of clusters I manage

What would you like to be added:
Lens represents each cluster in a colorful, randomly-generated icon. I have 20+ clusters I manage and I'd prefer to have a list view (or some other clever way)
Why is this needed:
I have 20+ clusters I manage. It's annoying to have to mouse-over each icon to figure out which cluster I want to select.
Environment you are Lens application on:
MacOS Catalina 10.15.5

Kubernetes distribution: GKE, Ubuntu bare-metal
Desktop OS: MacOS Catalina 10.15.5

You can create multiple workspaces and that way group your clusters in separate logical groups. Does this bring any help to your problem?

Ok, so I found the workspace button at the very bottom right. It was so small that I never noticed.
(Actually with Lens 3.6, the workspace button is at the bottom left corner)
I'll give that a shot. I think workspaces would help a lot. Thank you.


Adds HTML for the log in and the verification email

Note, the configuration for the forgot password page is encompassed in the html for the log in.

On another note - I don't think packages/apps/auth0-actions is the right place to store this. The scripts stored in there are Auth0 action scripts, i.e. JavaScript that is executed under certain conditions.


[Avatar Picker] Browser window resize should not make image go out of bounds

Details

With this PR, we are ensuring that the image picker on Avatar selection does not go out of bounds if the user is at the edges of the image at the maximum zoom and tries to resize the browser window.
This PR will also ensure that if the image has been panned by the user and then the browser window is resized, the location the image crop was originally at remains the same.
This PR will also fix an issue where if the browser height is reduce too much, a console error is shown.
Fixed Issues

$ https://github.com/Expensify/App/issues/14712
PROPOSAL: https://github.com/Expensify/App/issues/14712#issuecomment-1432186637
Tests

Open Settings > Profile > Click on profile picture > Upload Photo > Choose any photo.

All tests will take Step 0 as the base.
All resizing involves both reducing window size and then increasing window size. This includes both width and height of the browser window.
Test 1 - No panning / zooming

When the image crop modal opens, resize the window without panning/zooming.
Ensure that the image remains at the center / initial position.
Save the image. Ensure that the image saved is the same as was shown in the modal.

Test 2 - No panning

When the image crop modal opens, resize the window without panning/zooming.
Ensure that the image remains at the center / initial position.
Save the image. Ensure that the image saved is the same as was shown in the modal.
Repeat from step 1 but this time zoom the image, resize, save and check. Check for maximum, minimum and random zoom values.

Test 3 - No zooming

When the image crop modal opens, pan the image any position.
Resize the window.
Ensure that the image remains at the panned position.
Save the image. Ensure that the image saved is the same as was shown in the modal.
Repeat from step 1 and check for cases when the image is panned to the rightmost, leftmost, topmost and bottommost position.

Test 4 - Border values

When the image crop modal opens, zoom the image to the maximum.
Pan the image to the top right corner.
Resize the browser window.
Ensure that the image remains in bound and the panned position is retained.
Repeat the above steps for all 4 corners at maximum zoom.

Test 5 - Random zoom + random pan

When the image crop modal opens, zoom the image to a random value.
Pan the image to a random position.
Resize the window and ensure that the panned position remains the same.

Test 6 - Browser height too small

When the image crop modal opens, zoom in to the image.
Reduce the height & width of the window as much as possible.
Ensure no console error is shown.

Repeat all the above tests for different images. Some important configurations to check are:

Image with same width and height.
Image with height > width.
Image with height < width.
Image with a very big resolution.
Image with weird proportions, like one side relatively too small and other too big.

Note: You might encounter some visual glitch in rare cases where the image position does not update. No need to worry about such case as long as when you click on save, the image is saved with the correct panned position.

[x] Verify that no errors appear in the JS console

Offline tests

N/A. No special expectations.
QA Steps

Same as above.

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
https://user-images.githubusercontent.com/54077356/224182295-0de4f307-8fc6-4c82-bc66-057aecbe40c6.mp4

Mobile Web - Chrome
https://user-images.githubusercontent.com/54077356/224181221-d9e2d560-b11f-4c67-9c93-7b8be94489d9.mp4

Mobile Web - Safari
https://user-images.githubusercontent.com/54077356/224769101-ece094e0-0f97-4501-b960-2c492e489551.mp4

Desktop
https://user-images.githubusercontent.com/54077356/224769109-b086ecf3-7ef0-4de7-b712-652bad512061.mp4

iOS
https://user-images.githubusercontent.com/54077356/224769060-5f28cdbc-1c78-4843-bdef-a12da393e6ff.mp4

Android
https://user-images.githubusercontent.com/54077356/224178237-aa3b2eda-8779-4c1b-b359-1c7bef1d05cc.mp4

@MariaHCD @parasharrajat One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

🚀 Deployed to staging by https://github.com/MariaHCD in version: 1.2.85-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/Julesssss in version: 1.2.85-1 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Outdated tutorials

I have installed KnowRob following the tutorial here (I had to delete the ros-mongodb_log due to missing dependencies, but I don't think I need that anyway).
Launching rosprolog using
$ rosrun rosprolog rosprolog knowrob_common

launches rosprolog and shows me the prolog command line. Then, according to the basic tutorial I should be able to query
?- owl_subclass_of(A, knowrob:'FoodOrDrink').

resulting in subclasses of 'FoodOrDrink' as answers, which should look like:
 A = 'http://ias.cs.tum.edu/kb/knowrob.owl#FoodOrDrink' ;
 A = 'http://ias.cs.tum.edu/kb/knowrob.owl#Drink' ;
 A = 'http://ias.cs.tum.edu/kb/knowrob.owl#Coffee-Beverage' ;
 A = 'http://ias.cs.tum.edu/kb/knowrob.owl#InfusionDrink' ;
 A = 'http://ias.cs.tum.edu/kb/knowrob.owl#Tea-Beverage' ;
 A = 'http://ias.cs.tum.edu/kb/knowrob.owl#Tea-Iced'
 Yes.

However, the answer I am receiving is:
A = knowrob:'FoodOrDrink' ;
false.

Testing to see whether the Knowrob ontology is actually loaded using:
?- owl_parser:owl_file_loaded('http://knowrob.org/kb/knowrob.owl').

returns:
true.

I looked into the file at http://knowrob.org/kb/knowrob.owl and I do find the Class:
<!-- http://ias.cs.tum.edu/kb/knowrob.owl#FoodOrDrink -->
<owl:Class rdf:about="http://ias.cs.tum.edu/kb/knowrob.owl#FoodOrDrink">
<rdfs:subClassOf rdf:resource="http://ias.cs.tum.edu/kb/knowrob.owl#FoodOrDrinkOrIngredient"/>
</owl:Class>

The only way I can get it to work is by downloading the respective ontology that should be loaded from the init.pl file and query it using the full uri:
?- owl_parser:owl_parse('/home/<user>/Downloads/knowrob.owl').

and then:
?- owl_subclass_of(A,'http://ias.cs.tum.edu/kb/knowrob.owl#FoodOrDrink').

which does result in the expected answers.
So, something somewhere along the line went wrong making the basic tutorials a pain to follow. Does anyone have any idea where things went wrong, and can this be fixed to make KnowRob easier to get into for new users?
EDIT:
It seems that parsing http:// files does not work using owl_parser:owl_parse, which it should be able to do according to this documentation.

Hello @SDBonhof
There were recently breaking changes regarding the ontologies.
Namely that KnowRob now uses a well designed foundational ontology DUL.
Unfortunately, I haven't had the time to update the tutorials on knowrob.org yet.
Please have a look at the README files instead, they should be up-to-date and provide
some information about what is going on in the respective package.
I will soon also update the tutorials, but it will be quit an effort to do so,
so it will need some time.
Please let me know in case I can help otherwise.

btw. you can use the onlyPythonSupport branch of ros-mongodb_log. There is currently an issue with the CXX driver of mongo being removed from package repositories.

Thank you for your quick reply.
I understand that these things take time. Maybe you can already add a warning at the beginning of the tutorials stating that some things might not work, until you have had time to update the tutorials.
Is it possible that the parsing of ontologies from http:// files is broken due to the changes you mentioned? It feels to me like the function which parses ontologies should not be affected by which ontologies are being imported? I am no expert by any means so correct me if I'm wrong.

http is supposed to work, I don't think that I have touched the predicate owl_parse recently.
I will test it and report back here.
about the tutorials: yes I agree, and will do now. ultimately versioned tutorials are needed in the long term. There is some hope that KnowRob will have a release schedule soon, Then I would also plan to update the tutorials where required for each released version.
The first release might be close, as finally I could get rid of rosjava which has no release yet for melodic.

I've added a note in the doc page here: http://www.knowrob.org/doc

I do not have issues loading ontologies from http.
Is the http address publicly accessible? if so, please provide it, then I can try to load it.
Otherwise, is there any console output? owl_parse yields true or false?

Thank you for adding the note to the doc! And also thank you for your response.
I am trying to load http://knowrob.org/kb/knowrob.owl, which is the ontology which includes the 'FoodOrDrink' example from the tutorial. This ontology is still publicly accessible and I can find the 'FoodOrDrink' class, so it should be found if it is loaded and queried.
I am launching rosprolog using
rosrun rosprolog rosprolog knowrob_common
Which should already load the ontology according to these lines in the init.pl file in knowrob_common:
:- owl_parser:owl_parse('http://knowrob.org/kb/knowrob.owl').
and
:- rdf_db:rdf_register_ns(knowrob,   'http://knowrob.org/kb/knowrob.owl#', [keep(true)]).
Trying to query
?- owl_subclass_of(A, knowrob:'FoodOrDrink').
returns:
A = knowrob:'FoodOrDrink' ;
false.
while the expected answer is:
A = knowrob:'FoodOrDrink' ;
A = knowrob:'Drink' ;
A = knowrob:'Buttermilk' ;
A = knowrob:'Coffee-Beverage' ;
...cont...
Manually loading from http://:
Parsing the ontology manually using
?- owl_parser:owl_parse('http://knowrob.org/kb/knowrob.owl').
returns:
true.
Then registering it under a new namespace (using knowrob2 as a namespace since I the namespace 'knowrob' already exists and I am not sure how that is handled):
?- rdf_db:rdf_register_ns(knowrob2,   'http://knowrob.org/kb/knowrob.owl#', [keep(true)]).
also returns:
true.
However, the query (this time using the namespace 'knowrob2') still returns the same answer.
Registering the URI mentioned in the ontology itself:
?- rdf_db:rdf_register_ns(knowrob2,   'http://ias.cs.tum.edu/kb/knowrob.owl#', [keep(true)]).
returns
true.
but doesn't solve the problem either.
Loading from file:///:
The other method is to download the ontology and save it locally under the name 'knowrob.owl'. Then load it using:
?- owl_parser:owl_parse('file:///home/<user>/Downloads/knowrob.owl').
returns:
true.
Then, registering
?- rdf_db:rdf_register_ns(knowrob2,   'http://knowrob.org/kb/knowrob.owl#', [keep(true)]).
still doesn't work, but registering
?- rdf_db:rdf_register_ns(knowrob2,   'http://ias.cs.tum.edu/kb/knowrob.owl#', [keep(true)]).
does result in the expected answers following the query mentioned above.

KnowRob has an internal mapping from http prefixes to local paths, such that local ontologies are preferred over remote ones. So that you can have local changes, and try them out without it to http.
So in fact, you will not get the one from http in that case, but knowrob.owl from the knowrob_common package. And this does not have a class knowrob:FoodOrDrink.
I guess this is where the confusion is coming from.
rather try something like: owl_subclass_of(A, dul:'Object'). to see e.g. all subclasses of Object.
You can also open knowrob.owl in Protege to look at the class hierarchy.

So the init.pl file of knowrob_common loads the knowrob.owl file from that package. And this ontology doesn't have the FoodOrDrink class. That makes sense to me.
However, I still do not understand why I can't load the http manually using the commands I mentioned.
For my use case I might not need to be able to load the http ontologies, but others might, and I am also just trying to understand how this works.

Ok here is the reason: KnowRob uses since always package URIs in OWL import statements.
Which is not how it is supposed to be with OWL files. Standard Protege won't know what to do with these import statements (thaht's why there is a fork of it in my github that allows to load these URIs)
I went a few steps towards fixing this by basically intercepting calls to owl_parse and looking up a registry of local OWL files when owl_parse is called with a HTTP URI. The idea was to get rid of package URIs in the ontologies used by KnowRob, such that they are more accessible, especially to people unfamiliar with ROS. What is still missing is (1) regular deployment to some http server, and (2) proper versioning of deployed ontologies. What made me switch back to package URIs for now is that many of the http URIs would still yield 404, and even worse, Protege does not like when this 404 is delivered wrapped in some error page (actually it tries to load the html as OWL file then).

So the call to parse from http is intercepted by owl_parse and instead looks at local files first? That makes sense with what you are saying.
Thank you!

Hi,
Are there any updates on this? I started trying knowrob out recently and it's being rather hard given that there are no clear working examples of what can and cannot be done with it. Even some of the readme's in the repo seem to be out of date. For example, in the reasoning section it mentions the workflow_constituents/3 predicate, but there's no such predicate in the repo (there's a predicate called workflow_constituent with no 's', so I'm not sure if that's a typo).
Some of the explanations seem to be rather technical too, failing to illustrate how things can be useful (for example, the action detection section).
If there's anything I can do to help I will be more than happy to do so.

@Thordreck thanks for your hint about being too technical in the READMEs. They should reflect the current state, however. Unfortunately, after writing the READMEs I haven't found the time to do an iteration over them.
Especially, I plan to write more documentation in the near future about how the tell/ask rules work as I am approaching a cool state for it in my local development branch: https://github.com/daniel86/knowrob/tree/aggregate
But it might still take some weeks to get everything right.
In addition, there is some seminar material created at the moment that involves practical tasks with KnowRob that we would translate into a tutorial afterwards (around March).
Best,
Daniel

@Thordreck thanks for your hint about being too technical in the READMEs. They should reflect the current state, however. Unfortunately, after writing the READMEs I haven't found the time to do an iteration over them.
Especially, I plan to write more documentation in the near future about how the tell/ask rules work as I am approaching a cool state for it in my local development branch: https://github.com/daniel86/knowrob/tree/aggregate
But it might still take some weeks to get everything right.
In addition, there is some seminar material created at the moment that involves practical tasks with KnowRob that we would translate into a tutorial afterwards (around March).
Best,
Daniel

Hi Daniel,
Thanks a lot for the clarification, I understand these things take time. Looking forward to the new tutorials!

Hi Daniel,
Thanks a lot for the clarification, I understand these things take time. Looking forward to the new tutorials!

I have updated the KnowRob basics wiki page, most of the old tutorials remain marked as deprecated, however.
We will try to update some of them in the next months.

Any updates on this yet? The last time I tried (yesterday) it was still out of date, and the rosinstall for knowrob-basic pulls the master branch which I think is your dev branch?

Any updates on this yet? The last time I tried (yesterday) it was still out of date, and the rosinstall for knowrob-basic pulls the master branch which I think is your dev branch?

well, the README files should be fine, and also the source code documentation.
Creating tutorials takes time, time I do not really have at the moment.
But maybe e.g. @sasjonge or @AbhijitVyas have worked on something

Any updates on this yet? The last time I tried (yesterday) it was still out of date, and the rosinstall for knowrob-basic pulls the master branch which I think is your dev branch?

well, the README files should be fine, and also the source code documentation.
Creating tutorials takes time, time I do not really have at the moment.
But maybe e.g. @sasjonge or @AbhijitVyas have worked on something

the knowrob-base.rosinstall points to the master branch which is the current development branch, which i've heared broke things a few times for other people.
I know you don't have time, but maybe we can ask someone else to keep an eye on this. Otherwise we spam you guys with 100 emails asking about how to do something over and over again. That might take more time then updating the tutorial/Readme :/

I haven't heard about such things


Move flags to config file

We have recently added a big number of options https://github.com/input-output-hk/cardano-db-sync/blob/master/doc/configuration.md. These mostly cannot change between separate executions, which means the possibly they need to be part of the config file.

How this config could look like
{
tx-out: (on)
      / consumed  {force_tx_in : (off) / on }
      / prune     {force_tx_in : (off) / on }
      / bootstrap {force_tx_in : (off) / on }
      / off,
ledger: (on) / off / dont-use,
shelley : (on) / off / <stake_address_list>,
multiasset: (on) / off / <policies_list>,
metadata: (on) / off / <keys_list>,
plutus: (on) / off / <script_hash_list>
gov: (on) / off,
offchain-pool-data : (on) / off,
json_type : jsonb / text,
}

Steps to take for this

Decide the exact format: json or yaml, use the existing config or add a new one
Define a InsertConfig (?) Haskell type, part of SyncNodeParams with an aeson instance. Most of the fields are optional and have default values.
Translate the InsertConfig type to the existing types InsertOptions and SyncOptions. These need to be extended. Some of the options will remain unused for now, but it's good to have them.

This is basically what I'm thinking: extend the db-sync-config file with a new property. This will allow users to use whichever format they prefer. The new property can be called insert_options (or insert_config), with the below pseudo json-schema:
 {
   "properties": {
         "tx_out": {
             "enum": ["enable", "disable", "consumed", "prune", "bootstrap"]
         },
         "ledger": {
             "enum": ["enable", "disable", "dont-use"]
         },
         "shelley": {
             "type": "object",
             "properties": {
                 "enable": {
                     type: "boolean"
                 },
                 "stake_addresses": {
                     "type": "array",
                 }
             }
         },
         "multi_asset": {
             "type": "object",
             "properties": {
                 "enable": {
                     type: "boolean"
                 },
                 "policies": {
                     "type": "array",
                 }
             }
         },
         "metadata": {
             "type": "object",
             "properties": {
                 "enable": {
                     type: "boolean"
                 },
                 "keys": {
                     "type": "array",
                 }
             }
         },
         "plutus": {
             "type": "object"
             "properties": {
                 "enable": {
                     type: "boolean"
                 },
                 "script_hashes": {
                     "type": "array",
                 }
             }
         },
         "governance": {
             "enum": ["enable", "disable"]
         },
         "offchain_pool_data": ["enable", "disable"],
         "json_type": ["text", "jsonb", "disable"]
     }
 }

@kderme was the idea that we always have to have every value in the schema present?
looking at bellow
"metadata": {
    "enable": true
    "keys": ["seans-key"]
  },

for example the act of having "metadata" present, would make it enabled but if not then disabled.
The working "metadata" type would turn from:
data MetadataConfig
  = MetadataEnable
  | MetadataDisable
  | MetadataKeys [ByteString]
  deriving (Eq, Show)

into:
data MetadataConfig
  = MetadataDisable
  | MetadataKeys [ByteString]
  deriving (Eq, Show)

secondly I'm slightly confused with ledger: (on) / off / dont-use, are dont-use and off the same here?
our type representation right now is:
-- A representation of if we are using a ledger or not given CLI options
data LedgerEnv where
  HasLedger :: HasLedgerEnv -> LedgerEnv
  NoLedger :: NoLedgerEnv -> LedgerEnv

secondly I'm slightly confused with ledger: (on) / off / dont-use, are dont-use and off the same here?

This corresponds to --dont-use-ledger: https://github.com/IntersectMBO/cardano-db-sync/blob/master/doc/configuration.md#--dont-use-ledger--experimental


Represent module level doc comments in forc doc

Description
Adds module level docs & previews to forc doc.
Screencast from 2023-02-20 20-30-24.webm
Checklist

[x] I have linked to any relevant issues. Closes #4095
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have updated the documentation where relevant (API docs, the reference, and the Sway book).
[x] I have added tests that prove my fix is effective or that my feature works.
[x] I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
[x] I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
[x] I have requested a review from the relevant team or maintainers.

@sdankel @JoshuaBatty looks like some LSP tests are failing, any chance you'd be keen to take a look?

@sdankel @JoshuaBatty looks like some LSP tests are failing, any chance you'd be keen to take a look?

Ah, looks like it may be that forc build is looking for the program kind and because I added a root module doc comment it err'd out:
Error: dependency of "array" named "std" is invalid: Parsing std failed:
Expected a module kind (script, contract, predicate or library).


Server crash during large crafting operation

Issue description:
Server crash due to large crafting operation
What happens:
Set up a 10k tnt craft and the server crashed and won't reload
What you expected to happen:
Craft to complete
Steps to reproduce:
1.Start a 10k tnt craft
2.Crash
3.
...
Version (Make sure you are on the latest version before reporting):

Minecraft: 1.10.2
Forge: <IP_ADDRESS>5
Refined Storage:1.1.2

Does this issue occur on a server? [yes/no]
Yes
If a (crash)log is relevant for this issue, link it here:
crash-2016-10-08_15.42.11-server.txt
Also since the server will now not load, do you know anyway of cancelling the task without reverting to a backup?
Thanks

Damn watchdog.... Guess we'll have to make it faster

you can try deleting the controller that might help, or revert to a backup
Also, this won't get fixed as the crafting system is in the process of being reworked...

Yeah we had to revert to a backup. Hopefully the new crafting fixes it eventually.

I'll close this as this is irrelevant anyway with the new crafting system

Is this new system present in the current release?

Not yet


buffer: improve read reservations to efficiently handle multiple slices

Signed-off-by: Greg Greenway<EMAIL_ADDRESS>Commit Message: Enable reading larger chunks from sockets in a single call without drastically increasing memory waste by implementing a system where reservations of multiple slices are made, and unused slices (after the read operation) are put into a small cache for re-use by the next read operation.
This improves performance in some high-throughput use cases.
Additional Description:
Risk Level: High
Testing: TODO
Docs Changes: None; internal only change
Release Notes: None; internal only change
Platform Specific Features: None
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]

This still needs tests written, but I wanted to get some feedback on the design first.

@antoniovicente PTAL. This isn't tested yet, but I think this will keep us only going over the high watermark by up to 16k (same as before). Does this seem like the right approach?

@antoniovicente I'm working on merging in the changes around Slice layout into this PR. One oddity is what to do with Reservation::owned_slices_. There's no longer a type in buffer.h to put in here. Given that the type isn't known in this context, should it just be a void*, plus function to properly free it? Or declare a base type (with no members) in buffer.h to have Slice inherit from, just to put something better than void* here? In either case, actually free'ing the held pointer is delegated to something setup in reserve().

@antoniovicente I'm working on merging in the changes around Slice layout into this PR. One oddity is what to do with Reservation::owned_slices_. There's no longer a type in buffer.h to put in here. Given that the type isn't known in this context, should it just be a void*, plus function to properly free it? Or declare a base type (with no members) in buffer.h to have Slice inherit from, just to put something better than void* here? In either case, actually free'ing the held pointer is delegated to something setup in reserve().

I think that the replacement for SliceDataPtr in the original PR is std::unique_ptr

I think that the replacement for SliceDataPtr in the original PR is std::unique_ptr<Slice>

The problem is that Slice is defined in buffer_impl.h, but Reservation is defined in buffer.h. Reservation is part of the interface, and Slice is now strictly part of the implementation.

I think that the replacement for SliceDataPtr in the original PR is std::unique_ptr<Slice>

The problem is that Slice is defined in buffer_impl.h, but Reservation is defined in buffer.h. Reservation is part of the interface, and Slice is now strictly part of the implementation.

Hmmm.  Ok, will think about it and get back to you.

It could hold a std::unique_ptr<SliceData>, but then I'd have to allocate a SliceDataImpl for each slice. I'd prefer to avoid the extra temporary allocation.

There are few options that come to mind:

Have the buffer own the slices in the reservation instead of having the reservation own them.  This is similar to what the old reserve implementation does.
Have reserve return ReservationPtr and allow OwnedImpl to implement its own override of the Reservation mechanism
Have the Reservation store a pointer to a cleanup function that should be run if the Reservation is not committed to the buffer.
Have reservations hold a parallel array of std::unique_ptr<uint8_t> for the storage associated with the raw slices.  Commit would need to know how to create OwnedImpl::Slice from a uint8_t[], data size and capacity.
Similar to the previous option, but have the reservation be single region only.

I can see option 4 being attractive.  Option 1 would also be efficient and not compromise much on ease of use.
It may be useful to have a buffer AP method
void Buffer::add(std::unique_ptr<uint8_t> data, uint64_t data_start, uint64_t data_end, uint64_t capacity) that allows the buffer to take ownership of externally allocated memory regions.

I think I'll try to do 4 next, but I just pushed a version that works, but has extra allocations for each slice in the reservation.

Also, I'm hitting a crash in wasm tests, and I have no idea why; the backtrace and state in gdb are not helpful. I might try ASAN to see if that helps sort out the issue.

Sorry for the delays on this; too many competing priorities for time.
I think I have the API in a good state now. It no longer has a regression around UDP reads using an enormous amount of space on the stack.
I still need to do some testing around watermarks and see if this has a behavior change or performance degradation in that area.
This version is allocating one SliceDataImpl for each reserved slice, which isn't ideal, but it's a small allocation at least, so should hit the fast-path in the allocator. If I switched this to hold only the underlying buffer, I'd need somewhere to store the capacity to be able to put it back together.

16kb per allocation per UDP packet instead of 4kb

I don't think that's true. UDP packets go through reserveSingleSlice(), which uses the provided size rounded up to the next multiple of 4096.

16kb per allocation per UDP packet instead of 4kb

I don't think that's true. UDP packets go through reserveSingleSlice(), which uses the provided size rounded up to the next multiple of 4096.

You're right.
Sorry, I got confused.

@antoniovicente This now has your tightening of buffer limits, and I fixed the merge conflicts that have come up. PTAL.

@antoniovicente This now has your tightening of buffer limits, and I fixed the merge conflicts that have come up. PTAL.

/retest

/retest

@antoniovicente I reworked the large-reserve API to not take a length anymore, and I think I addressed most/all of your comments. PTAL.

@antoniovicente I reworked the large-reserve API to not take a length anymore, and I think I addressed most/all of your comments. PTAL.

Seems like there's a buffer_fuzz_test failure in CI

Seems like there's a buffer_fuzz_test failure in CI

Looks fantastic.
Could you update the details of the PR in https://github.com/envoyproxy/envoy/pull/14054#issue-522072046
Commit message may need some adjustments.
Tests were added.
Should risk level still be considered high?

Looks fantastic.
Could you update the details of the PR in https://github.com/envoyproxy/envoy/pull/14054#issue-522072046
Commit message may need some adjustments.
Tests were added.
Should risk level still be considered high?

@antoniovicente Revisting https://github.com/envoyproxy/envoy/pull/14054/files#diff-0fdef7bd42dfa48ed5a015ddb85be158a514d61a82a5a17c1cfa34c6d744e5f8R348, do you think it would be worth adding a freelist for SliceDataImpl objects that are needed? I think it can be done as a followup to this PR (and pending benchmarks showing it is actually an improvement).

@antoniovicente Revisting https://github.com/envoyproxy/envoy/pull/14054/files#diff-0fdef7bd42dfa48ed5a015ddb85be158a514d61a82a5a17c1cfa34c6d744e5f8R348, do you think it would be worth adding a freelist for SliceDataImpl objects that are needed? I think it can be done as a followup to this PR (and pending benchmarks showing it is actually an improvement).

@antoniovicente Revisting https://github.com/envoyproxy/envoy/pull/14054/files#diff-0fdef7bd42dfa48ed5a015ddb85be158a514d61a82a5a17c1cfa34c6d744e5f8R348, do you think it would be worth adding a freelist for SliceDataImpl objects that are needed? I think it can be done as a followup to this PR (and pending benchmarks showing it is actually an improvement).

I really rather not have freelists anywhere in here.

@antoniovicente Revisting https://github.com/envoyproxy/envoy/pull/14054/files#diff-0fdef7bd42dfa48ed5a015ddb85be158a514d61a82a5a17c1cfa34c6d744e5f8R348, do you think it would be worth adding a freelist for SliceDataImpl objects that are needed? I think it can be done as a followup to this PR (and pending benchmarks showing it is actually an improvement).

I really rather not have freelists anywhere in here.

Moving freelist conversation here (from https://github.com/envoyproxy/envoy/pull/14054#discussion_r564719902) because github buries the current one everytime I load the page.
Current benchmarks:
with freelist
----------------------------------------------------------------------------
Benchmark                                  Time             CPU   Iterations
----------------------------------------------------------------------------
bufferReserveCommit/131072               799 ns          799 ns     52535503
bufferReserveCommitPartial/131072        289 ns          289 ns    145588343

without freelist
----------------------------------------------------------------------------
Benchmark                                  Time             CPU   Iterations
----------------------------------------------------------------------------
bufferReserveCommit/131072               750 ns          750 ns     55794513
bufferReserveCommitPartial/131072        407 ns          407 ns    103863598

Moving freelist conversation here (from https://github.com/envoyproxy/envoy/pull/14054#discussion_r564719902) because github buries the current one everytime I load the page.
Current benchmarks:
with freelist
----------------------------------------------------------------------------
Benchmark                                  Time             CPU   Iterations
----------------------------------------------------------------------------
bufferReserveCommit/131072               799 ns          799 ns     52535503
bufferReserveCommitPartial/131072        289 ns          289 ns    145588343

without freelist
----------------------------------------------------------------------------
Benchmark                                  Time             CPU   Iterations
----------------------------------------------------------------------------
bufferReserveCommit/131072               750 ns          750 ns     55794513
bufferReserveCommitPartial/131072        407 ns          407 ns    103863598

I have mixed feelings about the freelist. In an ideal world, it would be better to let malloc take care of this, and it shows a slight perf degradation when all the slices get used by the read, but it is quite a bit faster for small reads.

I have mixed feelings about the freelist. In an ideal world, it would be better to let malloc take care of this, and it shows a slight perf degradation when all the slices get used by the read, but it is quite a bit faster for small reads.

/retest

/retest

@antoniovicente there was a real test failure on both ASAN and Windows. Slightly different failure on the two, but both for the same reason. I deleted the offending test; explanation in commit message.

@antoniovicente there was a real test failure on both ASAN and Windows. Slightly different failure on the two, but both for the same reason. I deleted the offending test; explanation in commit message.

/retest

/retest

Mac CI passed all tests; some cleanup task of the CI job appears to have timed out.


The method     'UnmodifiableUint8ListView' isn't defined for the class 'CroppedFile'.

Describe the bug
/d:/pub_cache/hosted/pub.flutter-io.cn/image_cropper_platform_interface-5.0.0/lib/src/models/cropped_file/html.dart:32:38: Error: The method
'UnmodifiableUint8ListView' isn't defined for the class 'CroppedFile'.
 - 'CroppedFile' is from 'package:image_cropper_platform_interface/src/models/cropped_file/html.dart'
 ('/d:/pub_cache/hosted/pub.flutter-io.cn/image_cropper_platform_interface-5.0.0/lib/src/models/cropped_file/html.dart').
Try correcting the name to the name of an existing method, or defining a method named 'UnmodifiableUint8ListView'.
      return Future<Uint8List>.value(UnmodifiableUint8ListView(_initBytes!));

To Reproduce
Steps to reproduce the behavior:

cd projectname_server and dart pub add serverpod_auth_server
start projectname_server
add package serverpod_auth_shared_flutter to projectname_flutter
start projectname_flutter

Expected behavior
projectname_flutter start work.
Screenshots
If applicable, add screenshots to help explain your problem.
Serverpod versions

CLI Version: Serverpod version: 2.0.2
Library version: 2.0.2

Platform information
EDGE
Additional context
Add any other context about the problem here.

This seems to be an issue in the package: image_cropper_platform_interface and shouldn't be related to the serverpod code.

@Isakdl Yes, serverpod_auth_shared_flutter depends on image_cropper: ^5.0.0, and image_cropper depends on image_cropper_platform_interface: ^5.0.0.

@Isakdl The UnmodifiableUint8ListView method has been removed in dart 3.5.1, so you need to upgrade your dependencies.

Ah got it, this is solved on main already and is fixed in the upcoming 2.1 release, beta available on pub.dev


[$100 bounty] Match stock Hyundai button logic

Matches stock buttons on HKG cars that have a pause/resume button following bounty #30950
Cancel button is considered as the pause/resume button on cars with the HYUNDAI_PAUSE_RESUME_BTN flag set
Giving a grate on availability is considered equivalent to doing nothing
Considered "for the first time" as for the first main button is pressed ever
The logic still the same when OP longitudinal isn't used
Panda PR:  https://github.com/commaai/panda/pull/1940

We've moved the car interfacing code to our opendbc repository, which is now the new home for car ports and fingerprints. Please re-open your pull request against opendbc at your convenience by using this command below. This will transform all changes under selfdrive/car/ to opendbc_repo/opendbc/car/. Make sure you have initialized submodules beforehand and have checked out the latest opendbc commit.
PR_NUMBER=33045
curl -L https://github.com/commaai/openpilot/pull/$PR_NUMBER.patch | sed -e 's/selfdrive\/car/opendbc_repo\/opendbc\/car/g' | git apply -v --reject

Simply replace the PR number with your own. Once done, add the files, fix any conflicts, and open a new PR. Alternatively, you may start a new PR from scratch if that is easier for you.


No nodes provisioned when spot service linked role is missing

Version

Karpenter Version: 0.24.0

Kubernetes Version: v1.22.16
Expected Behavior
When both spot and on-demand instances are set in the provisioner, Karpenter should provision on-demand when spot is not available.
Actual Behavior
Even though provisioner has [spot, on-demand] values in the karpenter.sh/capacity-type, when the account is missing the spot service linked role no (neither spot or on-demand) instances are provisioned
Steps to Reproduce the Problem
AWS account without spot.amazonaws.com service linked role created. Providerref containing the following requirement:
  - key: karpenter.sh/capacity-type
    operator: In
    values:
    - on-demand
    - spot

Resource Specs and Logs
 ERROR    controller.provisioner    launching machine, creating cloud provider instance, creating instance, with fleet error(s), AuthFailure.ServiceLinkedRoleCreationNotPermitted: The provided credentials do not have permission to create the service-linked role for EC2 Spot Instances.; UnfulfillableCapacity: Unable to fulfill capacity due to your request configuration. Please adjust your request and try again.; launching machine, creating cloud provider instance, creating instance, with fleet error(s), AuthFailure.ServiceLinkedRoleCreationNotPermitted: The provided credentials do not have permission to create the service-linked role for EC2 Spot Instances.; launching machine, creating cloud provider instance, creating instance, with fleet error(s), UnfulfillableCapacity: Unable to fulfill capacity due to your request configuration. Please adjust your request and try again.; AuthFailure.ServiceLinkedRoleCreationNotPermitted: The provided credentials do not have permission to create the service-linked role for EC2 Spot Instances.; launching machine, creating cloud provider instance, creating instance, with fleet error(s), AuthFailure.ServiceLinkedRoleCreationNotPermitted: The provided credentials do not have permission to create the service-linked role for EC2 Spot Instances.; launching machine, creating cloud provider instance, creating instance, with fleet error(s), AuthFailure.ServiceLinkedRoleCreationNotPermitted: The provided credentials do not have permission to create the service-linked role for EC2 Spot Instances.; UnfulfillableCapacity: Unable to fulfill capacity due to your request configuration. Please adjust your request and try again.; launching machine, creating cloud provider instance, creating instance, with fleet error(s), AuthFailure.ServiceLinkedRoleCreationNotPermitted: The provided credentials do not have permission to create the service-linked role for EC2 Spot Instances.; UnfulfillableCapacity: Unable to fulfill capacity due to your request configuration. Please adjust your request and try again.    {"commit": "8c27519-dirty"}

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment

We intentionally don't fallback on auth error and instead report the auth error. Otherwise we risk only launching on demand capacity in accounts that are misconfigured.


Get prediction entropy

Requested by @berzak
This can be a shared script on top of the prediction output; see #26 .

not critical; moving to 1.2


Encrypt config.yaml

Bug: T348476
I believe that both the worker and web configs can be combine into one file. At which point having it encrypted should simplify deployment as the git clone will have it in place, and then the main purpose of this, having the file stored in git, is achieved.

@audiodude @siddharthvp I could use some help. I updated the exception to include UnicodeError though that seems to fail, works on a minimal example on py3.7 though not through tox? If I put a bare except py37-pytest will succeed but flake will fail on the bare exception. Any thoughts on what I'm doing wrong?

@vivian-rook Looks like the error thrown is yaml.reader.ReaderError, which extends yaml.error.YAMLError which extends Exception. So catching UnicodeDecodeError, UnicodeError doesn't solve the issue.
Instead of updating it to catch YAMLError, I think the better solution would be to give a different name to this binary file, say config-prod.yaml so that it doesn't interfere with local testing and unit tests.

Agree with @siddharthvp. I was already confused about the comment:
# Is ok if we can not load config.yaml

How is that okay? Won't both development and production be broken?

Agree with @siddharthvp. I was already confused about the comment:
# Is ok if we can not load config.yaml

How is that okay? Won't both development and production be broken?

In the test code it tends towards the default_config.yaml file, then the code attempts to update to the config.yaml file (which in prod should be there, but in dev it is usually not). Which in looking at it feels like a very awkward way of setting it up, that the code itself tries to select if it is dev or prod? Seems like something that should be made as a startup option for which file to use. Though that would be a cleanup task for another patch (Indeed, it is yet another thing that can go away if we have it in k8s)

Right, I see that now, after expanding more lines of the file. It uses default-config.yml and then overlays config.yml if it is present.
What is the plan for deploying the git-crypt key file to the production machines? Just drop it in and do git-crypt unlock?

Looks like the checks are passing. @SD0001 @Audiodude the decryption key is on the bastion in /opt/

What is the plan for deploying the git-crypt key file to the production machines? Just drop it in and do git-crypt unlock?

Yeah, that's what I usually do. Usually on the bastion system for a given project. Also helps with state files for things like terraform to just have it in one place. Though object storage is nicer if we can set it up. I wonder if object storage would be sufficient for the git-crypt key as well. That has always been an "Ask a maintainer" kind of solution. Perhaps it doesn't have to be. Though that is probably a solution in search of a problem.

Don't you have to tell the code to read from config-prod.yml instead of config.yml now?

config-prod.yaml is just the name for the encrypted file. As I understand it, in production the file will be decrypted and named config.yaml.

Don't you have to tell the code to read from config-prod.yml instead of config.yml now?

config-prod.yaml is just the name for the encrypted file. As I understand it, in production the file will be decrypted and named config.yaml.

Ok. I haven't worked with git-crypt at all, but just reading a few articles it sounds to me that it most commonly encrypts files "in place" such that they are decrypted when they are put in the filesystem by git.


Feat(pkgs/dmd): 2.108.1 and 2.109.1

As per title. I tested only 2.108 locally though, lets see what the autotester will say about 2.109.

@PetarKirov it seems the tests do pass. (Originally one failed, the failure seemed spurious and I just restarted it at some point and was too lazy to check back earlier). Can this go in?

No comment so I assume it's good to go.


[bug] on macOS call systray set_icon will cause memory leak

Describe the bug
I want to change the icon on notifications area, I found that each calling method "app.tray_handle().set_icon(tauri::Icon::Raw(include_bytes!("../icons/2.png").to_vec())).unwrap();" will increase memory.
loop {
                    let icon_row = icons.get(i % icons_len);
                    if let Some(v) = icon_row {
                        app.tray_handle().set_icon(v.clone()).unwrap();
                    } else {
                        println!("Failed to open the file.");
                    }
                    i = i + 1;
                    if i == icons_len {
                        i = 0;
                    }
                    thread::sleep(ten_millis);
}

Reproduction
Continuous calls “set_icon()”
Expected behavior
No memory leaks
Platform and versions
cargo tauri info
Environment
› OS: Mac OS 12.6.0 X64
› Node.js: 16.17.0
› npm: 8.15.0
› pnpm: Not installed!
› yarn: 1.22.19
› rustup: 1.25.1
› rustc: 1.63.0
› cargo: 1.63.0
› Rust toolchain: stable-x86_64-apple-darwin
Packages
› @tauri-apps/cli [NPM]: 1.1.1
› @tauri-apps/api [NPM]: 1.1.0
› tauri [RUST]: 1.1.1,
› tauri-build [RUST]: 1.1.0,
› tao [RUST]: 0.14.0,
› wry [RUST]: 0.21.1,
App
› build-type: bundle
› CSP: unset
› distDir: ../dist
› devPath: http://localhost:1420/
› framework: Vue.js
App directory structure
├─ dist
├─ resources
├─ node_modules
├─ public
├─ runcat.app
├─ src-tauri
├─ .git
├─ .vscode
├─ .idea
└─ src
Stack trace
No response
Additional context
Other languages have similar problems：
https://github.com/getlantern/systray/issues/135

same issue for me

This is not only limited to set_icon. I'm noticing similar behavior when calling set_title and set_menu.

Currently able to repro on MacOS using Tauri 1.6.7. It's unclear how why values passed in to set_icon + friends do not properly drop memory after they're replaced. I've dug a bit so far and haven't found anything. I'll continue!

Digging deeper it looks like this may be the cause:
https://github.com/SSheldon/rust-objc/issues/80
Alternatives on/off being worked on here https://github.com/tauri-apps/wry/issues/1239

Can someone confirm whether that's still an issue with latest v2?


Make loader tab a thin wrapper that holds the main router and all script tags for the tabs

Likely also make each tab a library that loads in as a window level module which can then be easily accessed between modules and with the router be turned off/on (ie. have a show/hide function that is exported and available in the window.module)

Closed in #393


Wrong Oracle SQL query generation on time filter when using range 'midnight' and 'now'

On the Chart page, when I set any time filter with 'Custom' as the Range type and set Start to 'Midnight' and End to 'Now', the SQL query generated is wrong.
...
where created_at >= to_date('2023-10-13', 'yyyy-mm-dd')
  and created_at < to_date('2023-10-13', 'yyyy-mm-dd')

This is giving me no results...
I'm using an Oracle Database.
I guess that the last filter created_at < to_date('2023-10-13', 'yyyy-mm-dd') should be like created_at < to_date('2023-10-13 17:00:00', 'yyyy-mm-dd hh24:mi:ss')
How to reproduce the bug

Open a chart
Use the pivot table (or a simple table)
Go to the 'Time' section and set a DateTime column, granularity as 'Day' and time range to custom with start Midnight and end Now
Click on Apply and then update the chart
Get the 'No results were returned for this query' message

Expected results
The results for the current day until "now".
Actual results
Get the 'No results were returned for this query' message
Environment
(please complete the following information):

browser type and version: Firefox v118.0.2
superset version: 2.1.0
python version: python --version
node.js version: node -v
any feature flags active:

Checklist
Make sure to follow these steps before submitting your issue - thank you!

[x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
[x] I have reproduced the issue with at least the latest released version of superset.
[x] I have checked the issue tracker for the same issue and I haven't found one similar.

yup, I get the same results, that should be TO_TIMESTAMP instead of TO_DATE!

yup, I get the same results, that should be TO_TIMESTAMP instead of TO_DATE!

to_date() it's OK. The problem is that it only considers the date, excluding the time portion....

as a "workaround" I see that if I convert the DateTime column to a timestamp it generates the query correctly...

I don't have Oracle, but the filters seem to be applying correctly in other DBs. I assume this is fixed (plus, we no longer support 2.x). If this is happening in 3.x/4.x, let us know and we can reopen/revisit.


Github Organizations are not aligned properly and the card looks clumsy

Signed-off-by: Amol Sontakke<EMAIL_ADDRESS>

@hnexokonkwo I know you were working on the PMC - can you review and confirm?


Longitude at which a "line" of constant latitude cuts the "line" between two coordinates

Hi there, and thanks for this most excellent code, all nicely in C, an increasing rarity.  Not an issue, just a question:
I am implementing a geofence for addition to an [Apache licensed] C library, https://github.com/u-blox/ubxlib.  I intend to use ray casting to resolve the "is my point inside a polygon?" question, which requires me to work out the point at which a line of constant latitude cuts a line between two points (that are adjacent vertices of the polygon).
For small geofences, less than 1 kmish, I will do this with plain old linear maths, but I would like to offer a solution that takes the curvature of the earth into account so that geofences of any size may be used.
I can see that the C++ version of this library offers such an intersect function: is there a way to do the same calculation using the C version?

At this point, I'm not planning on porting the intersection capability
to the C library.  Your choices then are:

Do the port yourself.
Write a C wrapper to the C++ class.
Implement just Intersect::Basic and have the segment intersection use
this.  This would be right most of the time.

The last might be a reasonable starting point.
HOWEVER, a circle of latitude isn't a geodesic!  So you would have to
reformulate how you solve this problem.  Perhaps you could switch to
using meridians?
In either case, I see you running into problems at the poles.  I realize
that this may not be your typical use case, but still...
If I wanted to tackle this problem and was willing to limit myself to
polygons with extent less than 1000 km, say, I would just use my
gnomonic projection with the point in question being the center of the
projection. (And the gnomonic projection is easy to implement in terms
of geodesics.)

Hi, and thanks very much for the swift response.  Thinking about it, there is no reason why we should not require the use of g++ for this case: all of our code compiles happily enough when consumed by g++ so there should be no issue with making a wrapper.
On the "latitude isn't a geodesic" that is not a subtlety that I'd appreciated until now: not a problem to switch to using meridians, it doesn't matter which direction our ray is heading.  Concerning behaviour near the poles, I don't believe that is an issue for the use-cases of our customers; I can add a note about it as a warning.
I must admit that I'm hanging on by my fingernails with this stuff; as you can see I'm barely up to speed with geodesics :-). However I will spend a little longer parsing your suggestion concerning the use of gnomonic projection as a way forward.

Yes, thinking some more about your problem, using the gnomonic
projection is the way to go:

It transforms with ellipsoidal problem into a planar problem.
The implementation is very simple (see src/Gnomonic.cpp in the C++
distribution).
Its properties are given in Sec. 8 of Algorithms for geodesics.
Finally, as long as all the points of the polygon are within 10000 km
of the test point, the inside/outside test is exact.

The thing I'm having trouble with here is relating the real world to the abstract concept of the Point In Polygon solution, ray casting version.
For the ray casting solution all that matters [I think] is that a ray emitted from the point ends up outside the polygon: the ray can be any shape, as squirly as you like, an infinite spiral or scribble, and can leave the polygon any number of times, it just has to end up outside the polygon for the counting to work.
Given that, shouldn't any circle around the earth work, provided it is indeed a circle?  Bare in mind that for a geofence I don't care about the distance to the polygon (though that might be a nice piece of additional information if it were not computationally intensive to get).
In fact, do I need to even worry about the earth?  Provided the ray I am projecting has no end, does that [maybe] meet the requirement?
[Feel free to close this issue, I don't mean to take up your time unnecessarily with this].

With the gnomonic projection, the points at infinity correspond roughly
to a circle of radius 10000 km from the center point.  So the
point-in-polygon algorithm works provided the polygon is within this
circle.  The key property of the gnomonic projection is that geodesics
project to (nearly) straight lines.  An arbitrary mapping of points on
the earth to a plane does not have this property (and may, for
example, project a circle of latitude to a straight line).

Understood, and thanks again for your swift response, that makes clear the unique properties of gnomonic projections.  I need to get my head around this, let me sleep on it: I need to resolve in my mind the instances where an intersection with any arbitrary infinite line over the surface would fail the in/out test while the gnomonic projection would succeed.

To test my understanding (he said, failing to sleep), looking at Gnomonic: Forward(), I would call it with the lat/lon of my point as lat0/lon0 and the lat/lon of one end of a segment of the polygon, let's call it (a):
Forward(pointLat, pointLon, aVertexLat, aVertexLon, &aVertexX, &aVertexY, NULL, NULL);

I would repeat for the other vertex of the segment, (b):
Forward(pointLat, pointLon, bVertexLat, bVertexLon, &bVertexX, &bVertexY, NULL, NULL);

I now have everything in an X/Y space, with pointLat/pointLon at the origin, and so calculating the intersection is good 'ole geometry.  Is that correct?

Yes, that's it.  Except that your C++ invocation is incorrect (don't use the address operator & for a reference argument) and you should use the overloaded function
Forward(pointLat, pointLon, aVertexLat, aVertexLon, aVertexX, aVertexY);
Forward(pointLat, pointLon, bVertexLat, bVertexLon, bVertexX, bVertexY);

Excellent: I can resolve the C++ mechanics (haven't used C++ in years, spend most of my time in resource-constrained real-time embedded stuff) it was the principle I hadn't quite got me head around.  Now I can sleep :-).
Thank you so much for your help with this, my eyes have been opened; we can sub-module your library and all is, hopefully, straight (for some value of straight) with the world.


Change base map for story map

Hiya, I hope you are well,
Thank you so much for the book with information on how to make a story map. It is so easy to follow and I am so happy with the results so far.
I am however trying to change the base map for my story map, I am not well savvied when it comes to java script so not being able to get the results I am after.
Do you have code or a way that I can do this please?
All the best,
Mark

Hi Mark, see my response and let me know if things don't work!


"Error 404 - This Container App is stopped or does not exist" page when calling internally by IP or name with different Host header

This issue is a:

[x] bug report

Issue description
Trying to achieve this setup:
Application Gateway -> VNET [ Container App Environment -> Ingress (Internal) -> App(Yarp Proxy) -> App(API)]
When Yarp Proxy tries to forward  (X-Forwarded- headers added) by App(API) name e.g. http://api/path I receive a full HTML page
Error 404 - This Container App is stopped or does not exist
from the logs in App(API) it is not even hitting it.
Can you explain what sits on the path of (presumably ClusterIP-based) inter-service calls in a fully internal environment - by App name? And if so, what is the motivation for that instead allowing direct traffic. I expected nothing but that "Error 404" page suggests traffic goes through something.
Docs: https://learn.microsoft.com/en-us/azure/container-apps/connect-apps?tabs=bash#call-a-container-app-by-name
Other interesting behaviors when investigating from a diagnostic app in the same environment:
IP of api = <IP_ADDRESS>
curl --header 'Host: api' http://<IP_ADDRESS>/path => OK
curl http://<IP_ADDRESS>/path => HTML page "Error 404 - This Container App is stopped or does not exist"
curl --header 'Host: api' http://<IP_ADDRESS>/**non-existing-path** => Plain 404 from api
and our specific scenario is calling the App(API) by name with the original host header plus X-Forwarded-*:
curl --header 'Host: host.external-domain.com' http://**api**/path => HTML page "Error 404 - This Container App is stopped or does not exist"
Steps to reproduce

Container App Environment inside VNet
Call your API by IP and expect the full 404 page
Call your API by IP with the host header as your API App name results in 200

Expected behavior
Inter-service calls by IP/name are not altered.
Actual behavior
Inter-service calls by IP/name are altered by proxy.
Additional context
#1160
#1240

@CezaryKlus Hi, We have an OSI Layer 7 mesh that requires this information for HTTP routing. If you prefer not to specify a Host header, is it possible to use TCP for ingress?

@v-vish the problem is that TCP ingress cannot expose itself on standard ports 80/443. In our lift and shift scenario we need to make sure to add the ports for inter-service calls. It would be good to have the possibility to configure non-processed TCP ingress on standard 80/443 ports.


Question about panic -> After() behaviour

Version: v2.25.7
Related: https://github.com/urfave/cli/issues/451
Hi there.
After(), as documented, executes regardless of any panics in Action() functions. Naturally, any business logic in After() that depends on business logic executed by an Action() will fail.

Is there a way to know inside After() whether an Action() has failed so that any subsequent business logic doesn't execute?
Adding defer/recover inside every Action() and taking over the control flow just because After() is designed to execute despite panics may not be ideal.
Are there any specific reasons as to why After() was designed to suppress panics and execute regardless?
I had an os.Exit(0) inside After() which prevented any stack traces from being printed, so it took forever to figure out that there was a panic happening. Should it be explicitly documented that os.Exit(0) should not be used at all?

Thanks!
Sample code for context (./app.bin test)
package main

import (
	"fmt"
	"log"
	"os"

	"github.com/urfave/cli/v2"
)

func main() {
	app := cli.NewApp()

	app.After = func(c *cli.Context) error {
		// 1. ... complex business logic here that depends on sub command
		// Actions() being executed successfully. If After() always executes
		// despite panics in sub commands, how can it know if there was a problem
		// to halt and return so that a failed run doesn't continue to execute here?
		fmt.Fprintf(c.App.Writer, "AFTER()\n")

		os.Exit(0)
		// 2. If there happens to be an os.Exit() anywhere, then the stacktrace
		// of panics happening inside Action() is not printed.
		// Should it be explicitly stated that using os.Exit() anywhere is not safe
		// and cli.Exit() should be used instead?
		return nil
	}

	app.Commands = []*cli.Command{
		{
			Name: "test",
			Action: func(c *cli.Context) error {
				// ... complex business logic here.
				// Without a defer/recover in every single Action(), it is not possible
				// to know if there is a panic.
				fmt.Fprintf(c.App.Writer, "ABOUT TO PANIC ...\n")
				panic("FAKE PANIC")
				return nil
			},
		},
	}

	if err := app.Run(os.Args); err != nil {
		log.Fatal(err)
	}
}

Is there a way to know inside After() whether an Action() has failed so that any subsequent business logic doesn't execute?

The cli library itself does not provide any mechanism to do this. You can implement it on your own.

Are there any specific reasons as to why After() was designed to suppress panics and execute regardless?

No panics are not suppressed. However After() is added as a deferred function to the command processing logic so it will execute even if Action() panics. That is golang standard behaviour. This allows the defer function to suppress/manage the panic and continue or abort.

I had an os.Exit(0) inside After() which prevented any stack traces from being printed, so it took forever to figure out that there was a panic happening. Should it be explicitly documented that os.Exit(0) should not be used at all?

Generally you shouldnt be using os.Exit() at all, you either return an err or nil to the corresponding Action()/Before()/After() funcs and the cli library will handle the rest.

This has to be explicitly stated in the docs then. Will send a docs PR sometime soon. Thank you.


logger issue

I am getting this issue when trying to start the bot
No handlers could be found for logger "slackclient.client"
Connection failed. Exception traceback printed above.

Ho, I'm having the same issue! Have you been able to fix it yet?

Friend of mine got the same error. He's on pip 18.1 and python 2.7.
Worked for me on pip 10.0.1 and python 3.7.

I am getting this same error - Python 2.7

I had the same error on Python 2.7. Python3 gives more info that helped me diagnose this as SlackLoginError. Some googling turned up this link, which suggests using the "Bot User OAuth Access Token" (the second one).
https://github.com/slackapi/python-slackclient/issues/326
I switched and it's good now.

I did make a hack/fix for Python 2.7 (I can't remember)
It was something like adding logger.basicConfig() right at the top of the client module


nodes is holded after delete its cluster

Steps to reproduce:

delete cluster with nodes
try to create new cluster (important do not reload page) with nodes of deleted cluster

workaround: reload page after cluster deleting

Can't reproduce it (I do not refresh page), actually, after cluster is deleted, ui pulls the list of orphans nodes from server.

Sorry, backend send empty list of nodes at first time


Make a way to disable extism

Made a plugins feature in pumpkin-plugin
Made a plugins feature in pumpkin, which enables the plugins feature in pumpkin-plugin
Made the feature default

To run the project without plugins, use cargo run --no-default-features

Perfect, I have been looking forward to this! LGTM!


Does Kong close idle keep alive upstream connections

I am using Kong 0.14 and was curious if there was a config to set the idle timeout for keep alive connections to the upstream server. I have looked through the documentation and can only find a config for keep alive connection count.
Also what is the default idle timeout for upstream (keep alive) connections from Kong.

Hi,
There is no such config available in Kong 0.14, given the underlying Nginx/OpenResty versions do not initiate upstream keepalive connections closings. See this Kong Nation thread for some additional details:
https://discuss.konghq.com/t/connection-draining/466/2
Starting with Kong 1.3 (to be release next month), the underlying Nginx version will be 1.15.8. This version comes with two new directives: keepalive_requests and keepalive_timeout, which will be configurable via Kong configuration properties.
Best,

@thibaultcha Thank you for the response.