usbmuxd service: init

Motivation for this change
The usbmuxd daemon is required for accessing files on connected iOS devices (along with ifuse). Also apparently enabling it allows Plug-and-Play tethering for iPhones, which is awesome.
This was tested by me and @grahamc, but it would be nice to have others try it out. Just run sudo usbmuxd -f in a terminal and connect your cellular iOS device, should work just like that.
Since this easily provides internet access, it would be very handy to enable this in the installer media by default, I'm probably gonna do a PR for that after this is merged.
Things done

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

[x] NixOS
[ ] macOS
[ ] other Linux distributions

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

I refactored the service to use a custom user and group. I tested this extensively with 2 iOS devices and had no problems

I tried to do a patch for it (to not require to be run as root) here https://github.com/Infinisil/nixpkgs/commit/33d7f1c34c33b57c8a7cb61c5786bf5c5a079051, but it fails when connecting a device with
preflight_worker_handle_device_add: ERROR: Could not connect to lockdownd on device XXXXXXXXXXXXXXXXXXXXXXXXXX, lockdown error -8

Well I don't know how to make it work without starting as root. Can be merged like this imo, the service could be really useful for some people.


feat: Artifact GC - POC

Hi @jessesuen ,
This PoC is the last part of Artifact GC.
Why do we want Artifact GC?
Deleting artifacts at on workflow completion or deletion saves users cost. It also makes sure that defunct data is deleted.
Why Can't You Use The Artifact Repository Built-in Mechanisms?
It is impossible for S3 to know when a workflow is deleted.
Solution
We must delete workflows by running a processes (i.e. pod) in the user namespace:

Each workflow might have a different IAM role annotation. The controller cannot be given IAM roles, because it cannot be give multiple values.
The agent's design is orientated around task-set which is not amenable to the job.

We need to store:

Was the artifact deleted?

We need a way to communicate between the user pod and the controller:

Please delete an artifact.
Was delete successful?

Currently a pod can update the following:

WorkflowTaskResult - this is for results, not jobs.
WorkflowTaskSet - this is for running templates, we do not have templates
Pod - interesting...

So...

Please delete an artifact = create a "GC pod" with the info needed to delete the artifact
Was the delete successful? = pod.status.phase == "Succeeded"

This means we need to run one pod to delete each artifact. This will always be at least equal to the number of nodes that produced artifacts. If every node produces 2 artifacts, then this will be 2x.
Won't that be expensive? No. We can control the resource requests. A pod deleting an artifact only needs enough CPU and memory to run the process and make the API call.
Won't this result too many pods runinng, overwhelming the Kuberenetes API Server? We can limit the number of concurrent GC pods.

@jessesuen as per Slack message, can I please ask you to review the design proposed here?


[SSoC'23] SparseTable Implementation in java

Implementation of a sparse table which is a data structure that can very quickly query a range on
a static array in O(1) for overlap-friendly functions (idempotent functions) like min, max and
gcd using O(n*logn) memory.

@Kumar-laxmi please assign this to me.


Axolotl vs Llama-Factory?

What piece of documentation is affected?
Hi thanks for the library! It seems that https://github.com/hiyouga/LLaMA-Factory has similar features as this lib, so I would appreciate it if I could know comparison between the two libs.
What part(s) of the article would you like to see updated?
(see above)
Additional Information
No response
Acknowledgements

[X] My issue title is concise, descriptive, and in title casing.
[X] I have searched the existing issues to make sure this feature has not been requested yet.
[X] I have provided enough information for the maintainers to understand and evaluate this request.

hi @fzyzcjy

Axolotl has rigorous automated integration testing for correctness.
Things move fast and upstream changes can break things, and we have much more extensive testing than any other downstream HF Trainer, so we're more likely to catch problems

@symlink Thank you, and that looks pretty important to me (personally speaking)!

@symlink Btw, it would be great to mention this serious testing thing in README, since this is really an advantage! For example, another popular library, tianshou, also mentions explicitly about its rigorous testing (https://github.com/thu-ml/tianshou/#reproducible-high-quality-results).

IMHO u are comparing oranges vs apples. A training framework vs an implementation that barely anyone uses 😄


Fix a few issues with libevent::Base::Delay.

If we delay the cancellation callback (by using Base::Add), it could race with the real completion, and the task could go into the DONE state, which means that both timer and task itself could be invalid by the time DelayCancel would get called! But the cancellation callback is stated to always complete before the task is allowed to go into the DONE state, and event_del is actually okay to call on other threads (as long as you haven't done event_free first, of course!).
So not only is bouncing the call to event_del to the libevent thread unnecessary, but doing so might cause a bug. :smiley:
FYI, if we still needed to do the event_del on the libevent thread, that could still be achieved, by having the cancellation callback add a hold on the task before scheduling the call to event_del (in a function that would release the hold, of course), to prevent the task from going into the DONE state.

LGTM


ignore DuplicateError when inserting mDNS answer in zone

When we issue two concurrent mDNS queries for the same name, the answer to the second one encounters a DuplicateError when inserting into the zone. We would return that error, which causes the query would fail. And we'd cache that fact. All bad.
So ignore DuplicateError.
Fixes #1270.

LGTM


Chained receive statements with method arguments

A feature that would be really nice is to be able to chain multiple receive(args).with(args) methods together. Chained methods are supported with the receive_message_chain method, and is really nice. However I don't see how useful it is if you can't actually, somehow, test the arguments.
Would it be possible to implement a syntax like this? expect(obj).to receive(:method_name).with("data").receive(:method_two).with("data2").and_return("result")
Example of use case:
Say I want to test a single-fire object like MessageClass.new("data").send_to("username"). Of course you can use spy on the MessageClass and stub the new method, and then run an ´expect´ on the spy. But it is tedious and would be much nicer to have in a chain.
Also, there are probably some piping libraries that could benefit from this as well, think: dataset.filter("whatever").order.first(20).
Is this kind of chaining at all possible? If it is, I think it would be a really nice addition to rspec-mocks. I would love to help out developing this, but I don't know where to start.

As discussed in https://github.com/rspec/rspec-mocks/issues/904#issuecomment-77389895 (and also in our docs: https://relishapp.com/rspec/rspec-mocks/v/3-2/docs/working-with-legacy-code) we consider receive_message_chain to be a code smell that can be useful for testing legacy code and other similar situations, but isn't usually something we recommend.  As such, we're not very keen on taking on increased maintenance for it in the form of additional features.
If you find useful needing this, use it as a signal to improve the design of your code.  For example, for the MessageClass case, I'd use this as a signal to add a class method that's more easily stubbed:
class MessageClass
  def self.send_data_to(data, username)
    new(data).send_to(username)
  end

  # ...
end

As a single-fire object (as you described it), instantiating MessageClass doesn't really serve a purpose for the caller, other than to get at the method it needs to use.  Why not make this use case more first-class by supporting it directly on MessageClass?  It elevates the intended public API and makes it obvious what entry point callers are intended to use for it.  Then you can mock or stub send_data_to.

I do agree that this can be a sign of poorly designed code, but the case for pipelining in my mind still holds. But maybe pipelines can be tested differently, like expect(one.two.three).to be_kind_of(PipeLine), and then see that the correct modification is done to the underlying data structure. I'm not sure.
I do see the case that this kind of feature might unnecessarily complicate things.


[server-wallet]: React to setFunding ChainService calls

The current strategy is to use a mock chain service to mimic the chain service v2 api.

No longer needed now that https://github.com/statechannels/statechannels/pull/2633 has been merged


keys and forEach method for Headers

Issue #, if available:
closes #186
Description of changes:
I omitted forEach's third argument object for now because i'm not sure how to efficiently pass Headers object in each loop (without cloning btreemap), and also it's rarely used anyway.
I add keys method as it was also missing.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Fantastic! Thanks for the PR! LGTM


Fix missing public include directory

Path <prefix>/include will not be added to the headers search of dependent
targets without specifying INSTALL_INTERFACE, i.e. compilation
will fail with error:
"fatal error: 'glog/logging.h' file not found".

I signed it!

:thumbsup:


Improve support for arbitrarily larger displays

This adds support for 32x32 displays by making the offset calculation more generic. This should still work just fine on 32x16 displays and may even work better across some other displays as compared to the behavior of the existing code.

Great - thanks ...  some 32x32 displays are 1/8 scan then?

Merged to master

Mine appears to be. 32x32 P6 from aliexpress with unlabeled ports (other than HUB75).


Support for meeting extensibility in sch channel meeting

[Enter feedback here]
Along with the below 4 types,
Scheduled meetings: Meetings scheduled through Teams calendar.
One-on-one calls: Calls initiated in one-on-one chat.
Group calls: Calls initiated in group chat.
Instant meetings: Meetings initiated through Meet now button in Teams calendar.
mobile also supports sch channel meeting we should call this out
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 82987815-d508-d642-c1f6-b609241d4750
Version Independent ID: 29e89cc6-c8ca-7d29-7dca-4ac4d06f5c42
Content: Apps for Teams meetings - Teams
Content Source: msteams-platform/apps-in-teams-meetings/teams-apps-in-meetings.md
Service: msteams
GitHub Login: @surbhigupta
Microsoft Alias: lajanuar

Hi @surbhigupta12 - Could you please help here to update the doc accordingly?


Stateful switch for stream URIs?

Hi @Julius-Bendt, many thanks for making this - exactly what I was looking for! The URI also works with .m3u8 streams which is great for custom control of radio. With this usecase it would be handy for the switch to be stateful - ie, when you toggle a homebridge-sonos-player switch to 'on' it starts the Sonos playing the stream, and when you toggle it 'off' it pauses the Sonos. Is this something you'd consider adding as an option? Thanks again!

That is an amazing idea! I'll most likely have to make some breaking changes in order to keep the code somewhat clean, but it should be possible.

@adamstamper could you provide me with the link you're using?

@adamstamper could you provide me with the link you're using?
EDIT: nevermind. I was missing the "x-rincon-mp3radio://" part of the url.

Sorry I missed your question - I'm actually using a plain http stream URI, it seems some formats work with just http:// whilst others require the "x-rincon-mp3radio://" prefix.
Thanks for working on this.


Device is set to Arabic and App is in English when onboarding

App version: Android <IP_ADDRESS>
OS: Android 11
Device: Google Pixel 3XL
Reproducible: Always
Note: iOS worked as expected, on-boarding was not in English.
I tried setting my Android device language to Arabic so I can onboard with device already set.
Results: The app is still in English during onboard
Expected: App language should detect language and display in that language
See screenshot for the language I chose (there are many to choose from)
Note: In screenshot I have it at 2nd level but I had it in first position when testing this

Should be fixed in latest build

Verified fixed <IP_ADDRESS>


Context Replacement should clean DB entries

It was observed that partial DB entries was causing session setup
failure all the time and there was no way to bring PCRF out of
that state. Only PCRF restart could solve the problem of removing
all DB entries.

retest this please

retest this please

retest this please

retest this please

retest this please


Fix: count aggregate function should not be nullable

Which issue does this PR close?
Closes #12077
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?

Thank you for this contribution @HuSen8891

Thanks @HuSen8891  -- I double checked and it does seem to be fixed on main. However, I don't think we have the test.
Could you please update the PR to just have the additional test?
DataFusion CLI v41.0.0
> create table empty;
0 row(s) fetched.
Elapsed 0.007 seconds.

> select distinct count() from empty;
+---------+
| count() |
+---------+
| 0       |
+---------+
1 row(s) fetched.
Elapsed 0.010 seconds.

>

Sure. Current branch is deleted, I'll add the test in another PR.

PR was https://github.com/apache/datafusion/pull/12100


7.2.4 fails to send password to Redshift when you don't have "Save password locally" checked.

System information:

Operating system: Windows 10 Pro 2004 (19041.63)
DBeaver: v7.2.4
Additional extensions: I don't remember ever adding any extentions.

Connection specification:

Database name and version: AWS Redshift
Driver name: Redshift
Do you use tunnels or proxies (SSH, SOCKS, etc)? I use an SSH Tunnel

Describe the problem you're observing:
I have multiple saved connections that were originally created many versions ago, and immediately after upgrading to 7.2.4, I started seeing JDBC errors from the Redshift driver about how it wasn't being given a PWD.
My dev connections continued to work fine, but my prod connections all gave that error about requiring a PWD. Both sets of connections use SSH Tunneling, but only the dev connections have "Save password locally" checked. The prod connections require me to enter the password each time I connect. I believe that is an important step in the repro.
Steps to reproduce, if exist:

Create a connection using the Redshift driver, via an SSH tunnel, and uncheck "Save password local".
Attempt to connect with this connection. When it asks for the password, enter the appropriate password.

Result: an error complaining about PWD being required.
Expected: a connection is established.
Include any warning/errors/backtraces from the logs
[Amazon][JDBC](10100) Connection Refused: [Amazon][JDBC](11640) Required Connection Key(s): PWD; [Amazon][JDBC](11480) Optional Connection Key(s): AccessKeyID, AuthMech, AutoCreate, BlockingRowsMode, ClusterID, DbGroups, DisableIsValidQuery, DriverLogLevel, EndpointUrl, FilterLevel, ForceLowercase, IAMDuration, Language, OpenSourceSubProtocolOverride, plugin_name, profile, Region, SecretAccessKey, selectorProvider, selectorProviderArg, SessionToken, socketTimeout, sslcert, sslfactory, sslkey, sslpassword, sslrootcert, SSLTruststore , SSLTrustStorePath, tcpKeepAlive, TCPKeepAliveMinutes, unknownLength

Note that uninstalling 7.2.4 and reinstalling 7.2.3 fixed the issue for me.

probably it is fixed in 7.2.5. Could you check if it fixed your issue?
thanks in advance

It does appear to be fixed in 7.2.5. Thanks!


Docs: Supported fields

The wiki page for supported fields hadn't been ported to the Falco website.
We need to make clear what are the fields one can use and how to understand when they are available, e.g: if you don't use the --cri flag you don't have the container runtime fields.
Wiki page: https://github.com/falcosecurity/falco/wiki/Supported-Fields
URL broken from the wiki page: https://falco.org/docs/rules/supported-fields/

Fixed in falcosecurity/falco-website#18


Add more prebuilt formatters for logging

Similar to Rails', adding support for Django's default log format would be helpful (see: https://github.com/django/django/blob/1939dd49d142b65fa22eb5f85cee0d20864d3730/django/utils/log.py#L18)

Django's default formatter is logging.Formatter, not so interesting...

Add also Pyramid's: https://github.com/Pylons/pyramid/blob/332ca33fc51fb64b8e15e1aceb28e96dee2c6fec/docs/tutorials/wiki/src/installation/production.ini

And Flask's: https://github.com/pallets/flask/blob/master/src/flask/logging.py#L45


LZMA().decompress returns null

There is a old software that reads 2 files and decompresses them using LZMA (not LZMA2). It's written in Adobe AIR, using buildin utils to work on ByteArray. Here is a function that uses uncompress method.
        public function decode(bytes:ByteArray):ThingData
        {
            if (!bytes)
                throw new NullArgumentError("bytes");

            bytes.position = 0;
            bytes.endian = Endian.LITTLE_ENDIAN;
            bytes.uncompress(CompressionAlgorithm.LZMA);

            var version:uint = bytes.readUnsignedShort();
            if (version == OBDVersions.OBD_VERSION_2)
                return decodeV2(bytes);
            else if (version >= 710) // OBD version 1: client version in the first two bytes.
                return decodeV1(bytes);
            else
                throw new Error(StringUtil.format("Invalid OBD version {0}", version));
        }

I'm loading same files using File System and LZMA().decompress to "uncompress" them, however returned data is always null.
const express = require('express')
const fs = require('fs')
const lzma = require('lzma-native')

const app = express()
const port = 3000

app.listen(port, () => {
    fs.readFile("First.dat", null, (err, data) => {
        lzma.LZMA().decompress(data.buffer, (decompressedResult) => {
            console.log(decompressedResult) // null
        });
    })
})

I'm attaching one of the files (2nd is around 170MB).
First.zip

* The `decompress()` function here takes a second argument that provides the error, if one occurred. In this case, that is `LZMA_FORMAT_ERROR: File format not recognized`.
* If I unpack `First.zip` as attached by you here and run `lzma --lzma1 -d < First.dat` on the command line, that fails similarly.

Why is that? How is it that one algorithm for the same compression method works but not the other?

* You should not be using `data.buffer` here – `data` is the right thing to use. A Node.js `Buffer` does not need to have a 1:1 correspondence to the underlying `ArrayBuffer`.

Tried just data too, same results.
So this means that lzma-native won't work here? I can't find anything to work with these files...

@Oen44 I don’t know. Whatever First.dat is, it is not an LZMA file, so no, lzma-native won’t be able to decompress it.
Looking at the file directly, it seems like there are lots of strings and null bytes in there, which are good indications that it’s just an uncompressed raw data file.

@addaleax  Explain this part then bytes.uncompress(CompressionAlgorithm.LZMA);

@Oen44 It’s literally not my job, in any way, to figure out how your code works.


SVG loading sign isn't going away when redirected from Auth Guard

SVG loading sign isn't going away when redirected from Auth Guard
**I'm submitting a ...bug  (check one with "x")

[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository

Issue description
Current behavior:
SVG loading isn't going away after custom auth guard has redirected to a page
Expected behavior:
SVG loading should go away after custom auth guard has redirected to a page
Steps to reproduce:
Created auth guard, and imported it in app-routing.module.ts, also imported it in app.module.ts (adding it to the providers array)
Created page (pageComponent) within ./app directory
Added pageComponent to declarations array in app.module.ts
Declared routing for pageComponent in app-routing.module.ts
app.routing.module
const routes: Routes = [
  {
    path: 'pages', loadChildren: 'app/pages/pages.module#PagesModule',
    canActivate: [CanActivateViaAuthGuard],
  },
  {
    path: 'not-logged-in', component: NotLoggedInComponent
  },
.......
]

app.module.ts
@NgModule({
  declarations: [
    AppComponent,
    NotLoggedInComponent
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    HttpClientModule,
    AppRoutingModule,
    HttpModule,
    NgbModule.forRoot(),
    ThemeModule.forRoot(),
    CoreModule.forRoot(),
    AngularFireModule.initializeApp(firebaseConfig),
    AngularFireDatabaseModule,
    AngularFireAuthModule,
  ],
  bootstrap: [AppComponent],
  providers: [
    { provide: APP_BASE_HREF, useValue: '/' },
    CanActivateViaAuthGuard
  ],
......
})

auth-guard.ts
  canActivate() {
        if (this.currentUser) {
            const roles = this.currentUser.roles;
            if (roles.indexOf('Merchant') !== -1) {
                return true;
            } else {
                // console.log(this.currentUser)
                this.router.navigate(['/not-logged-in']); return true;
            }
        } else {
           this.router.navigate(['/not-logged-in']); return true;
        }
    }

Other information:
npm, node, OS, Browser
<!--
Node, npm: `8.10.1` and `5.6.0`
OS: Windows (10).
Browser: Chrome & Firefox
-->

Angular, Nebular

Hey @markoghifo, the issue here is that your pages are required to have  placed on it. Otherwise, there is no code executed that could hide the spinner.
Another solution would be to inject NbSpinnerService https://akveo.github.io/nebular/#/docs/services/spinnerservice on your own and call load method, which will execute all tasks and hide the spinner in the end.
Hope it helps!


HTTP Request node : RequestError for HTTPS links

Current Behavior
First of all, thanks for everyone contributing to this fantastic piece of software!
The http request node stopped working entirely for HTTPS links (whether accessed directly or through a redirect).
HTTP links that do not redirect to HTTPS work as intended.
Stack trace :
RequestError: The "listener" argument must be of type function. Received an instance of Object
    at Request._beforeError (file:///usr/lib/node_modules/node-red/node_modules/got/dist/source/core/index.js:310:21)
    at Request.flush (file:///usr/lib/node_modules/node-red/node_modules/got/dist/source/core/index.js:299:18)
    at checkListener (node:events:274:3)
    at ClientRequest.once (node:events:648:3)
    at new ClientRequest (node:_http_client:239:10)
    at Object.request (node:https:378:10)
    at /var/lib/nodejs-node-red/.node-red/node_modules/agent-base/patch-core.js:25:22
    at Request._makeRequest (file:///usr/lib/node_modules/node-red/node_modules/got/dist/source/core/index.js:963:37)
    at async Request.flush (file:///usr/lib/node_modules/node-red/node_modules/got/dist/source/core/index.js:285:13)

Expected Behavior
I expect the HTTPS requests to not fail.
Steps To Reproduce

Place a HTTP Request node in a flow
Set the URL to any HTTPS:// address
Watch it fail with

Example flow
[{"id":"baee9ee129d73bc2","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"404e5de5a28e8b82","type":"http request","z":"baee9ee129d73bc2","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://www.httpvshttps.com/check.png?1234","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":510,"y":160,"wires":[["ce38ed0de293c386"]]},{"id":"0103d210a29fe545","type":"http request","z":"baee9ee129d73bc2","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://www.httpvshttps.com/check.png?5678","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":510,"y":220,"wires":[["387f6b60222edd8a"]]},{"id":"112085635461616d","type":"inject","z":"baee9ee129d73bc2","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":290,"y":160,"wires":[["404e5de5a28e8b82","0103d210a29fe545"]]},{"id":"ce38ed0de293c386","type":"debug","z":"baee9ee129d73bc2","name":"debug 23","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":780,"y":160,"wires":[]},{"id":"387f6b60222edd8a","type":"debug","z":"baee9ee129d73bc2","name":"debug 24","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":780,"y":220,"wires":[]},{"id":"c8704c6e5d954153","type":"catch","z":"baee9ee129d73bc2","name":"","scope":null,"uncaught":false,"x":500,"y":300,"wires":[["9e4ed109447803bd"]]},{"id":"9e4ed109447803bd","type":"debug","z":"baee9ee129d73bc2","name":"debug 25","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":780,"y":300,"wires":[]}]

Environment

Node-RED version: 3.1.0
Node.js version: 20.8.1
npm version: 10.2.0
got version: 13.0.0
Platform/OS: ArchLinux @ latest everything
Browser: Firefox-developer

Modules installed both globally and inside node-red's path - which does not include got - are at the same version.
I keep an incremental update of my ArchLinux server, but I never really double-check if everything in Node-Red works properly or not afterwards. I am therefore unable to ascertain when exactly this bug happened.
The only thing I am certain of is that everything worked perfectly with the latest possible version of NodeJS, Node-Red and NPM as of the end of the first week of June 2023. This is when I created a few flows that were working then but no longer working now.
Thank you for your time

OK, quick test with Node 16 works correctly

and with Node 18

Hello.
I do have the digitaloak-mqtt.
Will try to disable it

Very well spotted.
Deleted node-red-contrib-digitaloak-mqtt, Uninstalled agent-base and reinstalled the nodejs-node-red package to be sure to have the right versions of everything, and it now works well again.
Thank you very much !


MSFT_xPackageResource.psm1: Fix script analyzer issues

Pull Request (PR) description
Fixes script analyzer issues in MSFT_xPackageResource.psm1
This Pull Request (PR) fixes the following issues

Fixes #487

Task list

[x] Added an entry under the Unreleased section of the change log in
CHANGELOG.md. Entry should say what was changed, and how that affects
users (if applicable).
[ ] Resource documentation added/updated in README.md.
[ ] Resource parameter descriptions added/updated in README.md, schema.mof
and comment-based help.
[ ] Comment-based help added/updated.
[ ] Localization strings added/updated in all localization files as
appropriate.
[ ] Examples appropriately added/updated.
[ ] Unit tests added/updated. See
DSC Resource Testing Guidelines.
[ ] Integration tests added/updated (where possible). See
DSC Resource Testing Guidelines.
[x] New/changed code adheres to
DSC Resource Style Guidelines and Best Practices

This change is

Codecov Report

Merging #534 into dev will decrease coverage by <1%.
The diff coverage is n/a.

@@         Coverage Diff         @@
##            dev   #534   +/-   ##
===================================
- Coverage    74%    74%   -1%
===================================
  Files        27     27
  Lines      4024   4022    -2
  Branches      4      4
===================================
- Hits       3004   3002    -2
  Misses     1016   1016
  Partials      4      4

@PlagueHO , the requested changes have been made. Let me know if this needs anything else. Thanks.

Ready to merge once CI finishes.


Replace weak namespace stripping with smarter rewriting

Instead of "stripping" weak namespaces from all paths, instead rewrite
weak namespaces to be "absolute" by removing namespaces that don't
appear at the binding site for the path.
Fixes #1381.

Oh, oops, it looks like I never ran test_edgeql_ir_scopetree after I got rid of some hacks I used to use the old namespace stripping while doing test setup, so it need a lot of updating

Oh, oops, it looks like I never ran test_edgeql_ir_scopetree after I got rid of some hacks I used to use the old namespace stripping while doing test setup, so it need a lot of updating

I ended up writing https://gist.github.com/msullivan/0d3e3d52b9cca471ddcc29b31cc61def to automate the scope tree test fixing.

I ended up writing https://gist.github.com/msullivan/0d3e3d52b9cca471ddcc29b31cc61def to automate the scope tree test fixing.


pointInPolygon and polygons crosses the ~180 (Opposite of Greenwich)

(you don't have to strictly follow this form)
Describe the bug
Sometimes requires to check pointInPolygon (and potentially other Geo functions) that point in polygon which crosses Opposite Greenwich meridian in Pacific ocean, but this polygons outside the -/+180 boundary. But google maps uses them and generates them.
Example:
Function returns 0 results.
How to reproduce

Which ClickHouse server version to use
<IP_ADDRESS>
Queries to run that lead to unexpected result

Both example points are in polygon, but ClickHouse showing that only one in Polygon
SELECT pointInPolygon((0, -170), [(41.21726864182845, -180), (42.78528336200011, -115.66406250000001), (-11.92471931078849, -100.89843750000001), (-23.29943075461891, -180)]) AS res

┌─res─┐
│   1 │
└─────┘

1 rows in set. Elapsed: 0.002 sec.

SELECT pointInPolygon((0, 170), [(41.21726864182845, -211), (42.78528336200011, -115.66406250000001), (-11.92471931078849, -100.89843750000001), (-23.29943075461891, -211)]) AS res

┌─res─┐
│   0 │
└─────┘

1 rows in set. Elapsed: 0.002 sec.

moreover on example dataset it returns me less point on original polygon, but it ~2x bigger than reduced to 180 degree boundry
SELECT count(*)
FROM ais.messages
PREWHERE ((message_ts >= '2010-10-01 00:00:00') AND (message_ts <= '2010-10-05 08:00:00')) AND pointInPolygon((lat, lon), [(41.21726864182845, -211.99218750000003), (42.
78528336200011, -115.66406250000001), (-11.92471931078849, -100.89843750000001), (-23.29943075461891, -215.5078125)])

┌─count()─┐
│ 2787820 │
└─────────┘

1 rows in set.  Elapsed: 0.503 sec. Processed 88.54 million rows, 1.06 GB (176.06 million rows/s., 2.11 GB/s.)

Expected behavior
If I am trying to find points in polygon then in whole example polygon (up to -211 longtitude) it returns me less vessels than when I am manually limiting polygon up to -180, but polygon ~2x bigger.
Additional context
Not sure how to handle -/+ polygons in Opposite Greenwich in Pacific Ocean

Well, it's expected behaviour for current implementation of pointInPolygon function. It works for points on the Cartesian plane. It's also ok for small polygons on sphere, but for sure won't fork for poles and polygons outside the -/+180 boundary.


Use prettier as linter

This npm module is really helpful for ensuring that all contributors
maintain the same style guide. Prettier auto-formats all code on commit
so that all commit automatically adhere to the the style guide
The config ignores files in the dict and data directory and does not auto-format them. (see the discussion on #33)
More info about prettier at https://github.com/prettier/prettier
I would love to merge this PR in so that future pull requests do not include many style changes

This commit might be easier to review ignoring whitespace
https://github.com/nieldlr/Hanzi/pull/35/files?w=1

@zurawiki happy to merge this when things have been rebased from the latest PR 👍

Rebased. All yours!

This is so great! Tested it locally. Makes following style guides really simple 👍. That pre-commit setup is genius. Merging!


Update eslint, rules, and some style stuff.

Update eslint package, update the 'space-after-keywords' rule to the
new name, and run the lint.
Sorry about the tons of CI builds from this PR, I made a real mess.

Hi Matt, thanks for your pr. I m overseas now and don't have a computer, just an old phone atm. I ll return on 26th October.
I may be able to answer your question regarding exec function if I get a good internet here.
Cheers
Leonardo

@leonardoanalista All good, I figured out my questions (the source was shelljs/global).


Status always showing 'enabled'

I am using clipmenu-git package from AUR, and clipctl status command always shows enabled, even when clipmenu is disabled

Hi! Sorry to be late getting back.
This works fine for me. Maybe you can provide some more detailed repro steps?
clipmenu develop % ./clipctl status
enabled
clipmenu develop % ./clipctl disable
clipmenu develop % ./clipctl status
disabled
clipmenu develop % ./clipctl enable
clipmenu develop % ./clipctl status
enabled


Make column header separators (td border) easier to see in Import Previews

If a project only has 1 row, for example, only the column header row, then the columns themselves are nearly impossible to distinguish.
In fact, the column header row in preview, simply looks like a long line of text.  There is only the default 1 pixel border separator which is basically "invisible".
separating by commas, default border, browser zoomed 200% - and still no column separation visible
(there is actually a very faint 1 pixel default grey line between each column...but not even my screenshot could pick it up!!)

Proposed solution
We should bring a new column header style in the import previews (and maybe export previews, haven't checked).
This style would bring better readability to the column separation, especially when there is no data table with cell bordering to help the eye see the different columns.
border-width and border-color could be applied.
Optionally, perhaps a bit of border-radius could also be used.
border-radius: 5px;
border-width: medium;
border-right-color: royalblue;

improvement of readability for individual columns in header

style and colors can be tweaked, but you get the general idea and can clearly see the distinct columns in the header row in preview.  This style also seems to magically give a bit of 3D effect to column headers, but likely it's a bit too much so fine tuning will likely result in something more acceptable. Acknowledgement - I am not a CSS artist wizard.
Alternatives considered

Additional context

Overall I wonder why we really need such different renderings in the preview stage and in the project view. I could imagine having the same column headers, just without the column menus in them.

I could imagine having the same column headers, just without the column menus in them.

I support unifying the styles, but we're almost certainly going to want import column menus (Don't Import, Import as ..., etc), so might as well plan for them now.


Add chart export background

Type of PR: bugfix
PR checklist:

[x] Addresses an existing issue: fixes #798
[ ] Includes tests
[ ] Documentation update

Overview of change:
Add chart background when exporting
Is there anything you'd like reviewers to focus on?

@thanhlmm can you add a test case for that please? Just to be sure that 1) the change fixes the issue 2) we won't break it in the future. I think you can slightly modify this test case https://github.com/tradingview/lightweight-charts/blob/master/tests/e2e/graphics/test-cases/take-screenshot.js.

@thanhlmm it seems that the test case works fine, probably something is missed?

I added new test case

it seems that the test case works fine, probably something is missed?

Let me explain a bit. e2e tests are screenshots-based tests which are comparing what the library from merge-base commit and from PR branch are generating. Thus, if you fixed something and added e2e test case for that we expect that the tests to be failed as soon as there should be a difference between master branch and your changes. If tests are passed that means that a test doesn't actually check the issue.

Updated. Thanks

Thank you for your contribution!


--exiftool and --update don't catch changes in keyword template

Possibly related, but also I guess more trickier to address, I've noticed the following behaviour:

Run export with update and exiftool and keyword_template = [ "{keyword}", ]
Run export again with update and exiftool and keyword_template = [ "{keyword}", "{label}", ]
The pics are not exported with the new values on keywords
As it is not an actual change of the pic, nor a change of metadata but a change of config/data to export is not detected and processed.

I have a workaround which is to delete the exported files (in batches to run this over several cycles) and run export/update

BTW, I noticed that keyword_template defines the values to be set by exiftool on the keywords and subject fields. I imagine this to be intentional.
Originally posted by @oPromessa in https://github.com/RhetTbull/osxphotos/issues/621#issuecomment-1034167047

Oddly enough with version 0.45.8 I've deleted some pics (115) from one folder/album at the destination to force a re-export with the new template and osxphotos not only re-exported those 115 deleted pics but he found a total of 919 where he updated the EXIF data as per the new template.
For instance under the label Machine it exported 54 pics when Photos reports 3865 pics on the database.
Só version 0.45.8 once it is pushed to update some keywords does go a bit further but not completely.
Hope it helps and not confuses things much.

I think this is fixed in v0.45.9

Actually, don't update yet. I think there's an unrelated bug in that release.

OK, I think it's fixed for real this time in v0.45.10

I'll take a look.  This should have been fixed (I even have a test case for this that shows it's working).  I'll try with your .toml and see if I can figure out what's going on.
I just did a test and it worked as expected:
Clean export:
osxphotos export ~/Desktop/export --keyword-template "{keyword}" --exiftool --db tests/Test-10.15.7.photoslibrary
Processed: 27 photos, exported: 33, missing: 3, error: 1
Run update, no files updated
osxphotos export  ~/Desktop/export --keyword-template "{keyword}" --exiftool --db tests/Test-10.15.7.photoslibrary --update
Processed: 27 photos, exported: 0, updated: 0, skipped: 33, updated EXIF data: 0, missing: 3, error: 0
Add a new keyword-template, some files updated as expected
osxphotos export ~/Desktop/export --keyword-template "{keyword}" --keyword-template "{label}"  --exiftool --db tests/Test-10.15.7.photoslibrary --update
Processed: 27 photos, exported: 0, updated: 6, skipped: 27, updated EXIF data: 6, missing: 3, error: 1
Run --update again, no files should be exported
osxphotos export ~/Desktop/export --keyword-template "{keyword}" --keyword-template "{label}"  --exiftool --db tests/Test-10.15.7.photoslibrary --update
Processed: 27 photos, exported: 0, updated: 0, skipped: 33, updated EXIF data: 0, missing: 3, error: 0

The first run with update option I queried the .osxphotos db and get no data on the metadata field. Is this correct?

Yes, this is correct. The metadata field is only calculated when --force-update is used.
--update and --force-update work differently and should not be used interchangeably -- you should pick one or the other depending on your use case. --force-update forces the photo to be updated if any of the metadata in Photos changes, even if this change wouldn't otherwise trigger an export (e.g. you weren't using --exiftool).  --update only exports the photo if the exported photo is different than the one in Photos or if --exiftool would produce different metadata. In your case, you want --update and it should trigger an update based on the new keyword template.

Thanks... will re-test!

I just tried with your .toml and got the same results you did. So it's something about the combination of options. I'll dig deeper!

With the following .toml iand command-line worked. regexentry masked.
It's possibly one of these entries that generates a different behaviour. Will try to do a couple of more tests...

exiftool_merge_keywords
exiftool_merge_persons
touch_file

[export]
cleanup = true
db = "/Users/Shared/Pictures/iPhoto Shared Library.photoslibrary"
directory = "{album[/,.|:,.]}"
exiftool = true
regex = [ [ "^2000-(...).*/AAF03[5].*", "{album}/{name}"], ]
#keyword_template = [ "{keyword}", ]
keyword_template = [ "{keyword}", "{label}", ]
update = true
verbose = true

osxphotos export ./smalltest/ --db "/Users/Shared/Pictures/iPhoto Shared Library.photoslibrary" --load-config smalltest.toml

It's touch_file.  I found a bug in the logic: if touch_file is True and the touch signatures of source and destination file match, then the file is not re-exported even if the exifdata changed.  It'll take a little work to re-do the logic.
https://github.com/RhetTbull/osxphotos/blob/9c26e5519b2d48f3a0ae80d1cc4a765c12b62d40/osxphotos/photoexporter.py#L1042

Working on a fix but it'll take some time.  The interplay between all these options you're using is ferreting out some bugs in the export logic.  Very difficult to determine if a file should be exported with --update as so many things can affect it: did data in Photos change? Did template change? Did photo get edited? Was touch time update? Was photo converted to jpeg? And every combination of each of these.  osxphotos currently tries to export a photo only if absolutely needed. (e.g. maybe photo wasn't changed but the touch-time changed)  What if user ran with --touch-time then ran again without it?  osxphotos currently won't export the photos all over it'll just fix the touch time.  But this is complicated by all the other options.  It might be easier to export if anything changed regardless of whether it really needs to or not.

No worries and no stress for a quick fix. I have time. And there is always the workaround to delete files on the destination and force
The reason why I use the touch-time is to make sure other apps get the pic 'date taken' right 'cause they some times get it from the modify time of the pic/video for files like mpg (yikes... I'm converting them to mov soon...) the modify date of the file would be the current exported time.
Maybe you could leave it to the user to indicate 'hey keyword_template changed!' to make it re-export... and simplify the osxphotos logic.

Detecting the template change is actually pretty easy (the current export database stores a json string of all the fields sent to exiftool) -- it's the interplay of all the other options that's been tough.  I think I'm just going to rewrite this part of the code from scratch.  As I was looking at the code this weekend there are parts where I have no idea why I did something....not good for maintainability! I'm mapping out all the different options that affect --update and --force-update and will try to come up with some cleaner logic for detecting changes.  Where at all possible, I'd like osxphotos to "do the right thing" even if the user changes export options between updates. But this could take a little while.
--touch-time is definitely a desirable feature so I want to make sure the other options work with it and --update.

Jotting all this down so I don't forget it...  I've been thinking through how to refactor the export code and I think I have a simpler design I can implement.  But--this will likely require some schema changes to the export database and may mean everything gets re-exported the first time you run the new code.  The current export logic is a bit of a mess because it's evolved over time as I've added features that affect --update: --exiftool, --convert-to-jpeg, --touch-time, etc.  In each case, I've tried to adjust the export DB so it doesn't require a new export and "just works" except that now, with some combinations of options, it "just doesn't work".
Here's the current paths a photo can take to get exported (also, yay that Github markdown now supports mermaid:
graph TD
    A[Export] -->B(Convert to JPEG)
    A --> C(exiftool)
    A --> E[Destination]
    A --> D(Touch File)
    B --> C
    B --> D
    B --> E
    C --> D
    C --> E
    D --> E

To properly do --update, --force-update, --ignore-signature, etc. osxphotos needs to know the following information:

Did the destination file change from the last export (e.g. was post-processing done on the file or was the file edited?). If so, osxphotos will re-export the file unless --ignore-signature was specified. (looks at destination file signature)
Is the edited version being exported and if so, was the photo edited in Photos since the last export? (looks at stored file signature of the edited image)
Is exiftool being run? If so, did any of the metadata information that exiftool will write change? Did any of the inputs to this process (e.g. templates, --person-keyword, etc) change?  If so, export the photo.  (Looks at stored json string of the inputs that osxphotos would feed to exiftool which captures both changes in Photos and changes in the command line options/templates)
Is the file being converted to jpeg?  Because this case is covered by step 1 (destination changed), step 2 (photo was edited), step 3 (exiftool also being run), I don't think any additional checks need to be made for this case.  But do need to handle the case where there's a name collision.  E.g. user ran without --convert-to-jpeg and had source images named IMG_1234.HEIC and IMG_1234.JPEG then ran again with --update --convert-to-jpeg, osxphotos will need to know that the existing IMG_1234.JPEG is not the converted version of IMG_1234.HEIC.  It does this by looking up the UUID associated with a destination file in the export database.
Is touch time needed? As long as the stored signature happens after the file is touched (step 1) then no additional check is needed here.  (That's not currently how osxphotos does it so that will be one schema change).  However, if user first ran export without --touch-file then ran again with --update --touch-file, all the files will look different and will be re-exported.  osxphotos currently tries to handle this by computing what the file signature would have been had --touch-time been specified the first time but this over-complicates the code.  I may need to drop this check.  I could add a --touch-only option that doesn't export anything but touches files and updates the database in case user didn't use --touch-file then changed their mind.
In the case of --force-update, need to compare if any metadata for the image changed in Photos since last export.  This is currently done by computing a hash of the json string of all photo metadata and storing that in the database.

Given this logic, I think something like the following should work (pseudo-code):
def should_update(destination):
    if not ignore_signature:
        if not compare_signature(destination, last_signature):
            # destination file doesn't match what was last exported
            return True

    if exiftool:
        if current_exif_data != last_exif_data:
            # either metadata in Photos changed or input templates changed, re-export and run exiftool
            return True

    if edited:
        if not compare_signature(source, edited_signature):
            # edited file in Photos doesn't match what was last exported
            return True

    if force_update:
        if metadata != last_metadata:
            # metadata in Photos changed, force update
            return True

    # photo should not be updated
    return False

Progress!  This test uses @oPromessa 's toml file to run multiple exports whilst editing photos, etc and verifies --update behaves as expected.
[I] ➜ pytest tests/test_cli.py::test_export_update_complex
=========================================================== test session starts ============================================================
platform darwin -- Python 3.9.5, pytest-6.2.4, py-1.11.0, pluggy-0.13.1
rootdir: /Users/rhet/Dropbox/Code/osxphotos
plugins: mock-3.6.1
collected 1 item

tests/test_cli.py .                                                                                [100%]

============================================================ 1 passed in 10.71s ============================================================

This is almost working.  The "should update" logic above misses one case: if user ran export with --exiftool then ran again with --update but not --exiftool, the logic above would lead to skipping the export even though the file should be re-exported (the signature on disk, which is the exiftool signature, will match what's in the database).

I'm almost done with this major refactor of the export logic.  The code is much simpler to understand and will be far more maintainable as well as doing the "right" thing in all cases I can think of.  However, I'm at an impasse with one issue: osxphotos depends on the export database for state information about the export to do --update.  In previous versions, I've gone to great lengths in the code to try to do the right thing if for some reason the the export database was missing and user running with --update.  I think I've found a case where this can be indeterminate and thus may have to drop this "feature" meaning if you delete or lose your export database, you won't be able to do --update without first doing a full export to rebuild the database.  The edge case is this:

User runs with --exiftool --touch-file
User deletes the export database
User runs --update
osxphotos will try to determine if the file is the right file and should be exported by comparing the source file in Photos and the destination file on disk.  The only information it has to do this (without comparing hashes, which could be slower than just re-exporting) is to look at the file signature.  osxphotos currently looks at mode, mtime, and size.  If the mtime is the same (it will be if the source file already matched the touch time) and the mode is the same (very likely) then the only information is the size.  It's very likely the size will be different due to running --exiftool but it is possible to run exiftool and have the new file size the same.  In this case, the file won't be updated even though it should be.

I think the only safe solution to guarantee the integrity of the export is to remove the code that attempts to rebuild the export database and just require the user to do a full export if the export database is lost.

I'd agree.

one could maybe have an option to rebuild the lost database and then run --update -- but from what you explain that won't be possible.

So I'd go with a full re-export.
Wondering:

Would the re-export overwrite files and keep the same name or create '(1)' files and would require a second run to establish the base file name?

workaround would be to delete the destination files.

the option --limit on each run (#592) could be interesting?

simple workaround is to use --from-date and select batches of pics/year to export. Cannot be used with --cleanup!!

Would the re-export overwrite files and keep the same name or create '(1)' files and would require a second run to establish the base file name?

It will by default add (1), etc. to each file unless you specify --overwrite
You can also run --update --cleanup twice to get the same result (this of course results in redundant exports.  The first cleanup deletes the pre-existing files and the second --update will use the now available original names and --cleanup will delete the files from the last --update.

All tests passing!
====== 1192 passed, 13 skipped in 554.38s (0:09:14) ======
If you want to give the new version a try, it's in the exportdb_refactor branch
I want to do some more more testing with my own library before releasing but all the tests are passing including a couple of complex --update, and --force-update cases built specifically to catch the errors for this issue.
Also, this release adds a new (hidden) exportdb command to osxphotos for doing maintenance on the export database.  For example, you can use osxphotos exportdb --check-signatures to find any exported photos with a signature different than what's in the database or osxphotos exportdb --touch-file to update the touch time for all photos.  This is useful if you used --touch-time previous to this version as it'll prevent osxphotos from re-exporting everything when you run --update.   The export database also now saves the configuration for the last 10 exports and you can recover the most recent (in case you didn't save the toml file) with osxphotos --save-config config.toml.
If you're going to try this version, I recommend you backup your export database as osxphotos will migrate the database to a new schema and this cannot be rolled back.
$ osxphotos help exportdb
Usage: osxphotos exportdb [OPTIONS] EXPORT_DATABASE

  Utilities for working with the osxphotos export database

Options:
  --version                  Print export database version and exit.
  --vacuum                   Run VACUUM to defragment the database.
  --check-signatures         Check signatures for all exported photos in the
                             database to find signatures that don't match.
  --update-signatures        Update signatures for all exported photos in the
                             database to match on-disk signatures.
  --touch-file               Touch files on disk to match created date in
                             Photos library and update export database
                             signatures
  --last-run                 Show last run osxphotos commands used with this
                             database.
  --save-config CONFIG_FILE  Save last run configuration to TOML file for use
                             by --load-config.
  --export-dir DIRECTORY     Optional path to export directory (if not parent
                             of export database).
  -V, --verbose              Print verbose output.
  --dry-run                  Run in dry-run mode (don't actually update
                             files), e.g. for use with --update-signatures.
  -h, --help                 Show this message and exit.

I've done enough testing with v0.46.0 to feel confident enough to release.  I've tried every edge case & combination of options I can think and the export logic appears to be working. Let me know if you still have any issues!

v0.46.1 also adds a --ramdb option to load the export database into an in-memory database during export which may improve performance over a slow network drive. However, I've also added other sqlite optimizations so if you use a local (on the Mac, not network) database, I'm not sure how much difference this will make.


Block height is always reported as 123?

using the api returns a sensible height, but the UI seems to report 123? It's the value next to your balance on the overview page.

I think API.md is out of date- which call gives the block height?

it's in /consensus/status, the value is Height


[Feature Request]: Add transition to  FAQ section

Is there an existing issue for this?

[X] I have searched the existing issues

Feature Description
I want to add transition to the FAQ section to make it look visually more appealing
Use Case
This enhances the UX of the website.
Benefits
No response
Add ScreenShots

Priority
High
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[X] I have starred the repository

can you please assign this issue to me i would like to work on it.

I would like to work on this, kindly assign me this issue.


Run command on different server

Hi,
please, is it possible to somehow run command on different server? I have for example task database:sync which I run like this
$ dep database:sync test

I have two servers defined:

production
test

Now I would like to connect to production, create database dump, download it and then upload it to the test server.
If it is not possible (maybe yet :smile:), is there at least some workaround please?
Thank you

Ou.. I just found #355 so I'll try the suggested solution. Sorry if this is a duplicate

So I tried onlyOn method, but that will only run task if given server name (from command) is same

You can set dumping by onlyOn on prod server.

@davidkudera
Can you try?
task('database:dump', function(){
    // TODO: dump and download
})->onlyOn('production');

task('database:restore', function(){
    // TODO: upload and restore
})->onlyOn('test');

task('database:sync', [
     'database:dump',
     'database:restore',
]);

server('test', '<IP_ADDRESS>', 22)
    ->user('your_user')
    ->identityFile()
    ->stage(['dev'])
    ->env('deploy_path', '/var/www/apps/your_app')
    ->env('branch', 'master');

server('production', '<IP_ADDRESS>', 22)
    ->user('your_user')
    ->identityFile()
    ->stage(['dev'])
    ->env('deploy_path', '/var/www/apps/your_app')
    ->env('branch', 'master');

and run:
dep database:sync dev -vvv

Goodluck!

@oanhnn that's what I tried :wink:
task('database:dump', function(){
	write('DUMPING...');
})->onlyOn(['production']);

task('database:restore', function(){
	write('RESTORING...');
});

task('database:sync', [
	'database:dump',
	'database:restore',
]);

output:
✔ Executing task database:dump
➤ Executing task database:restore
RESTORING...✔ Ok

@davidkudera
With your case, please try my script.
Your script missing ->onlyOn('test') and settings server stage dev

@oanhnn I didn't noticed your stage setup, sorry...
So with that setup:
localServer('production')
	->stage(['dev', 'david_work', 'test']);

localServer('test')
	->stage(['dev', 'test']);

localServer('david_work')
	->stage(['dev', 'david_work']);

task('database:dump', function() {
	write('DUMPING...');
})->onlyOn(['production']);

task('database:restore', function() {
	write('RESTORING...');
})->onlyOn(['test', 'david_work']);

task('database:sync', [
	'database:dump',
	'database:restore',
]);

I was able to run all tasks like I needed. The only problem is, that it looks quite difficult to just run some task on different server :wink:

I think it will be easy if you split it into 2 standalone works
Good luck

I am closing thing issue but feel free to reopen if you think there needs to be more discussion.

What do you think about some other option? Somehing like runAt for example.. Because now if I'll want to add another server, I'll have to update production configuration which btw seems little strange to me and database:restore task too.
And thats just one task. Later I'll have to add another similar task for downloading some uploaded files (like user's profile images, etc.).

runAt pretty much onlyOn.

@elfet Yeah, I know sorry.. But you know what I meant, right? :smiley:

I found another flaw. Every other task needs to have onlyOn options too, which is not so nice :disappointed:
Also I can't reopen this issue (but maybe it's issue just for me....)

What do you mean? Can you show example?

Sure, I just added a new task database:migrate to database:sync for running doctrine migrations, but it throw an error for this command:
$ dep database:migrate test

I just forgot to set onlyOn on that new command, which is my mistake. Problem is that our old deployment (also written in deployer) has about 30 tasks and the new version which is written from scratch is much more complete... So you just have to think about it every time and if you'll forgot... Well.. I can lead to unexpected results or break something completely.

You need understand what task you running on which server. What you suggest to avoid this?

No no, I understand.. But lets see an example:
You have many servers and one of them is production. Now you want to be able to download database from production to any other server at any time.
localServer('production')
	->stage(['production', 'test1', 'test2', 'test3']);

localServer('test1')
	->stage(['test1']);

localServer('test2')
	->stage(['test2']);

localServer('test3')
	->stage(['test3']);

No you want to sync database at test2:
$ dep database:sync test2

And tasks are:
task('database:dump', function() {
	write('DUMPING...');
})->onlyOn(['production']);

task('database:restore', function() {
	write('RESTORING...');
})->onlyOn(['test1', 'test2', 'test3', 'test4']);

task('database:migrate', function() {
	write('MIGRATING...');
});

task('database:sync', [
	'database:dump',
	'database:restore',
	'database:migrate',
]);

Now you want to add another task, which shouldn't run on production, so you'll set onlyOn (if you'll not forgot). Then you'll want to add another independent testing server = you have to update all of these tasks above with production server too (same for removing, updating, ...).
I suggest something like this:
task('database:dump', function() {
	write('DUMPING...');
})->runOn('production'); // with better name of course

task('database:restore', function() {
	write('RESTORING...');
});

task('database:migrate', function() {
	write('MIGRATING...');
});

If I'll run dep database:sync test2 and I'll not have any stages configured (I don't otherwise need them) it will run database:dump automatically and always on production server.
Also I could leave onlyOn configuration on database:restore task because I can watch myself to not run dep database:restore on production.
onlyOn is just some kind of filter, nothing more (I think). runOn on other hand starts task always on given server. No matter on which server or stage you actually started your tasks.
And finally adding new tasks or servers is simple again :wink:

I understand, but this is really complicate Deployer itself =)
It's better to configure your scripts to avoid this problems.

Ok, I'll try it, thanks anyway

Sorry that I'm again reacting here... But it just seems impossible to do what I need.
In previous example when I'll run dep database:migrate test2, it will run on both test2 and production, which is exactly what I don't want.
I just can't find any combination of server names, stages and onlyOn options to make it work

Ehm, what if I'll prepare a pull request and than you'll see? You know I'm trying so hard, because I really don't want to switch to some other tool (read worse tool). Also I don't think that it will complicate Deployer any more by looking at the code.

@davidkudera
I think with your case, we can using:
task('database:dump', function() {
    write('DUMPING...');
})->onlyOn('production');

task('database:restore', function() {
    if ('production' == input()->hasArgument('stage')) {
    // or
    // if ('production' == env('server.name')) {
        return;
    }
    write('RESTORING...');
});

@oanhnn sure, I can, but it is not better than some combination of stages, servers and onlyOn options. Just imagine how the code will look like if more tasks have such otherwise useless code. Like I said, our deployment is pretty complicated and I just love the simplicity of docker - compare it with for example rocketeer...
Also I tried to use all of your suggestions, but really soon (just in minutes) I run across another problem. The bigist is that any developer can forgot to put such code in tasks and that can lead to really large problems.
We can either make it little bit more dificult for developers with similar problem, or we can add new feature. So please, may I ask you to look at #413?


Feature: Advanced UI

This PR implements

all use cases in Advance UI including,

Set Display Message
Get Display Message
Clear a Display Message
Show EV Driver Running / Final Total Cost During / After Charging Show EV Driver-specific Tariff Information
Update Tariff Information During Transaction
Configure Fallback Tariff Information & Total Cost Message (Covered by Set Variable, no need to implement)

a Tariff workaround which supports calculate total cost

Local tests
Use wscat to test display messages related as well as show specific tariff use cases. Use EVerest for other use cases.
Set Display Message

send a invalid request body contains invalid value in field “language“ from postman

{
  "message": {
    "id": 0,
    "priority": "AlwaysFront",
    "endDateTime": "2024-04-01T00:00:00.000Z",
    "message": {
        "format": "ASCII",
        "language": "sth??",
        "content": "This is a test message."
    }
  }
}

returns not success and the error message

{
    "success": false,
    "payload": "Language shall be specified as RFC-5646 tags, example: US English is: en-US."
}

send a valid set display message req without start date time
the start date time is auto generated in the request and charger receive it

send a response from the charger. Then if the status is accepted, citrine sends a get all display messages request to the charger.

Get Display Message

send a request from postman and received by the charger

send NotifyDisplayMessagesRequest from charger
[2, "e328fcbf-aa7d-4057-9117-e180b184a210", "NotifyDisplayMessages", {"requestId": 1, "messageInfo":[{"id":1,"priority":"AlwaysFront","endDateTime":"2024-04-01T00:00:00.000Z","startDateTime":"2024-03-28T19:08:08.519Z","message":{"format":"ASCII","content":"This is a test message."},"display":{"name":"MonitoringCtrlr"}},{"id":2,"priority":"NormalCycle","startDateTime":"2024-03-28T19:08:08.519Z","endDateTime":"2024-04-01T00:00:00.000Z","message":{"format":"ASCII","content":"This is a test message."},"display":{"name":"MonitoringCtrlr"}}]}]
charger receive the response

the messages are stored in db

Clear a Display Message

send a clear request from postman and charger receive it

send a accepted response from the charger

citrine marks all active = true messages on this charger to false in db and send a get all messages req

Show EV Driver Running Total Cost During Charging
Send CostUpdatedRequest every minute

CostUpdatedRequest is sent every 60 seconds

cost not send in the TransactionEventResponse when use costUpdateInterval.

Alternative scenario: update cost when receiving TransactionEventRequest (eventType=Updated)
after receiving the transaction event, citrine calculates by all meter values of this transaction and return the total cost in response.
Show EV Driver Final Total Cost After Charging
After stop the transaction (EVDisconnected), returns the final cost.

Show EV Driver-specific Tariff Information
charger send a authorize request and then citrine set the tariff info in the response if the id token is accepted. (To simplify the test, I change the code in the handler temporarily to force id token status always to be accepted.)

Update Tariff Information During Transaction
after receiving TransactionEventRequest (eventType = Updated) , citrine should check if there is updated tariff and send it back to charger. Since we don’t have such a case, I currently just print a log here.

Create/Find/Delete Tariff

create new tariffs using the data endpoint and store in db

get tariffs using unit(KWH)

get tariff using station id (cp001)

get tariff by id (3)

delete a tariff by id (3)

Good start! There are some changes I'd like; see review comments.

Thanks a lot Thana! The feedback is very helpful! I updated the code. Pls let me know if there are any further comments.

Local test on partial use cases:
Update cost interval

Show specific tariff


Ability to pass default values to query parameters

In the yaml configuration, it would be great to pass a default value if required by the user.
For example,
url-path: /test
request:
  - field-name: country
    field-in: query
    required: true
    description: Counry name like Germany, France, etc.
    default: Germany # default value
    field-type: string

Please have a look at commit [Make it possible to add default values to request fields]. Does this work for you? (https://github.com/DataZooDE/flapi/commit/0e11ac00445ada4aed2156f09e2a833b97a74f96)

Thanks it works.


Rounded corners on circle

Is there a way to round the corners on the circle? For instance something like this. Thanks!

I added this line to the library:
this.path.style.strokeLinecap = 'round';

And it workes, but it'd be nice to have that as an option :smile:

This is something I implemented but removed since it was hard to implement for e.g line. The rounding cap goes out of the canvas with Line. Do you have ideas how to overcome that issue?

I don't sorry, canvas ain't my thing :smile:

The implementation is using just SVG, and was talking about SVG's canvas. I'm open for ideas from anyone.

Closing this for now. You can achieve this by setting the style manually as mentioned above:
var bar = new ProgressBar.Circle('#container');
bar.path.style.strokeLinecap = 'round';

Is there a way to increase the radius of strokeLinecap


Feature/get page

PortalBrowser

Inherit ShibbolethClient
Return Singleton object against following params

username
password

Not support asynchronous

Why should be synchronous?
requests module is not design for async. So if this support async, we should find out the module to obtain network resources like requests which supports asynchronous function.

stop merging for now

discard


Feature/1 setup GitHub actions pipeline to build and publish package to npm

Added pipeline that runs on main push to build components and publish them on NPM.
Changes

Added new build & publish pipeline (publishes to NPM)

Checklist

[ ] Changed e2e tests
[ ] Changed unit tests
[ ] Successfully executed unit tests locally
[ ] Successfully executed e2e tests locally
[ ] Ran linter
[ ] Bumped version

Closes #1
@PlanBGmbH/flinkey-web-components

This currently only includes the publishing. That's the thing I mentioned yesterday:
You need to ensure, that you update and commit the package.json first in the workflow before submitting the package. Otherwise you get a conflict on NPM a package with this version is already published.

Also: your workflow says master as trigger. Should be changed to main ;)

This currently only includes the publishing. That's the thing I mentioned yesterday:
You need to ensure, that you update and commit the package.json first in the workflow before submitting the package. Otherwise you get a conflict on NPM a package with this version is already published.

Yes, I'll check this.


Project Settings | Window | Stretch | Mode | 2d not working?

I've created a project that will ultimately target a rpi4 and a 1920x1080 monitor. It's purely a UI project (top level tree node is a Control) and it's been designed with a width/height of 1024x576 (same aspect as 1920x1080).
I've set the project's Stretch Mode = 2d with various settings of Aspect and set Fullscreen = true. Running the project on a Windows PC, my UI is scaled up and shown fullscreen as expected. However, when I export the project for the rpi4, it results in the UI not being rescaled. I that case, it just covers 1024x576 of the full screen (anchored to the upper-left of the monitor). If I set the width/height of the project to 1920x1080, I do get a full-screen view on the rpi, but then all of my UI text is too small (as expected).
So, it seems that the 2d scaling isn't working correctly here. I guess I don't know if the problem is specifically related to this rpi export template or whether it's more generally Linux related as this is this the only Linux export I've done.
Also, in case it's helpful, I'm starting the Godot app on the rpi (from an SSH terminal) as follows:
sudo xinit /path/to/my/project.x86
Any input appreciated.

I was able to resolve (more accurately, work around) this issue by setting the test width and test height to my monitor's resolution - as described here:
https://github.com/efornara/frt/issues/17
Closing this issue.


jupyter ctrl-z behavior is insane

please reopen 150145 and mark p1
the current jupyter behavior is:

i'm happily typing in a cell.
click ctrl-z to undo something in that cell
unknown to me, the editor has shifted focus to the whole document instead of the cell
ctrl-z appears to undo the most-recent "create cell" which isn't even in the viewport
i refocus on the cell i'm working on, and keep typing
much later, i notice the far-away deleted cell, and it is seems impossible to undo the undo?

this certainly violates the principle of least surprise.
how about not taking actions that aren't in the viewport?  confirming before deleting a cell full of stuff?  making it possible to recover?  disabling the "document-like" behavior at the top level altogether?

Sorry you are running into this issue.
Whats the value for the following setting?

That box is checked.


⚠ Bofrost.de has degraded performance

In 0b652cf, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1152 ms

Resolved: Bofrost.de performance has improved in 139ff5b after 6 minutes.


QEOM energies differ for Statevector and Qasm simulator

Information

Qiskit Aqua version: 0.8.1
Python version: 3.6.8
Operating system: Ubuntu

What is the current behavior?
For H2 molecule QEOM excited state energies differ running with Statevector and Qasm simulators.
Steps to reproduce the problem
Please, run the gist
What is the expected behavior?
Close excited state energies
Suggested solutions
Seems like the problem is somewhere in eval() method, but I'm not sure about that.

This issue seems to have been solved as a side effect of the new Qiskit release.
The problematic methods for this issue (eval_op() and evaluate_operators()) have been deprecated and replaced.
The new behaviour of the QEOM calculation does not show this difference between the noisy and state vector "backend" (this has also been replaced): see this gist

Thank you, Anthony! :+1:


inventories are gone since i installed the plugin meaning 4 weeks of stuff gone in seconds fix also xp and bal staying the same in all worlds

Kinda. Players will retain the inventory that they had in the world that they were in when you removed the plugin. If that's not an issue, then yes.
Originally posted by @drbot7 in https://github.com/EbonJaeger/perworldinventory-kt/issues/229#issuecomment-751164414

how do i fix this issue of it not saving the old inventories and also fix the eco and xp saving across all worlds

so inv fixed but now the problem is still with eco and xp still


Update dev slides

@cmonjeau great work. Please ping me if you don't have any pending changes!

Hi @bgruening @abretaud
I tried to fix travis errors and there are some 'time out' when it checks some URLs
 got a time out (response code 303)
Any ideas?

Oh it's ok now. Thanks @abretaud for relaunching travis.

@cmonjeau thanks, I still see the source map files though.

Hi @bgruening @willdurand. Thanks for the review.
I added these files because on firefox, I've an error without them.

Server running... press ctrl-c to stop.
[2018-02-09 08:05:50] ERROR `/training-material/assets/css/bootstrap.min.css.map' not found.

I don't understand why we should delete them... :(

@cmonjeau works for me locally. Can you run make build again?

Hi @bgruening ,
It seems to work after the build. I forgot about that stage.  Sorry

No problem. Thanks a lot for your contributions!


Nav Bar || Search Bar

This component requires the search-suggestion-panel component as a dependency.
Component tree

search-bar

input(.search-bar__text)
img(.search-bar__icon)
search-suggestion-panel(.search-bar__dropdown)

Requirements:

Create a branch off of master and make a PR to master
Should be responsive as rendered in the design specks
Should implement typeahead/autocomplete feature. For now, it can consume some JSON residing in the component itself, which will be made dynamic at the time of integration.

Taking this.

@reynard2007 You can pick this up, however, this component would require search-suggestion-panel to be built first. So, may be you can pick first that or any component that depends on. Once you are done with them, you can pick this one as soon as you are done with that.

Thanks, @vikasrohit. I didn't realize that. Are you referring to Issue #7?

@reynard2007  Sorry for any confusion. However, basically one has to pick first all those components which does not depend on any other component e.g. panel, dropdown, std list item etc. Once they are done (PR is generated and merged), anyone can start on components that are using them. We would try to be as fast as possible to review and merge the PRs. Even though if we have some minor issues/things to be fixed in that PR, we can close it for the sake of unblocking other components and ask you to fix those missing pieces in the same PR.

Got it. I'll take #4 then since it appears to be a generic component.

Taking this again.

@reynard2007 it seems the watermark text, when user types something in the text box, is not aligned with what user is typing. Can you please take care of it?

Made the fix already. I also changed the StandardListItem labelText propType to PropTypes.node to allow us to use a span DOM node for the emboldening effect on matching searches.

Closing task. Thanks @reynard2007 for your hard work.


update the italian localization

little update for the new v0.952

Many thanks again for the localization update :)


Run code analysis automatically via GitHub Action

Added a GitHub Action that will automatically run phpstan and ecs code quality tools on pushes to the develop branch.
This likely could easily be extended to run unit tests on pushes as well (see the notes in the .github/workflows/code-analysis.yaml file)
It should be a simple copy pasta to add this to your other plugins, but that's left as an exercise for the reader

One thing I should have mentioned in this initial PR is that these inspections do not, and can not, alter the code in any way.
The repo is checked out in a container running in the cloud, the inspections are done there, and then the containers are discarded. Nothing is ever checked back in to the repository.
They are merely pass/fail tests that will be run on any PR or push, as an indicator to you that something is amiss.

Thanks!


Floating hint now shows for Material and Metro PasswordBox

Something I noticed while playing with the recent changes that introduced the PasswordBox field.

@rc201612 Good catch, thanks!


Widget wrong visualization with django-recurrence + django-admin-bootstrap

As per title, when trying to use the two together, I obtain this:

Basically, the widget is rendered under the other parts of the form, and I'm unable to fix it without messing up with the css code... I don't know if I'd rather ask django-admin-bootstrap developers, but I hope you can point me somewhere with this. Thank you for your help!

Just in case anyone else is interested.
Here you can find my open-to-improvements solution: https://github.com/douglasmiranda/django-admin-bootstrap/issues/59

Marking as closed - I'm open to re-considering this, but for now, let's just ensure django-recurrence works with the vanilla admin, rather than the various admin skins.


expose variables in the EmailEditor page for extensibility

To enable custom validation on the recipient address fields (using a page extension with OnValidate and OnAssistEdit triggers for the To,Cc,Bcc fields), I moved the variables that retain the information into the protected scope.

@JesperSchulz  is there anything on the roadmap for setting CCs and BCCs automatically per Email Scenario given that exposing the Codeunit is not an option? The company I work for is implementing BC as our ERP, but we're a Google shop so we'll use SMTP for sending emails. In our case, we would like to copy the "from" field as BCC so we have a copy of the email in our mailbox.

@leonardo-matta, the related PR #12867 should be able to open up for your scenario :-)

@leonardo-matta you can do that by implementing your own connector that can edit the message and pass it to SMTP connector to send it. The related PR #12877 will not help your case.

Thanks, guys.


local-preview cannot create run

> spacectl -v spacectl version 0.30.0
Getting this error when trying to execute a local-preview:
> spacectl stack local-preview --id github-private Packing local workspace... Uploading local workspace... 126.48 KiB / 126.48 KiB [-----------------------------------------------------------------------------------------] 100.00% 271.54 KiB p/s 700ms 2024/04/09 15:50:15 could not create run: could not persist run: commit author name must not be empty
I can confirm the author name is set globally in my git config, not sure if there are any configuration steps I'm missing. Can execute other commands in the spacectl (list stacks, etc), so I'm definitely logged in and the token is valid.

We are aware of this regression. It covers users for whom the IdP connected to Spacelift does not return a full name (or else, returns an empty string). This is not a spacectl issue per se, this is an overly strict backend validation. Please stay tuned for the fix, and apologies for the inconvenience caused.

No worries -- appreciate the response! 😄

@wjbabicz We've addressed the regression on the backend side. Please check if the issue has been resolved.

@TheMacies Looking good! TYVM


build 0.18b for Python 3.7

Checklist

[x] Used a fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[x] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

this should go into a branch called 0.18b.
There is a pretty annoying bug that was introduced (see this discussion) after 0.18b which breaks https://github.com/Microsoft/qmt and the downstream (private) packages for Python 3.7.

Hi! This is the friendly automated conda-forge-linting service.
I was trying to look for recipes to lint for you, but it appears we have a merge conflict.
Please try to merge or rebase with the base branch to resolve this conflict.
Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug.

@conda-forge-admin, please rerender

@conda-forge-admin, please rerender

@conda-forge-admin, please rerender

@conda-forge-admin, please rerender

@conda-forge-admin, please rerender

Hi! This is the friendly automated conda-forge-webservice.
I tried to re-render for you, but it looks like there was nothing to do.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@conda-forge-admin, please rerender

Hi! This is the friendly automated conda-forge-linting service.
I was trying to look for recipes to lint for you, but it appears we have a merge conflict.
Please try to merge or rebase with the base branch to resolve this conflict.
Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug.

@conda-forge-admin, please rerender

Hi! This is the friendly automated conda-forge-webservice.
I tried to re-render for you, but it looks like there was nothing to do.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@conda-forge-admin, please rerender

Not sure what you are going to try here. Updating boost needs some more work here:https://github.com/conda-forge/coin3d-feedstock/pull/14
For qt5.9 everything should be ready, but I am currently testing the builds and see some crashes... You can install 0.19 development packages via channel freecad/label/dev (qt.5.6) and via channel freecad/label/testing (qt.5.9)

@looooo, thanks for taking a look!
I am merely trying to build 0.18b for Python 3.7 because that still had Open Cascade 7.2.0.
Unfortunately, we need that version of Open Cascade because of this bug.
OTOH it might be possible to build 0.18 with Open Cascade 7.2.0 too, but probably you understand that a whole lot better than I do. Do you think that's possible?

This sounds like a very difficult task. I guess the easiest way to get this done is:

build occt 7.2 with latest tools
build netgen with occt 7.2
build smesh with occt7.2 and netgen
build freecad with occt7.2 and d esh

I don't think using older builds will work out of the box. At least this is not something I would like to work on. No chance this can be fixed by a patch?

I tried to build freecad with occt7.2 but failed with:
conda.exceptions.UnsatisfiableError: The following specifications were found to be in conflict:
  - occt=7.2
  - python=3.7
  - smesh

https://circleci.com/gh/looooo/freecad-feedstock/290
So the problem here is that smesh-occt7.2-python3.7 and netgen-occt7.2-python3.7 is missing. So at least netgen, smesh and freecad have to be rebuild. I guess the easier solution is using python3.6 + occt7.2 for now and try to get the issue fixed in the next occt-release.

@looooo, actually there is a patch now!
If I apply it to occt, I would need to rebuild, netgen, then smesh, and then FreeCAD, is that right?

Hmmm, I guess it's best to try first locally if only rebuilding occt works already.


cli: Add ability for autofmt to read stdin

This change adds the ability for autofmt to read from stdin by using -f - or --file -

(clippy failure is unrelated)


[BUG] Sometimes statefulset data gone after node(volume attached to) network reconnect

Describe the bug
Sometimes statefulset data gone after node(volume attached to) network reconnect
Not every time but can reproduced
To Reproduce
Disconnect script

Launch Longhorn.
Use statefulset launch a pod with the volume and write some data.
Disconnect the node that the volume attached to for 100 seconds.
Wait for the node back and the volume reattachment.
After the volume is reattached, the pod will be automatically deleted and recreate.
Verify the data and the pod still works fine.
Repeat step 2~6 for 3 times.
Create, Attach, and detach other volumes to the recovered node. All volumes should work fine.
Remove Longhorn and repeat step 1~9 for 3 times.

Sometimes after node reconnect, from UI can observe all replica change from failed to running, and pod data will gone ( in my case , file still exist)
Expected behavior
Data should kept
Log or Support bundle
longhorn-support-bundle_5a3f78ed-079d-45b1-82e4-d56567ed73e2_2022-10-05T12-32-09Z.zip
Environment

Longhorn version: v1.3.2-rc1
Installation method (e.g. Rancher Catalog App/Helm/Kubectl): kubectl
Kubernetes distro (e.g. RKE/K3s/EKS/OpenShift) and version: k3s

Number of management node in the cluster: 1
Number of worker node in the cluster: 3

Node config

OS type and version: ubuntu 20.04

Underlying Infrastructure (e.g. on AWS/GCE, EKS/GKE, VMWare/KVM, Baremetal): AWS
Number of Longhorn volumes in the cluster: 1

Additional context
https://longhorn.github.io/longhorn-tests/manual/pre-release/node/node-disconnection/ case 3

Hi @derekbit ,
Data always retained if I run sync in container before network disconnect, even after reconnect all replica failed then become healthy, the data still kept, thank you

Yeah, seems like data has not flushed to disk yet in the original reproducing steps. Great observation, @derekbit

Clarified with Chris and Derek. What Chris did for each iteration is independent, so if encountering no flush, the file would be created but w/ empty data.
This is more about the application's responsibility to ensure data sync or rely on the system default setting, so it's intended.


Funcsharp without covariance + bumped packages

Description
Bumps Funscharp version.
Fixes #issue
Type of change

[ ] Bug fix.
[ ] Feature.
[ ] Consolidation.

Checklist

[ ] Is breaking change.
[ ] Documentation updated.
[ ] Tests included (please specify cases).

Hmm, this will leak the preview build of FuncSharp to all Mews.Fiscalization consumers. Do you want that? OTOH I don't know how else to do this than making this preview as well


C# - insert auto comment when close brackets

Hi CC Team
In VB, just to look at the code and you already know where the end blocks. In C#, depending on the amount of braces, you must pass the mouse over each brace to make sure what is the end of the block.
I believe that a auto comment option would be useful to facilitate the reading of the code and its maintenance:
 } // end if(...
} // end foreach(entities...

} // end using(dbcontext...
} // end void routine
To avoid pollution visual, the auto comment will do your work only when the open brace is far away, maybe 20 rows of distance, configurable.
Thanks for your time, and sorry my poor english.

@midnait Do you know this plugin: https://visualstudiogallery.msdn.microsoft.com/e792686d-542b-474a-8c55-630980e72c30 Maybe can help you with this.

@carloscds tks, but this dont avoid rolling up screen or move mouse over }

@midnait Sorry for confusion, the correct plugin is Productivity PowerTools: http://blogs.msdn.com/b/visualstudio/archive/2013/12/19/productivity-power-tools-for-visual-studio-2013.aspx
It has a funcionality that when you put your mouse over '}' show begin of block.

Personally, I hate the use of comments here. It screams that the code should have been refactored into smaller more manageable chunks, much in the same way that regions are an anti-pattern to many. IF we have to provide this refactoring, I would recommend one that does the opposite - remove trailing comment trivia from end brackets.

I also don't like it, because it changes the code. And because if you change the condition for the if, for example, it will not automatically change the comment, we would have to run it again. If there is another extension that solves the problem without changing the code, and it's there as Carlos pointed out, I would prefer it.
I agree with Jim that such code is screaming for a refactoring, but these codes exist, and maybe we can help. I just don't think an analyzer is the best way to solve this problem. After dwelling on this idea for a while, I believe we should not do it.

@giggio @jwooley Visual Studio Productivity Tools has this functionality. My suggest is close this issue.


getTypeAtLocation fails for module-functions re-exported to global scope

TypeScript Version:  3.7.0-dev.20191002

Search Terms: package module global export
Code
The repro requires multiple files.
If I have a TypeScript project which, in an ambient TypeScript file, imports from a module and then re-exports a portion of the module into the global-scope, when I use the re-exported portions of the module through the global-scope getTypeAtLocation returns a type of any (with intrinsicName set to "error", if that means anything) for the functions.
The module I would like to make available through global-scope, node_modules/demo-package/index.d.ts:

export declare namespace Foo {
    /**
     * A function for doing cool things
     * @param p a parameter
     */
    export function bar(p: string): string;
}

The import-then-declare-globally of the demo-package (made available through the typeRoots option of my tsconfig.json) node_modules/type-roots/custom/index.d.ts:
import {
	Foo
} from "demo-package";

declare global {
	export {
		Foo
	};
}

And then in the file which uses the global-import main.ts:

import * as demo_package from "demo-package";

export function main() {
    Foo.bar("hello"); // inferred type of 'bar' is any
    demo_package.Foo.bar("goodbye"); // inferred type of 'bar' is string->string
}

Expected behavior:
I expected both functions referenced in the main function above to have the same inferred type. This worked in TypeScript 3.6 and earlier.
Actual behavior:
Calling getTypeAtLocation on the first Foo.bar in main returns any.
Demonstration use of TS APIs: https://github.com/aslatter/ts-demo-global-error/tree/127785c2204cbf6e60163bfebbb74b4738e85f0f
The 'input' folder represents the demo program above. The 'processor' folder attempts to use TypeScript APIs to call getTypeAtLocation on the two functions used in main.ts.
To run the demo program, check out the repo and then:
cd processor
npm install
npx tsc -p .
node out

Playground Link:
Related Issues:

A couple of work-arounds I'm going to experiment with.
Setting up the augmentation of the global-scope like this:
import {
	Foo as FooImported
} from "demo-package";

declare global {
	export const Foo = FooImported;
}

Or this:
import {
	Foo as FooImported
} from "demo-package";

declare global {
	export const Foo: typeof FooImported;
}

While we shouldn't crash on it (so this is still an issue), for your own reference,
import {
	Foo
} from "demo-package";

declare global {
	export {
		Foo
	};
}

isn't a valid global augmentation. It reports Exports and export assignments are not permitted in module augmentations..

Okay, I'll take this as an opportunity to move to something supported.
If its helpful, I think I was using export instead of the alternatives I mentioned because it made for a better in-IDE experience as it pulls along the documentation for the root element.

More details on why I thought export was a good idea: at the time I wanted to make a class globally available, and export pulls across the type the constructor and the documentation all in one go, which was super handy.
I'm not trying to make any classes globally-available any-more so I'm okay with the alternate approaches.


Update mapbox app guide for latest version

Updates the Mapbox native app quickstart guide to reflect installation and usage using the latest version of the Mapbox app. There were two major changes to the app which require updating this quick start guide:

The previous version of the app involved a manual post-installation setup process. This process now uses the config/setup SDK and is automated via some dialogues in a streamlit app. The installation instructions in the guide now reflect this change.
The previous version of the app created UDFs, whereas the new version creates stored procedures as the main interface/API offered by the app. The guide is now updated to contain information about these interfaces, as well as examples of how to use them

@sfc-gh-obielov @ianshward Pl add "Conclusion And Resources" as the last step. See https://quickstarts.snowflake.com/guide/getting_started_with_snowflake_arctic/index.html#5 for reference.

@ianshward to address above comment, could you add the following contents to the end of the quickstart: https://docs.google.com/document/d/1tNbB0Dzuw84MsfXnlfb0qw67WOi5wnOnNeKu12hWaEc/edit#heading=h.xk25zg1lhzyf

@iamontheinet @ppatternn I addressed comments in the new PR as I can't contribute to Jan's private repo


Update 2.0.x version to 2.0.6.

Signed-off-by: Pan Li<EMAIL_ADDRESS>

Codecov Report

Merging #341 into 2.0.x will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##            2.0.x     #341   +/-   ##
=======================================
  Coverage   80.79%   80.79%
=======================================
  Files          42       42
  Lines        1078     1078
  Branches      138      138
=======================================
  Hits          871      871
  Misses        133      133
  Partials       74       74

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 920e8e9...3e1942c. Read the comment docs.