Failed to establish database connection, I wanted to retrieve the db_config

import requests
from sql_database_module import SQLDatabase  # Importing necessary modules
class DatabaseConnection:
"""
A class to represent a database connection.
Attributes:
    db: The database connection object.
"""
def __init__(self, username, password, hostname, port, database):
    """
    Initializes a DatabaseConnection object.

    Parameters:
        username (str): The username for the database connection.
        password (str): The password for the database connection.
        hostname (str): The hostname of the database server.
        port (int): The port number for the database connection.
        database (str): The name of the database.

    Returns:
        None
    """
    try:
        self.db = SQLDatabase.from_uri(f"postgresql://{username}:{password}@{hostname}:{port}/{database}")
    except Exception as e:
        print(f"Error initializing database connection: {e}")
        self.db = None

def select_db(username, password, hostname, port, database):
"""
Function to select a database.
Parameters:
    username (str): The username for the database connection.
    password (str): The password for the database connection.
    hostname (str): The hostname of the database server.
    port (int): The port number for the database connection.
    database (str): The name of the database.

Returns:
    DatabaseConnection: A DatabaseConnection object representing the selected database.
"""
return DatabaseConnection(username, password, hostname, port, database)

def get_db_config():
"""
Function to retrieve database configuration from an API endpoint.
Returns:
    dict or None: A dictionary containing database configuration if successful, otherwise None.
"""
try:
    api_endpoint = 'http://<IP_ADDRESS>:84/db_connection'
    response = requests.get(api_endpoint)
    if response.status_code == 200:
        return response.json().get('db_config')
    else:
        print(f"Error: Failed to retrieve db_config from API endpoint. Status code: {response.status_code}")
        return None
except Exception as e:
    print(f"Error retrieving db_config: {e}")
    return None

def establish_db_connection():
"""
Function to establish a database connection using configuration retrieved from an API endpoint.
Returns:
    SQLDatabase or None: A SQLDatabase object representing the established database connection, or None if unsuccessful.
"""
try:
    db_config = get_db_config()
    if db_config:
        return SQLDatabase.from_uri(
            f"postgresql://{db_config['username']}:{db_config['password']}@{db_config['hostname']}:{db_config['port']}/{db_config['database']}"
        )
    else:
        print("Error: Failed to obtain db_config from the API endpoint.")
        return None
except requests.RequestException as e:
    print(f"Request to API endpoint failed: {e}")
    return None
except KeyError as e:
    print(f"Missing key in db_config JSON: {e}")
    return None
except Exception as e:
    print(f"Error establishing database connection: {e}")
    return None

What does this have to do with this repo? You're not importing the extension and you're using PostgreSQL ...


Serialize dictionary to XML without including double quotes; simplify…

… XML escaping function
Fixes #16

Thanks, looks good. Not sure why CI was unable to merge, going to take a punt and assume it will be fine on master :-)


feat: Explore popovers should close on escape

SUMMARY
This PR enables the popovers in the explore to be closed when hitting the escape key.
Also, improves the locking of the explore scroll, so that the popovers are pinned to the triggering div until they're closed.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
No way to visually show the difference, so this is the actual result:
https://user-images.githubusercontent.com/17252075/166059870-309451f9-3eeb-4db5-bb15-f593a2011819.mov
TESTING INSTRUCTIONS
In the explore:

Try to edit the Data, be it metrics, columns, dimensions, filters, etc, and ensure it continues to work as before
Hit the escape key while a popover is open and ensure it closes
Ensure you can still interact with the popver (type, click, etc).

ADDITIONAL INFORMATION

[ ] Has associated issue:
[ ] Required feature flags:
[x] Changes UI
[ ] Includes DB Migration (follow approval process in SIP-59)

[ ] Migration is atomic, supports rollback & is backwards-compatible
[ ] Confirm DB migration upgrade and downgrade tested
[ ] Runtime estimates and downtime expectations provided

[ ] Introduces new feature or API
[ ] Removes existing feature or API

🏷 preset:2022.19


Add class instead of color

Nice job with this lib !
It should be nice to be able to add a class instead of a color to an ion-floating-item !

Hi Shinzah,
Thanks a lot for your suggestion!
I just added an option for the class called button-class. The change is only on master but it will be included in the next release


set an initial disk array for rescue configs

Closes #1995

Coverage increased (+0.06%) to 71.268% when pulling 18dee383c16c09fdb944ce9d518acd304ebe0d10 on displague:rescue_disks into d7ecd35034a329e44c373f5ff21ce9d853cedcf9 on linode:master.

Eventually this will need to support volumes too, but this is fine for now.

Coverage increased (+0.004%) to 71.209% when pulling 269a38dce0adc71ec8206841f1f81d565053fa9f on displague:rescue_disks into 7ea3d6b55a0054a32f4506a99c5702e3a22388e7 on linode:develop.

Looks good! Will pull down and give it a run-through.

Coverage increased (+0.004%) to 71.209% when pulling c92375cf206695310eec2ce2e15e0de2a19f9f96 on displague:rescue_disks into 7ea3d6b55a0054a32f4506a99c5702e3a22388e7 on linode:develop.

Coverage increased (+0.01%) to 71.217% when pulling 465b4706767f8c9f200279596abaef607e338426 on displague:rescue_disks into 7ea3d6b55a0054a32f4506a99c5702e3a22388e7 on linode:develop.

Coverage increased (+0.04%) to 71.252% when pulling 3926fae31ee1bd980e8b8b74202584df74092f76 on displague:rescue_disks into 28493ff795487524a3ab6cca089c81db080ea734 on linode:develop.


Make little changes

This is a long-lived issue that will track little changes to be made to the template. Changes tracked here are not usually big enough for their own PR, so they can be batched with each other in occasional sprints.

[ ] Fix Pylance/pyright discrepancy

pyright 1.1.296
D:\a\boilerdata\boilerdata\src\boilerdata\stages\notebooks\metrics.py
  D:\a\boilerdata\boilerdata\src\boilerdata\stages\notebooks\metrics.py:9:6 - error: Import "IPython.core.display" could not be resolved (reportMissingImports)
  D:\a\boilerdata\boilerdata\src\boilerdata\stages\notebooks\metrics.py:10:6 - error: Import "IPython.display" could not be resolved (reportMissingImports)
D:\a\boilerdata\boilerdata\src\boilerdata\stages\notebooks\modelfun.py
  D:\a\boilerdata\boilerdata\src\boilerdata\stages\notebooks\modelfun.py:1:6 - error: Import "IPython.core.display" could not be resolved (reportMissingImports)
  D:\a\boilerdata\boilerdata\src\boilerdata\stages\notebooks\modelfun.py:2:6 - error: Import "IPython.display" could not be resolved (reportMissingImports)
4 errors, 0 warnings, 0 informations
Completed in [23](https://github.com/blakeNaccarato/boilerdata/actions/runs/4319780176/jobs/7539330761#step:3:24).151sec

[ ] Fix config protecting Jupyter client

Something like this instead
{
  "packageRules": [
    {
      "matchPackageNames": ["angular"],
      "allowedVersions": "<=1.5"
    }
  ]
}

[ ] Fix newly cropped up pre-commit issues that aren't triggering locally for some reason

Will track this in my notes instead.


⚠ St. Lawrence Global Observatory CKAN Sitemap has degraded performance

In 789d0fe, St. Lawrence Global Observatory CKAN Sitemap (https://catalogue.ogsl.ca/sitemap/sitemap-1.xml) experienced degraded performance:

HTTP code: 200
Response time: 5352 ms

Resolved: St. Lawrence Global Observatory CKAN Sitemap performance has improved in ccc9368 after 18 minutes.


Request: Add --no-cache

I would to have a --no-cache option.

PR: https://github.com/genuinetools/img/issues/177


Update ciris-enumeratum, ciris-refined to 3.1.0

Updates

is.cir:ciris-enumeratum
is.cir:ciris-refined

from 2.4.0 to 3.1.0.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "is.cir" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "is.cir" }
}]

labels: library-update, early-semver-major, semver-spec-major, version-scheme:early-semver, commit-count:1

Superseded by #371.


Allow seeing contour lines and/or hillshades as background

It would be useful to see contour lines and/or hillshades (e.g. from OpenCycleMap and SRTM) when doing some edits (e.g. small mountain rivers flowing through woods -- hard to see on satellite images, but the location is usually clear when seeing details about the elevation).

Closing as stale, and not directly an iD issue.
Imagery sources with contour lines can be added to the editor-imagery-index project, if available.


cadvisor has been removed. I think this should be updated too

https://github.com/Microsoft/pai/blob/857787807bf8a4e343d0c6ddf6f0c5dd89634ef8/service-deployment/bootstrap/prometheus/prometheus-configmap.yaml.template#L48

https://github.com/Microsoft/pai/pull/485


tippy: Use namespace import for tippy.js

Names like delegate, Instance, Placement, Props, and ReferenceElement are much too generic to make sense as named imports.
The downside is that we now need to write tippy.default(…) instead of tippy(…) (because ES module namespace objects cannot be callable), but that cost is worthwhile.

Definitely worth it, merged, thanks @andersk!


No space left on device when doing the backup.

The backup directory is hardcoded (e.g., see here). If there is insufficient space, the backup will fail.
To resolve this, the directory should be parameterized. The next step is to add this parameter as a configuration option in the charm.

@jneo8 can you provide more information why this is needed? and if this is only need to for postgres?  If the disk is full, normally the charm can't help you anymore than providing error message saying that the disk is full

The case we get is the disk is full on /home/ubuntu/, but there are some space left on /tmp. It depends on how user mount the disk.
The possible improvement we can do is make it become a argument/configuration that user can choose where to store the backup files.

Yeah, that's an issue (and more or less should be fixed in the postgresql charm itself) but how about the other DBs? Are they a problem or not? We need to be more precise what are we going to fix. Since currently, they are also hardcoded


Implement a solid external cover

An extra possible feature is the implementation of an external cover as defined at the end of page 3 of this document.
Essentially, the original document cover needs to be complemented with a spine that must contain specific data as mentioned in the linked document. This can be implemented additionally using the class file and the macros used to make the original cover.

I don't see what is missing, apart from making the image optional.

Absolutely a fair question. When thesis get print out, they're suggested to come with a back cover, besides the main cover already included. Page 6 of the main IST guide has an example for the spine typesetting style.
The idea for implementing this in the template came from TUDelft's report template (check the cover.pdf file in the linked zip), which implements it as a part of the makecover command like this:
\title{Title}
\subtitle{Optional subtitle}
\author{J.\ Random Author}
\affiliation{Technische Universiteit Delft}
\coverimage{cover.jpg}
\covertext{
    \textbf{Cover Text} \\
    possibly \\
    spanning \\
    multiple \\
    lines
    \vfill
    ISBN 000-00-0000-000-0
}

%% The 'back' option enables the generation of the back cover.
\makecover[back,whitelogo]

Bottom line is this: the idea is that it's a cover additional to the one already implemented.

I just added the \makespine command to commit e8abe16df73447aba147ac6be4df2310d0e6e10c, which is a preliminary version of the idea. For now, it prints out an extra page with a cut-out of the document spine, just like the main guide.
The final idea is to put it on the \makecover command as the full option, which would output a page bigger than an A3 including the front and back covers and the spine in between. The pieces are all there, they just need to be put together.


AccessViolationException during JSObject disposal

This happens because JSCore.Unprotect is being called multiple times within Dispose(bool) (possibly from the finalizer?)

It seems that the JSContext where the JSObject is a part of is already released by the time Unprotect is called.

Fixed in https://github.com/vignetteapp/Oxide/commit/9b924495e293c0df73335599c93ff60137c61bac


CliApplication: Activate @Name annotation

The annotation is not used.
Expected is that it allows to name parameters.

Is used.

Is used.


[morphologicalFilters] output name standardisation

Most of our toolboxes output names type are: fileName (dilated)
Morphological filters toolboxes seems to be:
fileNameDilate filter(0.910156, 0.910156, 0.910152 mm)
We could standardize to fileName (dilated 1mm) for instance.

Problem here is that, the volume's dimensions can be different in x, y, z. That's why it was written like that.

Yes but we want to name the file with the dimension given by the user, and it's just "x"

But what he wants is not all the time what he gets.
If voxel size is 1.6mm (in every direction) and he wants a dilation of 2mm, he's gonna have a 1.6mm dilation.

Oki, if x/y/z can be different, i can add y and z indeed :)


Deprecation warnings on setCustomProps and getResources

Hello!
I'm getting deprecation warnings on setCustomProps and getResources in OkHttpSardine.java. Apparently, the functions they override have been deprecated in Sardine.

Yes, as mentioned in the comments, it's better to use list instead of getResources and patch instead of setCustomProps.

Of course, however, I was thinking about Android Studio Lint complaining about deprecation and even failing release compilations if these warnings remain (even if not actually using the functions). A simple way of fixing them is to just mark the functions in question as deprecated in turn.

Ok, I understand. This comes from the legacy Sardine library so I've never really thought about it. I'm not against removing these deprecated methods, both in the interface and in the class, or simply annotate them as deprecated. Do you want to make a PR?

Well, I'm currently just using this project in an app, I don't have it checked out or am particularly good at using GitHub, so perhaps it's easier if you do it so it gets done correctly.


Initial parser doc

@madchap do you want to add a link from other markdown files ? could be usefull to give more visibility to this file.

@madchap do you want to add a link from other markdown files ? could be usefull to give more visibility to this file.

@madchap do you want to add a link from other markdown files ? could be usefull to give more visibility to this file.

We can yea. I'll patch the CONTRIBUTING.md one shortly. Also created the other PR in documentation to get it to readthedocs.

@madchap do you want to add a link from other markdown files ? could be usefull to give more visibility to this file.

We can yea. I'll patch the CONTRIBUTING.md one shortly. Also created the other PR in documentation to get it to readthedocs.

@madchap just thought about maybe adding a hint in the PR template? I can do later as well if you want to merge NOW.

@madchap just thought about maybe adding a hint in the PR template? I can do later as well if you want to merge NOW.

Incorporated both @tohch4 and @valentijnscholten feedback. Thanks.

Incorporated both @tohch4 and @valentijnscholten feedback. Thanks.


Clean up follow API

Current method make_a_follow_b isn't cutting it. We need to distinguish between just sending the "follow" and then not responding, or confirming vs rejecting, and the various states that the exchange can be in over time.
Then, we need to update the Mastodon code which is currently partially commented-out due to that confusion.

The original code polled the API for a Relationship status to be established. I see that's commented out currently.


I don't know how to use your plugin, and I'm extremely rude.

ok. console. pex user "user" and what? Too many arguments????

What exactly are you typing and where are you typing it?  (In-game or in the console?)

What are you trying to do even? If you give no useful information, we can give you no useful answer.

I don't think we'll be hearing from this person again.  Case closed?


Memory leaks in v63

We upgraded to 63 (I think from an old release, 34) and the doppler process grows until it uses all available ram  fairly quickly after a restart ~15 minutes or so
Attached is the doppler executable a pprof heap, thanks!
doppler_dump.zip

@scottschulthess do you have more details about your deployment. how many dopplers? how many syslog drains?

1 doppler, 1 syslog drain. i'm closing this - it appears to be fixed in 70, but we are now running into some high memory usage.


sw_engine:  AA artifacts

I have simplified the previous crashing image   and modified it so that it crashes the FAA again.

crash-08.zip

Can confirm  https://github.com/thorvg/thorvg/pull/2399 !
or a quick hack limiting the line->length[0]
while (pos <= line->length[0] && line->length[0] < (INT32_MAX / 2)) {
//while (pos <= line->length[0]) {

fixes the crash.
However, I can spot some artefacts:

Thanks, I will revisit this.
see also: https://github.com/thorvg/thorvg/issues/2391

!!
I have tested this image with the older version of your PR,
         //Anti-Aliasing frames
         ay = y - aaSpans->yStart;
-        if (aaSpans->lines[ay].x[0] > x1) aaSpans->lines[ay].x[0] = x1;
-        if (aaSpans->lines[ay].x[1] < x2) aaSpans->lines[ay].x[1] = x2;

         //Range allowed
         if ((x2 - x1) >= 1 && (x1 < maxx) && (x2 > minx)) {

+            if (aaSpans->lines[ay].x[0] > x1) aaSpans->lines[ay].x[0] = x1;
+            if (aaSpans->lines[ay].x[1] < x2) aaSpans->lines[ay].x[1] = x2;
+
             //Perform subtexel pre-stepping on UV
...

but with the commit in main (51c2e66f51d815d5bf239859488b7d65d0063e56) the image unfortunately crashes the FAA again ...

@hermet The AA crash is now fixed!
The artifact on the right side doesn't. (The test svg uses really strange transformations, not sure if it makes sense to investigate it further ...)
godot4.3b ++ v0.14.0


[MILESTONE] Improve: Grammar refactoring for better readability and better maintenance

Grammer needs to support printing the value, and basic loops, if function and more

Currently Added New Lexer and working on the new parser

Finished refining most of the statement and grammar


Transparent header background not displayed correctly

UPDATE Text in italics indicates statements that were true when I started writing, however now after a few more reloads of the page, the header doesn't work correctly on any browser of any machine.

What MDL Version are you using? (please be specific, e.g. major.minor.patch)
1.3.0

What browser(s) is this bug affecting (including version)?
All of them , except in Chrome 55.0.2883.95 (64-bit) on my rMBP 13" with macOS 10.12.2.

What OS (and version) are you using?
macOS 10.12.2

I'm working on a Vue.js project where MDL is used for implementing Material Design. Now, we have a landing page in a .vue file, where the transparent mdl header is used with a background image. On my machine in my Chrome version, everything works fine. However, in any other browsers on my machine and all other browsers on my friends' machines, the background image is only as high as a usual Material design header, so just a few dozen pixels.

What is the expected behavior?
Background image should cover the entire viewport

What is the actual behavior?
Background image only covers entire viewport on my machine in Chrome 55.
Background image is only a few dozen pixels high on all other machines in all other browsers.

Any other information you believe would be useful?
We tested Linux with Firefox; Windows 10 with Edge, Chrome and Firefox; and macOS 10.12.2 with Safari, Firefox and Chrome

Currently displayed version

Earlier, correct version

Can you please provide a codpen that reproduces the issue?
Thank you.


Add information about GitHub Token

This isn't common knowledge and a bunch of us tried to get this sorted and trouble shoot it ourselves before we released the stuff about the personal token. These couple of lines with links to the official documentation will help prevent this in future 😄

Thanks @bdougie for this. I certainly think this should be part of all GitHub Actions that need access tokens. Not assuming knowledge is always a good thing 😉

Thanks! We might have a slightly better way to do this!


True P2P Hole Punch for IoT to run Without Cloud Premises and or Servers  (IDFGH-7411)

In the current days IoT become a role play for smartdevices where data was collect and consumed all over the places.
Using P2P Hole Punch could makes ESP-IDF SDK to be able to allow devices to open the connection to APP side and APP side to device without need to interface to any other servers to makes the data flow.
Images, sensor data and also a VoIP two channel audio to intradevices, intra APP~Device being complete able to be non cloud dependant.
So, this request would be the awesome 2022 feature to be implement over esp-idf esp32 series.

Hi @filzek, this feature is in our pipeline, but we'll likely not work on it soon. We welcome any PR and contributions in this area.

hi @espressif-abhikroy any progress we could test on this?

Hi @filzek
We haven't planned to work on this feature, yet, but looked around for libraries that could be ported to ESP platform. Here's one that doesn't need any dependencies, is relatively compact and published under MPL2.0 license:
https://github.com/paullouisageneau/libjuice
After taking a closer look, it seems like we only need to provide netif list (similar to linux's ifaddrs.h) and getnameinfo() implementation (in both cases, a very simplified version could be provided -- 1) we usually want to use only one netif for the actual NAT traversal; 2) could simply supply inet_ntop(), no need to provide reverse DNS lookup)
we still don't plan on officially adding this to IDF, in 2024, but the juice library looks very interesting and, if you're willing to spend some time on porting it, opening a PR, testing it, we will support the effort and help with certain low level implementations.

FYI: There's been an effort of development of a simplified layer of linux-like implementations of common signalling and network interface abstractions in https://github.com/espressif/esp-protocols/pull/671
This little component opens the door to porting many linux/host-platform libraries, including the aforementioned libjuice.
You can check my initial (very WIP) port in https://github.com/david-cermak/esp-ice (including the mqtt example demonstrated on the last community event)


Median of two Sorted arrays of different size

I want to add the C++ code for this in Array Folder under DCP'21

/assign


Adding metrics to NetworkClient

Adding metrics to NetworkClient.
SLA: 20 mins
Reviewers: Priyesh, Ming
Some notes to assist in reviewing:
Stage1: 5 mins
Renamed the class and some variables in NetworkRequestMetircs to NetworkSendMetrics.
Classes that calls into NetworkSendMetrics (just renamed):
NetworkSend, RequestResponseChannel, SocketRequestResponseChannel, AmbryRequests
Stage2: 15 mins
NetworkClient and NetworkMetrics
This has the major change in this patch. Introduced new metrics to track metrics for NetworkClient. Also have rearranged existing metrics in NetworkMetrics a bit.
Misc classes: NetworkClientFactory, NetworkClientTest, MockNetworkClientFactory,

I might be wrong, but I feel like this patch could be much simpler. I don't see why we need all the extra interfaces and implementations. Have you guys discussed something offline that I don't have context about?
In fact, before we tackle this, I think we should first change NetworkRequestMetrics to start taking in Histogram (from codahale). I'm unable to see or explain what value MetricsHistogram adds.

The existing code uses MetricsHistogram. I though this was required to save the reference of the metric passed in. Siva and I had noticed it and finding out the value of MetricsHistogram in NetworkRequestMetrics was part of this task.

Not sure what you mean but if we replaced all the MetricsHistogram in the constructor of NetworkRequestMetrics with Histogram, it should still work.

It appears so, yes.

@pnarayanan @xiahome : Can you guys review this.

will continue with this review as soon as I finish a pass on #326

@pnarayanan @xiahome : Reminder to review.

@pnarayanan @xiahome : Addressed feedbacks. Fixed the gauges for selector active connections and netowrkclient pending connections.
@pnarayanan : If we want to take the route you suggested(Meter instead of gauge), I would suggest we should revisit all the gauges in a later patch and do a sweeping change. For now, I am following what we have been doing for similar metrics elsewhere.

Looks good overall. Can merge once you address comments. Please also rebase with master (this branch has conflicts).

LGTM except my two pending comments. They are anyway naming suggestions so I am not pushing for a change if both @nsivabalan and @pnarayanan feel ok.

@pnarayanan @xiahome : rebased and addressed the comments

LGTM. Could you confirm that this builds on Linux and is formatted correctly?

yes. confirmed.


Add 'unlisted' option for content?

I have content that I wish to add to my website but not be linked from my articles/categories/tags lists (but can be accessed by direct link).  It seems to me the best way of doing this would be to add an 'unlisted' item to the front matter: f this were present then the content would still be processed and generated, but would not show up in any of the aggregate and iterator items such as content count, list of content, etc.
Does this sound like something that might be useful to add?  If so, some pointers to the pieces you think I need to change would be appreciated and I can see if I can put together a PR that implements this functionality.

We have headless which is, I suspect, similar but not what you want.
I'll put the proposal label on it. If enough people somehow shows an interest and can tell about some real use cases for this, then we can consider implementing it.

/cc @regisphilibert @budparr etc.

If enough people somehow shows an interest and can tell about some real use cases for this, then we can consider implementing it.

Yepp, very interested ;-)
I do this manually, but it can be tricky as you have to respect quite a few things:

robots meta tags (noindex, follow)
robots.txt
sitemaps (for each language)
feeds
all section lists
archives
landing page
taxonomy
…

Moreover, there were quite a few related questions in the forums.
An unlisted: true param would be just great!

I do this manually, but it can be tricky as you have to respect quite a few things:

That is true, but what do you use it for? Why do you need pages to be unlisted?

That is true, but what do you use it for? Why do you need pages to be unlisted?

Yes, I read your question. Yet, my use case is probably not representative:
I frequently publish internal stuff on my pages—for clients, family … As Hugo is so extremely flexible this is a lot more convenient and quicker than choosing various cloud sharing services, and clients have access to all the public stuff, as well.
Of course this is not sensitive data. For sensitive data I would probably use another e.g. .htpasswd protected Hugo site.
Thank you!

@bep according to the docs headless doesn't create the HTML so that wouldn't work.
To clarify my particular use case: I have an article that is in first draft and on which I require feedback from select individuals. I would like to be able to publish this article on my website so they can access it directly, but it not show up in the various lists (front page, category, RSS, and the rest).  Once the review is complete I can remove the unlisted status and it will show up in the list as usual, allowing it to be found by users.

@mcdee. Seems like all you need a special environment to deploy and give the URL to your clients. Have hugo -D run on this one, and your draft will be published. For your usecase, even though Hugo won't "list" the items, they'll be still indexed by google, shareable via social services etc... So that unlist reserved key might not fully solve your problem.
I for myself never had a use case matching your requirement. I usually won't publish something in production if it's private.

I also use unlisted pages, but do it by keeping them in draft so I can view them in local only. My use case is an SEO section where I list each page, and run various tests (date last modified, content length, title length, title same as h1, and many more other tests). I also have various data studio charts embedded bringing in data from the search console and Google analytics.
I also have a styleguide so I can check visually any changes, see styles in one place.
I guess if I had unlisted functionality, I could publish it and password protect it, but to be honest the local dev environment is fine for me.

I for myself never had a use case matching your requirement. I usually won't publish something in production if it's private.

That is a point, of course, @regisphilibert
Just one last pro argument from my point of view: I have seen quite a lot of templates using something like sitemap_exclude or hidden. So I guess there seems to be a demand.

So I guess there seems to be a demand.

I'm sure there is. There is also a lot of demands for publishing steps each validated by a different person, until, the last step is ✅ and article goes live.
Again, if a maintainer wants to take it on I won't oppose it, but I would think, in the future, some one will need another built-in way of "filtering" pages.
Here's what I think we should all do with this kind of predicament :
With returning partials, anywhere on your site you can call the same partial in charge of filtering your pages. In your case:
{{/* partials/func/FilterPages */}}
{{ $pages := where . ".Params.unlisted" nill }}
{{ return $pages }}

{{/* list.html */}}
{{ range partial "func/FilterPages" .Pages }}
  [ ... ]
{{ end }}

{{/* partial/recent-posts.html */}}

Recent Posts

{{ $posts := where (partial "func/FilterPages" site.RegularPages) "Type" "posts" }}
{{ range first 5 $posts }}
  [ ... ]
{{ end }}

Then as your filtering requirements evolves, just edit your func/FilterPages partial, and you're good.

I'm sure there is. There is also a lot of demands for publishing steps each validated by a different person, until, the last step is ✅ and article goes live.

I totally agree, however then it needs some kind of CMS functionality to manage the reviewers.
As a workaround, we use hugo to publish the development environment including drafts and publish it to a separate netlify-url. I also use the method described by matteobrusa to do some password protection (of course you have to adjust the robots.txt and html-meta-section to not be indexed by google etc). This way we get a secret online version of our website including drafts.
The review part of the articles is done in an issue for each article.

@regisphilibert this filtering approach is incredibly hard to get right considering all the places you need to apply it.
That said, I think we need to "wait a little" before we jump on this wagon. I have consolidated a lot of code in this department lately, but the above, while not super-hard, is a little bit more clumsy to apply than I would like.
I plan to add the first edition of "Pages from data" in Hugo 0.49, and it would be cool if someone bumbed this thread once that is out (should not be tooooo long), and see how to apply this to the code base as it looks then.

Hugo 0.49

I assume .59 which is awesome!

I assume .59 which is awesome!

No, it will also enable a Hugo Time Machine Mode; if you want you can dial it in to a time where Jekyll was the hippest kid in town.

Here's what I use unlisted pages for: I've started using Hugo for my online tagged bookmarks. Most of these bookmarks and tags are not mentioned anywhere on my site, but I can get to them because I know the secret URLs. It's fine if someone stumbles upon them because there's nothing private there.  The way I currently hide these is by including this in front matter:
weight: 88888888

And things like this in layout files:
    {{ range .Site.Taxonomies.tag }}
      {{ if ne .Count 1 }}
        {{ if ne .Page.Weight 88888888 }}

This feels incredibly hacky and I'm always thinking there must be a better way to do this!
It would be great if "unlisted" were built into Hugo. Thank you!

I support this feature.
A scenario which we've done in documentation sites a lot is when there is a page for a deprecated feature. You'd want that page to still be built and available directly for people who have it bookmarked already and direct links from blog posts, etc.
You don't want it "listed" though because you don't want new users in "research" mode to accidentally stumble upon it.

@felicianotech I support this feature too. I have created this, more practical issue, to track it:
https://github.com/gohugoio/hugo/issues/6412
I'm closing this. Let's take further discussions there.


chromium: add widevine support on aarch64

Description of changes
I packaged the arm64 build of widevine for chromium. The main weirdness here is widevine is built with DT_RELR relocations, which our version of glibc does support, but it checks for a particular symbol GLIBC_ABI_DT_RELR as a sort of compatibility flag. This widevine build doesn't have that flag, for what I understand to be ChromeOS reasons, so chromium fails to load the lib at startup. The fix I went with was to disable that check, as boldly copied from here. Another possibility would be to hand-patch that compatibility symbol into the widevine .so's, but I'm not sure where to start with that or how we'd carry that as a patch.
The main issue with this patch as it stands is by my understanding Hydra won't build/cache the patched glibc since it's not exposed anywhere, so users are stuck building glibc on their raspis or whatever. Alternatives that I know of would be to either expose the patched glibc as a package, or to just pull that patch into our glibc everywhere. My understanding is that wouldn't break anything (DT_RELR works the same way whether GLIBC_ABI_DT_RELR is present or not), but it's probably still more invasive than this warrants. I'd like to hear folks' thoughts on the best approach there.
The other issue is the widevine version/hash being inline when the other downloads are updateable through upstream-info.nix. I'm open to suggestions there.
Fixes https://github.com/NixOS/nixpkgs/issues/220828
Things done

Built on platform(s)

[x] x86_64-linux - confirmed derivation unchanged
[x] aarch64-linux - confirmed working on netflix/hbo
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Is it possible to also expand this PR to work with Firefox?
Also, would using Arch's widevine_fixup.py work as well? This is detailed in The Quest for Netflix on Asahi Linux.

This doesn't work for me on my aarch64 system (macbook m2 air). Chromium reports the following error when visiting a widevine site:
 [377601:1:1021/172733.020604:ERROR:cdm_module.cc(114)] CDM at /nix/store/qjbp2y9qbx88q518ny9ic49xhmcrv201-chromium-unwrapped-118.0.5993.88-wv/libexec/chromium/WidevineCdm/_platform_specific/linux_arm64/libwidevinecdm.so could not be loaded.
[377601:1:1021/172733.020667:ERROR:cdm_module.cc(115)] Error: /nix/store/qjbp2y9qbx88q518ny9ic49xhmcrv201-chromium-unwrapped-118.0.5993.88-wv/libexec/chromium/WidevineCdm/_platform_specific/linux_arm64/libwidevinecdm.so: cannot open shared object file: Operation not permitted

I'll see if I can get this to work with the widevie_fixup.py script.

Perhaps my comment at https://github.com/NixOS/nixpkgs/issues/220828#issuecomment-1713354862 can help?

This worked for me on Apple Silicon with 16k pages: https://gist.github.com/afilini/7fb5624c850f39af4938f4a5d087f2dc

We managed to get rid of the whole logic widevineCdm derivation in favor of the roughly two years old widevine-cdm package that is also used by qutebrowser and vivaldi in #311202.
This should, at least theoretically, allow us to concentrate the /Widevine on aarch64-linux efforts/ on a single derivation (widevine-cdm) instead of multiple mostly redundant implementations.
I am sorry that this PR has been left unreviewed for so long.
I've since been added as one of the two {ungoogled-,}chromium maintainers and did some Widevine related work in #310209.
While I don't actually use chromium with Widevine (or chromium at all, really), I would certainly like to help and eventually merge something like this.
At least assuming you didn't lose interest in it, which, well, I could totally understand if you did.
But I hope I can provide a better experience from now on.

Good to hear there's a better approach in the works. Unfortunately I don't have a test setup for this package anymore (I'd fixed up widevine for a Raspberry Pi media PC, which I since abandoned for other reasons), so this PR should probably be closed.

#337261


Use my own hooks

Instead of loading only WP core hooks/filters, allow using my own hooks via config options.
This is helpful if I want to e.g. load WooCommerce or any custom plugin hooks that should be checked.
See https://github.com/humanmade/psalm-plugin-wordpress/issues/12#issuecomment-1003797361

While this is waiting to be included in a future release, is there a way to suppress Psalm to allow non-core hooks?
I tried this:
/** @psalm-suppress HookNotFound */
add_filter(
	'ep_index_name',
	__NAMESPACE__ . '\\Elasticsearch\\set_index_name',
	10,
	3,
);

But this throws an error:
ERROR: HookNotFound - src/php/hooks/add-filters.php:16:1 - Hook ep_index_name not found.
/** @psalm-suppress HookNotFound */
add_filter(
	'ep_index_name',
	__NAMESPACE__ . '\\Elasticsearch\\set_index_name',
	10,
	3,
);

@paulshryock I just looked in my codebase and seems like I only found a way to ignore it per file:
<PluginIssue name="HookNotFound">
    <errorLevel type="info">
        <file name="src/foo/Bar.php" />
    </errorLevel>
</PluginIssue>

Thanks for the quick replies, @kraftner and @kkmuffme! I've decided to patch the plugin using cweagans/composer-patches to remove the HookNotFound check in my project until the next version of this plugin is released.
This means I lose the benefits of HookNotFound, but gain back the ability to use third-party hooks without Psalm errors.


TypeScript module BottomNavigationButton

Problem description
BottomNavigationButtonProps has the type for the field value set to number. According to the API documentation it is suppose to accept any.
https://material-ui-1dab0.firebaseapp.com/api/bottom-navigation-button/
Steps to reproduce
Attempt to assign a string value
Versions

Material-UI: 1.0.0-beta.5 and 1.0.0-beta.6

I confirm, feel free to update the typing.


Backlight switches off when moved out

Link to dodal PR (if required): #151
To test:

Check tests still pass

Done. Sorry, I missed that one.


[d3d8] Respect D3DLOCK_DISCARD only for dynamic write-only buffers

Fixes missing textures in Rayman 3, a problem that based on online testimonies started to occur with the transition to Windows 7.
Test on Windows XP have shown that the game renders properly, so native behavior on age-accurate systems seem to differ from d3d9, as in D3DLOCK_DISCARD appears to be respected only for D3DUSAGE_DYNAMIC + D3DUSAGE_WRITEONLY.
Making it a draft for now, as it would need more testing to ensure there are no regressions in other titles.

Turns out this isn't exactly free (performance-wise), so I've hidden it behind a config option and enabled it only for Rayman 3. I have yet to see another game relying on this type of behavior, anyway.

i can confirm game render are fixed

The docs only mention DYNAMIC. Does WRITEONLY make a difference for DISCARD?

The docs only mention DYNAMIC. Does WRITEONLY make a difference for DISCARD?

For this game in particular, yes. For what it's worth d3d8to9 is already doing this globally, however handling it this way appears to add a few queue sync and is generally slower at times, hence the config option.
As mentioned in the commit, this behavior seems to have been default on Windows XP, but modern Windows will behave inline with what D3D9 does, namely allow DISCARD for both DYNAMIC and DYNAMIC + WRITEONLY, which is why the game is also broken on native currently.
The workarounds you'll find online involve disabling HWVP entirely, using a game ini config option, specifically in order to disallow DISCARD on the affected buffers.

It makes a difference because Rayman 3 is doing undefined behaviour, namely writing to buffers after unlocking them (off by one error in reference counting I believe). Handling that is probably the more correct fix for this issue.

It makes a difference because Rayman 3 is doing undefined behaviour, namely writing to buffers after unlocking them (off by one error in reference counting I believe). Handling that is probably the more correct fix for this issue.

If that were indeed the only problem, it would have been fixed just by disabling direct buffer mapping. Which it was not.

It makes a difference because Rayman 3 is doing undefined behaviour, namely writing to buffers after unlocking them (off by one error in reference counting I believe). Handling that is probably the more correct fix for this issue.

Pretty sure we already handle this on the D3D9 side, which this calls into. D3D9 games do this all the time too.


[STOS-87] STOS mock

[STOS-87](https://tpalinski.atlassian.net/browse/STOS-87)

Trust me it works


Fix highlighting of comments in enum declarations

This fixes the highlighting of comments in vala enum declarations.
Previously only a comment before the first member would be highlighted
as a comment.

Before:

After:

ping

Sorry for the late response. I'll release a new version next weekend.


ERROR Subscription Liveness timeout every 5 minutes

I'm using an Aqara E1 hub with an Aqara U100 door lock.
The door lock is connected to HA Core docker using the matter-server docker in Unraid 6.12.4.
After setting up in homeassistant, it works, but it resets every 5 minutes. Is there a bug in matter-server causing this error?
2023-09-13 19:33:00 UnraidNAS PersistentStorage[1] INFO Committing...
2023-09-13 19:33:00 UnraidNAS root[1] INFO Re-subscription succeeded!
2023-09-13 19:33:00 UnraidNAS matter_server.server.device_controller.[node 1][1] INFO Re-Subscription succeeded
2023-09-13 19:39:38 UnraidNAS chip.DMG[1] ERROR Subscription Liveness timeout with SubscriptionID = 0x33f6410c, Peer = 01:0000000000000001
2023-09-13 19:39:38 UnraidNAS matter_server.server.device_controller.[node 1][1] INFO Previous subscription failed with Error: 50, re-subscribing in 0 ms...
2023-09-13 19:39:39 UnraidNAS PersistentStorage[1] INFO DeleteSdkKey: g/s/Uc8vwS2xf1tfddjms/WkJQ==
2023-09-13 19:39:39 UnraidNAS PersistentStorage[1] INFO Committing...
2023-09-13 19:39:39 UnraidNAS PersistentStorage[1] INFO SetSdkKey: f/1/s/0000000000000001 = b'\x150\x03\x10 u{\x08\xb4Nf\xb1"\x8f\x15H\xf9\x97q\xf30\x04 \x96\x8a\x08\xcca.R6\\)\xe5\x81h\xcd\x06\x1f\xa30\xd8,\x8c\x9fZ\x15\xfd\x1c)\xf5\xa8\x1f\xf7J0\x05\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18'
2023-09-13 19:39:39 UnraidNAS PersistentStorage[1] INFO Committing...
2023-09-13 19:39:39 UnraidNAS PersistentStorage[1] INFO SetSdkKey: g/s/IHV7CLROZrEijxVI+Zdx8w== = b'\x15$\x01\x01$\x02\x01\x18'
2023-09-13 19:39:39 UnraidNAS PersistentStorage[1] INFO Committing...
2023-09-13 19:39:39 UnraidNAS root[1] INFO Re-subscription succeeded!
2023-09-13 19:39:39 UnraidNAS matter_server.server.device_controller.[node 1][1] INFO Re-Subscription succeeded
2023-09-13 19:44:43 UnraidNAS chip.DMG[1] ERROR Subscription Liveness timeout with SubscriptionID = 0x5625e1e5, Peer = 01:0000000000000001
2023-09-13 19:44:43 UnraidNAS matter_server.server.device_controller.[node 1][1] INFO Previous subscription failed with Error: 50, re-subscribing in 0 ms...
2023-09-13 19:44:44 UnraidNAS PersistentStorage[1] INFO DeleteSdkKey: g/s/IHV7CLROZrEijxVI+Zdx8w==
2023-09-13 19:44:44 UnraidNAS PersistentStorage[1] INFO Committing...
2023-09-13 19:44:44 UnraidNAS PersistentStorage[1] INFO SetSdkKey: f/1/s/0000000000000001 = b'\x150\x03\x10$\xc2?%\xa4\x9f\xe7yu/\r\x94\xd5\x9eH%0\x04 \x96\x8a\x08\xcca.R6\\)\xe5\x81h\xcd\x06\x1f\xa30\xd8,\x8c\x9fZ\x15\xfd\x1c)\xf5\xa8\x1f\xf7J0\x05\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18'
2023-09-13 19:44:44 UnraidNAS PersistentStorage[1] INFO Committing...
2023-09-13 19:44:44 UnraidNAS PersistentStorage[1] INFO SetSdkKey: g/s/JMI/JaSf53l1Lw2U1Z5IJQ== = b'\x15$\x01\x01$\x02\x01\x18'
2023-09-13 19:44:44 UnraidNAS PersistentStorage[1] INFO Committing...
2023-09-13 19:44:45 UnraidNAS root[1] INFO Re-subscription succeeded!
2023-09-13 19:44:45 UnraidNAS matter_server.server.device_controller.[node 1][1] INFO Re-Subscription succeeded
2023-09-13 19:49:49 UnraidNAS chip.DMG[1] ERROR Subscription Liveness timeout with SubscriptionID = 0x44513c55, Peer = 01:0000000000000001
2023-09-13 19:49:49 UnraidNAS matter_server.server.device_controller.[node 1][1] INFO Previous subscription failed with Error: 50, re-subscribing in 0 ms...
2023-09-13 19:49:50 UnraidNAS PersistentStorage[1] INFO DeleteSdkKey: g/s/JMI/JaSf53l1Lw2U1Z5IJQ==
2023-09-13 19:49:50 UnraidNAS PersistentStorage[1] INFO Committing...
2023-09-13 19:49:50 UnraidNAS PersistentStorage[1] INFO SetSdkKey: f/1/s/0000000000000001 = b'\x150\x03\x10\xc4\x99\x89\xa7\xe4p\xc1E\xf1l\x17\xe9\xf5\xaaA\x140\x04 \x96\x8a\x08\xcca.R6\\)\xe5\x81h\xcd\x06\x1f\xa30\xd8,\x8c\x9fZ\x15\xfd\x1c)\xf5\xa8\x1f\xf7J0\x05\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18'
2023-09-13 19:49:50 UnraidNAS PersistentStorage[1] INFO Committing...
2023-09-13 19:49:50 UnraidNAS PersistentStorage[1] INFO SetSdkKey: g/s/xJmJp+RwwUXxbBfp9apBFA== = b'\x15$\x01\x01$\x02\x01\x18'
2023-09-13 19:49:50 UnraidNAS PersistentStorage[1] INFO Committing...
2023-09-13 19:49:50 UnraidNAS root[1] INFO Re-subscription succeeded!
2023-09-13 19:49:50 UnraidNAS matter_server.server.device_controller.[node 1][1] INFO Re-Subscription succeeded

Same issue here with a container install using a HUE Hub. Additionally I see some

ERROR [139829803208592] Client exceeded max pending messages: 512

messages. See matter-server-log.txt
I can provide more logs or test things if needed.

First of all, use the Home Assistant issue tracker for issues with Home Assistant, this repository is for the matter server/library only.
This looks like some connection issues as the subscription times out. As running matter server yourself in docker is highly experimental, please see if you can reproduce this same issue when using Home Assistant OS. For example run it in a VM or something.
Communication issues like this we see a lot due to Matter completely relying on (local) IPv6 multicast (mdns) for communication and network gear not completely ready up to that task or just filtering it partly out. That is also true for some linux kernels, hence our request to test this with HAOS as that is the platform we ensured it will work with.

There is no such thing as "sharing mode". A Matter device can be commissioned to multiple fabrics (controllers) at the same time. So sharing it from Apple Home just means that Apple Home will tell the device to open a commissioning window for the other controller. Each controller interacts with the device completely independently.
As for using your using own OTBR with HA; that is HIGHLY experimental, especially when you run it yourself in docker as you need special kernel patches to resolve routing issues. At this time we do not have the capacity to support you with that setup, I'm sorry.
My advice to everyone at this point is to use existing, established border routers, such as the Apple Homepod Mini. That works rock stable at this point, also to use in HA. In the meanwhile we're making progress in using the HA Yellow or SkyConnect a stand-alone Thread border router including some descent UI options flow.

Going to close here. Please use the HA core issue tracker to report issues with Matter devices in HA and be aware of the supported scenarios. So if you are using one of the setup methods described in the documentation and you run into this issue, please open a new issue in the HA core issue tracker, including the diagnostics dump so we can have a look at it. Thanks!

The issue was just fixed with 4.0.1 release for whatever reason!
As soon as I updated the docker from the previous version (I keep my dockers current), the HA status become stable. See picture below around 8PM.
For the record I'm on a pfSense router and Unifi switches and APs.


vscode-extensions.tailscale.vscode-tailscale: init at 0.4.0

New Tailscale extension: https://tailscale.com/blog/three-new-features-launching-at-tailscale-up/
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-in-distress/3604/61


Upgrade to Capybara 3

Thanks for creating an issue! Please fill out this form so we can be sure to have all the information we need, and to minimize back and forth.

What are we trying to do?
Upgrade our Systems Tests gem Capybara to version 3. V2 is two years old and has started throwing a lot of deprecation warnings at us.

What feature or behavior is this required for?
App Health

How could we solve this issue? (Not knowing is okay!)

Remove the version lock on Capybara in the Gemfile
Run bundle update capybara
Address any failing tests

Anything else?

Claiming this (as a reintroduction to programming in rails, since I have done exactly zero of that for awhile)


Login menu is needed

I am well-prepared to address the need for a login menu feature by taking on the task. I kindly request to be assigned to this issue for its implementation.

Hello ,
I hope you are doing well. I am eager to contribute to the project and would appreciate it if you could assign me a task or let me know how I can get started. I am looking forward to collaborating with all of you!
Best regards,
Monika

@khushi-joshi-05 please assign this issue to me.


Choose target invoker based on specific invoker load.

Currently, the loadbalancer advances from one Invoker to another after a fixed amount of invocations, which isn't aware of any load in the system causing suboptimal behavior.
This only advances away from the home invoker of an action (determined by hash) if that home invoker is "heavily" loaded. We advance further if the next chosen invoker is busy and so forth. If we arrive at the home invoker again, the system is completely loaded and we force schedule to the home invoker. Step sizes are determined by prime numbers and also chosen by hashing to prevent chasing behavior.

In going over this Markus, a couple of issues came up and are worth repeating here for review purposes in case we missed our intent.

The computation of co-primes is dynamic because the number of invokers is changed.  Yet it is too slow to compute in the inner loop for each activation.  Memoization overcomes the overhead.
The explicit introduction of 1 in the stepSizes is needed because for N = 2 (for example), we must include it for completeness.  Inclusion must be separate due to the way the sieve works.
The until x excludes x which is important if x (number of invokers) happens to be prime.

By my reading, I don't think the hashing based on prime numbers is good.    What we want are not a list of prime numbers, but a list of numbers that are relatively prime to the total number of invokers.
For example:  suppose we have 100 invokers.    "5" is a prime number, but it's not a good step, because 5 is not relatively prime to 100.   (stepping by 5 will not hit all 100 invokers -- only 20 of them.)
On the contrary, "21" is not a prime number, but it is relatively prime to 100.   So 21 is a good step, since stepping by 21 will hit all 100 invokers before coming home.
https://en.wikipedia.org/wiki/Coprime_integers

@sjfink is absolutely right. I rolled back to an earlier version with coprime prime numbers.

After chatting with Markus, I think his original idea "all prime numbers that don't divide N" is probably good.    Even though "21" will technically hit all invokers before wrapping,  I agree with Markus that we don't want both "7" and "21" in the list of steps, since they will collide early in the sequence, which will be the common case.
Bottom line:  I'm good with the algorithm "all prime numbers which don't divide N".

We actually started with something like that but got to this state due to a buggy code change.   But there is an algorithmic issue that underlies this.   Do we want co-primeness wrt the number of invokers only or also wrt to the subset of possible strides?
Concretely, suppose we have 100 invokers, do we want allow both 7 and 21 as possible steps?  Both are correct in terms of striding through all 100 invokers but there is possibly some greater chance of collisions for a different base hash.

I hope this could be addressed too.
Situation is as follow:

I have two running invokers.
User sends action invocation request.
At the same time, one invoker which is in charge of invoking the request is down.
It takes some time(5~10 secs) for controller to catch up the situation(invoker is down).
Accordingly, controller tries to send request to the abnormal invoker.
Controller can not receive proper response.
(At this point, I expect request will be automatically redirected to normal invoker but) Controller respond with failed response to client though there is running invoker.

This is because currently, there are kafka topics for each invokers.
And controller regularly checks the health of invokers with health topic.
So until the next check, controller will recognize the unhealthy invoker as health invoker.
Because of this, even though we deploy multiple invokers, we can not make invokers high available.
I think there are two options.

Make invokers to share one kafka topic.
Make controller(or loadbalancer) redirect the request to healthy invoker in case of failure.

1. Make invokers to share one kafka topic.
If we can make invokers to share one kafka topic, this situation could be handled.
Then each invokers will be grouped as one consumer group.
In case of failure of a target invoker, request will be automatically redirected to healthy invoker at kafka layer.
AFAIK, same request should be sent to same invoker to take advantage of warm container, so there are topics for each invoker.
So if we take this approach, any invokers should be able to handle any warm containers(which is not created by themselves).
Even though different invoker receives the same request, the invoker could activate warm container again.
I am not sure this could be easily achievable with current implementation.
2. Controller(or loadbalancer) redirect the request to healthy invoker in case of failure.
This approach is to make controller do what kafka does.
In case of failure, controller should redirect the request to healthy invoker rather than just respond with fail response.
Since many things are already considered in Kafka side, I am inclined to first option.
I want you guys to check on this issue too.

@markusthoemmes did you give any though on actually saving the state where each warmed container is found in the cluster ? In this way the load balancer could simply route traffic targeting the right nodes.

@style95 it would be interesting to see how other container management solutions powered by Kube or Mesos, plus a good load balancer such as NGINX, that is aware of where containers are, and can route requests directly to the warmed containers, change the picture towards what you're saying.

@ddragosd yes, what you're saying could be the next evolution of this. You need to be wary of scale-out scenarios etc. etc. I think that will need a broader discussion probably more suited for the dev list?
@style95 Very valid thoughts, it would be great to have this discussion on the dev list as well.

+1 to @ddragosd comment. Would be good to discuss how this approach expands into resource management solutions that:
a) have overview over all the available resources in the cluster and
b) maybe even the capability to dynamically expand those clusters if needed.
Good starting point, though - I like the stateless approach you have taken, @markusthoemmes

@michaelmarth re. " b) maybe even the capability to dynamically expand those clusters if needed." this is already supported in that if new "invoker" clusters are brought online, they self-register with the load balancer which then can use those resources in the scheduling. Did you mean for the loadbalancer to initiate a request for new capacity? So we don't hijack this pr with this discussion do you want to open a separate issue to discuss this?

@style95 while it is true that a request may go to an unhealthy invoker topic, since messages in queue are persisted, a new invoker to replace the unhealthy one will pick up those messages and process them eventually. This can be achieved either by having a new invoker subscribe to the topic as needed. We had considered consumer groups in the past and more recently rethinking an approach around work stealing.

@rabbah
oh ok.
I just wanted to bring such a case into the scene while we have discussion.
I think though action would be invoked eventually, problem still exists.
How about blocking call and web action(with api gateway)?
Once client receives failure response, client will no more expect the proper response.
(even though the action would be invoked)
I have not much idea on the decision history, so my opinion could be naive.

PG1 1685 🔵


fix(jasmine): support "pending" it clauses with no test body

Just ran into this issue today. Would love to use it. Any idea on the timeline for the next release cut?

released
On Wed, Mar 8, 2017 at 8:27 AM, Andrew Smith<EMAIL_ADDRESS>wrote:

Just ran into this issue today. Would love to use it. Any idea on the
timeline for the next release cut?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/angular/zone.js/pull/659#issuecomment-285090185, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAG1T1JPU-aM8tAQ4s4FOALIA04YYBgWks5rjtbtgaJpZM4MSF_2
.

Many Thanks!

On Mar 12, 2017, at 1:00 PM, Miško Hevery<EMAIL_ADDRESS>wrote:
released
On Wed, Mar 8, 2017 at 8:27 AM, Andrew Smith<EMAIL_ADDRESS>wrote:

Just ran into this issue today. Would love to use it. Any idea on the
timeline for the next release cut?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/angular/zone.js/pull/659#issuecomment-285090185, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAG1T1JPU-aM8tAQ4s4FOALIA04YYBgWks5rjtbtgaJpZM4MSF_2
.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.


Resolves #2285

Fix parameter description
https://github.com/MicrosoftDocs/windows-powershell-docs/issues/2285

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

File
Status
Preview URL
Details

docset/windows/msdtc/Receive-DtcDiagnosticTransaction.md
:white_check_mark:Succeeded
View (win10-ps)

docset/windows/msdtc/Send-DtcDiagnosticTransaction.md
:white_check_mark:Succeeded
View (win10-ps)

docset/winserver2012-ps/msdtc/Receive-DtcDiagnosticTransaction.md
:white_check_mark:Succeeded
View (winserver2012-ps)

docset/winserver2012-ps/msdtc/Send-DtcDiagnosticTransaction.md
:white_check_mark:Succeeded
View (winserver2012-ps)

docset/winserver2012r2-ps/msdtc/Receive-DtcDiagnosticTransaction.md
:white_check_mark:Succeeded
View (winserver2012r2-ps)

docset/winserver2012r2-ps/msdtc/Send-DtcDiagnosticTransaction.md
:white_check_mark:Succeeded
View (winserver2012r2-ps)

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


Report file is too complicated -- reporter being too helpful

The reporting configuration of karma has become more complicated over time.  But, the changes have not helped me at all.  Actually, the changes have only caused me headaches.  The junit reporter used to write to a file named 'test-results.xml'.  That's pretty arbitrary, but at least my test runner could find it.  Now the default name is based on the OS name and version and browser name and version -- most of which is hard to code into my test runner.  Now it's possible to specify parameters to a reporter, but even though I set outputDir and outputFile, I don't get what I ask for.  The file is still in a folder with a complicated directory name.  Karma is trying to be too helpful.  It should do what I ask and no more.  Extra functionality to support this or that system, make it hard to use outside of those systems.  The naming today seems about as arbitrary as it did when the name was test-results.xml.  Maybe some people find it useful that the name includes browser and os info, but some don't (like me) and maybe some want other info in there.  I should be able to select the output file name ... exactly ... without further modification.  And, if you really want to make the file name flexible, then implement a tag system that allows the user to put name parts together as they want.  For example: [browser-name]_[browser-version] [os-name][os-version].  Various other tags could be supported too.
Also, separating the reports by browser is the opposite of helpful to me.  It's easier for me to deal with the combined results.

One possible solution often to seeming over-configurability (being overwhelming) is to either (both can be applied as well):

have default simple configuration; ok, of course to be discussed: what is considered "default" ?
have overrides that make it possible to enforce the software back to legacy behavior. Ie. in this case you mentioned the fixed test result file, this could be a configuration directive.


It's not possible to have nested stateful LiveVue components inside a LiveVue parent component

Seems that currently it's not possible to have nested LiveVue components added via slots
Here is an example:
  def render(assigns) do
    ~H"""

        <%!-- Top level component --%>
        <.Card class="m-5">

              <%!-- Nested component with socket, goes away after mount --%>
              <.Counter count={@count} v-socket={@socket} id="inner-with-socket" v-on:inc={JS.push("inc_counter")} />

              <%!-- Nested component without socket, shown, but static, doesn't have even a local state --%>
              <.Counter count={@count} id="inner-without-socket" v-on:inc={JS.push("inc_counter")} />

        </.Card>

      <%!-- Another top level component --%>

        <.Counter count={@count} v-socket={@socket} id="outer-with-socket" v-on:inc={JS.push("inc_counter")}  />

    """
  end

Card is a very simple Vue component which has only a slot inside:

<template>

    <slot />

</template>

The very first Counter.vue disappears (this is slightly visually modified module included to LiveVue) disappears after the view mounted to the server.
The second one is there, but it doesn't have any state or behaviour - event the slider itself doesn't change the button label.
The third one - which is outside of the Card - is working as intended.

Funny enough that the top visible Counter gets one update when the server state changes the first time (the first "Increase counter" click) but then it stops.
I tried to look into the code but haven't found a good way to implement the case above.
Also, I noticed that each component gets its own application instance. I wonder if it makes sense to have only one app? In this case components can share state. Or it can be configurable. Don't think it worth spending time on that now TBH, but in the future can be interesting.
But the question is how should nested Vue components behave is an interesting topic. Currently to change server state from the nested Vue components (I mean, actual Vue components without anything in-between) it is necessary to emit events from the bottom to the top level one, which is actually got a VueHook, and then this component will emit an event to the LiveView controller.
May be an option here is to implement a server-side reactive store of some kind? It is possible to integrate pinia, but it will be too heavy only for that purpose, I think.
Anyway, I believe this topic worth another thread :-D

@vheathen Great points! I'll try to explain why it looks as it looks:

You can't mount standalone Vue component into a page. It always has to be wrapped by top-level app created with createApp. I don't see a way of having a single Vue app mounted into multiple places (maybe portals? but it would be quite complex and might cause bugs).

To keep slots interactive, they're fully rendered on the server and sent as an HTML over the wire. In other words, they doesn't use phoenix-driven update & render cycle since I couldn't find a way of making it work (once Vue "takes over" rendering phoenix can't update & execute hooks inside). So currently content in slots can't use phoenix hook - it's the same as in LiveSvelte. If you could find a way to make it work, it would be amazing :)

To emit events directly to live view from a nested compontent you can use

import {useLiveVue} from "live_vue"

const live = useLiveVue()

live.pushEvent("ping")

or you can subscribe to handle custom events as well. useLiveVue gives you the hook instance, so you can use anything from JS interoperability.

I was thinking about exposing a state component that would synchronize passed props to reactive object on the frontend, so it could be shared by multiple components, if necessary. But right now it's just a thought  😉

@vheathen maybe https://github.com/phoenixframework/phoenix_live_view/pull/3478 might be a way to solve this!


Update example/demo

Cannot be updated yet as there is no SWI 7.3.12 docker image.

SWI docker was released and demo is updated for 0.0.13.

Updated and pushed new docker image.


Login: Multiple User Support

(Opened by @mtaobiz on #112)

Second question: how to set few users in config?
Now i have only 1 user:
credentials    : {
    username : 'admin',
    password : 'password'
  },

@mohammadrafigh made a PR #129 that closes this


License

Hi, thanks for sharing your code. Can you add an open source license (e.g. MIT license) to this repo? It would be very helpful.

Thanks for the comment, relevant files have been added.

Thanks!


No env control in installation instructions

I think it is a good idea to include an env/package manager such as conda or mamba in the installation instructions.

This will create more homogenous experience for users on different OS
You should get less awkward bug reports from less expereinced users

There is an example of a (also energy) project that makes use of mamba here.

Agreed.


Adds a config key to set the default login authType. Closes #5585

Closes #5585
Adds a config key to set the default login authType.
Also re-added a space behind the chili icon before the device code message.
In bash the missing space looks ugly.

Updated this to add an extra test case

ready to merge 🚀

merged manually 👏

code is ✅ tested ✅ you rock 🤩
one strange behavior I noticed not connected to your change is
I changed the default to password and hit login. I got an error which is fine buuuut if CLI is interactive shouldn't I get a prompt for that if it is required 😉. I guess a good one for a follow up issue 🙂 don't you agree?

Hi @Adam-it, yeah, that's the reason I created this issue: #5636, as we're talking about conditionally required options.
But now it appears that we first have to research zod :)


New Device for your list: Sonoff S30

I can confirm working:
The Sonoff S30 running on firmware version 3.0.0
Integrated into HA 0.94.4
This is great as the S30 is a sealed unit.
Thanks

@Wormhole44 added to the list, thank you!


Trident CSI sitll connecting on FCOS 36.20220716.3.1

Describe the bug
After doing upgrade Fedora CoreOS to ver 36.20220716.3.1 the Node-CSI driver still connecting.
time="2022-08-02T14:24:57Z" level=warning msg="Could not update Trident controller with node registration, will retry." error="could not log into the Trident CSI Controller: error communicating with Trident CS
I Controller; Put "https://<IP_ADDRESS>:34571/trident/v1/node/l8101\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)" increment=10.496269484s requestID=e3e2d6c4-c6d7-497a-93c4-95
I have this problem only with OS:
Fedora CoreOS 36.20220618.3.1
Fedora CoreOS 36.20220703.3.1
Fedora CoreOS 36.20220716.3.1
Environment
$ tridentctl version
+----------------+----------------+
| SERVER VERSION | CLIENT VERSION |
+----------------+----------------+
| 22.07.0        | 22.04.0        |
+----------------+----------------+
$ k get node -o wide
NAME    STATUS   ROLES                  AGE   VERSION     OS-IMAGE                        KERNEL-VERSION            CONTAINER-RUNTIME
l8101   Ready    control-plane,master   78d   v1.23.7     Fedora CoreOS 36.20220716.3.1   5.18.11-200.fc36.x86_64   containerd://1.6.4
l8102   Ready    control-plane,master   78d   v1.23.7     Fedora CoreOS 36.20220605.3.0   5.17.12-300.fc36.x86_64   containerd://1.6.4
l8103   Ready    control-plane,master   78d   v1.23.7     Fedora CoreOS 36.20220605.3.0   5.17.12-300.fc36.x86_64   containerd://1.6.4
l8104   Ready                           78d   v1.23.7     Fedora CoreOS 36.20220605.3.0   5.17.12-300.fc36.x86_64   containerd://1.6.4
$ k get pod -o wide
NAME                                READY   STATUS    AGE     IP                      NODE
trident-csi-5pplc                   2/2     Running   34m     <IP_ADDRESS>   l8103
trident-csi-6f2wr                   1/2     Running   8m58s  <IP_ADDRESS>   l8101
trident-csi-cvz7d                   2/2     Running   34m     <IP_ADDRESS>   l8102
trident-csi-vsgn8                   2/2     Running   34m     <IP_ADDRESS>   l8104
trident-operator-7c98557778-ftqq5   1/1     Running         34m     <IP_ADDRESS>   l8105
trident-csi-797999d774-rq5ch        6/6     Running   34m     <IP_ADDRESS>    l8108
Logs
k logs -f trident-csi-6f2wr trident-main
time="2022-08-02T14:24:27Z" level=info msg="Running Trident storage orchestrator." binary=/trident_orchestrator build_time="Fri Jul 29 11:24:51 EDT 2022" version=22.07.0
time="2022-08-02T14:24:27Z" level=info msg="Initializing plain CSI helper frontend."
time="2022-08-02T14:24:27Z" level=info msg="Added frontend." name=plain_csi_helper
time="2022-08-02T14:24:27Z" level=info msg="Initializing CSI frontend." name=l8101 version=22.07.0
time="2022-08-02T14:24:27Z" level=info msg="Enabling node service capability." capability=STAGE_UNSTAGE_VOLUME
time="2022-08-02T14:24:27Z" level=info msg="Enabling node service capability." capability=EXPAND_VOLUME
time="2022-08-02T14:24:27Z" level=info msg="Enabling node service capability." capability=GET_VOLUME_STATS
time="2022-08-02T14:24:27Z" level=info msg="Enabling volume access mode." mode=SINGLE_NODE_WRITER
time="2022-08-02T14:24:27Z" level=info msg="Enabling volume access mode." mode=SINGLE_NODE_READER_ONLY
time="2022-08-02T14:24:27Z" level=info msg="Enabling volume access mode." mode=MULTI_NODE_READER_ONLY
time="2022-08-02T14:24:27Z" level=info msg="Enabling volume access mode." mode=MULTI_NODE_SINGLE_WRITER
time="2022-08-02T14:24:27Z" level=info msg="Enabling volume access mode." mode=MULTI_NODE_MULTI_WRITER
time="2022-08-02T14:24:27Z" level=info msg="Added frontend." name=csi
time="2022-08-02T14:24:27Z" level=info msg="Initializing HTTPS REST frontend." address=":17546"
time="2022-08-02T14:24:27Z" level=info msg="Added frontend." name="HTTPS REST"
time="2022-08-02T14:24:27Z" level=info msg="Added 0 existing volume(s)" requestID=34eb6d49-a684-4f89-b6fa-6e1767e351a0 requestSource=Internal
time="2022-08-02T14:24:27Z" level=info msg="Trident bootstrapped successfully."
time="2022-08-02T14:24:27Z" level=info msg="Activating plain CSI helper frontend."
time="2022-08-02T14:24:27Z" level=info msg="Activating HTTPS REST frontend." address=":17546"
time="2022-08-02T14:24:27Z" level=info msg="Activating CSI frontend." requestID=e3e2d6c4-c6d7-497a-93c4-959fb1bf0bfe requestSource=Internal
time="2022-08-02T14:24:27Z" level=info msg="Starting periodic node access reconciliation service." requestID=dc00598e-6109-4b50-b622-517187516267 requestSource=Periodic
time="2022-08-02T14:24:27Z" level=info msg="Discovered iSCSI initiator name." IQN="iqn.1994-05.com.redhat:de886ad0c8f6" requestID=e3e2d6c4-c6d7-497a-93c4-959fb1bf0bfe requestSource=Internal
time="2022-08-02T14:24:27Z" level=info msg="Discovered IP addresses." IP Addresses="[<IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS>]" requestID=e3e2d6c4-c6d7-497a-93c4-959fb1bf0bfe requestSource=Internal
time="2022-08-02T14:24:57Z" level=warning msg="Could not update Trident controller with node registration, will retry." error="could not log into the Trident CSI Controller: error communicating with Trident CSI Controller; Put "https://<IP_ADDRESS>:34571/trident/v1/node/l8101\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)" increment=10.496269484s requestID=e3e2d6c4-c6d7-497a-93c4-959fb1bf0bfe requestSource=Internal
time="2022-08-02T14:25:38Z" level=warning msg="Could not update Trident controller with node registration, will retry." error="could not log into the Trident CSI Controller: error communicating with Trident CSI Controller; Put "https://<IP_ADDRESS>:34571/trident/v1/node/l8101\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)" increment=19.057534053s requestID=e3e2d6c4-c6d7-497a-93c4-959fb1bf0bfe requestSource=Internal
time="2022-08-02T14:26:27Z" level=warning msg="Could not update Trident controller with node registration, will retry." error="could not log into the Trident CSI Controller: error communicating with Trident CSI Controller; Put "https://<IP_ADDRESS>:34571/trident/v1/node/l8101\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)" increment=40.699091843s requestID=e3e2d6c4-c6d7-497a-93c4-959fb1bf0bfe requestSource=Internal
$ k logs -f trident-csi-6f2wr driver-registrar
I0802 14:24:27.601972    3484 main.go:166] Version: v2.5.1
I0802 14:24:27.602066    3484 main.go:167] Running node-driver-registrar in mode=registration
I0802 14:24:27.603799    3484 main.go:191] Attempting to open a gRPC connection with: "/plugin/csi.sock"
W0802 14:24:37.604947    3484 connection.go:173] Still connecting to unix:///plugin/csi.sock
W0802 14:24:47.603983    3484 connection.go:173] Still connecting to unix:///plugin/csi.sock
W0802 14:24:57.604876    3484 connection.go:173] Still connecting to unix:///plugin/csi.sock
W0802 14:25:07.604311    3484 connection.go:173] Still connecting to unix:///plugin/csi.sock
W0802 14:25:17.604232    3484 connection.go:173] Still connecting to unix:///plugin/csi.sock

Hi @pmokrz,
Fedora CoreOS isn't one of the supported Operating Systems  that we test. Considering that you are only having issues with the most recent version of FCOS I'd suspect that there is a breaking change in FCOS and not Trident.
You can check on network connectivity from your Kubernetes node, where the Trident daemonset pod is running, with the Kubernetes node where the Trident controller is running. There may have been a configuration change in FCOS that is preventing the needed network connection to register the Trident daemonset pod with the Trident controller.

Closing this issue as there hasn't been a response from @pmokrz recently and previous FCOS versions are known to work with Trident.

From what I found it somewhere after the update, some strange way is blocking communication between the pods in the k8s cluster. Maybe someone had a similar case?
I think this bug can be hooked up together with:  Could not update Trident controller with node registration, will retry." error="could not log into the Trident CSI Controller: error communicating with Trident CSI Controller #752

My solution: sudo ethtool --offload vxlan.calico rx off tx off was done on every node


Lemonbar doesn't accept too much info

Lemonboy's bar doesn't accept a string too long, or it doesn't print the entire thing. For one instance per screen, it's not really an issue, but it is for a unique lemonbar instance with a multiple screen setup.
I can't change directly this behaviour, but maybe the panel can "clean" each string sent to the bar, to clean redundancies. It would be specially useful with the fg and bg definitions, as barython doesn't really try to avoid duplicates for now, it just ensures that the defined colours will be applied.
This solution will not be magical, though, as if there as still too much info after a clean, lemonbar will have the same behaviour than now.
In all cases, you might switch to a per-screen instance if you have more than 1 screen.

maybe PR lemonbar to increase the limit? it's 4096 currently

Yes, ok, thanks for you bugreport, I will look at lemonbar


Fix sort fields to actually match MyOrgUnitSortField

Tangentially related to DE23798, these don't actually match the names as defined in MyOrgUnitSortField. The disadvantage of this is that the values sent back have to be .ToLowerCase()'d then compared to hardcoded strings - if we use the correct values here, we can instead use the proper MyOrgUnitSortField.TryParse (generated by the codegen).

This requires https://git.dev.d2l/projects/CORE/repos/lp/pull-requests/4525/overview to be in first, hence the WIP.

This is going to be done by the PR for DE23798, which should be up soon-ish.


Wrong Connections made when places an element outside a subprocees

A sequence flow should not leave a subprocess but you also cannot create an association to an element outside the subprocess.

It should refuse to create the element

Just curious: An association can be drawn between any elements, right? Or is there any rule that forbids it.
I get the point that it doesn't make sense for users to get this result so :+1: for a fix.

You can only draw an association to an Artifact (like a data object)  or a compensation task, but nothing else as far as i know. :)

Associations can now only connect flow objects with artifacts. As far as I understand and as stated here they can only be used for that purpose. Connecting flow objects through associations makes no sense, I think.

TODO

[ ] figure out if association between gateway and data object is allowed

I would allow it, if we do not get an explicit indication that it isn't.

Connecting data objects to start events or gateways is not possible currently. Connecting data objects to end events is possible for some reason. I've only ever seen them connected to tasks, though. For now, I would leave it like it is.

Let's leave it as it is and wait for feedback.


bugfix fix topn runtime predicate getting value bug for decimal type

Proposed changes
Issue Number: close #xxx
Problem summary
Describe your changes.
The value pushed down for decimal type is wrong and cause datatype_p0/scalar_types/decimal test cases fail occasionally. This PR fix the bug getting the value.
Checklist(Required)

Does it affect the original behavior:

[ ] Yes
[x] No
[ ] I don't know

Has unit tests been added:

[ ] Yes
[ ] No
[x] No Need

Has document been added or modified:

[ ] Yes
[ ] No
[x] No Need

Does it need to update dependencies:

[ ] Yes
[x] No

Are there any changes that cannot be rolled back:

[ ] Yes (If Yes, please explain WHY)
[x] No

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

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.7 seconds
load time: 509 seconds
storage size:<PHONE_NUMBER>9 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230201172129_clickbench_pr_88965.html


pandas.api.types imports

Importing from pandas.api.types causes MypyError

"pandas.api.types" has no attribute "is_numeric_dtype"

Minimal example:
from pandas.api.types import is_numeric_dtype, is_string_dtype

srs = pd.Series([1,2,3])

is_numeric_dtype(srs)
>>> True
is_string_dtype(srs)
>>> False

No solution was provided for problem but pandas-stubs has moved to another repository and will now be managed alongside pandas itself: https://github.com/pandas-dev/pandas-stubs
You might try using the newest version pip install pandas-stubs==<IP_ADDRESS>626 which comes from that repository.  If it doesn't work please considering opening an issue in the new repository.


Use noop io scheduler by default

KB article from VMware which recommends the noop scheduler: https://kb.vmware.com/s/article/2011861
Instructions on how to set the default io scheduler from Red Hat: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/performance_tuning_guide/sect-red_hat_enterprise_linux-performance_tuning_guide-storage_and_file_systems-configuration_tools#sect-Red_Hat_Enterprise_Linux-Performance_Tuning_Guide-Configuration_tools-Setting_the_default_IO_scheduler
Wondering if we think we should only change this for VMware images or for all of them?
https://bugzilla.redhat.com/show_bug.cgi?id=1531088

@jrafanie @carbonin so the risk of using a blanket [noop] scheduler is if the customer has a raw device map instead of a virtual machine. Essentially what we're trying to accomplish by using [noop] is allow the hypervisor to handler all optimizations to the physical devices, instead of doing it twice, once in the guest and once on the host.
tldr; there is risk, only if the customer is using SR-IOV or RDM.

So I have done more digging into the ManageIQ appliance. Setting this option manually is mutually exclusive to running tuned and the appliances ship with tuned installed and running be default.
$ rpm -qa | grep tuned
tuned-2.8.0-5.el7_4.2.noarch

$ systemctl status tuned
● tuned.service - Dynamic System Tuning Daemon
   Loaded: loaded (/usr/lib/systemd/system/tuned.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2018-03-01 07:58:38 EST; 1 day 8h ago
 Main PID: 1373 (tuned)
   CGroup: /system.slice/tuned.service
           └─1373 /usr/bin/python -Es /usr/sbin/tuned -l -P

Here are the list of profiles available, the active one (as expected) is virtual-guest.
$ tuned-adm list
Available profiles:
- balanced                    - General non-specialized tuned profile
- desktop                     - Optimize for the desktop use-case
- latency-performance         - Optimize for deterministic performance at the cost of increased power consumption
- network-latency             - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance
- network-throughput          - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks
- powersave                   - Optimize for low power consumption
- throughput-performance      - Broadly applicable tuning that provides excellent performance across a variety of common server workloads
- virtual-guest               - Optimize for running inside a virtual guest
- virtual-host                - Optimize for running KVM guests
Current active profile: virtual-guest

If the noop scheduler were to be set then we would want to remove the tuned package. I am not against this as it would open up the option to make more purposeful changes to improve performance in the future.
PostgreSQL Performance and I/O Schedulers

linux-io-scheduler-tuning
postgresql-io-schedulers-cfq-noop-deadline

Pulled this from the tuned instance running on my ManageIQ appliance:
virtual-guest/tuned.conf
#
# tuned configuration
#

[main]
summary=Optimize for running inside a virtual guest
include=throughput-performance

[sysctl]
# If a workload mostly uses anonymous memory and it hits this limit, the entire
# working set is buffered for I/O, and any more write buffering would require
# swapping, so it's time to throttle writes until I/O can catch up.  Workloads
# that mostly use file mappings may be able to use even higher values.
#
# The generator of dirty data starts writeback at this percentage (system default
# is 20%)
vm.dirty_ratio = 30

# Filesystem I/O is usually much more efficient than swapping, so try to keep
# swapping low.  It's usually safe to go even lower than this on systems with
# server-grade storage.
vm.swappiness = 30

throughput-performance/tuned.conf
#
# tuned configuration
#

[main]
summary=Broadly applicable tuning that provides excellent performance across a variety of common server workloads

[cpu]
governor=performance
energy_perf_bias=performance
min_perf_pct=100

[disk]
readahead=>4096

[sysctl]
# ktune sysctl settings for rhel6 servers, maximizing i/o throughput
#
# Minimal preemption granularity for CPU-bound tasks:
# (default: 1 msec#  (1 + ilog(ncpus)), units: nanoseconds)
kernel.sched_min_granularity_ns = 10000000

# SCHED_OTHER wake-up granularity.
# (default: 1 msec#  (1 + ilog(ncpus)), units: nanoseconds)
#
# This option delays the preemption effects of decoupled workloads
# and reduces their over-scheduling. Synchronous workloads will still
# have immediate wakeup/sleep latencies.
kernel.sched_wakeup_granularity_ns = 15000000

# If a workload mostly uses anonymous memory and it hits this limit, the entire
# working set is buffered for I/O, and any more write buffering would require
# swapping, so it's time to throttle writes until I/O can catch up.  Workloads
# that mostly use file mappings may be able to use even higher values.
#
# The generator of dirty data starts writeback at this percentage (system default
# is 20%)
vm.dirty_ratio = 40

# Start background writeback (via writeback threads) at this percentage (system
# default is 10%)
vm.dirty_background_ratio = 10

# PID allocation wrap value.  When the kernel's next PID value
# reaches this value, it wraps back to a minimum PID value.
# PIDs of value pid_max or larger are not allocated.
#
# A suggested value for pid_max is 1024 * <# of cpu cores/threads in system>
# e.g., a box with 32 cpus, the default of 32768 is reasonable, for 64 cpus,
# 65536, for 4096 cpus, 4194304 (which is the upper limit possible).
#kernel.pid_max = 65536

# The swappiness parameter controls the tendency of the kernel to move
# processes out of physical memory and onto the swap disk.
# 0 tells the kernel to avoid swapping processes out of physical memory
# for as long as possible
# 100 tells the kernel to aggressively swap processes out of physical memory
# and move them to swap cache
vm.swappiness=10


clap derive support missing/broken

I have this:
use clap::Parser;
use twelf::config;

#[config]
#[derive(Parser)]
#[clap]
struct Config {
    #[clap(
        long,
        short = 's',
        help = "The server to connect to",
        display_order = 0
    )]
    host: Option<String>,

    #[clap(
        long,
        short,
        help = "The port to use",
        display_order = 1
    )]
    port: Option<u16>,
}

I expect a help like this:
USAGE:
    foo [OPTIONS]

OPTIONS:
    -s, --host <HOST>                        The server to connect to
    -p, --port <PORT>                        The port to use
    -h, --help                               Print help information

But I get this:
USAGE:
    foo [OPTIONS]

OPTIONS:
    -h, --help                               Print help information
        --host <host>
        --port <port>

I.e. it seems all clap-derive macro-related info is somehow ignored/lost.
I presume one key issue is that #[config] also creates a parse() method that somehow clashes with the one the #[derive(Parser)] wants to generate.

hmm yes I think the clap arguments are dropped, do you use the function provided by twelf to declare your clap commands and arguments ? Or do you use directly clap ?
I need to fix it ASAP, if you have a smal reproductible main to copy paste me here it would be helpful for me :)

I need to fix it ASAP, if you have a smal reproductible main to copy paste me here it would be helpful for me :)

The struct I posted can just be copypasta'd into a main.rs. Add the call to Config::parse() which usually calls clap's parse() and run this to see the help with broken/missing bits & bobs.

A new version of twelf has been released on 0.4.0 to support clap derive. If you want an example of how it works just check here https://github.com/bnjjj/twelf/blob/master/twelf/examples/clap_derive.rs
If you need something else feel free :)

Please reopen this.
I think you really need to test with all (or a lot more) clap_derive attributes before this is fixed. :)
It seems the config macro wraps members of a marked struct into Option. I think this is not a good idea. The user should do this explicitly. If they don't, use Default::default(), or expect a default attribute. Like clap.
Specifically clap allows one to omit Option for members which are still optional by specifying a default. Example:
#[derive(Parser, Debug)]
#[clap(author, version, about, long_about = None)]
struct Config {
    #[clap(
	long,
	default_value_t = String::from("localhost"),
        help = "Documentation inside clap, to specifiy db_host",
    )]
    db_host: String,
    ...
}

Here db_string is guaranteed to have a value but is still an option (--db-host can be omitted).
Because of this the user can use Config.db_host directly in their code w/o unwrap() and w/o any error handling ambiguity that would come with the latter.
Adding one line to twelf/examples/clap_derive.rs like above already breaks compilation (this is clap_derive complaining about the Option that db_host got wrapped into by the twelf::config macro):
error: default_value is meaningless for Option
  --> twelf/examples/clap_derive.rs:14:9
   |
14 |         default_value_t = String::from("localhost"),
   |         ^^^^^^^^^^^^^^^

Fixed and published as v0.5.0 sorry for the delay, I have a newborn at home and it takes me a lot of time these days :p

Tell me if it fix your project.

I'm sorry I'm just getting to testing this now.
Thanks heaps for the fix! I will provide feedback asap.

Here is another example that doesn't work as expected:
use clap::{CommandFactory, Parser, Subcommand};
use serde::{Deserialize, Serialize};
use std::{
    fs::File,
    path::PathBuf,
    ffi::OsStr,
};
use twelf::{config, Layer};

pub const HELP_TEMPLATE: &str = "{bin} {version}

{about}

USAGE:
    {usage}

{all-args}
";

#[config]
#[derive(Parser, Debug)]
#[clap(
    help_template = HELP_TEMPLATE,
    version,
    about = "Twelf Test",
)]
pub struct CliOptions {
    #[clap(flatten)]
    pub global: GlobalOptions,

    #[clap(subcommand)]
    pub command: Command,
}

#[derive(Parser, Debug, Deserialize, Serialize)]
#[clap(rename_all = "kebab-case")]
pub struct GlobalOptions {
    /// Host name or IP address
    #[clap(display_order = 0, short = 'o', long, default_value_t = String::from("localhost"), env = "TB_HOST")]
    pub host: String,

    ///  Port number
    #[clap(
        display_order = 1,
        short,
        long,
        default_value_t = 4242u16,
        env = "TB_PORT"
    )]
    pub port: u16,
}

#[derive(Subcommand, Debug, Deserialize, Serialize)]
#[clap(rename_all = "kebab-case")]
pub enum Command {
    /// Place an order
    #[clap(display_order = 0, alias("p"))]
    Place(Place),

    /// Flatten all positions
    #[clap(display_order = 1, alias("f"))]
    Flatten(Flatten),
}

#[derive(Parser, Debug, Deserialize, Serialize)]
pub struct Flatten {
    #[clap(display_order = 0, long, short)]
    pub urgent: bool,

    #[clap(display_order = 1, long, short, conflicts_with = "urgent")]
    pub percentage: Option<f64>,

    #[clap(display_order = 2, long, short, conflicts_with = "urgent")]
    pub force_absolute_spread: Option<f64>,
}

#[derive(Parser, Debug, Deserialize, Serialize)]
pub struct Place {
    #[clap(short, long, parse(from_os_str), validator_os = path_readable_file, env = "TB_CONTRACT")]
    pub contract: Option<PathBuf>,

    #[clap(short, long, parse(from_os_str), validator_os = path_readable_file, env = "TB_ORDER")]
    pub order: Option<PathBuf>,

    #[clap(long)]
    pub execute: bool,
}

const TOML_CONFIG_FILE: &str = "config.toml";

fn main() {
    let matches = CliOptions::command().get_matches();

    let mut config_layers = Vec::with_capacity(2);
    if std::path::Path::new(TOML_CONFIG_FILE).exists() {
        config_layers.push(Layer::Toml(TOML_CONFIG_FILE.into()));
    }
    config_layers.push(Layer::Clap(matches));

    let _config = CliOptions::with_layers(&config_layers).unwrap();
}

fn path_readable_file(value: &OsStr) -> Result<(), String> {
    let path = PathBuf::from(value);//.as_ref();

    if path.is_dir() {
        return Err(format!("{}: Input path must be a file, not a directory",
                           path.display()));
    }

    File::open(&path).map(|_| ()).map_err(|e| format!("{}: {}", path.display(), e))
}

Running this with e.g.:
cargo run -- flatten --urgent

Gives me:
thread 'main' panicked at '`global` is not a name of an argument or a group.
Make sure you're using the name of the argument itself and not the name of short or long flags.', src/main.rs:20:1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

When I remove the twelf stuff, everything works.
Also note that I need serde::{Deserialize, Serialize} on everything to make this compile.
I would very much like to only have some stuff in a config file. Not all. Specifically in the example code above only the GlobalOptions.
On that note: I do not understand why serde::Serialize is needed.
After all, I only want to read from a config file, not write to it.

@virtualritz thx for a good example. I noticed you used TOML_CONFIG_FILE constant rather than taking config file name from the CLI. Would twelf be able to handle such case? Thx!

I'm not the author of ttwelf. I tried it and it wasn't working. So I opened the issue. I haven't revisited it since @bnjjj just reopened it after that Option issue I added. Once that is fixed I will try twelf again and may be able to answer your question.

@nyurik Yes it would be possible by directly using ArgMatches I did not already succeed to find a good solution for this issue though

Here is another example that doesn't work as expected:
I am also running into this issue.

👋
I don't have answers for the features that are unsupported, but I did come through this thread while I was working on setting up Twelf for a project so it might provide some value to show on the implementation I landed on, even if it isn't perfect.
First, I have my struct defined with clap derive (options.rs L6 -> L49), and have all fields marked as required = false, and defaults applied with the serde attribute rather than on clap — I don't want my CLI flags to have the default, I want my config as a whole to have the default. Adding defaults for clap meant that my CLI argument defaults would override config files.
Next I detect any config files and build up my layers with them and the environment (main.rs L24 -> L52). Below that I finalize using with_layers — since every key is not required and has a default the only errors thrown here are bad keys or invalid types.
The only non-ideal aspect is that I then have to validate an argument that is required manually — but I don't mind doing that in my use case, and I'm quite happy maintaining this setup going forward.
Apologies if this is slightly off topic for this issue, but it might help someone looking to get up and running with a clap derive implementation 🙂

Update: https://github.com/clap-rs/clap/issues/1206 has just been fixed, so you can iterate over args now.