Add rawFractionalSeconds property to GeneralizedTime

Motivation:
There is a possible overflow when computing a Double value for fractionalSeconds from an ArraySlice of bytes. Hence, access to this original ArraySlice is necessary.
Modifications:

Add rawFractionalSeconds property to GeneralizedTime.
Add a new internal init to GeneralizedTime that accepts rawFractionalSeconds instead of fractionalSeconds and generates the later from the former.
Adjust the algorithm for computing fractionalSeconds, from a mathematical to a String computation. This is due to the precision mismatch between the mathematical computation and the native Double computation. This issue, which previously did not surface, now does, due to the newly included round-trip conversion from fractionalSeconds to rawFractionalSeconds.

Result:

The rawFractionalSeconds property now provides the original ArraySlice from which fractionalSeconds was computed.
GeneralizedTime can now compute fractionalSeconds from the provided rawFractionalSeconds.

@swift-server-bot add to allowlist


No module named 'anomalib.config'

Describe the bug
(pytorch) F:\anomalib-0.7.0>python tools/train.py --model padim
Traceback (most recent call last):
File "F:\anomalib-0.7.0\tools\train.py", line 17, in
from anomalib.config import get_configurable_parameters
ModuleNotFoundError: No module named 'anomalib.config'
Dataset
MVTec
Model
PADiM
Steps to reproduce the behavior
。
OS information
OS information:

OS: [e.g. Ubuntu 20.04]
Python version: [e.g. 3.10.0]
Anomalib version: [e.g. 0.3.6]
PyTorch version: [e.g. 1.9.0]
CUDA/cuDNN version: [e.g. 11.1]
GPU models and configuration: [e.g. 2x GeForce RTX 3090]
Any other relevant information: [e.g. I'm using a custom dataset]

Expected behavior
。
Screenshots
。
Pip/GitHub
pip
What version/branch did you use?
No response
Configuration YAML
。

Logs
。

Code of Conduct

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

F:\anomalib-0.7.0 looks like you are using version 0.7.0 which is outdated. Please install the latest version via https://github.com/openvinotoolkit/anomalib?tab=readme-ov-file#-installation


Fast-scroll-handle jumping issue

Referenced from the discussion of #110 , it seems that the fast-scroll-handle issue is not completely solved, the jumping issue is not there when the divider height is big, etc: 20dp.
But when the divider height is set down to 1dp, the jumping issue came to obvious, especially when you slowly scroll through the list, it happens when divider hits the 'top wall'.
The quick fix to this is by removing the android:clipToPadding setting. However @androidmoney felt that this should not be the culprit but instead something is missing on isCalledFromSuper(). Any takers?

I use the version 2.5.2 of the library from maven and still have the Fast scroller jumping issue on androids <= 4.3


Added bridge to homekit, however, can't find devices

I've followed the directions and understood the bridge will scan/find all my A/C units. This isn't working for me.
Please tell me how to add the physical units to the bridge. I used your sample file and only changed my user/password.
Thank you in advance

First of all what a AC device you use?
Next go to plugin config advanced section and enable debug mode, save and restart the plugin. Next post the whole log.

Note, You need to add every AC device to the HomeKit.app
https://github.com/grzegorz914/homebridge-melcloud-control/wiki#adding-to-homekit


ARROW-16832: [C++] Remove cpp/src/arrow/dbi/hiveserver2

It's not maintained.
No objection on the mailing list:
https://lists.apache.org/thread/70qv1q9krx7ztk35tzxq8jp11vq5b5zt

@lidavidm at some point, we might resurrect this in https://github.com/apache/arrow-adbc since it would be reasonably straightforward to make a client implementation using this code as a starting point. Unclear how many Hive and Impala users are out in the while now though

Good idea, filed https://github.com/apache/arrow-adbc/issues/19


Allow absolute path as config option

I'm unable to write a test for it as you compile the tests, so webpack handles the path for you... Ideas?
The test I wrote:
it('allows to change config path with absolute path', function () {
    // eslint-disable-next-line no-path-concat
    var css = require('!raw-loader' +
                      '!../?config=' +
                      __dirname + '/cases/config/postcss.config.js' +
                      '!./cases/style.css');
    expect(css).toEqual('a { color: black }\n');
});

Thanks! Release in 1.2.1.


fix: revert previous formatting changes

Attempting to trigger a release of 0.7.1

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


Port to Firefox for Android

It would be great if this add-one would also be available on Firefox for Android.

I agree. I wonder what it takes.


Update simple-schema dependency to avoid errors in Meteor 1.3

We've had to remove a workaround in Meteor 1.3, which leads to the issue previously reported in #104 reappearing:
toEnd: wrong arguments-i18n-compiler` fr...  /

to: wrong arguments

This is due to shelljs (which is a dependency of the Cordova packages we use) modifying String.prototype to add to and toEnd functions, and this conflicting with the stringjs. The current version of tap:i18n depends on simple-schema 1.3.0, which has a dependency on stringjs.
I don't know enough about this project and the reasons for depending on an older version of simple-schema, but is there any way you could upgrade?
Since simple-schema has now removed the string.js dependency, that would at least solve the issue until this has been fixed in shelljs and the Cordova packages that use it have updated their dependencies.

Which simple-schema version to try test with?

I would try the most recent version, but at least the one after the string.js dependency was removed.
Sent from my iPhone

On 26 Feb 2016, at 18:08, Daniel C<EMAIL_ADDRESS>wrote:
Which simple-schema version to try test with?
—
Reply to this email directly or view it on GitHub.


Error:  visibility in dark mode

Describe the Error
In the github badge page, the headings are not visible in dark mode.
Expected behavior
The headings and all the text should be clear and visible.
Additional context

@sanjay-kv Please assign it to me under gssoc

@sanjay-kv I was working on it. Why it was closed

My bad. you can continue working on it.


Moving ember-view blueprint into addon

See: https://github.com/ember-cli/ember-cli/pull/5607

Tests failing for other reasons

Needs to bring the view-test blueprint also.

@rwjblue all fixed

Failures are issues with master (not this PR).


Adding Vulnerability management quickstarts

Summary
Adding integrations for AWS Security Hub, GitHub Dependabot, New Relic Security API.

Pre merge checklist

[x] Did you check you NRQL syntax? - Does it work?
[ ] Did you include an InstallPlan and Documentation reference?
[ ] Are all documentation links publically accessible?
[ ] Did you check your descriptive content for voice and tone?
[ ] Did you check your descriptive content for spelling and grammar errors?

Dashboards

[ ] Does the PR contain a screenshot for each of your dashboards?
[ ] Do your screenshots show data?
[ ] Has the sanitization script been run on each dashboard?

Alerts

[ ] Did you check that your alerts actually work?

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Frank Straulemann seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


first run and execute the mysql query has errors

I changed my database is Mysql 5.7, and carefully read the document, but also encountered an sql execute errors when I run the application in visual studio 2015.
The detail is following:

**An exception of type 'System.Exception' occurred in MySereneDemo.Web.dll but was not handled in user code
Additional information: Error executing migration:
/* Using Database MySql and Connection String Server=localhost;Port=3306;Database=MySereneDemo_Default_v1;uid=root;password=root */
/* VersionMigration migrating ================================================ */
/* CreateTable VersionInfo */
CREATE TABLE VersionInfo (Version BIGINT NOT NULL) ENGINE = INNODB
GO
/* VersionMigration migrated */
/* VersionUniqueMigration migrating ========================================== */
/* CreateIndex VersionInfo (Version) */
CREATE UNIQUE INDEX UC_Version ON VersionInfo (Version ASC)
GO
/* AlterTable VersionInfo */
/* No SQL statement executed. */
/* CreateColumn VersionInfo AppliedOn DateTime */
ALTER TABLE VersionInfo ADD COLUMN AppliedOn DATETIME
GO
/* VersionUniqueMigration migrated */
/* VersionDescriptionMigration migrating ===================================== */
/* AlterTable VersionInfo */
/* No SQL statement executed. */
/* CreateColumn VersionInfo Description String */
ALTER TABLE VersionInfo ADD COLUMN Description VARCHAR(1024)
GO
/* VersionDescriptionMigration migrated /*
I found this sql generated from Serenity has some syntax errors When I put them in workbench.
How can I do and I'll get compatible with Mysql 5.7 version if I prefer Mysql?

IMHO your best shot would be to fix errors in mysql statements in migrations. That way every time Serenity runs on uninitialized DB, it will use proper Statements and initialize DB properly.
Considers push requesting fixed up mysql SQL back to solution...

@ga5tan Yeah, it's a better one in solution and I considered it.
But, To be honest I don't know how to fix this errors in mysql statements in migrations.
Actually, I don't know what's this technical generated this sql automatic?(If you know please tell me)

I have no clue how MySQL statements were generated but I want to believe they were tested working at some point. I am surprised that latest version of MySQL are not backward compatible. I actually find that hard to believe. I think u'd better check in some MySQL forums on how to fix the scripts, since it does not seem there are much MySQL guys here ready to help.

@ga5tan
I think I already found the issue is about FluentMigrator.
I already tested MySQL statement and edit my code, it's not compatible with Mysql.
Just FluentMigrator seems has some issues, I don't want to still use FluentMigrator because I think it's already old technique.
So, I ready to use Entity Framework code first, Did you have some experience about use EF in Serenity?

Well I may be mistaken, but FluentMigrator is just for versioning\keeping database structure\data in sync between dev, beta and prod installs.
It has nothing to do with Entity Framework. For that purpose is Dapper integrated into Serenity.
I guess there may be some samples floating around for use of other ORM than Serrenitys.
But I may be wrong on account of EF and EF indeed provides some means for versioning of DB...


Fix broking link to net-next

The file bpf_devel_QA.txt was renamed to bpf_devel_QA.rst
Signed-off-by: Jesper Dangaard Brouer<EMAIL_ADDRESS>

Looks like this PR was forgotten. Sorry Jesper! Merging now :) Thanks!


Refactoring after collective code review

Thanks Alex, it's looking way better. Just a few things

Could we rename goObs and goVal to evalObs and eval: that would be consistent with the use in the previous definition?

The change to Slot is great - suddenly those magic numbers mean something. Let's do the same with other synonyms of integer. You can see (some of) these in the example in Main.hs: participants, currency, and there may be others.

I'm not entirely convinced about the Errors; for example, look at
Reduced ReduceNoWarning ReduceNoEffect state cont
this would be much more readable as
Reduced NoWarning NoEffect state cont
or as
Reduced Nothing Nothing state cont
but I can see the argument about keeping the specificity. So I guess we live with this. One possibility is that we do use abbreviations here, but at the end, so that we have
NoWarningR
instead of
ReduceNoWarning
This gives us the distinctness (the final character) without overloading the eye. In math we might well have written the R as a subscript, say.

With intervals, did you decide not to use naturals (or "slot naturals") for this?

Thanks Alex, it's looking way better. Just a few things

Could we rename goObs and goVal to evalObs and eval: that would be consistent with the use in the previous definition?

Done.

The change to Slot is great - suddenly those magic numbers mean something. Let's do the same with other synonyms of integer. You can see (some of) these in the example in Main.hs: participants, currency, and there may be others. Specifically this would mean
-- adding constructors to the currencies, and

I've done that, but it doesn't change much. Because we use Value (e.g. Constant 1000), not Money/Ada per se when we construct a contract.
We could add helper functions, like adaValue :: Integer -> Value = Constant but it won't work while pretty-printing.

-- making participants Text

OK.

I'm not entirely convinced about the Errors; for example, look at
Reduced ReduceNoWarning ReduceNoEffect state cont
this would be much more readable as
Reduced NoWarning NoEffect state cont
or as
Reduced Nothing Nothing state cont
but I can see the argument about keeping the specificity. So I guess we live with this. One possibility is that we do use abbreviations here, but at the end, so that we have
NoWarningR
instead of
ReduceNoWarning
This gives us the distinctness (the final character) without overloading the eye. In math we might well have written the R as a subscript, say.

I'll give it a try and we'll see how it looks.

With intervals, did you decide not to use naturals (or "slot naturals") for this?

I was going to. But now I'm in doubt, because I can't see what do we gain from it, really.
We won't remove all Interval errors, there still going to be IntervalInPastError. We still would need fixInterval.
So, effectively, we'll remove one error and one if. On the other hand, we'll introduce another dependency for Nat library.
So I'm no convinced. Guys, what do you think?

I am happy to keep it simple.
Simon

On 17 Aug 2019, at 12:31, Alexander Nemish<EMAIL_ADDRESS>wrote:
With intervals, did you decide not to use naturals (or "slot naturals") for this?
I was going to. But now I'm in doubt, because I can't see what do we gain from it, really.
We won't remove all Interval errors, there still going to be IntervalInPastError. We still would need fixInterval.
So, effectively, we'll remove one error and one if. On the other hand, we'll introduce another dependency for Nat library.
So I'm no convinced. Guys, what do you think?
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub https://github.com/input-output-hk/marlowe/pull/34?email_source=notifications&email_token=AAE224CMJR6ESO27WOMNZMLQE7OSDA5CNFSM4IMBFXD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4QJL2I#issuecomment-522229225, or mute the thread https://github.com/notifications/unsubscribe-auth/AAE224E5OOJBVNNQVZDUDLLQE7OSDANCNFSM4IMBFXDQ.

Simon Thompson | Professor of Logic and Computation
School of Computing | University of Kent | Canterbury, CT2 7NF, UK
<EMAIL_ADDRESS><EMAIL_ADDRESS>| M +44 7986 085754 | W www.cs.kent.ac.uk/~sjt http://www.cs.kent.ac.uk/~sjt

I tried a couple of things and now I think that original implementation of data ReduceEffect = Payment | NoPayment was the most readable, self-documenting, and self explanatory. Even though it's effectively equivalent of Maybe Payment.
My proposal would be to live it as it was.

Sounds fair enough.
S.

On 17 Aug 2019, at 12:35, Alexander Nemish<EMAIL_ADDRESS>wrote:
I tried a couple of things and now I think that original implementation of data ReduceEffect = Payment | NoPayment was the most readable, self-documenting, and self explanatory. Even though it's effectively equivalent of Maybe Payment.
My proposal would be to live it as it was.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub https://github.com/input-output-hk/marlowe/pull/34?email_source=notifications&email_token=AAE224CFAT7W2EZO7VGUS6LQE7PBFA5CNFSM4IMBFXD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4QJNUQ#issuecomment-522229458, or mute the thread https://github.com/notifications/unsubscribe-auth/AAE224DCPY2URDJS3QDNGZ3QE7PBFANCNFSM4IMBFXDQ.

Simon Thompson | Professor of Logic and Computation
School of Computing | University of Kent | Canterbury, CT2 7NF, UK
<EMAIL_ADDRESS><EMAIL_ADDRESS>| M +44 7986 085754 | W www.cs.kent.ac.uk/~sjt http://www.cs.kent.ac.uk/~sjt

There is a way of defining subtraction, called “natural subtraction”, naturally.
n -nat- m = max (n-m,0)
and of course it doesn't satisfy the ring axioms, but does work as long as you never subtract anything larger than the number that you’re subtracting from.
S.

On 20 Aug 2019, at 15:19, Alexander Nemish<EMAIL_ADDRESS>wrote:
@nau commented on this pull request.
In semantics-3.0/Semantics.hs https://github.com/input-output-hk/marlowe/pull/34#discussion_r315716548:

-{-| Add the given amount of money to an accoun (only if it is positive).
+{-| Add the given amount of money to an account (only if it is positive).
Nats are not simpler in Haskell.
There is no standard Nat, only from 3rd party libraries.
We'll lose ability to implement Num for Nats, because naturals do not form a ring (how would you define negate?).
All we need from account Id's is that those form a linear order.
Integers are good enough.
Text is worse (because of potential complexities with lexicographical order) but at least it's descriptive.
Nat gives no advantages over Integer, so we won't gain anything.
So I'm not convinced, basically :)
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub https://github.com/input-output-hk/marlowe/pull/34?email_source=notifications&email_token=AAE224BXTAN7BJRCDLSWPCLQFP4OLA5CNFSM4IMBFXD2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCCC4FIY#discussion_r315716548, or mute the thread https://github.com/notifications/unsubscribe-auth/AAE224E5JEZPHTDSAHNY7B3QFP4OLANCNFSM4IMBFXDQ.

Simon Thompson | Professor of Logic and Computation
School of Computing | University of Kent | Canterbury, CT2 7NF, UK
<EMAIL_ADDRESS><EMAIL_ADDRESS>| M +44 7986 085754 | W www.cs.kent.ac.uk/~sjt http://www.cs.kent.ac.uk/~sjt


TFRS - Enable IDIR Users to Export Fuel Supplier User Contact Information

Description:
As an IDIR user, the ability to export a list of fuel supplier user contact information in an Excel format is required. This feature will be added to the existing Fuel Suppliers page by introducing a new button for downloading user information while renaming the current button for better distinction.
Purpose and benefit to user:
The purpose of this feature is to facilitate efficient communication between IDIR users and fuel suppliers by providing an accessible and organized list of contact information. This will enable IDIR users to reach out to stakeholders regarding key issues, upcoming events, and other essential topics.
Acceptance Criteria:

[ ] Add a new button labeled "Download User Information" on the Fuel Suppliers page.
[ ] Rename the existing button to "Download Supplier Information" for better clarity.
[ ] Ensure that the exported Excel file contains the following columns:

First name
Last name
Email BCeID
BCeID Username
Title
Phone
Email Notifications
Status
Fuel Supplier (Organization)
Role(s)

[ ] Test the new "Download User Information" button to confirm that it exports the fuel supplier user contact information in the correct format.
[ ] Verify that the exported Excel file contains accurate and up-to-date information.

Wireframe:

Hey team! Please add your planning poker estimate with Zenhub @AlexZorkin @vibhiquartech @tim738745

Please add your planning poker estimate with Zenhub @jig-patel

Can you check the BCeID Username values? they appear to be more like a GUID rather than the User Name.
Also please change the Excel file name from example BC-LCFS_organizations_2023-04-28
to change the 'organizations' to 'bceidusers' so the two download files have different names

@airinggov sure, will do!

@tim738745 sorry Tim, I don't think i wrote the error very well above with the username issue
previously we had a record like this
BCHydro Test<EMAIL_ADDRESS>user1671746007734
the update you made now returns
BCHydro	Test<EMAIL_ADDRESS>Test BCHydro
what I'm expecting to see instead of user1671746007734 or Test BCHydro
is bceid\tbchydro or just tbchydro

@airinggov okay, let me take another look

@airinggov I made a change (PR is up right now); the username you're looking for is a user's keycloak/external uername, and we don't necessarily store those; we have those if they're a mapped user and they've logged in before, so not all users will have this username.

ok that's fine, thanks for looking into it

@airinggov no problem!


publish to nuget

Is it possible to publish this library to nuget for easier install?

Sorry for not making it clear. @haf made a NuGet package available at https://www.nuget.org/packages/FsZ3/

thank you！


The numerical columns should be Column1 through Column4 (instead of 5)

@hning86 - Please review the proposed changes.  Thanks

@limorl - You have a merge conflict of some kind. If you can resolve that, then Hai can review your change. Thanks for catching this!

Good catch, and thanks for the contribution! ~Jason
#please-close  This article was previously updated last week with the same information when I received the feedback.
https://docs.microsoft.com/en-us/azure/machine-learning/preview/tutorial-classifying-iris-part-1#create-a-data-preparation-package

#please-close

@garyericson @limorl This one is a duplicate of existing changes, so please close.


mypornsnap.top

ESET blocked it results in this search engine site against JS/ScrInject.B trojan.

Thank you Tomasz @FadeMind.  Merging!


Alt+arrow_keys navigation only partially works

Description
This is related to #6736 but its not a feature request but a bug.
When in the file/folder pane and pressing Alt+◀/▶, the contents is actually correctly updated. In other words: left goes to the previous location, right to the next (if any), as expected by convention.
But, after changing the location the focus is switched away from the pane and goes to the other controls of the app, thus no further navigation is possible.
The Alt+🔼/🔽 keys also exhibit erroneous behavior: Alt+🔼 does (unexpectedly) move upwards in folder hierarchy, yet Alt+🔽 does either nothing when in the file pane, or navigate amongst controls when the focus is outside a file pane.
Steps To Reproduce
select a folder in the right pane
open a sub folder (repeat if more levels of navigation  history are desired),
press Alt+◀ to go backwards in navigation history
press Alt+◀ again, when at the last step in history, the focus will jump to the "Name" column of the pane
repeated Alt+◀ will then cycle trough the apps controls
Expected behavior
Not ever change focus with Alt+◀/▶ as those are not focus keys, rather stay in the navigation mode.
Files Version
Version: <IP_ADDRESS>
Windows Version
OS Version: 10.0.19042.1348
Relevant Assets
No response

@Hefaistos68 is this an issue in all the layouts?

Just tested it, yes, same behavior in all layouts.

Merging with #9042


[DEPENDENCY_REFACTOR] - Remove proposal validation from the quorum proposal task

Closes #3266.
This PR:

Removes the Proposal dependency from the quorum proposal task.
Modifies the validate_proposal_liveness function in the quorum proposal recv task to only handle the state udpates without liveness checking and renames it to update_states.
Simplifies the return type of handle_quorum_proposal_recv in the quorum proposal recv task.
Removes the QuorumProposalLivenessValidated event.
Updates test outputs.
Adds a command to justfile.

This PR does not:

Fix the existing test_success failure.
Fix lints.

Key places to review:

crates/task-impls/src/quorum_proposal
crates/task-impls/src/quorum_proposal_recv

I'll send another commit to fix the lint errors, as it's turned on recently.

I'll send another commit to fix the lint errors, as it's turned on recently.

Done.


Error when installing via pip on Ubuntu 15.10

/usr/bin/pip run on Thu Apr  7 20:59:25 2016
Downloading/unpacking gmusicapi
  Getting page https://pypi.python.org/simple/gmusicapi/
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 304, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1178, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 194, in find_requirement
    page = self._get_page(main_index_url, req)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _get_page
    session=self.session,
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 670, in get_page
    resp = session.get(url, headers={"Accept": "text/html"})
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 477, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 237, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 465, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 370, in send
    timeout=timeout
  File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 557, in urlopen
    body=body, headers=headers)
  File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 388, in _make_request
    assert_header_parsing(httplib_response.msg)
  File "/usr/lib/python2.7/dist-packages/urllib3/util/response.py", line 49, in assert_header_parsing
    if not isinstance(headers, httplib.HTTPMessage):
AttributeError: 'module' object has no attribute 'HTTPMessage'

Hm. Can you try installing into a virtualenv instead? I have a feeling this has to do with your local environment, and a virtualenv will isolate us from it.

So, this is from a bad interaction between older urllib3 versions and python-future's standard library aliasing. Updating requests to >= 2.8.1 and, if installed separately, urllib3 >= 1.11.1 should prevent this problem.

Feel free to reopen if this is still an issue.


Dock plugins were not detected

Required Info:

Operating System: Ubuntu 22.04 LTS
ROS2 Version: ROS2 Humble
DDS implementation: rmw_fastrtps_cpp. Tried with Cyclone DDS as well

Hi,
I just added the docking nodes as a composable node in my launch file as such:
lifecycle_nodes = ['controller_server',
                       'smoother_server',
                       'planner_server',
                       'behavior_server',
                       'bt_navigator',
                       'waypoint_follower',
                       'velocity_smoother',
                       'docking_server']

Node(
                package='opennav_docking',
                executable='opennav_docking',
                name='docking_server',
                output='screen',
                respawn=use_respawn,
                respawn_delay=2.0,
                parameters=[configured_params],
                arguments=['--ros-args', '--log-level', log_level],
                remappings=remappings,
            ),

ComposableNode(
                        package='opennav_docking',
                        plugin='opennav_docking::DockingServer',
                        name='docking_server',
                        parameters=[configured_params],
                        remappings=remappings,
                    ),

I have the default plugins specified in my nav2_params.yaml file as such:
docking_server:
  ros__parameters:
    controller_frequency: 50.0
    initial_perception_timeout: 5.0
    wait_charge_timeout: 5.0
    dock_approach_timeout: 30.0
    undock_linear_tolerance: 0.05
    undock_angular_tolerance: 0.1
    max_retries: 3
    base_frame: "base_link"
    fixed_frame: "odom"
    dock_backwards: false
    dock_prestaging_tolerance: 0.5

    # Types of docks
    dock_plugins: ['simple_charging_dock']
    simple_charging_dock:
      plugin: 'opennav_docking::SimpleChargingDock'
      docking_threshold: 0.05
      staging_x_offset: -0.7
      use_external_detection_pose: true
      use_battery_status: false # true
      use_stall_detection: false # true

      external_detection_timeout: 1.0
      external_detection_translation_x: -0.18
      external_detection_translation_y: 0.0
      external_detection_rotation_roll: -1.57
      external_detection_rotation_pitch: -1.57
      external_detection_rotation_yaw: 0.0
      filter_coef: 0.1

    # Dock instances
    # The following example illustrates configuring dock instances.
    docks: ['home_dock']  # Input your docks here
    home_dock:
      type: 'simple_charging_dock'
      frame: map
      pose: [0.0, 0.0, 0.0]

    controller:
      k_phi: 3.0
      k_delta: 2.0
      v_linear_min: 0.15
      v_linear_max: 0.15

However when I launch navigation_launch,py, I get the following error:
[opennav_docking-8] [ERROR] [1728923077.655240967] [docking_server]: Charging dock plugins not given! [lifecycle_manager-9] [ERROR] [1728923077.655614486] [lifecycle_manager_navigation]: Failed to change state for node: docking_server [lifecycle_manager-9] [ERROR] [1728923077.655628225] [lifecycle_manager_navigation]: Failed to bring up all requested nodes. Aborting bringup.
I'm not sure what's going on since the plugins were specified in the nav2_params.yaml file. Any help on this would be much appreciated!

Did you follow the tutorial? https://docs.nav2.org/tutorials/docs/using_docking.html
This is odd. I've shown this to work in Nav2's CI and in practical use across a number of robots. I suspect that you're missing some subtle detail but I can't ID what it is off of the top of my head. Are you sure that the nav2_params.yaml file that you edited is the one that's being loaded and used? I'm thinking right now its a subtle issue in your integration rather than a bug in the code given we have repeatable tests and others using this, but I don't outright dismiss this as a potential issue if you find something suspicious

Hi Steve,
Thanks for pointing out loading the right nav2_params.yaml file. Changing this line in the launch file fixed the issue:
bringup_dir = get_package_share_directory('rad_lab_spot_path_planning')
to
bringup_dir = get_package_share_directory('my_nav_pkg')


Minor inconsistency in DSiWare-Downgrade Wiki

The following issue is found at DSiWare-Downgrade Wiki page

In Section I of the guide, step 5 says to perform a SysNAND Backup to "NAND.bin"
In Section VI of the guide, step 4 tells the user to restore SysNAND from "NANDmin.bin" instead of "NAND.bin."

fixed


feat!: set esbuild default charset to utf8

Currently, if I use a language other than English in my javascript code, my bundle gets very large. To avoid this, I have to use a Terser.  For example, Terser preserves "丂", but esbuild seems to convert it to "\u4E02".
In order to solve the problem and start using esbuild without fear, we need to add charset.

An example of a real bundle:

Is this only for v4 ? Because I get the exact same error in version ^3.2.2. I will upgrade to v4 this should be fixed right ?

Yes, this is only for v4.

Yes, this is only for v4.

I tried to upgrade to v4 but i encountered many other problems because of other packages that do not support v4. Are you planing on fixing this for v3 too? This problem happened to me today suddenly.


[BUG] [azure-messaging-servicebus] Resource leak when reusing ServiceBusClientBuilder

Describe the bug
I am using azure-messaging-servicebus for a simple session receiver. The code reuses the ServiceBusClientBuilder and tries to obtain a session using acceptNextSession. Originally using azure-sdk-bom:1.2.24 and all managed dependencies, versions since 1.2.27 (and latest .28) are showing an intenral memory leak in the underpinnings, so an idle application repeating the same usage pattern without sending/receiving messages and just repeatedly trying to obtain a session leaks memory in an internal threadpool associated with reactor-core, it seems.
To Reproduce

Create a ServiceBusClientBuilder
Create a ServiceBusSessionReceiverClient
Try to obtain a session using ServiceBusSessionReceiverClient.acceptNextSession()
We get a timeout ("Timeout on blocking read for") with no active session/producer , call ServiceBusSessionReceiverClient.close()
Repeat the cycle from step 2 on

Expected behavior
Memory usage of the application should remain stable as it was with older versions of azure-messaging-servicebus.
Screenshots

Setup (please complete the following information):

Library/Libraries: azure-sdk-pom:1.2.27, azure-messaging-servicebus:7.17.5
Java version: OpenJDK Runtime Environment Corretto-8.372.07.1 (build 1.8.0_372-b07)

Additional context
Heapdump reflecting an instance of the issue has been uploaded to file Secure File Exchange case<PHONE_NUMBER>000765

Customer reported potential regression between May and August 2024 releases

Hello @fposch, thank you for reaching out!
I am following the provided steps to reproduce the issue you're encountering.
The code is:
package org.example;

import com.azure.core.util.ConfigurationBuilder;
import com.azure.messaging.servicebus.ServiceBusClientBuilder;
import com.azure.messaging.servicebus.ServiceBusProcessorClient;
import com.azure.messaging.servicebus.ServiceBusReceivedMessage;
import com.azure.messaging.servicebus.ServiceBusReceiverClient;
import com.azure.messaging.servicebus.ServiceBusSessionReceiverClient;
import com.azure.messaging.servicebus.models.ServiceBusReceiveMode;

import java.time.Duration;
import java.util.List;
import java.util.Scanner;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

public class Main {
    private static final String CON_STR = System.getenv("CON_STR");
    private static final String Q_NAME = System.getenv("Q_NAME");

    public static void main(String[] args) {
        // 1. Create a ServiceBusClientBuilder
        final ServiceBusClientBuilder clientBuilder = new ServiceBusClientBuilder()
                .connectionString(CON_STR);

        int i = 0;
        while (i < 100) {
            System.out.println("Creating ServiceBusSessionReceiverClient #" + i);
            // 2. Create a ServiceBusSessionReceiverClient
            ServiceBusSessionReceiverClient sessionClient = clientBuilder
                    .sessionReceiver()
                    .queueName(Q_NAME)
                    .receiveMode(ServiceBusReceiveMode.PEEK_LOCK)
                    .disableAutoComplete()
                    .prefetchCount(0)
                    .buildClient();

            try {
                // 3. Try to obtain a session using ServiceBusSessionReceiverClient.acceptNextSession()
                final ServiceBusReceiverClient receiverClient = sessionClient.acceptNextSession();
            } catch (Exception e) {
                // 4.  Repeat the cycle from step 2 on
            i++;
        }
        waitKeyPress();
    }

    private static void waitKeyPress() {
        Scanner input = new Scanner(System.in);
        input.nextLine();
    }
}

I executed this code for nearly 180 minutes without observing any memory leak (the screenshot below). In contrast, your scenario showed a rapid increase from 500MB to 1GB within approximately ~30 minutes. Could you review the code provided above to ensure it aligns with your usage? If there are discrepancies, can you help modify it accordingly to match your usage, or if you can push a minimal repro to a git-repro that would help.

I've slightly modified the above code to have valid sessions with messages, hence it won't time out as always but get to read the messages. I created 5000 sessions each with few messages.
In this case as well no luck with reproducing the heap growth for a 2-hour run, here is the Heap captured using VisualVM and JProfiler

I've pushed the project here under the class Main_Session_Receive_1  (and Main_Session_Receive_0  is the previous attempt to repro with timeout)
Could you take a look and help modifying it to reproduce? You can send PR, it's a public repro.

Hi @anuchandy,
Thank you for your efforts so far! 👍
Samples look pretty much like ours, we use defaults for receiveMode, disableAutoComplete and prefetchCount - I don't think this should make a difference, though. Receive mode defaults to PEEK_LOCK anyway from what I can see and I'm not sure if the other two really matter when no messages are received.
Meanwhile, I tried to write an isolated reproducer that closely resembles our logic but had no luck getting any sign of leakage, either.
I need to further test/debug this in our full application context, it's a pretty dependency-bloated beast and even for initial implementation, I had to dependency-manage netty libraries because we had a clash with versions we were using. I think, azure uses 4.1.110.Final in the current releases.
I'll get back to you with further details.

Hi @fposch, Yes, auto complete is disabled by default for synchronous receiver and prefetch is zero if not set.

@anuchandy I'm afraid I discovered what the issue is.
It comes down to

it's a pretty dependency-bloated beast

In our application deployment, a recent redisson  version inherits us io.projectreactor:reactor-core:jar:3.6.2 as opposed to 3.4.38 used by azure-core.

I gave it a try and wrote an sample where I included 3.6.2 and get the same issues, some thread-pool leakage by reactor.
I understand that reactor has multiple "release trains" and both versions are relatively recent releases from their lines. So this is arguably not a bug/regression and probably needs to be managed by us... I hope, I'm not getting issues with redisson going back to 3.4.x 😁
If you are interested, here's the sample app:  https://github.com/fposch/servicebus-reactor-leak
(Just changing the dependency probably does the same thing with your samples, though).

Running a few combinations, I'm actually not sure if it is really down to reactor-core

azure-sdk-bom: 1.2.27 without reactor-core:3.6.2 (so 3.4.38 as required by azure-core) still gives me the issue and there are plenty of java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask objects lurking on the leak
azure-sdk-bom: 1.2.24 with original reactor-core:3.4.36 seems to be stable in memory behavior, heap looks clean and (manual) GC heap usage goes back to 10-15 MB

Heap with 1.2.27

Heap with 1.2.24

I thought, maybe recreating the ServiceBusClientBuilder in the loop so that the object and the underlying connection pool get freed/collected
ServiceBusClientBuilder clientBuilder = new ServiceBusClientBuilder()
                    .fullyQualifiedNamespace(getFullyQualifiedNamespace())
                    .credential(new DefaultAzureCredentialBuilder().build())
                    .retryOptions(getRetryOptions());

In the given sample, this still seems to leak some ScheduledFutureTask objects

Hi @fposch, thanks for the update.
The java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask type is used for timers in general. For example, when Mono.delay(Duration) Reactor API is called, a ScheduledFutureTask object will be created by the reactor-core internally.
For this specific use case, there are mainly two hot paths in Service bus library where this type gets instantiated–

As part of constructing ServiceBusReceiverClient (i.e. when acceptSession Returns)
When calling receiveMessages(count, timeout)

Apart from these, expect this type to be also instantiated by any other libraries that uses Reactor, e.g. reacto-netty, redisson.
I've forked your sample project, ran it using "azure-sdk-bom:1.2.24" without overriding reactor-core for 3.5 hours. When running, we tracked the ScheduledFutureTask instances created by the Service Bus use case.

The similar pattern ^ is by "azure-sdk-bom:1.2.27" as well.  When running with 1.2.27 as well, this type instances does not appear to be leaking based on current observations, but yes there are too many of them but it's the side effect of how the above APIs are used in the sample. Between note that when running this test, I used sessions with messages in it so that above two hot paths will be hit.
The initial heap usage pattern observed for the complete application run shows different characteristics, with rapid and sharp growth. It might be helpful to see if these timer objects really are leaked in the original application or something else is causing heap growth, also potential for its happing from other libraries using reactor or plain old timers.

I'll also try pinning "azure-sdk-bom:1.2.27" to "reactor-core:3.6.2" and get back.

Here is the result (java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask instances and Heap) of "azure-sdk-bom:1.2.27" pinned to "reactor-core:3.6.2" for ~3 hours of run.

Thank your for the detailed investigation!

The initial heap usage pattern observed for the complete application run shows different characteristics, with rapid and sharp growth. It might be helpful to see if these timer objects really are leaked in the original application or something else is causing heap growth, also potential for its happing from other libraries using reactor or plain old timers.

This is somewhat expected, the complete application uses multiple (20+) of such consumers that are basically running the same pattern, so overall growth is indeed faster than a single-threaded demonstrator.
But we still had an upwards trend on heap usage with the combinations and it seems to be inevitable to have some resource leakage (albeit reactor-internal)
Do you have any further advice on how to mitigate this for our use-case?
I just tried modifying the lifespan of client/builder, when keeping the ServiceBusSessionReceiverClient instead of instantiating it on every attempt and that looks pretty stable in a first attempt (so assuming that reactor initialization happens at this point.)
int i = 0;
try (ServiceBusSessionReceiverClient client = clientBuilder.sessionReceiver()
        .queueName(getQueueName())
        .buildClient()) {
    while (i < 10000) {
        try (ServiceBusReceiverClient receiverClient = client.acceptNextSession()) {
            final IterableStream<ServiceBusReceivedMessage> stream = receiverClient.receiveMessages(5, Duration.ofSeconds(5));
            final List<ServiceBusReceivedMessage> messages = stream.stream().collect(Collectors.toList());
            System.out.println("session:" + receiverClient.getSessionId() + " messages:" + messages.size());
        } catch (Exception e) {
            System.out.println("Failed to obtain session receiver: " + e.getClass().getSimpleName() + ": " + e.getMessage());
        }
        i++;
    }
}

Can we keep such objects alive (i.e. per active poller thread) or are their any downsides? As far as I understand, the library underneath will deal with connection management/retries and pooling, so we can re-use and rely on it without re-initialization?

Hi @fposch, a "ServiceBusSessionReceiverClient' instance is designed to be reusable. Could you help me to understand your use case a little more – Is the following understanding correct?

The application has 20+ Poller-Threads.
Each Poller-Thread accepts a session, processes its messages, then moves on to accept the next session and continues this cycle in a loop.
All these 20+ Poller-Threads once initiated run (the loop in step-2) continuously throughout the application's lifetime.

Hi @fposch, a "ServiceBusSessionReceiverClient' instance is designed to be reusable. Could you help me to understand your use case a little more – Is the following understanding correct?

The application has 20+ Poller-Threads.
Each Poller-Thread accepts a session, processes its messages, then moves on to accept the next session and continues this cycle in a loop.
All these 20+ Poller-Threads once initiated run (the loop in step-2) continuously throughout the application's lifetime.

All three correct.
FYI: I tried to implement this with our (full) application and that seems to solve the "leak" or the reactor leftovers, so that could be a fix for my use-case (still need to make sure that the rest of it behaves as before)

@fposh, sounds promising. I would suggest a slight change as shown in the code below. There are rare cases where ServiceBusSessionReceiverClient needs to be re-created. I've added comments in the code for clarity.
package org.example;

import com.azure.core.amqp.AmqpRetryOptions;
import com.azure.core.util.IterableStream;
import com.azure.core.util.logging.ClientLogger;
import com.azure.messaging.servicebus.ServiceBusClientBuilder;
import com.azure.messaging.servicebus.ServiceBusReceivedMessage;
import com.azure.messaging.servicebus.ServiceBusReceiverClient;
import com.azure.messaging.servicebus.ServiceBusSessionReceiverClient;
import com.azure.messaging.servicebus.models.ServiceBusReceiveMode;

import java.time.Duration;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;

public class Poller {
    private static final String CON_STR = System.getenv("CON_STR");
    private static final String Q_NAME = System.getenv("Q_NAME");
    private static final AmqpRetryOptions RETRY_OPTIONS = new AmqpRetryOptions()
            .setMaxRetries(1)
            .setDelay(Duration.ofMillis(250))
            .setMaxDelay(Duration.ofMillis(1000))
            .setTryTimeout(Duration.ofMillis(10000));

    private final ClientLogger logger;

    public static void main(String[] args) {
        // In this scenario, we share a builder instance across Poller instances. While this is a good starting point,
        // be aware of potential bottlenecks related to connection (builder) sharing. If such bottlenecks arise in
        // the future, consider grouping Pollers so that each group shares a dedicated connection (builder) instance.
        // https://learn.microsoft.com/en-us/azure/developer/java/sdk/troubleshooting-messaging-service-bus-overview#connection-sharing-bottleneck
        //
        final ServiceBusClientBuilder clientBuilder = new ServiceBusClientBuilder()
                .connectionString(CON_STR)
                .retryOptions(RETRY_OPTIONS);
        // a flag to signal stop polling.
        //
        final AtomicBoolean shouldStop = new AtomicBoolean(false);

        // Create a poller and start (run) polling continuously.
        final Poller poller1 = new Poller("poller-1");
        poller1.run(clientBuilder, shouldStop);
    }

    Poller(String name) {
        final HashMap<String, Object> context = new HashMap<>(1);
        context.put("poller", name);
        this.logger = new ClientLogger(Poller.class, context);
    }

    private void run(ServiceBusClientBuilder builder, AtomicBoolean shouldStop) {
        final int maxBatchSize = 5;
        final Duration maxBatchWaitTime = Duration.ofSeconds(5);

        while (!shouldStop.get()) {
            try (ServiceBusSessionReceiverClient client = builder
                    .sessionReceiver()
                    .queueName(Q_NAME)
                    .receiveMode(ServiceBusReceiveMode.PEEK_LOCK)
                    .disableAutoComplete()
                    .prefetchCount(0)
                    .buildClient()) {
                while (!shouldStop.get()) {
                    try (ServiceBusReceiverClient receiver = client.acceptNextSession()) {
                        final IterableStream<ServiceBusReceivedMessage> stream = receiver.receiveMessages(maxBatchSize, maxBatchWaitTime);
                        final List<ServiceBusReceivedMessage> messages = stream.stream().collect(Collectors.toList());
                        for (ServiceBusReceivedMessage message : messages) {
                            process(message);
                        }
                    } catch (RuntimeException e) {
                        DisposeSessionReceiverException.throwIfNotTimeout(e);
                    }
                }
            } catch (DisposeSessionReceiverException e) {
                // Back off 5 seconds before opening a new ServiceBusSessionReceiverClient.
                // The DisposeSessionReceiverException won't happen normally but when it happens that typically indicate
                // a network issue or update on the Service Bus broker side, hence a long 5 seconds backoff.
                backoff(5000);
                logger.atInfo().log("creating new ServiceBusSessionReceiverClient.");
            }
        }
    }

    private void process(ServiceBusReceivedMessage message) {
        logger.atInfo().log("Processing message: {} from session: P{}", message.getMessageId(), message.getSessionId());
    }

    private static void backoff(int ms) {
        try {
            Thread.sleep(ms);
        } catch (InterruptedException ex) {
            throw new RuntimeException(ex);
        }
    }

    /**
     * An exception indicating the current ServiceBusSessionReceiverClient should be disposed and a new one
     * is needed to continue the accepting new sessions.
     */
    private static final class DisposeSessionReceiverException extends RuntimeException {
        private DisposeSessionReceiverException(Throwable t) {
            super(t);
        }

        /**
         * Throws DisposeSessionReceiverException if the given error is anything other than accept-session timeout error.
         *
         * @param e the error to inspect.
         */
        static void throwIfNotTimeout(RuntimeException e) {
            if (!(e instanceof IllegalStateException)) {
                throw new DisposeSessionReceiverException(e);
            }
            final String message = e.getMessage();
            if (message == null || !message.toLowerCase(Locale.ROOT).startsWith("timeout on blocking read for")) {
                // string comparison is not great but reactor-core won't really throw Timeout error :(
                throw new DisposeSessionReceiverException(e);
            }
        }
    }
}

@anuchandy Thank you for the updated sample.
We've already been dealing with IllegalStateException("timeout on blocking read for") from reactor internals and I'll add your suggested disposal handling on any other type of error.
That seems to work well in terms of memory, but I'm having issues with messages being stuck while my (concurrent) receivers for the queue are actually blocked on acceptNextSession, but not picking any messages.
Going to the Azure Servicebus explorer while this is happening and trying to obtain a session úsing the session ID of a queue message on the UI gives me the following error (for example)

Stopping the application resolves this, so I think, I have an orphaned session lock, definitely need to check if my handling is bullet-proof, but....
Just making sure, can I use ServiceBusSessionReceiverClient and ServiceBusReceiverClient in a nested construct as shown below where

I create the ServiceBusSessionReceiverClient only once to manage a session-based queue
From it, temporarily obtain ServiceBusReceiverClient using acceptNextSession
Only close the receiver after successfully receiving messages

... and assume receiver.close() (respectively try-with-resources) is enough to unlock the session? So, client can be kept alive - you said, it is reusable in general.
while (!shouldStop.get()) {
            try (ServiceBusSessionReceiverClient client = builder
                    .sessionReceiver()
                    .queueName(Q_NAME)
                    .receiveMode(ServiceBusReceiveMode.PEEK_LOCK)
                    .disableAutoComplete()
                    .prefetchCount(0)
                    .buildClient()) {
                while (!shouldStop.get()) {
                    try (ServiceBusReceiverClient receiver = client.acceptNextSession()) {
                        final IterableStream<ServiceBusReceivedMessage> stream = receiver.receiveMessages(maxBatchSize, maxBatchWaitTime);
                        final List<ServiceBusReceivedMessage> messages = stream.stream().collect(Collectors.toList());
                        for (ServiceBusReceivedMessage message : messages) {
                            process(message);
                        }
                    }
                }
            }
        }
    }

Hello @fposch, I looked into session lock hold by the broker, there is at least one potential cause. The synchronous acceptNextSession today internally retry session request if broker signals that there is no session available (aka broker-timeout). This retry-loop runs until a session is available or client-side-timeout happens, that's when client-side-timeout triggers IllegalStateException with "timeout on blocking read for" message. It is not possible to cancel a session request already sent to the broker. Hence when the client-side-timeout triggers and if broker happens to find a session before the broker-timeout then that session may get locked in a period (which gets released by broker on idle timeout).
This never happens for ServiceBusProcessorClient since there is no such client-side-timeout in that case and it always relies on broker-timeout. I’m working on a draft proposal to reduce the chances of this happens in synchronous ServiceBusSessionReceiverClient case.
That said, I wanted to check, have you considered the ServiceBusProcessorClient for your use case? The Processor client is really simples where the app doesn’t have to manage the lifetime of multiple clients, or doesn’t have to deal with Poller threads manually, these all are abstracted in Processor. The app just needs to tell processor how many sessions to process concurrency and rest is taken care internally.

@anuchandy Ad ServiceBusProcessorClient - I see the benefits but our application is inherently designed for polling, at some point, there is a pollMessages contract. We can definitely work around that by collecting messages from processMessage callback, my only concern is controlling how many messages we consume from the queue while they are processed.
So, essentially avoiding backpressure, i.e. to stop receiving messages when we already have a certain amount in memory/pending and don't want to pull the full queue to properly distribute work across instances of our and avoid excessive memory consumption).
Can we aggressively use the ServiceBusProcessorClient.start/stop methods (I'm again afraid of reactor resources) or can/should we use the maxConcurrentSessions/maxConcurrentCalls options to limit the flow while we are busy?
If that is problematic with ServiceBusProcessorClient, now we know why we went with the polling approach first... it's also been stated in your documentation, so I didn't opt to try "push".
Would it be my first option if I write a modern, lightweight message receiver: probably yes!

Hello @fposch, I see, collecting messages to route them outside of the processor callback handler can make the app implementation complicated. The Processor pattern is designed to run continuously in a push style as long as there are messages available in the entity. Each time control returns from the handler, the library uses this as a signal to fetch the next message(s), effectively creating back pressure. In such a pattern, the stop() function is typically used during application shutdown, and any frequent use of stop()/start() entails additional costs.
I’ll update once the next version with improvement around propagating broker-timeout in synchronous use case is released.

Hello @fposch, 7.17.6 is just released.
<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-messaging-servicebus</artifactId>
    <version>7.17.6</version>
</dependency>

In version 7.17.6,

The broker timeout will be propagated to the app rather than client-side timeout.
The IllegalStateException will include a cause as TimeoutException, thereby eliminating the need for the application to perform string comparisons.

Note that, if the application ends the thread running Poller abruptly while acceptSession in the Poller is waiting for a response from the broker, there is still a possibility of a session becoming locked for a period. If you plan to start a new Poller thread immediately or other Pollers are running, ensure the previous thread is terminated properly by allowing it to complete its call, whether it ends in error or success.
I've updated the sample to account for graceful termination and also to demonstrate the inspection of TimeoutException.
import com.azure.core.amqp.AmqpRetryOptions;
import com.azure.core.util.IterableStream;
import com.azure.core.util.logging.ClientLogger;
import com.azure.messaging.servicebus.ServiceBusClientBuilder;
import com.azure.messaging.servicebus.ServiceBusReceivedMessage;
import com.azure.messaging.servicebus.ServiceBusReceiverClient;
import com.azure.messaging.servicebus.ServiceBusSessionReceiverClient;
import com.azure.messaging.servicebus.models.ServiceBusReceiveMode;

import java.time.Duration;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;

public class SyncSessionUsage {
    private static final String CON_STR = System.getenv("CON_STR");
    private static final AmqpRetryOptions RETRY_OPTIONS = new AmqpRetryOptions()
            .setMaxRetries(1)
            .setDelay(Duration.ofMillis(250))
            .setMaxDelay(Duration.ofMillis(1000))
            .setTryTimeout(Duration.ofSeconds(20));

    public static void main(String[] args) {
        // In this example, the builder instance is shared across Poller instances. While this is a good starting point,
        // be aware of potential bottlenecks related to connection (builder) sharing. If such bottlenecks arise, consider
        // grouping Pollers so that each group shares a dedicated connection (builder) instance or dedicated builder per Poller.
        // https://learn.microsoft.com/en-us/azure/developer/java/sdk/troubleshooting-messaging-service-bus-overview#connection-sharing-bottleneck
        //
        final ServiceBusClientBuilder builder = new ServiceBusClientBuilder()
                .connectionString(CON_STR)
                .retryOptions(RETRY_OPTIONS);

        final ScheduledExecutorService executor = Executors.newScheduledThreadPool(2 * Runtime.getRuntime().availableProcessors());
        try {
            // Create a poller and start (run) polling continuously.
            final Poller poller1 = new Poller("poller-1", builder);
            executor.execute(poller1);

            // Let Poller run for 3 minutes before disposing.
            sleep(Duration.ofMinutes(3));

            poller1.disposeWithAwait();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        } finally {
            shutdownWithAwait(executor, 5000);
        }
    }

    private static void shutdownWithAwait(ExecutorService service, long timeoutMillis) {
        service.shutdown();
        try {
            if (!service.awaitTermination(timeoutMillis, TimeUnit.MILLISECONDS)) {
                service.shutdownNow();
            }
        } catch (InterruptedException ex) {
            service.shutdownNow();
            Thread.currentThread().interrupt();
        }
    }

    private static void sleep(Duration duration) {
        try {
            Thread.sleep(duration.toMillis());
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }

    public static final class Poller implements Runnable {
        private static final String Q_NAME = System.getenv("Q_NAME");
        private static final int MAX_BATCH_SIZE = 5;
        private static final Duration MAX_BATCH_WAIT_TIME = Duration.ofSeconds(5);
        private final AtomicBoolean disposed = new AtomicBoolean(false);
        private final CountDownLatch awaiter = new CountDownLatch(1);
        private final ServiceBusClientBuilder builder;
        private final ClientLogger logger;

        public Poller(String name, String connectionString, AmqpRetryOptions retryOptions) {
            // Ctr using dedicated ServiceBusClientBuilder instance for each Poller.
            this(name, new ServiceBusClientBuilder().connectionString(connectionString).retryOptions(retryOptions));
        }

        public Poller(String name, ServiceBusClientBuilder builder) {
            this.builder = Objects.requireNonNull(builder, "builder cannot be null.");
            final HashMap<String, Object> context = new HashMap<>(1);
            context.put("poller", Objects.requireNonNull(name, "poller name is required."));
            this.logger = new ClientLogger(Poller.class, context);
        }

        @Override
        public void run() {
            logger.atInfo().log("start polling.");
            while (!disposed.get()) {
                try (ServiceBusSessionReceiverClient client = builder
                        .sessionReceiver()
                        .queueName(Q_NAME)
                        .receiveMode(ServiceBusReceiveMode.PEEK_LOCK)
                        .disableAutoComplete()
                        .prefetchCount(0)
                        .buildClient()) {
                    while (!disposed.get()) {
                        try (ServiceBusReceiverClient receiver = client.acceptNextSession()) {
                            if (disposed.get()) {
                                break;
                            }
                            final IterableStream<ServiceBusReceivedMessage> stream = receiver.receiveMessages(MAX_BATCH_SIZE, MAX_BATCH_WAIT_TIME);
                            final List<ServiceBusReceivedMessage> messages = stream.stream().collect(Collectors.toList());
                            for (ServiceBusReceivedMessage message : messages) {
                                process(receiver, message);
                            }
                        } catch (RuntimeException e) {
                            DisposeSessionReceiverException.throwIfNotTimeout(e);
                        }
                    }
                } catch (DisposeSessionReceiverException e) {
                    logger.atWarning().log("encountered DisposeSessionReceiverException.", e.getCause());
                    if (disposed.get()) {
                        break;
                    }
                    e.backoff();
                }
                logger.atWarning().log("disposing session receiver client.");
            }
            logger.atInfo().log("terminated polling gracefully.");
            awaiter.countDown();
        }

        public void dispose() {
            disposed.set(true);
        }

        public void disposeWithAwait() throws InterruptedException {
            disposed.set(true);
            awaiter.await();
        }

        private void process(ServiceBusReceiverClient receiver, ServiceBusReceivedMessage message) {
            logger.atVerbose().log("processing message: {} from session: {}", message.getMessageId(), message.getSessionId());
            try {
                receiver.complete(message);
            } catch (RuntimeException e) {
                logger.atWarning().log("error in completing message: {} from session: {}", message.getMessageId(), message.getSessionId(), e);
            }
        }

        /**
         * An exception indicating the current ServiceBusSessionReceiverClient should be disposed and a new one
         * is needed to continue the accepting new sessions.
         */
        private static final class DisposeSessionReceiverException extends RuntimeException {
            /**
             * Throws DisposeSessionReceiverException if the given error is anything other than accept-session timeout error.
             *
             * @param e the error to inspect.
             */
            static void throwIfNotTimeout(Exception e) {
                if (e instanceof IllegalStateException) {
                    if (e.getCause() instanceof TimeoutException) {
                        return;
                    }
                }
                throw new DisposeSessionReceiverException(e);
            }

            private DisposeSessionReceiverException(Throwable t) {
                super(t);
            }

            void backoff() {
                try {
                    // backoff of 5 seconds on DisposeSessionReceiverException before opening a new ServiceBusSessionReceiverClient.
                    // The DisposeSessionReceiverException won't happen normally but when it happens that typically indicate
                    // a network issue or update on the Service Bus broker side. Hence, a long 5 seconds backoff to avoid
                    // aggressive reconnect those likely to fail.
                    TimeUnit.SECONDS.sleep(5);
                } catch (InterruptedException ex) {
                    throw new RuntimeException(ex);
                }
            }
        }
    }
}

Hello @fposch, 7.17.6 is just released.
<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-messaging-servicebus</artifactId>
    <version>7.17.6</version>
</dependency>

In version 7.17.6,

The broker timeout will be propagated to the app rather than client-side timeout (this reduces the likelihood of potential session locking that explained in the previous comment).
The IllegalStateException will include a cause as TimeoutException, thereby eliminating the need for the application to perform string comparisons.

Note that, if the application kills the thread running Poller "abruptly" while acceptSession in the Poller is waiting for a response from the broker, there is still a possibility of a session becoming locked for a period. If you plan to start a new Poller thread immediately or if other Pollers are running, ensure the previous thread is terminated "gracefully" by allowing it to complete its call, whether it ends in error or success.
I've updated the sample to account for graceful termination and also to demonstrate the inspection of TimeoutException.
package org.example;

import com.azure.core.amqp.AmqpRetryOptions;
import com.azure.core.util.IterableStream;
import com.azure.core.util.logging.ClientLogger;
import com.azure.messaging.servicebus.ServiceBusClientBuilder;
import com.azure.messaging.servicebus.ServiceBusReceivedMessage;
import com.azure.messaging.servicebus.ServiceBusReceiverClient;
import com.azure.messaging.servicebus.ServiceBusSessionReceiverClient;
import com.azure.messaging.servicebus.models.ServiceBusReceiveMode;
import reactor.core.publisher.Mono;
import reactor.core.publisher.Sinks;

import java.time.Duration;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;

public class SyncSessionUsage {
    private static final String CON_STR = System.getenv("CON_STR");
    private static final AmqpRetryOptions RETRY_OPTIONS = new AmqpRetryOptions()
            .setMaxRetries(1)
            .setDelay(Duration.ofMillis(250))
            .setMaxDelay(Duration.ofMillis(1000))
            .setTryTimeout(Duration.ofSeconds(20));

    public static void main(String[] args) {

        final ServiceBusClientBuilder builder = new ServiceBusClientBuilder()
                .connectionString(CON_STR)
                .retryOptions(RETRY_OPTIONS);

        final ScheduledExecutorService executor = Executors.newScheduledThreadPool(2 * Runtime.getRuntime().availableProcessors());
        try {
            // Create a poller and start (run) polling continuously on an executor.
            final Poller poller1 = new Poller("poller-1", builder);
            executor.execute(poller1);
            // Let Poller run for sometime (e.g, 3 minutes) before disposing.
            sleep(Duration.ofMinutes(3));
            poller1.disposeWithAwait();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        } finally {
            shutdownWithAwait(executor, 5000);
        }
    }

    private static void shutdownWithAwait(ExecutorService service, long timeoutMillis) {
        service.shutdown();
        try {
            if (!service.awaitTermination(timeoutMillis, TimeUnit.MILLISECONDS)) {
                service.shutdownNow();
            }
        } catch (InterruptedException ex) {
            service.shutdownNow();
            Thread.currentThread().interrupt();
        }
    }

    private static void sleep(Duration duration) {
        try {
            Thread.sleep(duration.toMillis());
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }

    public static final class Poller implements Runnable {
        private static final String Q_NAME = System.getenv("Q_NAME");
        private static final int MAX_BATCH_SIZE = 5;
        private static final Duration MAX_BATCH_WAIT_TIME = Duration.ofSeconds(5);
        private final AtomicReference<State> state = new AtomicReference<State>(State.NONE);
        private final CountDownLatch awaiter = new CountDownLatch(1);
        private final Sinks.Empty<Void> backoffCancelSink = Sinks.empty();
        private final ServiceBusClientBuilder builder;
        private final ClientLogger logger;

        public Poller(String name, String connectionString, AmqpRetryOptions retryOptions) {
            // Ctr using dedicated ServiceBusClientBuilder instance for each Poller.
            this(name, new ServiceBusClientBuilder().connectionString(connectionString).retryOptions(retryOptions));
        }

        public Poller(String name, ServiceBusClientBuilder builder) {
            // The builder instance can be shared across Poller instances. While this is a good starting point,
            // be aware of potential bottlenecks related to connection (builder) sharing. If such bottlenecks arise, consider
            // grouping Pollers so that each group shares a dedicated connection (builder) instance or dedicated builder per Poller.
            // https://learn.microsoft.com/en-us/azure/developer/java/sdk/troubleshooting-messaging-service-bus-overview#connection-sharing-bottleneck
            //
            this.builder = Objects.requireNonNull(builder, "builder cannot be null.");
            final HashMap<String, Object> context = new HashMap<>(1);
            context.put("poller", Objects.requireNonNull(name, "poller name is required."));
            this.logger = new ClientLogger(Poller.class, context);
        }

        @Override
        public void run() {
            if (!state.compareAndSet(State.NONE, State.RUNNING)) {
                if (state.get() == State.RUNNING) {
                    logger.atError().log("Not (re)running an already started poller.");
                }
                if (state.get() == State.DISPOSED) {
                    logger.atError().log("Not running the disposed poller.");
                }
                return;
            }

            logger.atInfo().log("start polling.");
            try {
                while (!isDisposed()) {
                    try (ServiceBusSessionReceiverClient client = builder
                            .sessionReceiver()
                            .queueName(Q_NAME)
                            .receiveMode(ServiceBusReceiveMode.PEEK_LOCK)
                            .disableAutoComplete()
                            .prefetchCount(0)
                            .buildClient()) {
                        acceptSessionAndProcess(client);
                    } catch (DisposeSessionReceiverException e) {
                        logger.atWarning().log("encountered DisposeSessionReceiverException.", e.getCause());
                        if (isDisposed()) {
                            break;
                        }
                    }
                    backoff();
                    logger.atWarning().log("closing current session receiver client.");
                }
                logger.atInfo().log("terminated polling gracefully.");
            } finally {
                awaiter.countDown();
            }
        }

        public void disposeWithAwait() throws InterruptedException {
            final State s = state.getAndSet(State.DISPOSED);
            if (s != State.DISPOSED) {
                logger.atInfo().log("disposing Poller.");
                // Cancel any backoff sleep, since Poller is terminating gracefully.
                backoffCancelSink.emitEmpty(Sinks.EmitFailureHandler.FAIL_FAST);
            }
            if (s == State.RUNNING) {
                awaiter.await();
            }
        }

        private void acceptSessionAndProcess(ServiceBusSessionReceiverClient client) {
            while (!isDisposed()) {
                try (ServiceBusReceiverClient receiver = client.acceptNextSession()) {
                    if (isDisposed()) {
                        // breaking from while() along with auto closing 'receiver' to release session.
                        break;
                    }
                    final IterableStream<ServiceBusReceivedMessage> stream = receiver.receiveMessages(MAX_BATCH_SIZE, MAX_BATCH_WAIT_TIME);
                    final List<ServiceBusReceivedMessage> messages = stream.stream().collect(Collectors.toList());
                    for (ServiceBusReceivedMessage message : messages) {
                        process(receiver, message);
                    }
                } catch (RuntimeException e) {
                    DisposeSessionReceiverException.throwIfNotTimeout(e);
                }
            }
        }

        private void process(ServiceBusReceiverClient receiver, ServiceBusReceivedMessage message) {
            logger.atVerbose().log("processing message: {} from session: {}", message.getMessageId(), message.getSessionId());
            try {
                receiver.complete(message);
            } catch (RuntimeException e) {
                logger.atWarning().log("error in completing message: {} from session: {}", message.getMessageId(), message.getSessionId(), e);
            }
        }

        private boolean isDisposed() {
            return state.get() == State.DISPOSED;
        }

        private void backoff() {
            try {
                // backoff of 5 seconds on DisposeSessionReceiverException before opening a new ServiceBusSessionReceiverClient.
                // The DisposeSessionReceiverException won't happen normally but when it happens that typically indicate
                // a network issue or update on the Service Bus broker side. Hence, a long 5 seconds backoff to avoid
                // aggressive reconnect those likely to fail.
                Mono.firstWithSignal(backoffCancelSink.asMono().doOnEach(s -> {
                    if (s.isOnComplete()) {
                        logger.atInfo().log("cancelling the backoff sleep.");
                    }
                }), Mono.delay(Duration.ofSeconds(5)).then()).block();
            } catch (RuntimeException e) {
                logger.atError().log("backoff()", e);
            }
        }

        /**
         * The state of the poller.
         */
        private enum State {
            // Poller is not running yet.
            NONE,
            // Poller is running.
            RUNNING,
            // Poller is disposed.
            DISPOSED,
        }

        /**
         * An exception indicating the current ServiceBusSessionReceiverClient should be disposed and a new one
         * is needed to continue the accepting new sessions.
         */
        private static final class DisposeSessionReceiverException extends RuntimeException {
            /**
             * Throws DisposeSessionReceiverException if the given error is anything other than accept-session timeout error.
             *
             * @param e the error to inspect.
             */
            static void throwIfNotTimeout(Exception e) {
                if (e instanceof IllegalStateException) {
                    if (e.getCause() instanceof TimeoutException) {
                        return;
                    }
                }
                throw new DisposeSessionReceiverException(e);
            }

            private DisposeSessionReceiverException(Throwable t) {
                super(t);
            }
        }
    }
}

@fposch, yes, BOM containing 7.17.6 will be released once all the Azure SDKs for November are published (expected to be out by late November).


Add basic assert tests for clues for rolls range

Hard is 4->8 because of master sets for potions. Don't think anything else is like that 🤔

These are good tests to have, although I think theres a flaw that it will only open 1 casket in the test. E.g. if something was wrong, the tests could pass/fail just based on the RNG of that 1 casket. You could open maybe 100 of each (which should take only an instant), and check after each open whether its right.

These are good tests to have, although I think theres a flaw that it will only open 1 casket in the test. E.g. if something was wrong, the tests could pass/fail just based on the RNG of that 1 casket. You could open maybe 100 of each (which should take only an instant), and check after each open whether its right.

added

Closing in favour tests I added @ https://github.com/gc/oldschooljs/blob/master/test/Monsters.ts which thoroughly test the clues to match the exact rates, using millions of simulations. Thank you!


How to respond with a server error?

Hey folks 👋 I'm struggling with responding with a server error. I use the typical mirage way. Say, I want to simulate 502s and test Apollo's retry mechanism, so under some fake conditions I return this for a query:
return new Response(502);

But what I get returned instead is wrapped in GraphQL error. It looks like miragejs/graphql (or something internally) treats my response with 502 as a regular response and complains that the data is not returned properly:

Is it possible that miragejs/graphql is not aware that it should "re-throw" (pass) the error? Could someone give me pointers on where I should look to fill the gap?

This is due to how GraphQL itself works. If the GraphQL endpoint is reachable, it wraps errors and includes them in the response. You won’t be able to simulate a 5xx type error by throwing one while resolving a query.
You should be able to override the route handler for the GraphQL endpoint where needed, though:
// Assumes `server` is the instance of the Mirage server
server.post('<path-to-graphql>', new Response(502))

@jneurock Uh, that would be quite global, right?

It depends on how you’re using Mirage. I thought you mentioned testing and, if you’re using Mirage in a testing context, defining a route handler in a test is not global.


[FLINK-34865][pipeline-connector]support sync table and column comments

Currently we don‘t support sync comments of table or column, so the pipeline sink cannot obtain them. Users must get the comments  from the source, it's a bad experience.

resolve some problems from PR https://github.com/apache/flink-cdc/pull/3039, thanks for @lvyanquan and @dufeng1010 and @yuxiqian

@yuxiqian Would you like to help review this PR?

Sure, I'll take it.

fix paimon

@melin thanks

hi,@qg-lin thank you for PR, which is very useful for us. I did some tests after meger and found a problem.
If user defines transform in pipeline, the current TransformParser#generateProjectionColumns method will filter out column comment, such as:
source:
  type: mysql
  ....
  include-comments.enabled: true

sink:
  type: paimon
  ....

transform:
  - source-table: testdb.test_table1
    projection: \*, date_format(create_sys_tm,'yyyyMMdd') as pt
    primary-keys: id, pt
    partition-keys: pt
    description: project fields and filter

pipeline:
  name: MySQL to Paimon Pipeline
  parallelism: 1


Add support back for passing location of sqlite3 database directly

Adding a connect method to avoid code duplication and abstract database access.
The design is not pretty and should only be considered as a stop-gap measure to ensure backwards compatibility. Now a call might either result in using an existing connection or establing a new connection. This can cause performance issues.

Thanks. I think performance issues will only arise if the function is used inappropriately in pipelines, which given that it's not, shouldn't be a problem.
The function was written to make db access as simple as possible - without the ability to setup the connection it's not really useful for anything (aside for execution of attach statements).


Delete duplicate files

ref: https://github.com/tikv/client-go/pull/1055#issuecomment-1970803388

@ekexium Hi master, could you please take a look?


Jp refactor

Using Java 11, consists of the same functionality, but creating better readability for future maintenance. Spotless ran and formatted without errors.
Linked to PR #84
Note: Since I now have commit rights, when I pushed, it went directly to this repository. I am not sure if I did something wrong, but we can complete the PR here if that works.

Superseded by #257.


acme-client simply.com DNS API not deleting TXT records of acme challenge dns-01

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

[X] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
[X] I have searched the existing issues, open and closed, and I'm convinced that mine is new.
[X] The title contains the plugin to which this issue belongs

Describe the bug
The acme challenge of dns-01 type against simply.com DNS API is not deleting the created _acme_challenge TXT record. Instead it results in the error:
No record deleted, the DNS record needs to be removed manually.
The above error is found in acme.sh/dnsapi/dns_simply.sh. Running acme.sh from the original repository on any other device result in the TXT record being deleted as expected.
To Reproduce
Steps to reproduce the behavior:

Go to Services -> ACME Client -> Challenge Types
Create a new challenge type
Choose type 'DNS-01' and DNS Service 'Simply.com'
Add valid API key and account name
Create new certificate with the challenge type above
Reissue certificate
TXT records get created
Error: No record deleted, the DNS record needs to be removed manually. in ACME Log

Expected behavior
TXT record on simply.com DNS service should be deleted.
Environment
OPNsense 23.7.4 (amd64).
os-acme-client 3.19.

Dump of log with debug mode:
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] Removed: Success
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] No record deleted, the DNS record needs to be removed manually.
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] Fetching txt record
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] ret='0'
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L -g '
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] timeout=
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] url='https://api.simply.com/2/my/products/<my-domain.com>/dns/records/'
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] GET
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] Getting all existing records
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] txtvalue='<acme_challenge_key>'
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] _domain='<my-domain.com>'
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] _sub_domain='_acme-challenge'
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] ret='0'
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L -g '
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] timeout=
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] url='https://api.simply.com/2/my/products/<my-domain.com>/dns/'
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] GET
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] Find the DNS zone
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] config file is empty, can not read SAVED_SIMPLY_Api
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] Removing txt: <acme_challenge_key> for domain: _acme-challenge.<my-domain.com>
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] d_api='/usr/local/share/examples/acme.sh/dnsapi/dns_simply.sh'
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] txt='<acme_challenge_key>'
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] _currentRoot='dns_simply'
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] aliasDomain='_acme-challenge.<my-domain.com>'
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] txtdomain='_acme-challenge.<my-domain.com>'
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] d='<my-domain.com>'
2023-09-24T16:37:23	acme.sh	[Sun Sep 24 16:37:23 CEST 2023] Removing DNS records.

Two suggestions:

Upgrade to the latest OPNsense release, it includes a new version of acme.sh.
Try again with Log Level set to "debug 3"


Error during startup of postgres:9.6-postgis image

I was advised by email of the availability of postgres images tailor-made for CircleCI, so I switched from mdillon/postgis to circleci/postgres:9.6-postgis.  This error happened:
/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/postgis.sh

Exited with code 3CREATE DATABASE
UPDATE 1
Loading PostGIS extensions into template_postgis
ERROR:  could not open extension control file "/usr/share/postgresql/9.6/extension/postgis.control": No such file or directory
STATEMENT:  CREATE EXTENSION IF NOT EXISTS postgis;
ERROR:  could not open extension control file "/usr/share/postgresql/9.6/extension/postgis.control": No such file or directory
LOG:  received SIGHUP, reloading configuration files
LOG:  parameter "listen_addresses" cannot be changed without restarting the server
LOG:  configuration file "/var/lib/postgresql/data/postgresql.conf" contains errors; unaffected changes were applied

Thanks for opening this issue. I am actively looking into a solution.
In the meantime, the alpine variation will work as expected.

Thanks for your patience while we get them tested & published!
https://github.com/circleci/circleci-images/pull/85/files

Great news!  I realized I used the postgis variant out of habit, but my current project doesn’t actually need it so I switched to your alpine variant which works.  I’ll test with the classic 9.6 and later with postgis on a different project.  Thanks!


Adding SPIRE health check status UI

Addresses https://github.com/spiffe/tornjak/issues/156

Closing due to conflicts, moved to https://github.com/spiffe/tornjak/pull/164


Add IPv6 support

This fixed the two issues you found in my previous #232 and also adds IPv6 support, which is #95
While reactor.connectTCP() already supports IPv6, it only works when given an IPv6 address but not, when a DNS name is given which resolved to one. This is a bug in twisted/internet/tcp.py where self.addressFamily = socket.AF_INET6 does not get set in that case.
My next try was to call socket.getaddrinfo() myself, which returns multiple addresses. Any client must iterate over them in turn and try to connect it until one works. That way most clients will try IPv6 first and fall back to IPv4.
But doing the iteration manually does not work well with the Twisted reactor design as you have to hook the iteration to clientConnectionFailed(), which I did not get to work.
So I decided to switch to the newer endpoints API, which already has code to work with getaddrinfo(). But it works with Factory instead of Clientfactory, so all those clientConnection* callbacks are no longer invoked. Because of that I added code to still call them.
I have testes this successfully on my local system with IPv4 (<IP_ADDRESS>:0), IPv6 ([::1]:0), DNS (localhost), UNIX (/tmp/qemu), but please have a closer look yourself.

My only concern is using [] to denote the ipv6 address. It might be confusing to users as that is also used in the help for optional arguments.
...
Is there another way we could detect v6? I'm naively thinking something along the lines of
split = server.split(':')
if len(split) > 6:
   # assume v6 host
else:
   # assume v4 host and default to localhost if no host
# handle port/display colons too, which makes it tricky

Yes, that syntax looks a bit confusing, but vncdotool is not the first and any protocol where : is used to separate the protocol is affected by this; Using […] if quite common, see URLs for example: https://en.wikipedia.org/wiki/IPv6_address#Literal_IPv6_addresses_in_network_resource_identifiers
And the number of : may be anything between 2 and 7; all of these examples are valid IPv6 addresses:

::1
200d::1
0000:1111:::6666:7777
0000:1111:2222:3333:4444:5555:6666:7777

Looks like I need to configure running CI on PRs.  I'll assume the tests pass and merge.


Shortcut for editing editor.fontSize

At a conference with a customer. They are suggesting that CTRL/CMD and +/- should be configurable to change editor.fontSize rather than window.zoomLevel. It doesn't look like it's possible to do it at the moment, as there are commands for workbench.action.zoomIn and workbench.action.zoomOut, but not for font size.
@AgtLucas

@AgtLucas

This will be doable if VS Code has commands for increasing/decreasing font size, which you can then bind to your own keybindings.

@octref 👍
FYI; Atom, Sublime and others has this feature.

Funny timing. They were just released. See https://code.visualstudio.com/updates/v1_24#_font-zoom-commands

Thanks!


Add ignore-self-only-init option

Adding an option ignore-self-only-init (off by default) which will not report a D107 error if __init__ has no parameters other than self. The justification is that these methods usually aren't very interesting and will likely result in redundant/boring docstrings which add noise.
Just turning off D107 isn't an option, since there are __init__ methods which are interesting ;)
Please make sure to check for the following items:

[x] Add unit tests and integration tests where applicable.
[x] Add a line to the release notes (docs/release_notes.rst) under "Current Development Version".

Of course, the option name is up for debate :)

@thejcannon could you please rebase this PR against the master branch? Thanks!

@samj1912 got time for a quick review?


Reboot and Kill Commands

Moved reboot to kill command and added new reboot command to use a POST request. These commands are now hidden from !help.

Nice first contribution.


SARAALERT-1678: Including manual Status changes in Audit log

Description
Jira Ticket: SARAALERT-1678
All manually set Status changes in the Admin view for a given user will be logged in that user's Audit log. This does not include Statuses set by the system such as "Inactive," "Active," and the auto-lock reason.
Screenshot

Important Changes
app/javascript/components/admin/AuditModal.js

Displays new audits for manual_lock_reason data element

app/javascript/components/util/InfoTooltip.js

New Info tooltip for Manually set Status audits (to clarify that system-set Statuses are not audited)

app/models/user.rb

Included manual_lock_reason as an auditable data element

Testing Recommendations
As an Admin user, attempt to change the Status of a user and validate the Audit log displayes the changes properly. Only manually set Statuses will be displayed in the Audit log. Note that when a system-set Status is applied, the manually set status at that time will be blank.
Checklists
Submitter:

[x] This PR describes why these changes were made.
[x] This PR is into the correct branch.
[x] This PR includes the correct JIRA ticket reference.
[x] Comment added to the relevant JIRA ticket(s) with a link to this PR
[x] Code diff has been reviewed (it does not contain: additional white space, not applicable code changes, debug statements, etc.)
[ ] If UI changes have been made, Chrome Dev Tools Lighthouse accessibility test has been executed to ensure no 508 issues were introduced.
[ ] Tests are included and test edge cases
[x] Tests have been run locally and pass (remember to update Gemfile when applicable)
[ ] Test fixtures updated and documented as necessary

@sgober :

[ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code
[ ] If applicable, you have tested changes against a large database, and considered possible performance regressions
[ ] Tested all recommendations listed in the "Testing Recommendations" section. The application behaves as expected with this PR.

@timwongj :

[ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code
[ ] If applicable, you have tested changes against a large database, and considered possible performance regressions
[ ] Tested all recommendations listed in the "Testing Recommendations" section. The application behaves as expected with this PR.

@deastman :

[x] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[ ] The tests appropriately test the new code, including edge cases
[x] You have tried to break the code
[ ] If applicable, you have tested changes against a large database, and considered possible performance regressions
[x] Tested all recommendations listed in the "Testing Recommendations" section. The application behaves as expected with this PR.

@hackrm This looks good to me! Confirming that a migration to back populate audits for any pre-existing manual locks is out of scope.


Use Timber lib instead the default Log class

Actually we are using Log class to log outputs in logCat.  Using Log class, we need to provide the tag which is the class name. With Timber the tag is inferred automatically and we can easily use it with Firebase Crashlytics as a reporting tool by sending functional logs to Firebase. See https://medium.com/@sembozdemir/using-timber-with-crash-reporting-tools-931eafd1296c

Nice...but shouldn't we use the  Kotlin version @mosadialiou ?   Heavy lifting but it's going in the right direction migrating more and more to .kt files.  We can start with the smallest java files. Thoughts?

Yeah good point @kcw-grunt. Timber is now a Kotlin lib and we can used it in java files. As a rule we can say 1) new class should be written in Kotlin and 2) start porting to Kotlin existing smallest java files and so on.
Could you create an issue to track the Java->Kotlin migration. ?

merged in 0cdae690d374256d9ce56902453b4cdeeaa1ae17


Any documentation or tutorials on the Atlas EZO ph sensors?

Hi,
Thanks for all the hard work! Is there any documentation on how you did integrate the Atlas sensors with HA?
I was looking for an integration with espHome and only found a custom component here:
https://github.com/ssieb/custom_components/blob/master/ezo
I'm not sure how well it will work and how to set up the cables with the esp32 microcontroller.
I wonder if the atlas sensors need to be calibrated or if they work out of the box
Thanks for any info.

I'm also interested. Did you succeed?
Thanks.

I didn't proceed any longer than what I wrote here. Might continue when I got more time.

I found their datasheets to be very helpful!

https://files.atlas-scientific.com/pH_EZO_Datasheet.pdf
https://files.atlas-scientific.com/pH_probe.pdf


Why not use FnOnce rather than Fn in Cache::draw?

Hello, I'm sorry about my broken English. So let me ask the question directly. In file cache.rs, the method draw use a impl Fn(&mut Frame) as its parameter:
pub fn draw(&self, bounds: Size, draw_fn: impl Fn(&mut Frame)) -> Geometry

So, I can't move a iterator into the closure and have to collect the iterator before calling draw method. I wonder why not just use a FnOnce?

Seems like a super quick change, and I've tried FnOnce with both Cargo tests and each of the examples in master; is there a reason this might not be a good idea? Or should I just make a tiny MR?

Got it, PR made. Thank you!