update_dict should return empty string instead of None

Operating system
all
Kluctl Version
2.17.x
Kubernetes Version
all
kubectl Version
all
Bug description
See https://github.com/kluctl/kluctl/issues/145#issuecomment-1327210856.  update_dict should not return None but instead return an empty string.
Steps to reproduce
No response
Relevant log output
No response

Turned out that update_dict was already returning an empty string.


Compute vm task

Added support for virtual machine management

I guess it's ok to merge this, since I haven't heard complains :)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/03/2015 08:48 AM, Marcus Schäfer wrote:

I guess it's ok to merge this, since I haven't heard complains :)

Well, giving people more time for a very large pull request is always
good idea. But it's only code and can be changed at any time. Due to
other issues I didn't even have a chance to look at this.


Cannot find customMouseHover event for tooltip

I'm using the distribution js version and it doesn't have customMouseHover tooltip event.
https://raw.githubusercontent.com/eventbrite/britecharts/master/dist/bundled/britecharts.min.js
Expected Behavior
In this bar example, it shows customMouseHover event. However, javascript distribution file doesn't include such event:
https://eventbrite.github.io/britecharts/tutorial-bar.html
Current Behavior
When I use customMouseHover event, I get:
Error: unknown type: customMouseHover
Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

Version used: 1.5.2
Browser Name and version:
Operating System and version (desktop or mobile):
Link to your project:

I just checked the JS code. Looks like the event is now called customMouseOver instead of customMouseHover. Please update the documentation.

Ooops! Sorry @dnprock !
Here is the fix https://github.com/eventbrite/britecharts/pull/248


Keep language consistent - SDK > manager

Maybe ask for others input on this, but "manager" seems more appropriate to me than "sdk". I think of "sdk" as a library.

Should we just delete this line? It was copied from https://github.com/microsoft/vscode-vsce. We've made a lot of changes since then.

Maybe ask for others input on this, but "manager" seems more appropriate to me than "sdk". I think of "sdk" as a library.

@defunctzombie - thoughts? Believe you preferred SDK when referring to foxglove/fox, from your comments on the extensions blog post.
cc: @amacneil

I agree with @amacneil , this is an executable application not an SDK.

LGTM

Keeping manager terminology.


Autoplay & Video Viewer Lifecycle Issues to Hotfix

Creating this issue just to consolidate and track issues related to the video viewer's lifecycle and autoplay changes.

for pages that embed multiple videos, it plays them all. I think we had autoplay blocked for embeds, unless specially passed.
https://journal.rajeshtaylor.com/p/0e5d263a-f915-48e4-859d-8ce4f3589c0a/

for pages that embed multiple videos, it plays them all. I think we had autoplay blocked for embeds, unless specially passed.
https://journal.rajeshtaylor.com/p/0e5d263a-f915-48e4-859d-8ce4f3589c0a/

the videojs refactoring seems to have broken the 'Retry' and 'Tap to unmute' button.  Haven't looked into details yet.
Ok, I now see both cases (working and not working).
Steps:

Select a video. Click play (I had 'autoplay' off).
Mute the video.
Press Back to invoke Floating Player.
Close floating player.
Select another video. Click play.
Tap 'Tap to unmute'. Control bar stays muted.

Selecting another video from 'Related' makes it work for me, although sometimes the next video becomes muted again.  Can't reproduce this yet.
As for 'Retry', nothing is happening when I tap the button.

the videojs refactoring seems to have broken the 'Retry' and 'Tap to unmute' button.  Haven't looked into details yet.
Ok, I now see both cases (working and not working).
Steps:

Select a video. Click play (I had 'autoplay' off).
Mute the video.
Press Back to invoke Floating Player.
Close floating player.
Select another video. Click play.
Tap 'Tap to unmute'. Control bar stays muted.

Selecting another video from 'Related' makes it work for me, although sometimes the next video becomes muted again.  Can't reproduce this yet.
As for 'Retry', nothing is happening when I tap the button.

It looks like there is an issue with the quality selector not showing after the videojs refactor. Here is a video where it should be displayed.
https://odysee.com/@jackspirko:a/stop-listening-to-the-f-king-bs-tether:0

It looks like there is an issue with the quality selector not showing after the videojs refactor. Here is a video where it should be displayed.
https://odysee.com/@jackspirko:a/stop-listening-to-the-f-king-bs-tether:0


Missing line breaks in code snippet

Many thanks for your loader :pray:!
I tried to add code snippets into some on my .md documents in a NextJS project and statically exported site. These snippets are not properly rendered. More precisely line breaks are, somehow removed and the full content get displayed on a single line.
I tried to dig into your loader and markdownIt but I got lost.
Have you ever heard about similar issue with NextJs and code snippets?
Would you have insights to share and helpp me troubleshoot that limitation?
Many thanks,
Working example:
File:
https://github.com/mes-aides/simulateur/blob/demo-break-code/contribuer/content/home.md
Render:
https://deploy-preview-48--mes-aides.netlify.app/
Project root:
https://github.com/mes-aides/simulateur/tree/demo-break-code/contribuer
(Another file:
https://github.com/mes-aides/simulateur/blob/demo-break-code/contribuer/content/tasks/ajouter-une-aide.md#vérifier-que-votre-environnement-est-fonctionnel---12-minutes-max
Render:
https://deploy-preview-48--mes-aides.netlify.app/tasks/ajouter-une-aide
In H2 « Préparer l'environnement de travail - 10 minutes max », H3 « Vérifier que votre environnement est fonctionnel - 12 minutes max »
)
(Plus I have a React warning, Warning: Invalid DOM property class. Did you mean className? but that's may be unrelated).

Thanks for bringing this to my attention! Looks it's unintentional behavior and I'm going to look into soon.

React warning

It's fixed on v3.4.2: https://github.com/hmsk/frontmatter-markdown-loader/releases/tag/v3.4.2 😉

Released a quickfix as a beta release: https://www.npmjs.com/package/frontmatter-markdown-loader/v/3.6.0-0
Could you try this?

Many thanks for you fast quickfix 😍!
It worked with simple situations.
However I got an error with the following file

title: title
Some text.
Some raw content.

With some inline code awesome command, it messes with the REGEX.

I saw your quickfix, I feel like you loader should rely on an HTML parser (I think I read a comment stating that you tried to avoid adding such dependency).

Thanks for confirming!
Yeah, it must be the time to welcome HTML parser finally. Let me have more time for that. I'm so excited since HTML parser enables us to write more feasible codes ✨ Another beta release of v3.6.0 will come.

Released v3.6.0 https://github.com/hmsk/frontmatter-markdown-loader/releases/tag/v3.6.0
Additionally, I fixed another class vs className problem and some corner cases I found in my test apps. I'm closing this PR, but happy to hear back from you whenever.


Mention required nuget package in remote app doc

I can't find anywhere in the current docs where it says to install this package. Just using the sample code will yield The name 'SystemWebAdapterConfiguration' does not exist in the current context
EDIT by @Rick-Anderson
Fixes #28976

Internal previews

📄 File
🔗 Preview link

aspnetcore/migration/inc/remote-app-setup.md
Remote app setup

@dotnet-policy-service agree

Thanks for the contribution. Be sure to check out your name as a contributor about the 3rd of next month on the What's new page in the Community contributors section at the bottom.


How to define batch AppSync mutations

** Which Category is your question related to? **
How to create batch AppSync mutation as according to https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-dynamodb-batch.html
** What AWS Services are you utilizing? **
AppSync, DynamoDB
** Provide additional details e.g. code snippets **
How do I create a batch AppSync mutations as the example in https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-dynamodb-batch.html, using Amplify?
amplify/backend/api//schema.graphql does not look like the correct place to create
type Mutation {
  batchAdd(models: [Input]): [Model]
}

@kangks Thank you for the comment. We are actively working on building a customer resolver flow into both the Amplify CLI and GraphQL Transform that will allow you to define custom resolvers using VTL. This will allow you to attach a custom resolver to the Mutation.batchAdd field that was defined in your schema.graphql where you can implement the batch write mutation. In the future, the @model directive may expose capabilities to generate batch mutations in addition to what it generates today but this is not yet planned and does not have a release date.


You may be interested in jams ?

Dear reader,
author lists are a pillar of scholarly communication and rewarding system.
On the other hand, the number of tools to create scholarly outputs requiring an author list is growing exponentially,
with software and dataset being published on top of research manuscripts.
Each system gets its own author information entry (and export) points, and they are not talking to each other.
We would like to create a common, open standard that could be used as a transfer point between the different formats,
and build tools to transform the metadata from one format to the other.
We are biased toward markdown-based documents, i.e. yaml-formatted metadata,
but we are hoping to get more use cases and input from YOU.
We are using Github for asynchronous work, while we try to meet regularly in online meetings.
Please use this form to express your interest and be invited to our next online meeting: https://docs.google.com/forms/d/e/1FAIpQLSfShr9808kUIzUDAtAgJFT_ngDd6myUnWIFDxskWrRp3eBJWA/viewform?usp=sf_link
Julien Colomb, on behalf of the Jams team.

Github home: https://github.com/jam-schema/jams
Poke:
rrtools: @benmarwick @nevrome @wolass @annakrystalli
manubot: @dhimmel @epogrebnyak
joss: @arfon @danielskatz @karthik @cMadan @xuanxu @kyleniemeyer @parrish @labarba @Kevin-Mattheus-Moerman
zettlr: @nathanlesage @tobiasdiez @Wieke @Aigeruth
rticles and Ropensci: @sckott @cboettig @yihui @jjallaire @hadley

also poking
openminds: @lzehl @UlrikeS91 @skoehnen

Interesting idea, I'll be following the progress (albeit I can't really be that active due to other responsibilities, but I'd always like to share suggestions etc.! — if we go towards a common specification/standard, which I from the few info I got assume would be the way to go, I'd probably be more active, I've just asked @tarleb for more info!)

I'd like the Contributor Attribution Model to export jams as one format. Great idea!
https://contributor-attribution-model.readthedocs.io/en/latest/
I will make a ticket there.
ping @mbrush


XSS vulnerability in 'about' plugin , need 'Blog X' theme to be active

1  http://<IP_ADDRESS>/admin/configure-plugin/pluginAbout
About

2 http://<IP_ADDRESS>/create-your-own-content

No vulnerability.  And yes, the admin has to be able to add scripts to the editor field.


Ensure schema is consistent while bootstrapping

This PR addresses a potential edge case where the Schema is updated while bootstrapping. The following changes are made

Ensure that the local schema version matches the versions for all peers reported by the Gossiper before Bootstrapping
After creating bootstrap streams, ensure that the local schema version has not changed, and is not in the process of changing.

This PR make no change to the logic here 4c831cc
Making that change would not work for the first node in a new cluster.

nice! i think these checks are sufficient to guard us against the theoretical edge case we talked about. as discussed, let's hold off on merging this "fix" until we have a repro of the edge case to make sure we aren't missing something here

and to double check, this doesn't affect spinning up new clusters because they don't bootstrap, right?

does this affect spinning up zombie or new clusters?

Confirmed from testing that this does not impact spinning up new clusters. On the first startup of seed nodes, this codepath is not flexed because they do not bootstrap.


Mirrors on walls cannot be interacted with

Description

Works if you deconstruct the wall, UI opens for a millisecond before closing instantly if inside a wall
Reproduction

Screenshots

Additional context

Dupe of #28172


Enhancement - added URL validator

We have a requirement for a URL validator in ROTM. This cannot be achieved by using a regex validator as it is an optional field.

added url validator
added tests

@easternbloc @JoeChapman @gavboulton @HughePaul mind having a look?

@joefitter I've added more test cases but 'something.com.' is failing.


Not able to parse publish date.

-> Newspaper is unable to parse date for the URL: http://pratyushsharma.blogspot.in/2016/03/jindagi-mauth-na-ban-jaye-samhalo-yaaron.html
-> On seeing page source publishing date can be seen in the line: <abbr class='published' itemprop='datePublished' title='2016-03-31T03:55:00-07:00'>3:55 AM</abbr>
->  Newspaper is able to get till this DOM element by matching it with

{'attribute': 'itemprop', 'value': 'datePublished', 'content': 'datetime'}

in line 203 in extractors.py
-> But the content attribute is not matched instead a new attribute title is needed.
-> We need to add

{'attribute': 'itemprop', 'value': 'datePublished', 'content': 'title'}

to the PUBLISH_DATE_TAGS to get this read properly.

@kartikparnami good find.
Are you sure it's supposed to be "title" and it's not a mistake of this specific blog?
https://schema.org/datePublished says the attribute should be "content", other sources refer to "datetime", but I couldn't find any other examples with "title"...

Well, I dont know how widespread this issue is and whether its a blog specific issue. But, I feel an addition just increases our coverage of the cases. Let me know your thoughts.

Similar to #151

#402 changes the behaviour to follow the schema of datePublished.
Doesn't solve this problem in particular, but this seems to be an isolated case of out of spec metadata.

not able to parse date of many domain articles
marketscreener.com
contagionlive and many other but diffbot does but its paid


Create an Angular 2 CLient

Create a client in Angular 2, for example, and use by developers

Completed with: https://github.com/SayonaraJS/Bonvoyage


prevent HTMLElement keys as props

Prevent keyof HTMLElement from being used as state or input props / keys.

done, will be released in v20


Unable to extract from: http://www.frogtoon.com

youtube-dl --verbose http://www.frogtoon.com/Track/Horus/Peregrination+016+(February+2014)
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://www.frogtoon.com/Track/Horus/Peregrination+016+(February+2014)']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.05.19
[debug] Python version 2.7.5 - Darwin-13.2.0-x86_64-i386-64bit
[debug] Proxy map: {}
[generic] Peregrination+016+(February+2014): Requesting header
WARNING: Falling back on generic information extractor.
[generic] Peregrination+016+(February+2014): Downloading webpage
[generic] Peregrination+016+(February+2014): Extracting information
ERROR: Unsupported URL: http://www.frogtoon.com/Track/Horus/Peregrination+016+(February+2014); please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 418, in _real_extract
doc = parse_xml(webpage)
File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 1406, in parse_xml
return xml.etree.ElementTree.XML(s.encode('utf-8'), **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML
parser.feed(text)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
self._raiseerror(v)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
raise err
ParseError: not well-formed (invalid token): line 21, column 312
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 516, in extract_info
ie_result = ie.extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 163, in extract
return self._real_extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 687, in _real_extract
raise ExtractorError('Unsupported URL: %s' % url)
ExtractorError: Unsupported URL: http://www.frogtoon.com/Track/Horus/Peregrination+016+(February+2014); please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.

YouTube-embed, but not working.


Documentation and HOW-TO

Atom version: 1.18.0 x64
Organized version: 0.7.2
It seems the documentation lacks some explanations.
For example the README presents no clue how to use some features such as agenda or even tags and priorities.
If Organized relies on some third-party plugins to provide these features, it should be made clear in the documentation in order for new users to use it properly.
Thank you.

You can find examples here: https://github.com/MattFlower/organized/tree/master/samples
I do think these samples need to be directly linked to in the README
The agenda syntax looks like this:
  SCHEDULED: <2017-11-24 Fri 14:00>

Make sure the date is in the future or else it won't display in the agenda window.


Update tutorial-create-private-cloud.md

Corrected grammar error and VMware product names.

@rvandenbedem : Thanks for your contribution! The author(s) have been notified to review your proposed change.


all: use %w instead of %v to wrap errors

... so that they can be unwrapped & the root causes inspected with errors.Unwrap, errors.Is, and errors.As.
Conceptually a follow-up to #508, #509, but trying to be systematic over the whole repo.
The particular use case that motivated this for me: I have code in my app that tries to detect & do Smart Things if database interactions failed because of context cancellation / deadline exceeded, as opposed to other (more worrisome) reasons. But if the errors happen in certain places within ent, that logic fails, as things like errors.Is(err, context.Canceled) return false, even when that was the real underlying error.
Another use case (though one that is so far theoretical for me) is wanting to access the detailed underlying DB error type to get extended information out for logging/diagnostics/metrics. For example, pgx has a rich error type, but it's inaccessible if errors from ent don't consistently use wrapping.

Most of this was done with "supervised" search & replace. One place I did a bit of a more manual edit of note is the handling of errors during rollback recovering from another error. Several (all?) of these had comments claiming the original error was wrapped, which is not what the implementation actually did, so I chose to make the implementation match the comment, since the documented behavior seems proper.
To hopefully ease review, I separated this into two commits, the first with the "edited" files, the second those updated by application of go generate
PS: I'm on gophers slack as fastcat, lurking in #ent, feel free to ping me there too for questions / follow-up

[x] Tests pass locally
[x] Lint passes locally

NB: I did get the tests to work locally, but I ran into some challenges first with just finding instructions on how to run tests & linting, and second that the instructions I did find for running the tests didn't quite work -- the docker compose file seems to have some features that, at best, only work with certain Docker-for-Windows configurations. They certainly don't seem to work on Linux, where I had to comment out the platform: directives.

Addressed review items. Since things are a bit tricky to review after a rebase, here's the commit I made locally to address the review, before squashing & rebasing it: https://github.com/mgabeler-lee-6rs/ent/commit/c9722d34
Re-ran lint & test after the rebase, still passes locally

Thanks @mgabeler-lee-6rs for addressing this. It's appreciated.

You're welcome, and thank you!


WIndow gets permanently lost when using multiple displays

Have more than one display active, open VHA and place it on display #2, disable display #2, application gets lost and is not retrievable at all unless you enable display #2 in same position and placement.
What should happen? Application should move to display #1 like all other windows do.
I cannot even get the VHA window back at all using known methods (https://www.howtogeek.com/howto/windows/bring-misplaced-off-screen-windows-back-to-your-desktop-keyboard-trick/) such as using Windows 10 Cascading Windows option, moving windows or changing desktop resolutions (which forces windows onto working display).

Oh no! This is not good at all ⚠
Initially I was handling the window position myself, but I accepted a PR that uses electron-window-state #457
Perhaps there's a check I need again to make sure the window is visible 😓
Thank you for reporting the bug 🙌

I have not investigated, but perhaps this is related: https://github.com/mawie81/electron-window-state/issues/27


Improve lib def for WebSocket 'close', 'message' event handlers

Handlers registered via addEventListener('close' | 'message', ...) now have their event argument spec'ed the same way that onclose and onmessage handlers have.

I get the union_new failure on master too, so I'm assuming this isn't due to my change. In fact, it seems like 56a82510efa774a9b079779fcfa4aa76abb6357d or 3e715557881eec7b8ce00edb017f63c9b1dc8b53 introduced this since that push is red and the revisions before it are green.

I just tried out #2680 and unfortunately it hit the same issue that it originally did. I'm going to assume that this PR is similarly blocked


Use setImmediate with callback in _close()

Closes https://github.com/Level/level.js/issues/109

Breaks the destroy tests.

Breaks the destroy tests.

I suspect that has something to with deferred-leveldown.

Yes I just found the same problem. Since we do setImmediate() then db.db is DeferredLevelDOWN object. I wouldn't mind picking option 1 either.

I wouldn't mind picking option 1 either.

Let's go with that 👍

I'll keep this PR open and fix that first.


Something's broken in the markup for KafkaTopic.

Probably just a missing/incorrect tag, but the rending's gone nuts on the side. :-)
File: themes/default/content/registry/packages/confluentcloud/api-docs/kafkatopic/_index.md

Thanks for opening the issue. Yes this is tripping up against a bug in our markdown parser in pulumi-terraform-bridge.


Add min function

Make sure these boxes are checked before submitting this pull request~!~ Thank you!!

[X] The test of the method you have fixed is passing
[X] You have written a new skeleton method for someone else to work on!

Please fix the merge conflicts so we can fix this :)
We will try to be quicker with merging PRs in the future so this does not happen that often!

Hey @max003003003 ! This looks like a duplicate of https://github.com/BlakeGuilloud/ganon/pull/106
Let's continue the conversation in that PR! Thanks!!


Use new PixelBuffer API

While not available in maven central, the new API using PixelBuffer can already be used. It would be nice to have this API being used in a branch, so that people can compare?

thats a good idea!

@johanvos do you know how to specify a local JavaFX installation in the openjfx plugin? I could work on this in the next couple of days.

Not possible yet, will be added very soon though.

This is now available in the new 0.0.8-SNAPSHOT of javafx-gradle-plugin. To use this, add a settings.gradle file with the following:
pluginManagement {
    repositories {
        gradlePluginPortal()
        maven {
            url "https://oss.sonatype.org/content/repositories/snapshots/"
        }
    }
}

In build.gradle, update the plugin version to 0.0.8-SNAPSHOT and add a declaration for sdk in the javafx block:
plugins {
  ...
  id 'org.openjfx.javafxplugin' version '0.0.8-SNAPSHOT'
}
...
javafx {
    modules = [ 'javafx.controls' ]
    sdk = "path-to-javafx-sdk"
}

Cool! So I have no excuses anymore ;)

Just for the record, this is how I currently fetch the preview release:
javafx {
    modules = [ 'javafx.controls']
    sdk = "$projectDir/deps/javafx-sdk/sdk/javafx-sdk-13/"
}

task downloadJFX13(type: Download) {

    if(isWindows) {
        src 'https://download2.gluonhq.com/openjfx/forks/pixelbuffer/openjfx-13-pixelbuffer-ea+10_windows-x64_bin-sdk.zip'
    } else if(isLinux) {
        src 'https://download2.gluonhq.com/openjfx/forks/pixelbuffer/openjfx-13-pixelbuffer-ea+10_linux-x64_bin-sdk.zip'
    } else if(isMacOs) {
        src 'https://download2.gluonhq.com/openjfx/forks/pixelbuffer/openjfx-13-pixelbuffer-ea+10_osx-x64_bin-sdk.zip'
    }

    dest "$projectDir/deps/javafx-sdk/sdk.zip"

    onlyIfNewer true
}

task downloadAndUnzipJFX13(dependsOn: downloadJFX13, type: Copy) {

    from zipTree(downloadJFX13.dest)
    into "$projectDir/deps/javafx-sdk/sdk/"

}

The good news is that the new API works. Wee consume around 50% less CPU on the java client. We have to reconsider the native mutex stuff though. It seems that we waste too much time waiting until native rendering is done.

So far so good. For my understanding: what native mutex do you mean? Inside the OpenJFX implementation, or in NativeFX code?

NativeFX


Evaluate green skill measures

For a sample of skills find:

is the skill extracted well?
if green, is it mapped to green ESCO well?
is it mapped to the full ESCO well?

Started a labelling document on our mixed sample here https://docs.google.com/spreadsheets/d/18Qdq5WIplVOeRtpswjderAEVXBEZ5L4VXQa0tulRx0k/edit#gid=1139196409
More keen on labelling green skills than non-green, but I think its nice to have a bit of a mix? Also there is some overlap with the evaluation of the skills extraction algorithm evaluation, but it might be good to have a new evaluation of green skills specifically as they may perform differently.
Note, we have the test metrics for the green skill / not green skill algorithm here
In short:
"green": {"precision": 0.904, "recall": 0.863, "f1-score": 0.883, "support": 175},
"not_green": {"precision": 0.908, "recall": 0.937, "f1-score": 0.922, "support": 254}

merged branch - closing issue


Handling secrets type changes

Hi,
When a secret type changes, let's say from Opaque to kubernetes.io/tls, secreter failing to update the secret.
I think it should handle such changes, and recreate secret if needed. Or make EncryptedSecret to honor type field as immutable same as in secret resources
2019-11-10T09:21:42.185Z	ERROR	kubebuilder.controller	Reconciler error	{"controller": "encryptedsecret-controller", "request": "default/tls-ingress", "error": "failed to update Secret: Secret \"tls-ingress\" is invalid: type: Invalid value: \"kubernetes.io/tls\": field is immutable"}
github.com/amaizfinance/secreter/vendor/github.com/go-logr/zapr.(*zapLogger).Error
	vendor/github.com/go-logr/zapr/zapr.go:128
github.com/amaizfinance/secreter/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:217
github.com/amaizfinance/secreter/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1
	vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158
github.com/amaizfinance/secreter/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1
	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133
github.com/amaizfinance/secreter/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil
	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134
github.com/amaizfinance/secreter/vendor/k8s.io/apimachinery/pkg/util/wait.Until
	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88

Hi!
Thanks for reporting this.
Unfortunately API documentation does not mention that this field is immutable.
I would be happy to add some validation of EncryptedSecret in this regard and I am actually planning to do that in future.
Currently Kubernetes - Open API to be precise - is not capable of validating immutable fields for custom resource objects. Yet it is possible to do that via a validating webhook.

Maybe having an optional param in EncryptedSecret resource to force recreate the secret, this can help and let people decide what to do in such cases;


Error detected while processing TextChangedI Autocommands for "*"

Hi I just updated neovim and luasnip today, and it throws this error below everytime I start typing in a new line:
Error detected while processing TextChangedI Autocommands for "*":
Error executing lua callback: ...start/LuaSnip/lua/luasnip/session/snippet_collection.lua:278: bad argument #1 to 'ipairs' (table expected, got nil)
stack traceback:
        [C]: in function 'ipairs'
        ...start/LuaSnip/lua/luasnip/session/snippet_collection.lua:278: in function 'get_snippets'
        ...nvim/site/pack/packer/start/LuaSnip/lua/luasnip/init.lua:51: in function 'get_snippets'
        ...e/pack/packer/start/cmp_luasnip/lua/cmp_luasnip/init.lua:74: in function 'complete'
        .../nvim/site/pack/packer/start/nvim-cmp/lua/cmp/source.lua:311: in function 'complete'
        ...re/nvim/site/pack/packer/start/nvim-cmp/lua/cmp/core.lua:286: in function 'complete'
        ...re/nvim/site/pack/packer/start/nvim-cmp/lua/cmp/core.lua:168: in function 'callback'
        ...re/nvim/site/pack/packer/start/nvim-cmp/lua/cmp/core.lua:218: in function 'autoindent'
        ...re/nvim/site/pack/packer/start/nvim-cmp/lua/cmp/core.lua:160: in function 'on_change'
        ...re/nvim/site/pack/packer/start/nvim-cmp/lua/cmp/init.lua:310: in function 'callback'
        ...ite/pack/packer/start/nvim-cmp/lua/cmp/utils/autocmd.lua:49: in function 'emit'
        ...ite/pack/packer/start/nvim-cmp/lua/cmp/utils/autocmd.lua:23: in function <...ite/pack/packer/start/nvim-cmp/lua/cmp/utils/autocmd.lua:22>

My neovim version:
:version
NVIM v0.8.0-dev-1071-gf98cff957
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-
prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-c
ommon -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/ub/programs/neovim/build/cmake.
config -I/home/ub/programs/neovim/src -I/home/ub/programs/neovim/.deps/usr/include -I/usr/include -I/home/ub/programs/neovim/build/src/nvim/auto -I/home/ub/programs/neovim/build/include
Compiled by root@zen

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/share/nvim"

Run :checkhealth for more info

My luasnip config file is the same as that in examples with some custom python snippets I have added (it still throws error if i delete my python snippets from config). Thanks in advance!
local ls = require("luasnip")
-- some shorthands...
local s = ls.snippet
local sn = ls.snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
local r = ls.restore_node
local l = require("luasnip.extras").lambda
local rep = require("luasnip.extras").rep
local p = require("luasnip.extras").partial
local m = require("luasnip.extras").match
local n = require("luasnip.extras").nonempty
local dl = require("luasnip.extras").dynamic_lambda
local fmt = require("luasnip.extras.fmt").fmt
local fmta = require("luasnip.extras.fmt").fmta
local types = require("luasnip.util.types")
local conds = require("luasnip.extras.expand_conditions")

-- If you're reading this file for the first time, best skip to around line 190
-- where the actual snippet-definitions start.

-- Every unspecified option will be set to the default.
ls.setup({
	history = true,
	-- Update more often, :h events for more info.
	update_events = "TextChanged,TextChangedI",
	-- Snippets aren't automatically removed if their text is deleted.
	-- `delete_check_events` determines on which events (:h events) a check for
	-- deleted snippets is performed.
	-- This can be especially useful when `history` is enabled.
	delete_check_events = "TextChanged",
	ext_opts = {
		[types.choiceNode] = {
			active = {
				virt_text = { { "choiceNode", "Comment" } },
			},
		},
	},
	-- treesitter-hl has 100, use something higher (default is 200).
	ext_base_prio = 300,
	-- minimal increase in priority.
	ext_prio_increase = 1,
	enable_autosnippets = true,
	-- mapping for cutting selected text so it's usable as SELECT_DEDENT,
	-- SELECT_RAW or TM_SELECTED_TEXT (mapped via xmap).
	store_selection_keys = "<Tab>",
	-- luasnip uses this function to get the currently active filetype. This
	-- is the (rather uninteresting) default, but it's possible to use
	-- eg. treesitter for getting the current filetype by setting ft_func to
	-- require("luasnip.extras.filetype_functions").from_cursor (requires
	-- `nvim-treesitter/nvim-treesitter`). This allows correctly resolving
	-- the current filetype in eg. a markdown-code block or `vim.cmd()`.
	ft_func = function()
		return vim.split(vim.bo.filetype, ".", true)
	end,
})

-- args is a table, where 1 is the text in Placeholder 1, 2 the text in
-- placeholder 2,...
local function copy(args)
	return args[1]
end

-- 'recursive' dynamic snippet. Expands to some text followed by itself.
local rec_ls
rec_ls = function()
	return sn(
		nil,
		c(1, {
			-- Order is important, sn(...) first would cause infinite loop of expansion.
			t(""),
			sn(nil, { t({ "", "\t\\item " }), i(1), d(2, rec_ls, {}) }),
		})
	)
end

-- complicated function for dynamicNode.
local function jdocsnip(args, _, old_state)
	-- !!! old_state is used to preserve user-input here. DON'T DO IT THAT WAY!
	-- Using a restoreNode instead is much easier.
	-- View this only as an example on how old_state functions.
	local nodes = {
		t({ "/**", " * " }),
		i(1, "A short Description"),
		t({ "", "" }),
	}

	-- These will be merged with the snippet; that way, should the snippet be updated,
	-- some user input eg. text can be referred to in the new snippet.
	local param_nodes = {}

	if old_state then
		nodes[2] = i(1, old_state.descr:get_text())
	end
	param_nodes.descr = nodes[2]

	-- At least one param.
	if string.find(args[2][1], ", ") then
		vim.list_extend(nodes, { t({ " * ", "" }) })
	end

	local insert = 2
	for indx, arg in ipairs(vim.split(args[2][1], ", ", true)) do
		-- Get actual name parameter.
		arg = vim.split(arg, " ", true)[2]
		if arg then
			local inode
			-- if there was some text in this parameter, use it as static_text for this new snippet.
			if old_state and old_state[arg] then
				inode = i(insert, old_state["arg" .. arg]:get_text())
			else
				inode = i(insert)
			end
			vim.list_extend(
				nodes,
				{ t({ " * @param " .. arg .. " " }), inode, t({ "", "" }) }
			)
			param_nodes["arg" .. arg] = inode

			insert = insert + 1
		end
	end

	if args[1][1] ~= "void" then
		local inode
		if old_state and old_state.ret then
			inode = i(insert, old_state.ret:get_text())
		else
			inode = i(insert)
		end

		vim.list_extend(
			nodes,
			{ t({ " * ", " * @return " }), inode, t({ "", "" }) }
		)
		param_nodes.ret = inode
		insert = insert + 1
	end

	if vim.tbl_count(args[3]) ~= 1 then
		local exc = string.gsub(args[3][2], " throws ", "")
		local ins
		if old_state and old_state.ex then
			ins = i(insert, old_state.ex:get_text())
		else
			ins = i(insert)
		end
		vim.list_extend(
			nodes,
			{ t({ " * ", " * @throws " .. exc .. " " }), ins, t({ "", "" }) }
		)
		param_nodes.ex = ins
		insert = insert + 1
	end

	vim.list_extend(nodes, { t({ " */" }) })

	local snip = sn(nil, nodes)
	-- Error on attempting overwrite.
	snip.old_state = param_nodes
	return snip
end

-- Make sure to not pass an invalid command, as io.popen() may write over nvim-text.
local function bash(_, _, command)
	local file = io.popen(command, "r")
	local res = {}
	for line in file:lines() do
		table.insert(res, line)
	end
	return res
end

-- Returns a snippet_node wrapped around an insert_node whose initial
-- text value is set to the current date in the desired format.
local date_input = function(args, snip, old_state, fmt)
	local fmt = fmt or "%Y-%m-%d"
	return sn(nil, i(1, os.date(fmt)))
end

-- snippets are added via ls.add_snippets(filetype, snippets[, opts]), where
-- opts may specify the `type` of the snippets ("snippets" or "autosnippets",
-- for snippets that should expand directly after the trigger is typed).
--
-- opts can also specify a key. By passing an unique key to each add_snippets, it's possible to reload snippets by
-- re-`:luafile`ing the file in which they are defined (eg. this one).
ls.add_snippets("all", {
	-- trigger is `fn`, second argument to snippet-constructor are the nodes to insert into the buffer on expansion.
	s("fn", {
		-- Simple static text.
		t("//Parameters: "),
		-- function, first parameter is the function, second the Placeholders
		-- whose text it gets as input.
		f(copy, 2),
		t({ "", "function " }),
		-- Placeholder/Insert.
		i(1),
		t("("),
		-- Placeholder with initial text.
		i(2, "int foo"),
		-- Linebreak
		t({ ") {", "\t" }),
		-- Last Placeholder, exit Point of the snippet.
		i(0),
		t({ "", "}" }),
	}),
	s("class", {
		-- Choice: Switch between two different Nodes, first parameter is its position, second a list of nodes.
		c(1, {
			t("public "),
			t("private "),
		}),
		t("class "),
		i(2),
		t(" "),
		c(3, {
			t("{"),
			-- sn: Nested Snippet. Instead of a trigger, it has a position, just like insert-nodes. !!! These don't expect a 0-node!!!!
			-- Inside Choices, Nodes don't need a position as the choice node is the one being jumped to.
			sn(nil, {
				t("extends "),
				-- restoreNode: stores and restores nodes.
				-- pass position, store-key and nodes.
				r(1, "other_class", i(1)),
				t(" {"),
			}),
			sn(nil, {
				t("implements "),
				-- no need to define the nodes for a given key a second time.
				r(1, "other_class"),
				t(" {"),
			}),
		}),
		t({ "", "\t" }),
		i(0),
		t({ "", "}" }),
	}),
	-- Alternative printf-like notation for defining snippets. It uses format
	-- string with placeholders similar to the ones used with Python's .format().
	s(
		"fmt1",
		fmt("To {title} {} {}.", {
			i(2, "Name"),
			i(3, "Surname"),
			title = c(1, { t("Mr."), t("Ms.") }),
		})
	),
	-- To escape delimiters use double them, e.g. `{}` -> `{{}}`.
	-- Multi-line format strings by default have empty first/last line removed.
	-- Indent common to all lines is also removed. Use the third `opts` argument
	-- to control this behaviour.
	s(
		"fmt2",
		fmt(
			[[
		foo({1}, {3}) {{
			return {2} * {4}
		}}
		]],
			{
				i(1, "x"),
				rep(1),
				i(2, "y"),
				rep(2),
			}
		)
	),
	-- Empty placeholders are numbered automatically starting from 1 or the last
	-- value of a numbered placeholder. Named placeholders do not affect numbering.
	s(
		"fmt3",
		fmt("{} {a} {} {1} {}", {
			t("1"),
			t("2"),
			a = t("A"),
		})
	),
	-- The delimiters can be changed from the default `{}` to something else.
	s("fmt4", fmt("foo() { return []; }", i(1, "x"), { delimiters = "[]" })),
	-- `fmta` is a convenient wrapper that uses `<>` instead of `{}`.
	s("fmt5", fmta("foo() { return <>; }", i(1, "x"))),
	-- By default all args must be used. Use strict=false to disable the check
	s(
		"fmt6",
		fmt("use {} only", { t("this"), t("not this") }, { strict = false })
	),
	-- Use a dynamic_node to interpolate the output of a
	-- function (see date_input above) into the initial
	-- value of an insert_node.
	s("novel", {
		t("It was a dark and stormy night on "),
		d(1, date_input, {}, { user_args = { "%A, %B %d of %Y" } }),
		t(" and the clocks were striking thirteen."),
	}),
	-- Parsing snippets: First parameter: Snippet-Trigger, Second: Snippet body.
	-- Placeholders are parsed into choices with 1. the placeholder text(as a snippet) and 2. an empty string.
	-- This means they are not SELECTed like in other editors/Snippet engines.
	ls.parser.parse_snippet(
		"lspsyn",
		"Wow! This ${1:Stuff} really ${2:works. ${3:Well, a bit.}}"
	),

	-- When wordTrig is set to false, snippets may also expand inside other words.
	ls.parser.parse_snippet(
		{ trig = "te", wordTrig = false },
		"${1:cond} ? ${2:true} : ${3:false}"
	),

	-- When regTrig is set, trig is treated like a pattern, this snippet will expand after any number.
	ls.parser.parse_snippet({ trig = "%d", regTrig = true }, "A Number!!"),
	-- Using the condition, it's possible to allow expansion only in specific cases.
	s("cond", {
		t("will only expand in c-style comments"),
	}, {
		condition = function(line_to_cursor, matched_trigger, captures)
			-- optional whitespace followed by //
			return line_to_cursor:match("%s*//")
		end,
	}),
	-- there's some built-in conditions in "luasnip.extras.expand_conditions".
	s("cond2", {
		t("will only expand at the beginning of the line"),
	}, {
		condition = conds.line_begin,
	}),
	-- The last entry of args passed to the user-function is the surrounding snippet.
	s(
		{ trig = "a%d", regTrig = true },
		f(function(_, snip)
			return "Triggered with " .. snip.trigger .. "."
		end, {})
	),
	-- It's possible to use capture-groups inside regex-triggers.
	s(
		{ trig = "b(%d)", regTrig = true },
		f(function(_, snip)
			return "Captured Text: " .. snip.captures[1] .. "."
		end, {})
	),
	s({ trig = "c(%d+)", regTrig = true }, {
		t("will only expand for even numbers"),
	}, {
		condition = function(line_to_cursor, matched_trigger, captures)
			return tonumber(captures[1]) % 2 == 0
		end,
	}),
	-- Use a function to execute any shell command and print its text.
	s("bash", f(bash, {}, { user_args = { "ls" } })),
	-- Short version for applying String transformations using function nodes.
	s("transform", {
		i(1, "initial text"),
		t({ "", "" }),
		-- lambda nodes accept an l._1,2,3,4,5, which in turn accept any string transformations.
		-- This list will be applied in order to the first node given in the second argument.
		l(l._1:match("[^i]*$"):gsub("i", "o"):gsub(" ", "_"):upper(), 1),
	}),

	s("transform2", {
		i(1, "initial text"),
		t("::"),
		i(2, "replacement for e"),
		t({ "", "" }),
		-- Lambdas can also apply transforms USING the text of other nodes:
		l(l._1:gsub("e", l._2), { 1, 2 }),
	}),
	s({ trig = "trafo(%d+)", regTrig = true }, {
		-- env-variables and captures can also be used:
		l(l.CAPTURE1:gsub("1", l.TM_FILENAME), {}),
	}),
	-- Set store_selection_keys = "<Tab>" (for example) in your
	-- luasnip.config.setup() call to populate
	-- TM_SELECTED_TEXT/SELECT_RAW/SELECT_DEDENT.
	-- In this case: select a URL, hit Tab, then expand this snippet.
	s("link_url", {
		t(''),
		i(1),
		t(""),
		i(0),
	}),
	-- Shorthand for repeating the text in a given node.
	s("repeat", { i(1, "text"), t({ "", "" }), rep(1) }),
	-- Directly insert the ouput from a function evaluated at runtime.
	s("part", p(os.date, "%Y")),
	-- use matchNodes (`m(argnode, condition, then, else)`) to insert text
	-- based on a pattern/function/lambda-evaluation.
	-- It's basically a shortcut for simple functionNodes:
	s("mat", {
		i(1, { "sample_text" }),
		t(": "),
		m(1, "%d", "contains a number", "no number :("),
	}),
	-- The `then`-text defaults to the first capture group/the entire
	-- match if there are none.
	s("mat2", {
		i(1, { "sample_text" }),
		t(": "),
		m(1, "[abc][abc][abc]"),
	}),
	-- It is even possible to apply gsubs' or other transformations
	-- before matching.
	s("mat3", {
		i(1, { "sample_text" }),
		t(": "),
		m(
			1,
			l._1:gsub("[123]", ""):match("%d"),
			"contains a number that isn't 1, 2 or 3!"
		),
	}),
	-- `match` also accepts a function in place of the condition, which in
	-- turn accepts the usual functionNode-args.
	-- The condition is considered true if the function returns any
	-- non-nil/false-value.
	-- If that value is a string, it is used as the `if`-text if no if is explicitly given.
	s("mat4", {
		i(1, { "sample_text" }),
		t(": "),
		m(1, function(args)
			-- args is a table of multiline-strings (as usual).
			return (#args[1][1] % 2 == 0 and args[1]) or nil
		end),
	}),
	-- The nonempty-node inserts text depending on whether the arg-node is
	-- empty.
	s("nempty", {
		i(1, "sample_text"),
		n(1, "i(1) is not empty!"),
	}),
	-- dynamic lambdas work exactly like regular lambdas, except that they
	-- don't return a textNode, but a dynamicNode containing one insertNode.
	-- This makes it easier to dynamically set preset-text for insertNodes.
	s("dl1", {
		i(1, "sample_text"),
		t({ ":", "" }),
		dl(2, l._1, 1),
	}),
	-- Obviously, it's also possible to apply transformations, just like lambdas.
	s("dl2", {
		i(1, "sample_text"),
		i(2, "sample_text_2"),
		t({ "", "" }),
		dl(3, l._1:gsub("\n", " linebreak ") .. l._2, { 1, 2 }),
	}),
}, {
	key = "all",
})

  ls.add_snippets("python" ,
  {
      s({
        trig="mark",
        name="Markdown-Jupyter",
        dscr="Add markdown field"
    },
      {
     t({"######################################################################################","# %% [markdown]","## "}), i(1),
    	t({"","# %%",""}), i(0),
    } ),
      s({
        trig="fr",
        name="Import"
    },
      { t("from "),
        i(1),t({" import "}),
        i(0)

      }
    ),
    s(
      {
        trig="'''",
        name="docstring",
      },
      {
        t({"'''",""}),i(1),
        t({"","'''",""}),i(0)
      }
    ),
    s(
      {
        trig = "ipdb",
        name= "Set trace"
      },
      {
        t({"import ipdb","tr = ipdb.set_trace",""}),
      }
    ),
    s(
    {
        trig = "autoreload",
        name = "default variables"
      },
    {

    t(
        {

          "if 'get_ipython' in globals():",
          "\timport os; os.chdir('/home/ub/Dropbox/code/unet_segmentation')",
          "\tprint('setting autoreload')",
          "\tfrom IPython import get_ipython",
          "\tipython = get_ipython()",
          "\tipython.magic('load_ext autoreload')",
          "\tipython.magic('autoreload 2')",
          }
        ),
      }
    )
    },
 {
	key = "python",
}
)

ls.add_snippets("java", {
	-- Very long example for a java class.
	s("fn", {
		d(6, jdocsnip, { 2, 4, 5 }),
		t({ "", "" }),
		c(1, {
			t("public "),
			t("private "),
		}),
		c(2, {
			t("void"),
			t("String"),
			t("char"),
			t("int"),
			t("double"),
			t("boolean"),
			i(nil, ""),
		}),
		t(" "),
		i(3, "myFunc"),
		t("("),
		i(4),
		t(")"),
		c(5, {
			t(""),
			sn(nil, {
				t({ "", " throws " }),
				i(1),
			}),
		}),
		t({ " {", "\t" }),
		i(0),
		t({ "", "}" }),
	}),
}, {
	key = "java",
})

ls.add_snippets("tex", {
	-- rec_ls is self-referencing. That makes this snippet 'infinite' eg. have as many
	-- \item as necessary by utilizing a choiceNode.
	s("ls", {
		t({ "\\begin{itemize}", "\t\\item " }),
		i(1),
		d(2, rec_ls, {}),
		t({ "", "\\end{itemize}" }),
	}),
}, {
	key = "tex",
})

-- set type to "autosnippets" for adding autotriggered snippets.
ls.add_snippets("all", {
	s("autotrigger", {
		t("autosnippet"),
	}),
}, {
	type = "autosnippets",
	key = "all_auto",
})

-- in a lua file: search lua-, then c-, then all-snippets.
ls.filetype_extend("lua", { "c" })
-- in a cpp file: search c-snippets, then all-snippets only (no cpp-snippets!!).
ls.filetype_set("cpp", { "c" })

-- Beside defining your own snippets you can also load snippets from "vscode-like" packages
-- that expose snippets in json files, for example <https://github.com/rafamadriz/friendly-snippets>.

require("luasnip.loaders.from_vscode").load({ include = { "python" } }) -- Load only python snippets

-- The directories will have to be structured like eg. <https://github.com/rafamadriz/friendly-snippets> (include
-- a similar `package.json`)
require("luasnip.loaders.from_vscode").load({ paths = { "./my-snippets" } }) -- Load snippets from my-snippets folder

-- You can also use lazy loading so snippets are loaded on-demand, not all at once (may interfere with lazy-loading luasnip itself).
require("luasnip.loaders.from_vscode").lazy_load() -- You can pass { paths = "./my-snippets/"} as well

-- You can also use snippets in snipmate format, for example <https://github.com/honza/vim-snippets>.
-- The usage is similar to vscode.

-- One peculiarity of honza/vim-snippets is that the file containing global
-- snippets is _.snippets, so we need to tell luasnip that the filetype "_"
-- contains global snippets:
ls.filetype_extend("all", { "_" })

-- see DOC.md/LUA SNIPPETS LOADER for some details.
require("luasnip.loaders.from_lua").load({ include = { "c" } })
require("luasnip.loaders.from_lua").lazy_load({ include = { "all", "cpp" } })

Wow, that's weird, this table pretty much can't be nil..
Maybe a few ideas:

make sure luasnip is completely up-to-date (find its' repo and check commit)
Looks like luasnip is loaded on TextChangedI, is that correct? If so, try loading it normally

Unfortunately I can't reproduce the error, could you try reducing your config until it disappears?

Thanks. It was my local snippets folder structure which was fudged up. Problem solved when I removed the line lazy loading my own snippets folder.

Oh, okay, fudged up in what way exactly? I still don't understand how that error can occur, but I'd like to :sweat_smile:

I tried loading custom snippets stored in a .lua file using the paths argument. Then it returns error 'package.json' is missing.
Is there a way to add custom snippets store in a separate file, written in lua (e.g., python.lua)?

Hm, I've been working on that portion of the code recently. Can you check if this error was introduced by the commit 4073f821e1c02c7deb50235b4b68ecc5cf0b95e9? (I don't get this error, but I'm also not working with packer / lazy loading the plugin)

I tried loading custom snippets stored in a .lua file using the paths argument. Then it returns error 'package.json' is missing. Is there a way to add custom snippets store in a separate file, written in lua (e.g., python.lua)?

Well, I'm doing so by using
	require("luasnip.loaders.from_lua").load{
		paths = "~/.config/nvim/lua/luasnip_settings/snippets"
	}

where my snippets live in ~/.config/nvim/lua/luasnip_settings/snippets/lua.lua. Looking at your error message, is is possible that you've forgotten to switch the loader? (there should be no package.json necessary when working directly with lua files providing the snippets, as far as I know)

And I find this is related to my snippet. When I remove all custom snippets or keep some simple ones, no more errors occur and it works fine.
But when some other snippets like the following are included, the error pops up and no snippets are available:
-- https://github.com/rafamadriz/friendly-snippets
require 'luasnip.loaders.from_vscode'.load {
  paths = "/root/.local/share/nvim/site/pack/packer/start/friendly-snippets",
  exclude = { "all", "global" },
}

Recording: https://asciinema.org/a/y5T922SUkTkL8VS5Dc8r3Npwj

Hmm, could you try reducing it to an add_snippets-call?

Can you check if this error was introduced by the commit 4073f82

The error exists on that commit. But I tried on its previous one e687d78fc95a7c04b0762d29cf36c789a6d94eda, the error is gone.

Yeah, that'd do it, but this table should/can (obviously it can though :( ) not be nil

But ft can be '':
-- ft may be nil, type not.
function M.get_snippets(ft, type)
  print(by_ft[type], by_ft[type][ft], ft, "ft == ''", ft == '', type) -- for debug
  if ft then
    return copy_by_ft_type_ft(by_ft[type][ft])
  else
    return copy_by_ft_type(by_ft[type])
  end
end

-- print
table: 0x7f35c5a00938 nil  ft == '' true snippets
table: 0x7f35c5a00938 table: 0x7f35c59d0fb8 all ft == '' false snippets

Hm, but in theory always an empty table should be returned if the key isn't known. Could you check if getmetatable(by_ft[type]) equals by_ft_snippets_mt?
In the code before e687d78fc95a7c04b0762d29cf36c789a6d94eda the nil was just propagated forward to the caller. After that commit in theory the nil should never occur due to that metatable thing we introduced. Maybe somehow the metatable gets lost when working with the from_vscode loader? (if that's the only way we know of to reproduce the error, up to now) :shrug:

Doesn't solve why there is an error bus most probable necessary info to fix it. [at]L3MON4D3 is get_snippets expected to return nil if there are no snippets found (we might have overlooked that case) and is it a problem if instead an empty table is returned?
EDIT:
local ft_table = require("luasnip").get_snippets(...
if ft_table then
    for j, snip in pairs(ft_table) do
        ...

(from cmp_luasnip) seams they expect nil in case nothing is found. On the other hand, returning {} should pose no problem as in that case the pairs-loop will just not being run.

Maybe somehow the metatable gets lost when working with the from_vscode loader?

It seems so, very weird :|

is get_snippets expected to return nil if there are no snippets found

I think we haven't really specified that yet, but as far as I remember, nil and empty tables could occur before the autotables-refactor.
@zjp-CN
Could you show the result of vim.inspect(by_ft, {depth=3})? Will omit the snippets, but show the relevant structure

It seems so, very weird :|

Especially so since the loaders exclusively call add_snippets

Ah, I might have found it.
function M.clean_invalidated(opts)
...
    by_ft[type] = without_invalidated(type_snippets)
...
local function without_invalidated(snippets_by_ft)
    local new_snippets = {}
    ...
    return new_snippets

I think when when invalidating, by_ft[type] can get a table which is missing the metatable. Should I make a small PR for this one?

You guys are legends - you sniped and acted so fast

And I just find the error pops up only on some filetypes. For example, Luasnip works on lua/md/rs files[^note] but doesn't work on nvim's empty buffer and txt files.
[^note]: I've set ls.add_snippets("testing", ls.text_node"expasion") globally. Although no error happens there, the input testing is not recognized by Luasnip.

but doesn't work on nvim's empty buffer and txt files.

Of course it doesn't :)
Because I don't have "" and txt snippets in the by_ft table, according to the gist I gave.

Ah, I might have found it.
function M.clean_invalidated(opts)
...
    by_ft[type] = without_invalidated(type_snippets)
...
local function without_invalidated(snippets_by_ft)
    local new_snippets = {}
    ...
    return new_snippets

I think when when invalidating, by_ft[type] can get a table which is missing the metatable. Should I make a small PR for this one?

Ahh nice work :+1:
PR would be great, would you also include a test that catches this problem?

@atticus-sullivan That fix works.  No more error occurs with add_snippets call and getmetatable(by_ft[type]) equals by_ft_snippets_mt.

Well we've introduced metatables which automatically add empty tables if a table is accessed with a non existent key. So the code relies on having these metatables in place (and does not check if table[key] returns nil as this shouldn't happen in any case). Turns out we've forgotten to add these metatables this time if the snippets are being invalidated.

would you also include a test that catches this problem?

@L3MON4D3 Hm, I don't think it's that easy as I cannot simply check if the metatables are present (the by_ft table isn't exposed) and the invalidate_snippets isn't accessible from the outside as well.
The way I'd do it is to run a scenario which triggers the exception which was thrown in this case and check in the test that the exception isn't thrown. Problem remains, I can't quite trigger the error. Maybe you've got a suggestion (I'll just make a draft PR).

Well we've introduced metatables which automatically add empty tables if a table is accessed with a non existent key. So the code relies on having these metatables in place (and does not check if table[key] returns nil as this shouldn't happen in any case). Turns out we've forgotten to add these metatables this time if the snippets are being invalidated.

To add on to this, the snippets are only invalidated if a certain number (200 by default) is added again, for example by calling someloader.load twice, so that's the connection to loaders we were looking for :D


python311Packages.boto3-stubs: 1.34.14 -> 1.34.15

Description of changes

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 279766 run on x86_64-linux 1

10 packages built:

aws-sam-cli
aws-sam-cli.dist
python310Packages.boto3-stubs
python310Packages.boto3-stubs.dist
python310Packages.dsnap
python310Packages.dsnap.dist
python311Packages.boto3-stubs
python311Packages.boto3-stubs.dist
python311Packages.dsnap
python311Packages.dsnap.dist

Result of nixpkgs-review pr 279766 run on aarch64-darwin 1

10 packages built:

aws-sam-cli
aws-sam-cli.dist
python310Packages.boto3-stubs
python310Packages.boto3-stubs.dist
python310Packages.dsnap
python310Packages.dsnap.dist
python311Packages.boto3-stubs
python311Packages.boto3-stubs.dist
python311Packages.dsnap
python311Packages.dsnap.dist


Erratic KWh report NAS-WR01ZE powerplug

Is your problem within Home Assistant (Core or Z-Wave JS Integration)?
NO, my problem is NOT within Home Assistant or the ZWave JS integration
Is your problem within ZWaveJS2MQTT?
NO, my problem is NOT within ZWaveJS2MQTT
Checklist

[X] I have checked the troubleshooting section and my problem is not described there.

[X] I have read the changelog and my problem was not mentioned there.

Describe the bug
What causes the bug?
I am not sure if this is a firmware issue or an issue with Z-Wave JS
What do you observe?
The KWH output of the MeterCCReport of the Neo Coolcam NAS-WR01ZE is erratic.
it switches between the correct value and a value that is around -20,000,000
What did you expect to happen?
a consistent report of KWh used over the lifetime of the plug.
Steps to reproduce the behavior:

Go to '...'
Click on '...'
Scroll down to '...'
See error

Device information
Manufacturer: Neo
Model name: Coolcam NAS-WR01ZE Powerplug
Node ID in your network:
006 and 007
How are you using node-zwave-js?

[ ] zwavejs2mqtt Docker image (latest)
[ ] zwavejs2mqtt Docker image (dev)
[ ] zwavejs2mqtt Docker manually built (please specify branches)
[ ] ioBroker.zwave2 adapter (please specify version)
[X] HomeAssistant zwave_js integration  (please specify version)
[ ] pkg
[ ] node-red-contrib-zwave-js (please specify version, double click node to find out)
[ ] Manually built from GitHub (please specify branch)
[ ] Other (please describe)

Which branches or versions?
version:
node-zwave-js branch: 0.1.37
Home Assistant branch: 2021.8.8
z-wave integration driver: 8.1.1 server: 1.10.0
zwavejs2mqtt branch:
Did you change anything?
no
If yes, what did you change?
No response
Did this work before?
Don't know, this is a new device
If yes, where did it work?
No response
Attach Driver Logfile
wrong value:
2021-08-25T12:33:16.449Z SERIAL « 0x0114000400070e32022144800001fb012d800001fb9f                      (22 bytes)
2021-08-25T12:33:16.454Z CNTRLR   [Node 007] [~] [Meter] value[65537]: -21474831.41 => -21474831.41 [Endpoint 0]
2021-08-25T12:33:16.458Z SERIAL » [ACK]                                                                   (0x06)
2021-08-25T12:33:16.463Z DRIVER « [Node 007] [REQ] [ApplicationCommand]
                                  └─[MeterCCReport]
                                      type:        Electric
                                      scale:       kWh
                                      rate type:   Consumed
                                      value:       -21474831.41
                                      time delta:  301 seconds
                                      prev. value: -21474831.41

right value:
2021-08-25T12:43:16.550Z SERIAL « 0x0114000400070e32022144000001fe012d000001fe9f                      (22 bytes)
2021-08-25T12:43:16.554Z CNTRLR   [Node 007] [~] [Meter] value[65537]: 5.1 => 5.1                   [Endpoint 0]
2021-08-25T12:43:16.558Z SERIAL » [ACK]                                                                   (0x06)
2021-08-25T12:43:16.563Z DRIVER « [Node 007] [REQ] [ApplicationCommand]
                                  └─[MeterCCReport]
                                      type:        Electric
                                      scale:       kWh
                                      rate type:   Consumed
                                      value:       5.1
                                      time delta:  301 seconds
                                      prev. value: 5.1

Duplicate of #2692


Add ansible for provisioning projects,users,groups

This adds the ability to provision our desired projects, groups and
users on the new cloud. It is a continuation of the cloud_bootstrap
role started in BonnyCI/hoist#166, and follows the spec contained in
BonnyCI/bonnyci.org#34.
Depends-On: BonnyCI/hoist#166
Resolves: BonnyCI/projman#134

Build failed.

http://logs.bonnyci.com/check_github/BonnyCI/hoist/168/1487885728.63/bonnyci-run-check-multinode : FAILURE in 56s

I think we still need the users-projects role, to manage the personal dev and admin accounts that will eventually be running this?  We could potentially role it into the cloud-bootstrap role/

This LGTM, will let @j2sol look and change his negative to a positive.


fixed module import issue

gpt:
If you're working on a simple web project and you're not using a module bundler, you can include the matter.js script directly in your HTML using a script tag. This will make the Matter object available globally, and you won't need to use import statements.


On Bernstein–Vazirani

When describing Bernstein–Vazirani (chapter 3.2 section 1a):

... now the function only returns $1$ for a particular $n$ length bit string $s$, and for all other inputs it returns $0$. In other words, for each input $x$, $f(x) = s \cdot x \, \text{(mod 2)}$.

I think what you are describing before and after In other words are actually two different things. The latter one seems to be what commonly known as the oracle in 'Bernstein–Vazirani' and the former one seems to be a searching oracle. (Are you also thinking about Grover's when writing this ^_^)

@aasfaw issue fixed. see PR #64


IGAPP-1035: Reference open source licenses on web

Click on Footer>openSourceLicenses to see the license page.

Translation is missing, it should be available at least in German:
I think there should be translations for version and license as well.
I also think you shouldn't use the whole width of the page for the list (probably you just need to wrap it in <Layout /> or something-

The translation for open source licenses  is available in multiple languages though...
Imo it's not necessary to translate the content of the licenses page. Anyone who want to understand the content must speak english because the packages name aren't translated anyway.

The translation for open source licenses is available in multiple languages though...

Yes, maybe, but the translations are not used, see my screenshot.

Imo it's not necessary to translate the content of the licenses page. Anyone who want to understand the content must speak english because the packages name aren't translated anyway.

Please translate it anyway, we don't use hard coded strings for the UI in our apps for various reasons. We want our apps to be as accessible to all users as possible. That includes that a user can always see and understand what a specific page is about (for example if clicked on a link by mistake) even if the specific content is not understood.

Translation is missing, it should be available at least in German:
I think there should be translations for version and license as well.
I also think you shouldn't use the whole width of the page for the list (probably you just need to wrap it in <Layout /> or something-

The translation for open source licenses  is available in multiple languages though...
Imo it's not necessary to translate the content of the licenses page. Anyone who want to understand the content must speak english because the packages name aren't translated anyway.

The translation for open source licenses is available in multiple languages though...

Yes, maybe, but the translations are not used, see my screenshot. You can fix this by changing
 <CleanLink to={RoutePatterns[LICENSES_ROUTE]}>{t('openSourceLicenses')}</CleanLink>

to
 <CleanLink to={RoutePatterns[LICENSES_ROUTE]}>{t('settings:openSourceLicenses')}</CleanLink>

in GeneralFooter.tsx.

Imo it's not necessary to translate the content of the licenses page. Anyone who want to understand the content must speak english because the packages name aren't translated anyway.

Please translate it anyway, we don't use hard coded strings for the UI in our apps for various reasons. We want our apps to be as accessible to all users as possible. That includes that a user can always see and understand what a specific page is about (for example if clicked on a link by mistake) even if the specific content is not understood.

ok, I get it now. And hardcoded ui strings are really ugly...

When I run yarn on this branch the lockfile changes. Apparently it does not in the CI though so probably just a problem on my machine?


IMDB bidirectional lstm example. Is it correct?

https://github.com/fchollet/keras/blob/master/examples/imdb_bidirectional_lstm.py
In this example, the last sequence of the bidirectional LSTM will be used by the next layer right?
The last sequence of the bidirectional LSTM will be just the last sequence of the forward LSTM, concatenated with the first sequence of the backward LSTM, right?
How is it different from a unidirectional LSTM where also only the last layer will be taken?

It matters when the order of the sequence is important. Sometimes you have more information when you read a sequence backwards. Now you can use the BiLSTM to combine this information. Does this answer your question?

If we are taking just the last sequence of a bidirectional LSTM, is it not equivalent to taking the last sequence of a forward LSTM? Because the last sequence of a bidirectional LSTM will just be last sequence of the forward LSTM and the first sequence of the backward LSTM (which hasn't seen any input).

They are not equivalent, as at t0, the backwards RNN layer will have input Input[t0] + initialization data. Whether this is useful is another question.

Ya exactly. I meant in that sense only. The forward LSTM has seen the last input already right? I wonder whether adding a backward LSTM will make any difference.

I doubt it, for this problem as written - as you say, the backward pass will only output one used/usable value in this case; one value that utilizes only one input and the initialization data. The Initialization data, though, may be stateful (if it's a stateful RNN) and provide some useful information from the previous data. This is fairly doubtful though.
Important to note that if there was another RNN layer of any kind after the BRNN, this would not be the case. Or, if this was more than a classification problem and return_sequences was set to True.


🛠fix: encoding problem for operations

fix encoding problem for operation. ascii -> utf-8

not orda issue, but orda-js issue


feature: iam 部分单元测试完善

Codecov Report

Merging #283 (2c09961) into v2.6.x_develop (f90d67a) will increase coverage by 0.59%.
The diff coverage is n/a.

@@                Coverage Diff                 @@
##           v2.6.x_develop     #283      +/-   ##
==================================================
+ Coverage           54.56%   55.16%   +0.59%
==================================================
  Files                 446      446
  Lines               27512    27565      +53
==================================================
+ Hits                15013    15205     +192
+ Misses              12499    12360     -139

Impacted Files
Coverage Δ

itsm/ticket/tasks.py
31.70% <0.00%> (-3.01%)
:arrow_down:

itsm/ticket/managers.py
35.51% <0.00%> (ø)

weixin/core/accounts.py
35.71% <0.00%> (+2.04%)
:arrow_up:

adapter/config/sites/ieod/api.py
74.41% <0.00%> (+9.30%)
:arrow_up:

itsm/auth_iam/resources/basic.py
84.21% <0.00%> (+10.52%)
:arrow_up:

weixin/core/middlewares.py
44.73% <0.00%> (+13.15%)
:arrow_up:

itsm/component/misc_middlewares.py
41.00% <0.00%> (+15.10%)
:arrow_up:

itsm/auth_iam/resources/role.py
57.50% <0.00%> (+32.50%)
:arrow_up:

itsm/auth_iam/resources/service.py
57.50% <0.00%> (+32.50%)
:arrow_up:

itsm/auth_iam/resources/workflow.py
57.50% <0.00%> (+32.50%)
:arrow_up:

... and 9 more

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 f90d67a...2c09961. Read the comment docs.


Switch to Rover CLI

Apollo has deprecated the Apollo CLI and released a new one called Rover.

Decided to call the Apollo Studio API directly instead of wrapping the CLI. See #21.


Notify about available plugin updates and vim-plug upgrade

Hi,
everyday when I start vim I firstly do :PlugUpgrade and then :PlugUpdate and usually no updates are available. If this plugin could provide an interface for statusline or use some other method (e.g. echo message) to display info (at least count) about plugins which have available updates, that would be great.
Something like 4 updates available and plug upgrade available or with less text and with use of some nice symbols. I guess this should be possible using git.
Thanks.

Type:

[ ] Bug
[x] Enhancement
[x] Feature Request
[ ] Question

OS:

[x] All/Other
[ ] Linux
[ ] OS X
[ ] Windows

Vim:

[x] Terminal Vim
[x] GVim
[x] Neovim

There is no way to know if the remote repository has been updated without contacting it. So in order to print the suggested message (x updates available), vim-plug has to fetch all the changes, which is effectively, :PlugUpdate.

@junegunn, there can be a hack solution for at least git-located VIM plug-ins. So vim-plug can execute something like
git ls-remote origin --heads refs/heads/master
once a week in order to compare that hash with the one from local .../.git/refs/heads/master for each plug-in. If the values differ then vim-plug can open a new VIM buffer with the news and the update prompt. Do you have a long-term roadmap for this feature implementation?

It would be good to get it implemented for at least automatic vim-plug self-upgrade. Some of the users do :PlugUpdate several times a month but they usually forget to run :PlugUpgrade.

@junegunn I actually did a quick how to check for git remote updates google search and the result's looked promising so I tought this is possible. Also @mike-zueff has a good approach for this.
@mike-zueff Is there a reason why the hash compare should be done only once per week? This could be maybe configurable.

Dudes. Just set up a crontab for vim +PlugUpgrade +PlugUpdate +qa! and run the updates as often as you like, automatically.

@martin-svk, of course, it should be configurable.
@Celti, not a good idea, IMHO. Rationale: some plug-ins can take too long time for update. E.g., YouCompleteMe update usually triggers install.py launch and can work for about 15 minutes before the update is completed. So if the computer will be rebooted until the cron job is finished then you can get a buggy plug-in or not completely compiled one. One more argument consists in that it would be nice to control the update process ourselves and view the update summary data in the vim-plug VIM buffer when all the update jobs are completed. The silent update using cron/anacron won't show you the summary actually.

@Celti, also cron/anacron job can be launched when you'll be busy with the software development, etc. So some plug-ins may become broken after automatic update is finished or during the update process workflow. It can be much more comfortable to update all the plug-ins in the spare time or at the end of a working day nevertheless.

Have you ever worried about your computer rebooting in the middle of any other cronjob it comes with? Most Linux distros come with a number enabled by default. But if it's really a problem, have the cronjob inhibit shutdowns while it's running (c.f. molly-guard, polkit inhibitors).
The typical user of Plug, from everything I've seen, simply runs PlugUpgrade and PlugUpdate without any interactivity whatsoever, then (sometimes) reviews the buffer when done. So, dump the buffer to stdout when you're done (or simply run Vim in 'exim' mode for the job) so that cron emails you the output.
As for updates happening while you're busy with software development... you could have the cron job check for running Vim sessions and inhibit itself, but I don't think that's actually a problem — once Vim is loaded, a plugin is not going to reload itself from disk unless you tell it to, therefore changing the plugin on the disk isn't going to affect your development session one iota.
None of those problems are insurmountable, or even terribly difficult to solve — but they do require you to do something.

@Celti None of those problems are insurmountable, or even terribly difficult to solve — but they do require you to do something.

That's true. But isn't it easier to find a good way for my proposed feature to work? It's not much harder to solve and no user has to do anything like cron + molly-guard + etc. fancy stuff. I mean, almost every modern editor now displays a notification when plugin updates are available.

vim-plug labels itself as "minimalist plugin manager" and I'm not in favor of adding more features to it. Unlike "modern" editors, Vim is basically a single-threaded, synchronous program, and to start background process, you'll have to use the bleeding-edge version of Vim or Neovim, while one of the strong points of vim-plug is its obsession with backward compatibility (almost all of its features work in archaic Vim 7.0 with Git 1.7)
What I'd like to stress is that, you can implement the idea as an external script, like an addon plugin. Since vim-plug exposes its data structure via g:plugs variable, you can refer to it. Or to make things simpler, you can blindly check the directories in ~/.vim/plugged in a shell script that is registered as a cron job, and display the result of it on your statusline.
If you come up with a solution, let me know. We can put it on the wiki, or if it turns out to be really nice and simple, we can then consider integrating it to vim-plug.

@junegunn Would you reconsider this issue in 2018?
vim8 is now the default version on current

macOS 10.13
Debian 9
Ubuntu (since 17.04)
Fedora

Some of the more conservative Linux distributions (such as Mint or openSuse) are still on 7.4 but this will certainly change and does not really count as an argument against it. People on rolling release Linux distributions have most likely already a newer vim version (otherwise it does not make sense to use a rolling release).
Many user could already use it today and more are about to come.
Your plugin is certainly one of the most popular vim plugin manager.
And most importantly: this issue is also about a feature which people have to add manually to their configuration of the statusline. It does not hurt anybody with an older vim version as long as they do not add it. It is easy to document the requirements and even give a meaningful message in vim why it does not work if someone tries nevertheless (e.g. uses a central configuration on several machines).
I am interested in a self-contained solution to see the number of available packages where git tells you that changes are available. Crontab is an external tool which is also not available on all platforms (e.g. Windows). This would also require additional vim setup to query the output of the cronjob to add its results to the statusline. It would make more sense if vim8 checks itself and then redraws the statusline. When I do not use vim, there is also no need for the cronjob.
Vim8 has now the timer and job feature which should provide all functionality required.
IMHO, even from a technical standpoint it would make sense to add this to a vim plugin itself.
I understand your reasoning about a minimalistic plugin manager. I think vim-plug is a great plugin manager with many good features and see no reason why a return string for the statusline goes beyond what this plugin manager does.
It also fits into the scheme of many plugins which provde strings for the statusline (fugitive#statusline(), SleuthIndicator(), tagbar#currenttag(), gutentag#statusline(), GitgutterGetHunkSummary(), ale#statusline#Status(), ObsessionStatus(), virtualenv#statusline(), ...).
 There is not even an LTS Ubuntu release with Vim 8 yet!

@anowlcalledjosh Sorry to nit-pick: I have mentioned that vim8 is only available for Ubuntu 17.04 or newer and also tried to elaborate why arguments as yours do not really motivate to wait till everybody has vim8. For instance, people on server distros with official support for a decade will not have vim8 for a long time even after 2021. The point is that there is already a significant amount of users who can use it, not everybody, but also not a tiny group.
Since junegunn himself did not respond, any discussions are also most likely irrelevant. Regardless of your opinion whether it is a useful feature or not.

There is not even an LTS Ubuntu release with Vim 8 yet!

The next Ubuntu LTS release will be available in a month. Do you really think this is a reason not to implement this? (https://wiki.ubuntu.com/BionicBeaver/ReleaseSchedule) The next time someone checks this thread a month has passed. Sorry, I really can't understand you here!

Thanks to g:plugs variable I have created a very simple plugin that shows outdated plugins: vim-outdated-plugins. Currently, it works only with Neovim, but Vim support is coming soon.

@semanser: Thanks for creating this plugin!
Right now I still use vim and would love to hear about vim support. Why did you attach the label invalid to your issue https://github.com/semanser/vim-outdated-plugins/issues/1.
My vim instances are often running several days. Would you mind adding an option to trigger a check after a certain period of time, not only on VimEnter.

@kiryph Thanks, I replaced the invalid label :)
Vim support will be added when I will found a time to do that, but probably in a few days, I think.
This plugin exports CheckForUpdates() function and you can bind it to some shortcut and runs it manually. But the idea with a timer is also good.

@kiryph
I have added both Vim and Neovim support in https://github.com/semanser/vim-outdated-plugins/commit/003bf9d11e1cd4ad75c2ad09abdd8a14c7f85b5f so now you can test it :)

@Semanser Thanks for the quick addition. I will definitely give you feedback this week.
I had a look into the file https://github.com/semanser/vim-outdated-plugins/blob/master/plugin/vim-outdated-plugins.vim:
Single job control api for vim and neovim
I think  https://github.com/prabirshrestha/async.vim could remove the need to code everything twice.
Note that https://github.com/k-takata/minpac uses also async.vim by prabirshrestha to support vim and neovim. For convenience k-takata has copied the file https://github.com/prabirshrestha/async.vim/blob/master/autoload/async/job.vim into the repository of minpac https://github.com/k-takata/minpac/blob/master/autoload/minpac/job.vim to make minpac self-contained.

@kiryph Thanks for the suggestion. Yes, I find ugly to separate basically the same logic twice, just to be compatible with Vim and Neovim. I will dive deeper into Async.vim plugin, thanks.

@semanser Cool plugin, thanks for sharing!


2+ exported classes in one TS file : Translations are extracted

The lib doesn't extract translations when a single typescript file contains 2 different exported classes.
Scratched my head some time before understanding that ^^
For now I'll separate each class in a file but it's quite a weird/silent bug

There's a passing test for that here: https://github.com/biesbjerg/ngx-translate-extract/blob/608c4e8e2260d9bb443bd5600bfa4e6e0d70e46c/tests/parsers/service.parser.spec.ts#L228-L260


Grey square over the top

for some reason my circle has a grey square over the top of it like this
https://imgur.com/x6Zdd1l
my xaml is:
<CustomButton:CircleButton FontSize="30" TextColor="Black" HeightRequest="150" WidthRequest="150" BorderThickness="40" BorderColor="Black" />

Added BackgroudColor="Transparent"


[Share this page] new component

This epic contains an overview of the research and design performed to create this component.
User Story 1 - End user

As an [user role below]:
ibm.com user

I would like to be able to do:
?description here?

so that I can:
?description here?

Additional Information

[box folder]
[reference materials]

Acceptance Criteria

[ ] Research findings are available and posted to the Box folder
[ ] Design exploration is done and results posted to the Box folder
[ ] Agile board epic is created to begin the functional specs work
[ ] Final design is done and posted to the Box folder

No longer needed.


Deploy zkSync on Uniswap V2

🌟 Feature Request
📝 Description
I would be delighted to see zkSync network deployed on Uniswap V2, regardless of the current protocol OKU trade V3
🤔 Rationale
I truly believe it will attract more users, the adoption will increase as it's a top Dex on Ethereum
📋 Additional Context
Add any other context or information about the feature request here.

Its a must do, when finished?

Thanks for your response, issue already closed, keep the good work with our
zkSync devs community
#include
int main() {
std::cout << "Much love for zksync devs << std::endl;
return 0;
}
On Sun, Feb 18, 2024, 12:42 PM DLTKauz @.***> wrote:

Its a must do, when finished?
—
Reply to this email directly, view it on GitHub
https://github.com/matter-labs/zksync-era/issues/1120#issuecomment-1951124568,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A6VKYXVWD3EG7S44VUDDTV3YUHLJTAVCNFSM6AAAAABDN2R5C6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJRGEZDINJWHA
.
You are receiving this because you authored the thread.Message ID:
@.***>


UndefVarError: bijector not defined

Tutorial are key for users to learn.
The Variational Inference notebook has the following error for a long time.
_, sym2range = Variational.bijector(m; sym_to_ranges = Val(true)); #ERROR: UndefVarError: bijector not defined
Also, the following line needs to exclude ".value":
density!(collect(skipmissing(samples_nuts[:s].value)), label = "s (NUTS)", color = :green, linewidth = 2)
Regards,

So, do you know the correct way to get sym2range?
Seems, like Bijectors.bijector has a somewhat similar function signature, but also throws an error.

Was fixed at some point, it seems.


Support textDocument/formatting

Re-opening to let me verify the behaviour in vscode first.

We need better TextEdit behaviour for vscode. #83 implements that.


⚠ SkipTheCommericals has degraded performance

In d88992c, SkipTheCommericals ($STC) experienced degraded performance:

HTTP code: 200
Response time: 2055 ms

Resolved: SkipTheCommericals performance has improved in 5e6eb70.


feat: Add Event Timer module

What does this change?
Adds an event timer module that can be imported and used globally.
Why?
As part of the performance OKR we need additional monitoring of performance.
Using this module gives us a single place to collate and handle events recorded for this

Adding the event timer module

main failed on test coverage step:
COVERAGE DECREASED (-24.4%) TO 17.241%


Models Inside of Group Don't Render Correctly In Editor

Summary
After opening a level a group containing a model doesn't not render as expected. It will not show unless the cursor is hovering over it. After duplicating any object (alt drag) it will render correctly.
Note
It does render correctly when in play mode, this only impacts editor mode.

Yes! Same behavior found in #136.


Add support for unique master and follower certificates

Is your feature request related to a problem? Please describe.
Migrated from https://github.com/pivotal-cf/docs-cyberark-conjur-service-broker/issues/21 as reported by @whip113

Currently, the tile config only has one field for importing the SSL certificate. The recommendations for certificates is to use one certificate for the master VIP and a different certificate for the follower VIP. The tile config allows us to configure both the master URL and the follower URL, but when using different certs for each the lack of a field to store the follower certificate means you can't actually use the follower URL.

The configuration for the tile relates to this service broker. At current, the service broker supports specifying the DAP master URL and a (read-only) follower URL - but it only allows specifying one certificate, when (as noted above):

The recommendations for certificates is to use one certificate for the master VIP and a different certificate for the follower VIP.

Describe the solution you would like
At current the service broker supports supplying the following relevant configuration environment variables:

CONJUR_SSL_CERTIFICATE
CONJUR_APPLIANCE_URL
CONJUR_FOLLOWER_URL

We could add another parameter

CONJUR_FOLLOWER_SSL_CERTIFICATE

And if set, we could use this alternate certificate when we instantiate the read-only API:
https://github.com/cyberark/conjur-service-broker/blob/c5ee095a07bef17af5cd129327fc6fab1bb85e51/lib/conjur_client.rb#L17
Additional context
Once this change is made, we will also need to update the VMWare Tanzu tile definition to accept this parameter and properly configure the service broker with the CONJUR_FOLLOWER_SSL_CERTIFICATE env var.

fixed in the new version


Bar chart Y-axis cannot handle large values

Bug type
Component
Component name
MudChart
What happened?
In a Bar chart, if the Y axis value is large, then Y axis is no longer rendered properly.
Expected behavior
The increment of the Y axis should be adjusted according to scale. Current it seems to always be 20.
Reproduction link
https://try.mudblazor.com/snippet/wEGxkyPgVKaxcEPU
Reproduction steps
1.Chick the Reproduction Link. It has the issue
2.Change Y axis value from 4000 to 400. It works correctly.
Relevant log output
No response
Version (bug)
6.0.17
Version (working)
No response
What browsers are you seeing the problem on?
Chrome
On what operating system are you experiencing the issue?
Windows
Code of Conduct

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

can't you set the chart options like the line chart example?


Update home page copy

Home page  home page (https://www.figma.com/file/AXufBnFAVHvGdsxnQMVhNF/The-Accessibility-Exchange-Wireframes?node-id=4%3A136)

Resolved by #751.


fcst_init_beg loads to the database with incorect value

Describe the Problem
During the data loading into the database fcst_init_beg value get calculated and loaded into the table with incorrect value.
For example, in the file that is attached fcst_valid_beg value is 20210901_010000 and fcst_lead is 003000 (30min). fcst_init_beg should be 2022-09-01 00:30 but the value in the database is 2021-04-29 01:00:00
Here is the MET output:
grid_stat_003000L_20210901_010000V.stat.txt
Expected Behavior
In this case the value should be 2022-09-01 00:30
Environment
Describe your runtime environment:
1. Machine: (e.g. HPC name, Linux Workstation, Mac Laptop)
2. OS: (e.g. RedHat Linux, MacOS)
3. Software version number(s)
To Reproduce
Describe the steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
Post relevant sample data following these instructions:
https://dtcenter.org/community-code/model-evaluation-tools-met/met-help-desk#ftp
Relevant Deadlines
List relevant project deadlines here or state NONE.
Funding Source
Define the source of funding and account keys here or state NONE.
Define the Metadata
Assignee

[ ] Select engineer(s) or no engineer required
[ ] Select scientist(s) or no scientist required

Labels

[ ] Select component(s)
[ ] Select priority
[ ] Select requestor(s)

Projects and Milestone

[ ] Select Organization level Project for support of the current coordinated release
[ ] Select Repository level Project for development toward the next official release or add alert: NEED PROJECT ASSIGNMENT label
[ ] Select Milestone as the next bugfix version

Define Related Issue(s)
Consider the impact to the other METplus components.

[ ] METplus, MET, METdataio, METviewer, METexpress, METcalcpy, METplotpy

Bugfix Checklist
See the METplus Workflow for details.

[ ] Complete the issue definition above, including the Time Estimate and Funding Source.
[ ] Fork this repository or create a branch of main_<Version>.
Branch name: bugfix_<Issue Number>_main_<Version>_<Description>
[ ] Fix the bug and test your changes.
[ ] Add/update log messages for easier debugging.
[ ] Add/update unit tests.
[ ] Add/update documentation.
[ ] Push local changes to GitHub.
[ ] Submit a pull request to merge into main_<Version>.
Pull request: bugfix <Issue Number> main_<Version> <Description>
[ ] Define the pull request metadata, as permissions allow.
Select: Reviewer(s) and Development issues
Select: Organization level software support Project for the current coordinated release
Select: Milestone as the next bugfix version
[ ] Iterate until the reviewer(s) accept and merge your changes.
[ ] Delete your fork or branch.
[ ] Complete the steps above to fix the bug on the develop branch.
Branch name:  bugfix_<Issue Number>_develop_<Description>
Pull request: bugfix <Issue Number> develop <Description>
Select: Reviewer(s) and Development issues
Select: Repository level development cycle Project for the next official release
Select: Milestone as the next official version
[ ] Close this issue.

Times of less than an hour will now be handled correctly by met_db_load.py in the develop branch. This was part of PR 198.


Distribution: refactor, add distribution of means and MADs

Part of #11.

Apparently, computing means and MADs is not deterministic, and it leads to different results in different runs, even with a single parallel worker. The distribution of log-profits seems to be rather stable though. To be investigated.


Feature v06compat

This introduces the changes from #12 plus a change in the package.json to allow installation through npm.
I have still failing tests with v0.4.12 and v0.6.9 of node however...

Thanks for the updates ctavan and rnewson. As I'm sure you've noticed, there hasn't been much activity on our side in nodeload in the recent months.  I don't anticipate us keep this up to date in the near future, as both Ben & I are up to our necks in work projects at the moment.  Would either of you consider working directly in this repo it's useful?  I'm sure Ben wouldn't mind adding your public keys to the repo if so.  Let us know...

Thanks for offering that. It's not sure how intensive we're going to use nodeload in our current project but I'll let you know if I notice that I'll have to do a lot of patching. Thanks guys!

Hi, guys.  Like Jonathan mentioned, it's been awhile since we (especially me!) have done anything with nodeload.  I'm happy to give you commit access if you're interested.


Integrate nexus-e2e with Nexus GitHub workflow

https://github.com/gpBlockchain/nexus-e2e/blob/main/packages/e2e/README.md

option 1 - git submodule, import nexus-e2e as a git submodule
option 2 - workspace, import it as a sub package

https://github.com/ckb-js/nexus/pull/151

after discussion, we decided to enhance the existing e2e tests in order to make e2e more maintainable
In Short

deprecate unnecessary data-testid
a ckb object that can run in Node.js
one file, one scenario


Intrusive shamap inner

High Level Overview of Change
This branch is a memory optimization. It results in about a 2-2.5 GB savings
(10%-15%) when measured on my local validator.
This branch has a long history. About two years ago I wrote a patch to
remove the mutex from shamap inner nodes (ref:
https://github.com/seelabs/rippled/tree/lockfree-tagged-cache). At the
time I measured a large memory savings of about 2 gig. Unfortunately,
the code required using the folly library, and I was hesitant to
introduce such a large dependency into rippled (especially one that was
so hard to build). This branch resurrects that old work and removes the
folly dependency.
The old branch used a lockless atomic shared pointer. This new branch
introduces a intrusive pointer type. Unlike boost's intrusive pointer,
this intrusive pointer can handle both strong and weak pointers (needed
for the tagged cache). Since this is an intrusive pointer type, in order
to support weak pointers, the object is not destroyed when the strong
count goes to zero. Instead, it is "partially destroyed" (for example,
inner nodes will reset their children). This intrusive pointer takes
16-bits for the strong count and 14-bits for the weak count, and takes
one 64-bit pointer to point at the object. This is much smaller than a
std::shared_pointer, which needs a control block to hold the strong and
weak counts (and potentially other objects), as well as an extra pointer
to point at the control block.
The intrusive shared pointer can be modified to support for atomic
operations (there is a branch that adds this support). These atomic
operations can be used instead of the lock when changing inner node
pointers in the shamap.
Note: The space savings is independent from removing the locks from
shamap inner node. Therefor this work is divided into two phases. In the
first phase a non-atomic intrusive pointer is introduced and the locks
are kept. In a second phases the atomic intrusive pointer could be
introduced and the locks will be removed. Some of the code in this patch
is written with the upcoming atomic work in mind (for example, using
exchange in places). The atomic intrusive pointer also requires the C++
library to support atomic_ref. Both gcc and msvc support this, but at
the time of this writing clang's library does not.
Note: Intrusive pointer will be 12 bytes. The shared_ptr will be around
40 bytes, depending on implementation.
When measuring memory usage on a validator, this patch resulted in
between a 10 and 15% memory savings.
Type of Change
Memory Optimization

FYI: This is a branch that has some work to make the shared pointer atomic: https://github.com/seelabs/rippled/tree/atomic_shamap_inner. With that patch we may be able to remove the inner node locks. But I'm putting that on the back-burner for a while.

One important todo before this can be merge is to confirm that we can get away with 16-bit strong counts and 14-bit weak counts.

important todo

> 2 ** 16 -1
65535
> 2 ** 14 -1
16383

That's max refs for strong/weak?

important todo

> 2 ** 16 -1
65535
> 2 ** 14 -1
16383

That's max refs for strong/weak?

Yes, that's right. It's trivial to change that so it the counts are 32 bits and 30 bit, but at the cost of 4 extra bytes per object. If we can, I'd like to avoid those 4 extra bytes.

at the cost of 4 extra bytes per object

I guess that adds up with the current node counts.
Let's say ~20M for just one state tree.
That's ~76MB there alone.

Damn mac eh

@scottschurr I think we need to audit the code and understand all the places that are storing strong and weak shamap pointers and decide if there are ways this could blow up. I have not done that audit, but we'll need to do it before merging this. However, that audit shouldn't stop a review from starting. Even if we decide the limit is too low this is still worth merging, we'll just have to increase the limit (for slightly less memory savings).

important todo

> 2 ** 16 -1
65535
> 2 ** 14 -1
16383

That's max refs for strong/weak?

Yes, that's right. It's trivial to change that so it the counts are 32 bits and 30 bit, but at the cost of 4 extra bytes per object. If we can, I'd like to avoid those 4 extra bytes.

I think this is more than a todo.  It's a blocker.  We should not approve this PR until we know the answer to this question.

important todo
I think this is more than a todo. It's a blocker. We should not approve this PR until we know the answer to this question.
@HowardHinnant
I agree, and I have no intention on merging this until I audit the code to decide if we need larger count sizes - maybe "important todo" wasn't worded as well as I should have. On the other hand the code can be reviewed as-is now and if I need to up the count sizes there will be a slightly smaller memory saving (but it should still be worth doing) and it will be trivial to review the changes to the count sizes. I don't think the review needs to wait for the audit of the count sizes.

All subsequent discussions, fixes and changes will continue in the new PR: https://github.com/XRPLF/rippled/pull/5150
The current PR will be closed later.