rpc error, grpc error, connect to grpc: connection refused

Describe the bug
I have 3 servers:

Server 1: Run docker compose to run 1 master node
Server 2: Run docker compose to run 2 worker nodes
Server 3: Install mongoDB
docker image use latest version

I setup crawlab Ok, all thing is work fine.
Yesterday, all task get status is Error, with message: "Task ended with an error: grpc error: stream not found"

I check logs of container worker node and get logs as below:

I check master node, It's OK.
I try to check connection from both server A and 2 worker node container in server A to grpc :9666, all thing is Ok. Telnet OK and curl connection OK.
I try to create one more worker node is worker_node_3, and run task on it, It's Ok.
Then, I must remove old worker node and re-create to fix this issue temporary.

Hi @thachnv92,
Have you tried upgrading to the newest version and restart all master and worker nodes to see if it works okay?

Many thanks,
I forgot to update this.
It need to more time to retry connect grpc to master node.


feat(calendar): component implementation

[x] I read and followed the CONTRIBUTING.md guide.
[x] I read and followed the New Feature Checklist guide.

Short description of what this resolves:

Calendar component implementation:

horizontal/vertical layout support
default/ranged selection support
custom day cells
bounding months
scrollTo* support

Explorer app examples
Documented ✅

Closing due to some updates incoming


Why the left side code editor need to change front display while editing?

If I tried the following on the left side (type them, not cut and paste)
Test
====

On the left side of editor, it actually change the display while I type the = char ? This is very distracting where I assume left side is code editor for plain text. Since I have right side to preview already ready, while left side need to change the font? Is this a bug or intended? This is even worse when I tried to type a table and align withe I char, it's frustrating to see the font and type changes as I type.

It's a feature, and can be disabled in the settings.


Bump cert-manager to v1.13.2

https://github.com/cert-manager/cert-manager/releases/tag/v1.13.2

We should cherry pick this back to v1.12


Initial lib-bin split

Addressing #124
Okay @Skallwar @CohenArthur this is pretty basic split but does the job as initial base layout.
Note the doc=false on bin is intentional for backwards cargo compatibility,
Otherwise we would need to have different library name to crate but newer cargo versions still do doc --bins despite this.

@Skallwar could you merge so I can rebase my branches, thx!

Give me some time to create a release from what we have now

We have some issue with the automatic build artifact upload, I will need to amend the release commit later today (I'm in class right now)

We have some issue with the automatic build artifact upload, I will need to amend the release commit later today (I'm in class right now)

Can you get rid of the .svg on that release, it freezes all firefox browsers for whoever is looking at the repo or crate page annoyingly :)
Or add the one I generated:
https://raw.githubusercontent.com/pinkforest/svg-testing-bloat/main/suckit-100cols-15rows.svg
If you put it to media/ on the repo
You can then hotlink it by:
https://cdn.jsdelivr.net/gh/username/repo/media/file.svg
Or I can send a separate PR for that

A separate issue will be nice. I will make a PR to fix the CI anyway

The release is out now. I had to force push because of the release ci only being triggered on release...

I'll re-create the branch.

You could rebase on top of master? Do as you wish

I did :) hashtag tired.


The application does not work for me

Hello, at the moment I only tested in one game and the rich presence does not appear in Discord.
I am currently playing: https://www.roblox.com/games/8216196965/Touch-Soccer-League
I followed all the steps for the installation and already verified my account.

Yes, the bot cookie account expired for the account, I will be replacing it with a new one and sending out the new release. In the next 10 mins

I will keep you updated.

Hello, I've created a new release version v1.5.4.
This fixes the problem you had and some other smaller issues.

Feel free to open another issue, if you have any more problems.

Doesn't detect anything for me as of now and I verified as well + followed the RPC account + fixed join settings, is this on Roblox's side?


FR: Easier support for authentication to GKE clusters in ClusterResource

Expected Behavior
It should be easy to specify a GKE cluster as a target in ClusterResource.
Actual Behavior
Right now ClusterResource supports basic and token authentication. GKE uses kubectl credential helpers, which makes using this ResourceType hard.
Proposed Idea
Refactor the ClusterResource type from this:
type ClusterResource struct {
	Name string               `json:"name"`
	Type PipelineResourceType `json:"type"`
	// URL must be a host string
	URL      string `json:"url"`
	Revision string `json:"revision"`
	// Server requires Basic authentication
	Username string `json:"username"`
	Password string `json:"password"`
	// Server requires Bearer authentication. This client will not attempt to use
	// refresh tokens for an OAuth2 flow.
	// Token overrides userame and password
	Token string `json:"token"`
	// Server should be accessed without verifying the TLS certificate. For testing only.
	Insecure bool
	// CAData holds PEM-encoded bytes (typically read from a root certificates bundle).
	// CAData takes precedence over CAFile
	CAData []byte `json:"cadata"`
	//Secrets holds a struct to indicate a field name and corresponding secret name to populate it
	Secrets []SecretParam `json:"secrets"`

to something like:
type ClusterResource struct {
	Name string               `json:"name"`
	Type PipelineResourceType `json:"type"`
	// URL must be a host string
	URL      string `json:"url"`
	Revision string `json:"revision"`

    // Server requires Basic authentication
    BasicAuth BasicAuth `json:"basicauth"`

    // Server requires Bearer authentication. This client will not attempt to use
	// refresh tokens for an OAuth2 flow.
	// Token overrides userame and password
    TokenAuth string `json:"tokenAuth"`

    // This is a GKE cluster that requires credential helpers
    GKECluster GKECluster `json:"gkeCluster"`

	// Server should be accessed without verifying the TLS certificate. For testing only.
	Insecure bool
	// CAData holds PEM-encoded bytes (typically read from a root certificates bundle).
	// CAData takes precedence over CAFile
	CAData []byte `json:"cadata"`
	//Secrets holds a struct to indicate a field name and corresponding secret name to populate it
	Secrets []SecretParam `json:"secrets"`
}

type BasicAuth struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type GKECluster struct {
    ClusterName string
    Project string
    Zone string
}

Note that this exact refactoring won't work because Params in a Resource are limited to strings only, and can't contain other nested types. This is probably something we want to do anyway, though.


Running in webpack watch mode doesn't work after a recompile.

Running in webpack watch mode doesn't work after a recompile, this results in the __webpack_require__.ab being scrubbed from the output.js

This is my bad. RTFM.

@wesselvdv -- Which memo? I can't see anything referring to watch mode. Maybe I'm just blind!

@MynockSpit It's not referring to a watch mode, but to the cache mechanism introduced in webpack 5. You have to put the following in the plugins array in your config:
    plugins: [
      {
        apply(compiler: any) {
          compiler.hooks.compilation.tap(
            'webpack-asset-relocator-loader',
            (compilation: any) => {
              relocateLoader.initAssetCache(compilation, '');
            },
          );
        },
      },
    ]

Awesome, thank you!


CI (python matrix): Update to 3.10

Resolves: https://github.com/python-poetry/poetry/issues/5087

[x] Added tests for changed code. N/A
[x] Updated documentation for changed code. N/A

@danieleades

@tony tony dismissed danieleades’s stale review via e115389 now

Same, just a rebase

@tony Could you please rebase :pray:

@branchvincent Thank you for the review!
I will sit tight and rebase as needed to make sure the PR stays fresh 👍

@finswimmer always.


weird backspace behavior

Hello @hrsh7th , thanks for the really cool plugin. I shifted from completion-nvim and I feel it has the abstractions that people really want from an auto-completion setup.
Just I found the backspace behavior a little weird. When I leave some suggestion for my own text and then do a backspace it inserts the (left) suggestion text automatically. Very similar to android autocorrection :sweat_smile:
I have attached a gif that should explain my words more clearly.

I don't know if it is the intended feature. If it is then is there any option to disable it.
Also, sometimes backspace deletes a big amount of text (like 2 or 3 words) instead of a character.
This gif would show the behavior:

(Bottom right of gif shows my keypress in case of any ambiguity)
Thanks

Could you provide your config?

Could you provide your config?

@hrsh7th I just realized that this is due to my completeopt. I also set the longest parameter that was causing this behavior. Sorry for this dumb issue. :sweat_smile: Thanks again for plugin

@hrsh7th I just realized that this is due to my completeopt. I also set the longest parameter that was causing this behavior. Sorry for this dumb issue. :sweat_smile: Thanks again for plugin

It's weird... nvim-compe should overwrite complwteopthttps://github.com/hrsh7th/nvim-compe/blob/master/lua/compe/completion.lua#L229

It's weird... nvim-compe should overwrite complwteopthttps://github.com/hrsh7th/nvim-compe/blob/master/lua/compe/completion.lua#L229

That's weird. I guess that the function is not being called in case of backspace
but completion is being triggered. This maybe a possible scenario. I would
also check that.
The minimal configuration needed to regenerate the behavior is:
call plug#begin('~/.vim/plugged')
Plug 'hrsh7th/nvim-compe'
call plug#end()

lua << EOF
require'compe'.setup {
  enabled = true,
  debug = false,
  -- min_length = 1,
  preselect = 'disable',

  source = {
    path = {
	priority = 9
    },
    buffer = {
	priority = 8
    },
    vsnip = {
	priority = 9
    },
    nvim_lsp = {
	priority = 10,
	sort = false
    },
  };
}
EOF
set completeopt=menuone,longest

That's weird. I guess that the function is not being called in case of backspace
but completion is being triggered. This maybe a possible scenario. I would
also check that.
The minimal configuration needed to regenerate the behavior is:
call plug#begin('~/.vim/plugged')
Plug 'hrsh7th/nvim-compe'
call plug#end()

lua << EOF
require'compe'.setup {
  enabled = true,
  debug = false,
  -- min_length = 1,
  preselect = 'disable',

  source = {
    path = {
	priority = 9
    },
    buffer = {
	priority = 8
    },
    vsnip = {
	priority = 9
    },
    nvim_lsp = {
	priority = 10,
	sort = false
    },
  };
}
EOF
set completeopt=menuone,longest

Thank you for providing minimal repro.
It's reproduced. It's very weird...

Thank you for providing minimal repro.
It's reproduced. It's very weird...

Hm... nvim-compe seems to have a possibility of a bug.
In my environment, local feels feels mo|<BS><BS> will display pum only for a moment.

Hm... nvim-compe seems to have a possibility of a bug.
In my environment, local feels feels mo|<BS><BS> will display pum only for a moment.

I've added set completeopt=menu,menuone,noselect to README.md as required setting.
And bit improved a backspace behavior.

I've added set completeopt=menu,menuone,noselect to README.md as required setting.
And bit improved a backspace behavior.


Update linux-nginx.md

Modify the /etc/nginx/sites-available/default file to redirect all HTTP requests to HTTPS properly

We have to update the /etc/nginx/sites-available/default file after configuring HTTPS. If not, all HTTP requests are still captured and processed by the server block in the /etc/nginx/sites-available/default file. The following server block in the linux-nginx/nginx.conf file is unable to capture HTTP requests as expected because it doesn't have a proper server_name directive. It captures only HTTP requests with an empty HOST header.
server {
    listen     *:80;
    add_header Strict-Transport-Security max-age=15768000;
    return     301 https://$host$request_uri;
}

Thanks @tunggnu ... We'll have Sourabh look this over and then we can see about getting it merged.

Any HSTS guidance that sets max-age to a value greater than zero or setting up a 301 in production needs a big bold warning of how it impacts clients.

EDIT 2: I see this content is already part of the doc. See
https://github.com/dotnet/AspNetCore.Docs/blob/master/aspnetcore/host-and-deploy/linux-nginx/nginx.conf#L14-L18

... but @shirhatti ...

The following server block in the linux-nginx/nginx.conf file is unable to capture HTTP requests as expected because it doesn't have a proper server_name directive. It captures only HTTP requests with an empty HOST header.

... should that block contain ...
server_name               example.com;

... to match the other server entry?

... should that block contain ...

server_name example.com;

Yes! It should contain the server_name directive. When not specificed, nginx uses the empty name as the server name and that will not match

There isn't such a WARNING in the doc. Do you have text in mind that I can drop in?

Copying some verbiage from https://docs.microsoft.com/aspnet/core/security/enforcing-ssl

We recommend using temporary redirects rather than permanent redirects. Link caching can cause unstable behavior in development environments.

For production environments that are implementing HTTPS for the first time, set the initial max-age to a small value. Set the value from hours to no more than a single day in case you need to revert the HTTPS infrastructure to HTTP. After you're confident in the sustainability of the HTTPS configuration, increase the HSTS max-age value; a commonly used value is one year.

Thanks @shirhatti ... My hours are burned, so I'll take care of this first thing Tuesday morning.

@tunggnu ... do you want to modify this further, or do you want me to take care of the additional updates?

We'll be able to avoid a new section.

Let's update the existing example (AspNetCore.Docs/aspnetcore/host-and-deploy/linux-nginx/nginx.conf).

Add a WARNING based on ...

We recommend using temporary redirects rather than permanent redirects. Link caching can cause unstable behavior in development environments.
For production environments that are implementing HTTPS for the first time, set the initial max-age to a small value. Set the value from hours to no more than a single day in case you need to revert the HTTPS infrastructure to HTTP. After you're confident in the sustainability of the HTTPS configuration, increase the HSTS max-age value; a commonly used value is one year.

... but I'll need to do a touch of grammar work on that.

Hi all,
The main purpose of this pull request is to properly redirect all HTTP requests to HTTPS because I thought the current configuration was unable to redirect HTTP requests. In fact, technically, it could. Why?
The tutorial said:

Edit the /etc/nginx/nginx.conf configuration file. The example contains both http and server sections in one configuration file.

The instruction above is confusing, especially for those who are familiar with Ubuntu's convention for Nginx. This convention includes:

The /etc/nginx/nginx.conf file contains general settings. Also, the last part of it includes the settings from other files in other folders, which looks like this:
##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

The /etc/nginx/sites-available folder contains configuration files corresponding to their websites.

The /etc/nginx/sites-enabled folder contains symlinks to the actual configuration files in the /etc/nginx/sites-available folder.

That's why when readers only want to use HTTP, they only need to edit the /etc/nginx/sites-available/default file without touching the /etc/nginx/nginx.conf file, then Nginx can still know the new contents of the /etc/nginx/sites-available/default file.
When I read the quote above, I thought that I had to copy all the new contents of the example into my existing /etc/nginx/nginx.conf file, rather than replace all the old contents with the new ones. That means include /etc/nginx/sites-enabled/*; will be preserved. Thus Nginx will still read the contents of the /etc/nginx/sites-available/default file and I will have two HTTP server blocks colliding with each other.
But it seems that the quote above implies that the reader must replace all the old contents of the /etc/nginx/nginx.conf file with the example's contents. If so, Nginx will only read the contents of the /etc/nginx/nginx.conf file and ignore all other files, including the /etc/nginx/sites-available/default file. Consequently, the HTTP server block in the /etc/nginx/nginx.conf file is the only server block that handles HTTP requests, so it will catch all HTTP requests even if it is missing a server_name. If that is what the above quote really means, then it is necessary to add a note to the reader something like: "You need to replace the existing content of the /etc/nginx/nginx.conf file with the example's contents.". And you can decline this pull request.
Anyway, I see some other minor issues that can be improved:

Inconsistency in the declaration of the server_name directive. In the /etc/nginx/sites-available/default file you declared server_name example.com *.example.com;, but in the /etc/nginx/nginx.conf file you declared server_name example.com;.
The redundancy in the listen directive. You should replace listen *:80; with  listen 80;, and listen *:443 ssl; with listen 443 ssl;
Does not adhere to the separation of concerns principle. You created the /etc/nginx/sites-available/default file to contain HTTP configuration, but included HTTPS configuration settings in the /etc/nginx/nginx.conf file, which should only contain the general settings. In my opinion, the ideal solution is to move all the specific settings out of the /etc/nginx/nginx.conf file. They can be placed inside a new file or merged into the /etc/nginx/sites-available/default file.
About HSTS: you don't need to include add_header Strict-Transport-Security max-age=15768000; in the HTTP server block, because according to MDN, the Strict-Transport-Security header is ignored by the browser when your site is accessed using HTTP.
About redirection status code: the first sentence of this tutorial is "This guide explains setting up a production-ready ASP.NET Core environment on an Ubuntu 16.04 server." So, the configuration should NOT focus on development environments. The redirection status code should be 301 and you can add a comment for development environments like this:

For development environments, we recommend using temporary redirects (302) rather than permanent redirects (301). Link caching can cause unstable behavior in development environments.

@guardrex I'm not a native English speaker, so please help me to take care of the additional updates.

Thanks for providing that feedback, @tunggnu.
@shirhatti ... I can work on this, but not at the moment. I'm 🏃😅 on 5.0 Blazor issues over the next few weeks. Do you want to provide feedback on the updates that @tunggnu suggested and have me work on this, or do you want to take another course of action?

I have some time this morning to try and address this. Because I can't edit more than just the one file modified by this PR here without submitting a PR to your branch, I'm just going to open a new PR. Also, I opened https://github.com/dotnet/AspNetCore.Docs/issues/20359 to track the work.
Thanks @tunggnu ... I'll ping you on the PR.


how to use vue and ios communication?

I sparked an event in the vue, but I can't intercept it in the ios.why?

Hey you may want to ask your question on the forum, gitter or StackOverflow. It seems unrelated to vue-cli


feat: Added ability to assume a Role using STS

Hey hey @AlastairDewar ! Im so sorry for delay, great job, we are appreciated by your contribution!


migrate rancher owned cluster to another rancher deployment

What kind of request is this (question/bug/enhancement/feature request):
feature request
Use Case:
Ability to migrate clusters to be managed by another rancher deployment.
This should maintain the same ability to scale out custom clusters.
gz#6091
gz#8330
gz#8364
gz#11201
gz#11292
gz#12894
gz#15365
gz#15654
gz#16049
gz#16082
gz#16406
gz#17446
gz#17524
gz#17542

This is also VERY useful in the rare case where there is a disaster and the Rancher configuration is lost and a user needs to rebuild Rancher from the ground up.  In this case there is no way to import the previous clusters that Rancher had created.  The clusters would need to be recreated, which while doable, is very painful.

@aemneina  are you requesting this for hosted clusters, custom, imported, or all of the above?
Also, what do you mean by "This should maintain the same ability to scale out custom clusters." I dont quite understand what you mean by that requirement

I raised a support request (with ZenDesk) where the response was that THIS ticket was sited by Rancher Support as the potential fix (see: https://support.rancher.com/hc/en-us/requests/4208)
To be clear, our requirement is to be able to import Application Clusters to a specific Rancher management cluster through automation.
Automation is the critical factor since we don't allow use of the Rancher management UI for effecting change in our Production environment. Any changes are only possible using automated release pipelines which include change manager approval and creation/update of change audit records.
I won't replay all of the support ticket response but in a nutshell it is covered by

... there isn't a way to import a cluster to another rancher installation at this time however we have a GitHub issue open for this. https://github.com/rancher/rancher/issues/16471

@cjellick Ideally all of the above on cluster type. Understandable if we'd have to prioritize some over others.
What I meant with: "This should maintain the same ability to scale out custom clusters." is the case I have a cluster created by rancher using node templates. I have the ability there to scale the node pools, this most likely will be lost migrating the managed cluster to another rancher server instance.
Not sure if we can meet @goffinf 's requirement by cleaning up the cluster of rancher cruft, then create a new cluster for import on another managed rancher. I think the only piece missing in that case @goffinf is that cleanup step, this should be straight forward to automate. I'll sync with @patrick0057 on this.

@cjellick thanks. If some of the ‘cruft’ you are referring are the hosts that are still registered to Rancher but marked as unavailable because they actually no longer exist but Rancher doesn’t know that, we do run periodic de-register script that tidies those up. We did the same on v1.x and again on 2.x to deal with situations where you cycle a node out of a cluster and replace it with another and something goes wrong. We have a mandatory control that means we must replace our whole estate of nodes (of all types) frequently (min once a month) and of course we must be prepared for both DR and any security vulnerability that might occur at any time that requires us to burn everything.
Or perhaps you are referring to some other cruft (no shortage of that around here ;-) )

Our R&D department is looking at using Rancher / RKE to build clusters as well.  They have a bit of a unique need to be able to auto-deploy a cluster onto know hardware (using RKE) and then import and manage that cluster with Rancher at a later time, or even move the cluster from one Rancher to another.

We have a similar requirement - to be able to move K8S clusters between supported and self-supported environments.

We created an RKE cluster and now want to move it to a new Rancher 2 with HA setup. Seems also be waiting for a solution to this issue?

Is there a way to manually achieve it?

Where are the configurations for Rancher stored now?

I'am waiting for this feature. I want to migrate clusters to a closer ( new dc/ the same region), fresh rancher.

technically it should be just a matter of exporting all the custom crds + objects from the local cluster to the new one and referencing those right afterwards.

We'd love this feature too. We've tried to move rancher crds using Velero but didn't work.

Importing a Rancher-owned RKE cluster to another Rancher instance can be viewed as a feature, but I insist on it as it is crucial in any disaster scenario.
As an example, one of my Rancher installations died yesterday because of that cruft cert-manager, so the procedure highlighted here (more precisely, the "OPTION B: REINSTALLING RANCHER AND CERT-MANAGER") didn't work this time!
Now I'm left with a running pre-production RKE cluster, which I'm currently managing via kubectl with an updated kubeconfig file.
Importing that cluster in a fresh Rancher installation would just ease any upcoming management activity, which is exactly the Rancher mantra itself!
A robust K8s orchestrator shouldn't have any problems in moving clusters from an installation to another!

There is one case that is really frustrating, prod and test clusters running in single node docker rancher, I need to to seperate them but I cant find a way to migrate test cluster to another rancher instance.

2.5 should have a backup/restore (think migration via restores) feature, I suspect that would meet the need. I have yet to try it myself but encourage anyone with a test cluster to kick the tires.

Maybe with the register feature that allows managing a cluster "as if" it was created with rancher ? Then maybe it's capable of importing exsting k8s cluster that would have been created with another rancher instance.

@deniseschannon @cjellick
I'm a bit unclear, is there an intent to build a feature to all migrating an existing Ranching cluster from one Rancher instance to another?
Thanks

Is cluster migration between Rancher server implemented?

Is there a way to just delete the existing agent in a rancher-managed cluster and then re-import it into another rancher server by just that import agent deployment from the new cluster?

Huge bump. I would like to move from single-node-installation to HA in a different datacentre. Currently this doesn't look like an option, but might still be doable, e.g.:

Export all kubeconfigs
Install new Rancher in a new location
Create clusters as "Imported"
Execute kubectl commands to import clusters
At least I've managed to successfully perform full Rancher destruction and reinstallation without any old data on HA cluster, but it was on Digitalocean DOKS rather than custom RKE cluster.

@Gallardo994 If moving all clusters over, you can do a Rancher backup and restore. This will even work if moving from different types of clusters (RKE, K3S, AKS, EKS, GKE, etc). See https://rancher.com/docs/rancher/v2.x/en/backups/v2.5/

any news ?

please, add this this feature would have been awesome in my case :(

Could we use the Rancher backup operator to collect all the different resources IE cluster object, machines, projects, rolebindings, etc for a cluster? Then import it into another Rancher IE kubectl apply all that YAML?

This is so much needed. Please implement.
In fact, what I need is some way to do regular backups all necessary information about a cluster needed to import it into another Rancher instance later. Something to get production up and running asap.

@harridu yes, this is all well documented: https://rancher.com/docs/rancher/v2.5/en/backups/

@harridu yes, this is all well documented: https://rancher.com/docs/rancher/v2.5/en/backups/

This documentation covers migrating the Rancher server (upstream) between clusters. This feature request is to move a downstream cluster to another Rancher deployment. For example, I could deploy a downstream Cluster "A" in Rancher-A.example.net then later down the road I might want to move that cluster to Rancher-B.example.net.
This is currently there is no supported way to do this in Rancher.

+1 on this as I am just in this situation where I whole machine and DR having rancher is lost forever due to some mess up in infra management with no scope of recovery.
Since RKE is running fine as 3 node cluster and even kubeconfig is also available for controlpane access.
But all management capabilities are lost and this feature, where spinning up new rancher and importing this cluster there will help me regain management access.
Even if there is a manual way to do this, please guide me.

+1 for me too! I need this ability to manage disaster recovery.  It would also give me the ability to "promote" a test cluster that is attached to a test rancher to be a production cluster on a production rancher.

Same here. We'd like to move a cluster from the production Rancher instance to the test Rancher instance. Ideally, it would be nice to have an "Unregister" button next to the "Import Existing" button in the cluster management view. Hope you guys can add this feature in next Rancher versions.

Clearly this is an important feature that would help in a lot of different scenarios.
It does not look like difficult to implement, are there any strategical/political reasons to not do it?

Still waiting for this feature!!!

I think all that thats really needed is a reliable and safe way to Remove Rancher from a cluster.  After that you could just import it where you want it to be.  I have seen some instructions on removing rancher, but none that are officially supported by rancher.  Wait!  I found this: https://ranchermanager.docs.rancher.com/faq/rancher-is-no-longer-needed#what-if-i-dont-want-rancher-anymore.  Would that be the solution?

Answering my own question.  The method above removes rancher "and anything installed by rancher".  This would not be desirable in cases where rancher was use to install apps like maybe datadog or neuvector.  For me, it might works since I install everything with helm.  But its a little scary.  HOWEVER, in my case the section titled "What if I don't want my registered cluster managed by Rancher?" https://ranchermanager.docs.rancher.com/faq/rancher-is-no-longer-needed#what-if-i-dont-want-rancher-anymore would probably be my best solution.
In my environment I create the management cluster with eskctl, install rancher on it.  Then create my downstream clusters and import them.  I haven't test it, but seems like just simply deleting it from one Rancher Manager and importing it into another one, would work.
Obviously this would not work for rancher-created clusters because the described action would delete the entire cluster.

i tested the above and it works fine.  It removed all the rancher components from the cluster and left it intact.

My Rancher install died/stopped working correctly, span up a new instance, did the unrecommended "import existing Rancher managed cluster" - showed up, but I can't upgrade Kubernetes version or anything like that.... plus it hasn't really worked either.

My Rancher install died/stopped working correctly, span up a new instance, did the unrecommended "import existing Rancher managed cluster" - showed up, but I can't upgrade Kubernetes version or anything like that.... plus it hasn't really worked either.

One of the biggest problems with importing an existing cluster into Rancher is that you lose some features that you had when Rancher provisioned the cluster.

This would make a lot of Ops way more easy! Our Rancher instance is already very old and it seems like some things get broken with many upgrades and migration tasks. Some resources are left behind and our rancher is no longer working as expected - I was spending already several days, trying to "repair" things, but it just stays broken and does not upgrade downstream clusters any longer. I would just like to throw it all away and start with a new Rancher ..

we require this feature as well, so move a lot of legacy clusters away from an unupgradable single instance rancher server. Any ETA?

Any update on this one?

Haven't tested this yet but could the latest rancher-backup chart be used to backup the resources required and redeploy to a "migrated" instance?
https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/back-up-rancher

Importing orphaned downstream clusters into a new Rancher instance seems pretty essential, but I am surprised that this requirement has not yet been implemented, even after so many requests for this feature and such long time. I would have to reconsider using Rancher as an enterprise solution for my Kubernetes strategy. Please provide an update or let us know if you don't intend to ever implement this. Thanks.

I totally agree. Not having the ability to recover an orphaned downstream cluster in Rancher's Management introduces a major operational risk that enterprises should not have to take.

Is there an update on this. We are also thinking of using rancher as our enterprise kubernetes solution but need this feature to be in place before we take this decision.

same here

Following this for updates, this feature would be required for us.

following for updates, have used rancher a while and been happy. But this is a major roadblock
Is there any way to do this manually?

It has now been many years since this feature request, which is a very important one. Customers need to be able to migrate their downstream clusters to new Rancher instances. Please look into this request and sort it out.

this isn't there yet?!    Was just jumping onto Rancher Prime with the hope I'd be able to spin up rke2 clusters,  and have them be somewhat independent should the Rancher server have update failure or other such meltdowns.   Was hoping to lean on Rancher and not have to consume the Ansible playbooks for rke2...   The devs really lean on Rancher too,  having a reliable web-based hub gets rid of Ansible (tower) and also gets rid of any build directories full of machine specs and cluster notes,  no terraform, it'd all be in the UI.  alright I'm over it,  moving on.

Any update?

No movement on this issue after 6 years?? This is an essential feature for DR.

Actually it is not a viable option. It removes all the projects, and therefore all the namespaces.

@laurie-kepford Could you explain what happened?  We are in the same boat. Did you try to do this step  "What if I don't want my registered cluster managed by Rancher?" Are those clusters created by Rancher instead of RKE etc?
Thanks!


Remove dependance on Boost.logger

All of the service side logging is being handled by the Boost.logger library. While it's nice in that it provides a clean interface for logging to file and or console with timestamps, it turns out to be pretty heavy weight for what it does (effects compile times). The client uses it's own simpler console only logger that doesn't use boost. It should be extended to support logging to a file. Then we can replace and remove the dependence on Boost.logger on the service.

I've ripped out the boost logging mechanism, but the new logger still doesn't log to a file. Also the multithreading safe logger is only safe for each object added to the stream. I think we should just replace the stream style logging with classic printf style logging.

I was able to fix the logging to a file and multi-threading logging issues with the stream style logger. Closing this issue.


The ripple animation goes beyond the swipe list

#91605
Steps to reproduce

Click or hold the ListTile widget
Scroll the list up while holding the desired widget

Expected results
When clicking on a ListTile while scrolling through the list in the Search view, the ripple effect should hide under the Divider, just like the ListTile widgets themselves.
Actual results
When clicking on a ListTile while scrolling through the list in the Search view, a ripple effect is played over the text field starting from Divider.
Code sample
Code sample
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(useMaterial3: true, brightness: Brightness.light),
      darkTheme: ThemeData(useMaterial3: true, brightness: Brightness.dark),
      home: SearchBarsScreen(),
    );
  }
}

class SearchBarsScreen extends StatefulWidget {
  const SearchBarsScreen({super.key});

  @override
  State<SearchBarsScreen> createState() => _SearchBarsScreenState();
}

class _SearchBarsScreenState extends State<SearchBarsScreen> {
  final searchController = SearchController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Text('Search view - full screen'),
          SearchAnchor.bar(
            suggestionsBuilder: (context, controller) {
              return List<ListTile>.generate(50, (int index) {
                final item = 'item ${index + 1}';
                return ListTile(
                  title: Text(item),
                  onTap: () {
                    setState(() => controller.closeView(item));
                  },
                );
              });
            },
          ),
          SearchAnchor(
            builder: (context, controller) {
              return IconButton.filledTonal(
                icon: Icon(Icons.search),
                onPressed: () {
                  controller.openView();
                },
              );
            },
            suggestionsBuilder: (context, controller) {
              return List<ListTile>.generate(50, (int index) {
                final item = 'item ${index + 1}';
                return ListTile(
                  title: Text(item),
                  onTap: () {
                    setState(() => controller.closeView(item));
                  },
                );
              });
            },
          ),
          Divider(),
          Text('Search view - docked'),
          SearchAnchor.bar(
            isFullScreen: false,
            suggestionsBuilder: (context, controller) {
              return List<ListTile>.generate(50, (int index) {
                final item = 'item ${index + 1}';
                return ListTile(
                  title: Text(item),
                  onTap: () {
                    setState(() => controller.closeView(item));
                  },
                );
              });
            },
          ),
          SearchAnchor(
            isFullScreen: false,
            searchController: searchController,
            builder: (context, controller) {
              return IconButton.filledTonal(
                icon: Icon(Icons.search),
                onPressed: () {
                  controller.openView();
                },
              );
            },
            suggestionsBuilder: (context, controller) {
              return List<ListTile>.generate(50, (int index) {
                final item = 'item ${index + 1}';
                return ListTile(
                  title: Text(item),
                  onTap: () {
                    setState(() => controller.closeView(item));
                  },
                );
              });
            },
          ),
        ],
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

Logs
No response
Flutter Doctor output

Doctor output
[√] Flutter (Channel master, 3.11.0-14.0.pre.67, on Microsoft Windows [Version 10.0.22621.1702], locale ru-UA)
    • Flutter version 3.11.0-14.0.pre.67 on channel master at C:\Flutter-SDK\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 87bc2193e6 (2 hours ago), 2023-05-29 07:26:24 -0400
    • Engine revision 91bc423843
    • Dart version 3.1.0 (build 3.1.0-155.0.dev)
    • DevTools version 2.23.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at C:\Users\yablo\AppData\Local\Android\sdk
    • Platform android-TiramisuPrivacySandbox, build-tools 32.1.0-rc1
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.5.3)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.5.33516.290
    • Windows 10 SDK version 10.0.22000.0

[√] Android Studio (version 2022.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)

[√] IntelliJ IDEA Community Edition (version 2023.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.2.1
    • Flutter plugin version 73.1.1
    • Dart plugin version 231.9065

[√] VS Code (version 1.78.2)
    • VS Code at C:\Users\yablo\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.64.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22621.1702]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 113.0.5672.127
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 113.0.1774.57

[√] Network resources
    • All expected network resources are available.

• No issues found!

Reproducible on the latest master and stable channels.
  flutter doctor -v
[✓] Flutter (Channel master, 3.11.0-2.0.pre.55, on macOS 13.3 22E252 darwin-arm64, locale en-NG)
    • Flutter version 3.11.0-2.0.pre.55 on channel master at /Users/dammya/fvm/versions/master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 835b892d7f (3 weeks ago), 2023-05-07 01:30:22 +0530
    • Engine revision 23f730efbf
    • Dart version 3.1.0 (build 3.1.0-83.0.dev)
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/dammya/Library/Android/sdk
    • Platform android-33, build-tools 32.1.0-rc1
    • ANDROID_HOME = /Users/dammya/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2022.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.78.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.50.0

[✓] VS Code (version 1.78.0)
    • VS Code at /Users/dammya/.Trash/Visual Studio Code 20.07.05.app/Contents
    • Flutter extension version 3.50.0

[✓] Connected device (4 available)
    • sdk gphone arm64 (mobile) • emulator-5554                        • android-arm64  • Android 11 (API 30) (emulator)
    • iPhone 14 Pro (mobile)    • DCF2031A-7EA9-42FF-8CD4-D4584F3E7A6D • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)           • macos                                • darwin-arm64   • macOS 13.3 22E252 darwin-arm64
    • Chrome (web)              • chrome                               • web-javascript • Google Chrome 113.0.5672.126

[✓] Network resources
    • All expected network resources are available.

• No issues found!

[✓] Flutter (Channel stable, 3.10.2, on macOS 13.3 22E252 darwin-arm64, locale
    en-NG)
    • Flutter version 3.10.2 on channel stable at /Users/dammya/sdks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9cd3d0d9ff (5 days ago), 2023-05-23 20:57:28 -0700
    • Engine revision 90fa3ae28f
    • Dart version 3.0.2
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version
    32.1.0-rc1)
    • Android SDK at /Users/dammya/Library/Android/sdk
    • Platform android-33, build-tools 32.1.0-rc1
    • ANDROID_HOME = /Users/dammya/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2022.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.78.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.50.0

[✓] VS Code (version 1.78.0)
    • VS Code at /Users/dammya/.Trash/Visual Studio Code 20.07.05.app/Contents
    • Flutter extension version 3.50.0

[✓] Connected device (4 available)
    • sdk gphone arm64 (mobile) • emulator-5554                        •
      android-arm64  • Android 11 (API 30) (emulator)
    • iPhone 14 Pro (mobile)    • DCF2031A-7EA9-42FF-8CD4-D4584F3E7A6D • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)           • macos                                •
      darwin-arm64   • macOS 13.3 22E252 darwin-arm64
    • Chrome (web)              • chrome                               •
      web-javascript • Google Chrome 113.0.5672.126

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Closing per https://github.com/flutter/flutter/issues/127794#issuecomment-1597198550


Add tests for new newer Py versions and other misc packaging bits

Bump version to 0.1.2
Test on Python 3.8 and 3.9
Update HISTORY.md
Update tox
Update travis
Update setup.py
Update Makefile to use twine and add to dev reqs.txt

Merged in #24 and released to PyPI


Windows - powershell errors after starting

@shanumas we do not plan to support windows for the observable future, but will let you know if this changes


Add NewLegacyKeccak512 hash function

Go-Ethereum uses the NewLegacyKeccak512 from an newer version of golang/crypto.
This function is being added here to allow for compatibility with Go-Ethereum and Cosmos-SDK.
Code taken from: https://github.com/golang/crypto/blob/master/sha3/hashes.go#L61-L65

Bumping this PR - you cannot build a Cosmos SDK app in a vgo project that also imports go-ethereum.

we also want this to be merged

bumping this again

@ebuchman thank you for merging this


Parameter binding support

Hi. Is there any plan to implement this feature? It's 2023 and nowadays having to deal with SQL injections is pretty much blocking issue for actual deployment. :(
https://www.sqlite.org/c3ref/bind_blob.html

Sure, that's not hard to support it but currently there's no one working on it yet. I cannot ensure the shipping date but I think you can expect to see this in a few months.
For now, if you concern SQL injection issue, then we would recommend to use AST Builder for building queries.

@panarch any update on this? I could pick it up if need be.

@panarch any update on this? I could pick it up if need be.

sure 👍

Awesome!
My current approach would be use a parser, and then iterate through the tokens to generate the final output.
There is sqlformat crate which I found has similar functionality (plus formatting).
Let me know your feelings about the crate, and whether I can use it or port the specific parts that matter to us.

After a little more research, this crates uses https://github.com/sqlparser-rs/sqlparser-rs so I will work to integrate this feature at that point where I will look for Value::Placeholder

what's the current suggested way todo this?

what's the current suggested way todo this?

currently there is no parameter binding support for SQL.
if you accept the param values from client-side, safe way is that you need to use AST builder.

Parameter binding is a great feature. Is there any updates?
I dig a little into and there is a place looking good to adopt the Placeholder.
--- a/core/src/executor/evaluate/expr.rs
+++ b/core/src/executor/evaluate/expr.rs
@@ -9,7 +9,15 @@ use {
 };

 pub fn literal(ast_literal: &AstLiteral) -> Result<Evaluated<'_>> {
-    Literal::try_from(ast_literal).map(Evaluated::Literal)
+    match ast_literal {
+        AstLiteral::Placeholder(v) => {
+            // Ok(Evaluated::Value(Value::I64(3344)))
+            todo!()
+        }
+        _ => {
+            Literal::try_from(ast_literal).map(Evaluated::Literal)
+        }
+    }
 }

Therefore evaluate::evaluate_stateless could be changed to let a provider of parameters pass in. The provider take the placeholder like $1 and return corresponding Value. It can be a simple vec or a hashmap or a wrapper for both. I think.
All funcs in the whole calling path from execute to evaluate_stateless would be changed. Or a new func execute_args maybe?
Is this a workable idea?

Hi guys! I deleted my previous comment mentioning an idea that adopt the Placeholder. I realized it's too many impact to the codebase that if changes made to evaluate function.
I think maybe a resolve_parameters function between translate and execute is a solution that has the least impact and is less aggressive. That function replaces all ast::Expr::Placeholder(Placeholder::Text(String)) in a statement to a resolved one ast::Expr::Placeholder(Placeholder::Resolved(String, Vec<u8>)). The 2nd part of Placeholder::Resolved is the bytes of serialized data::Value. When the expr gets evaluated it converts self from bytes to a Value. That keeps ast mod decoupled from data mod.
I'm a kind of new hand to rust. I really like to receive your options. If the idea is ok I will keep working on it.


Allow passing props to the Camera component

I needed to access one of the properties of Camera (ratio) but couldn't. This PR adds this possibility, via the cameraProps property. An example:
<QRCodeScanner
  ...
  cameraProps={{
    ratio: "1:1"
  }}
/>

Technically, the spread operator handles the "undefined" scenario just fine ({ ... undefined } is {}), but I do agree that the code would improve in readability if a default value is explicitly defined (I just added it)

released in v1.1.0


Error: No handlers could be found for logger "multiprocessing"

I'm new to celery, been trying to set it up all day.
When I do python -m celery.bin.celeryd --loglevel=INFO (I'm on Windows), here's the output (redacted slightly):
[2011-06-06 02:08:08,105: WARNING/MainProcess] -------------- celery@blahblah v2.2.6
---- **** -----
--- * ***  * -- [Configuration]
-- * - **** ---   . broker:      amqplib://blah@localhost:5672/vhost

** ----------   . loader:      celery.loaders.default.Loader
** ----------   . logfile:     [stderr]@INFO
** ----------   . concurrency: 2
** ----------   . events:      OFF
*** --- * ---   . beat:        OFF
-- ******* ----
--- ***** ----- [Queues]
--------------   . celery:      exchange:celery (direct) binding:celery

[Tasks]
. tasks.add
[2011-06-06 02:08:08,812: WARNING/MainProcess] celery@blahblah has started
.
No handlers could be found for logger "multiprocessing"
No handlers could be found for logger "multiprocessing"
Please help!

Fixed by df9eda7ee555a79f49a6617ae1a65aacd93f52ef


Prepare Azure Core for October 2020 Release

AppConfiguration, Event Hubs, Identity, Service Bus were using unreleased dependencies, this is why they have changes.

/check-enforcer override


Environment Delete - incomplete and the person who deleted it not able to complete the delete from data.all

Describe the bug
We are seeing an issue where we were able to delete a environment but the delete seems to be incomplete however the user who orignially created the UI is not able to attempt re-delete as it shows access denied for the user,
How to Reproduce
*P.S. Please do not attach files as it's considered a security risk. Add code snippets directly in the message body as much as possible.*

Expected behavior
Validation should be added to check and not allow user to perform incomplete deletes. All the deletion should happen as one transaction and in case it is not possible it should roll back. The user should be allowed to retry the delete from the UI without needing a backend solution
Your project
No response
Screenshots
OS
All
Python version
3.1
AWS data.all version
all
Additional context
No response

Thank you for calling this out! The check on whether the environment still has outstanding resources associated before deleting was originally happening only AFTER the removal of group permissions to the environment - allowing for scenarios of incomplete deletes and access management issues on the UI
This issue was fixed in the mentioned PR #674 to first handle all checks before any delete operations
Closing this PR for now...


Manga Poster image adjustment

This is my first pull request to hummingbird so forgive me, since I am still trying to familiarize myself with the codebase!
In reference to Issue #553, the manga poster size was not kosher with the anime poster size. After reviewing the forum post:
https://forums.hummingbird.me/t/increase-manga-posters-images-resolution/24533
It seemed it had just been forgotten, so I updated the manga.rb to reflect the changes in anime.rb.
I also updated the default-path to the 'missing-anime-cover.jpg' in both the models on another commit,  since that seemed local enough to include without needing its own request.

Haha that reminded me I never opened the PR I did :snail:

:+1: :shipit:

Great Thanks! Please let me know how I can help; I just forked it today and excited to contribute.

Make sure to squash the commits into one commit using the got console. (Use HEAD~2)
https://help.github.com/articles/about-git-rebase/#rebasing-commits-against-a-point-in-time

Was there a reason you changed the default_url? I'm pretty sure that is going to break it (for the medium style at least). The actual URL is /assets/missing-anime-cover.jpg.

For reference: http://hummingbird.me/assets/missing-anime-cover.jpg

You right, my mistake! I just looked at my directory tree saw it in images and changed it on a separate commit hastily. I'll fix it when I get to my comp this morning and rebase. Thanks!

:+1: @NuckChorris did you want to rewrite current images, or just wait for users to edit them?

LGTM
@vevix We can regenerate 'em, it's easy enough


[RFR][VirtualCenter] Added method set hot add for cpu and memory

Signed-off-by: Nikhil Dhandre<EMAIL_ADDRESS>

@niyazRedhat can you please add test related to changes?. If you need help let me know.

@digitronik Sure

Test : https://github.com/ManageIQ/integration_tests/pull/8608


range of jsd loss in SSLD

Thanks for your excellent work on distillation. I just read the code of JSDivLoss and implement it in pytorch as follow.
def jsdiv_loss(y_s, y_t):
	p_s = F.softmax(y_s, dim=1)
	p_t = F.softmax(y_t, dim=1)
	loss = (F.kl_div(p_s, p_t, reduction="sum") * y_s.shape[1] + \
			F.kl_div(p_t, p_s, reduction="sum") * y_s.shape[1]) / 2.
	loss = loss / y_s.shape[0]
	return loss

When I start to train the distill model, I found the jsd loss is negative. I just want to know the correction of this implementation and the range of jsd loss.
Thanks for your time.

Thanks for your attention, Is it negative for paddle or torch?

Thanks for your attention, Is it negative for paddle or torch?

Thanks for your attention, Is it negative for paddle or torch?

It's negative in torch, so I want to know the range of js_div loss in paddle.

Thanks for your attention, Is it negative for paddle or torch?

It's negative in torch, so I want to know the range of js_div loss in paddle.

I reviewed the past logs, they are almost in 0~5.

I reviewed the past logs, they are almost in 0~5.

I implement it according to paddle version as followed, the jsd_loss is about 14.
def _kldiv(self, inputs, targets):
	eps = 1.0e-10
	loss = targets * torch.log((targets + eps) / (inputs + eps)) * inputs.shape[1]
	return loss

def jsdiv_loss(self, y_s, y_t):
	p_s = F.softmax(y_s, dim=1)
	p_t = F.softmax(y_t, dim=1)
	loss = (self._kldiv(p_s, p_t) + self._kldiv(p_t, p_s)) / 2.
	avg_loss = torch.mean(loss)
	return avg_loss

I have a question about the jsd_loss function, it seems not to be Jensen–Shannon divergence. Because js divergence equals to KL(p || (p+q)/2) + KL(q ||, (p+q)/2), but the code shows KL(p || q) + KL(q || p).

I implement it according to paddle version as followed, the jsd_loss is about 14.
def _kldiv(self, inputs, targets):
	eps = 1.0e-10
	loss = targets * torch.log((targets + eps) / (inputs + eps)) * inputs.shape[1]
	return loss

def jsdiv_loss(self, y_s, y_t):
	p_s = F.softmax(y_s, dim=1)
	p_t = F.softmax(y_t, dim=1)
	loss = (self._kldiv(p_s, p_t) + self._kldiv(p_t, p_s)) / 2.
	avg_loss = torch.mean(loss)
	return avg_loss

I have a question about the jsd_loss function, it seems not to be Jensen–Shannon divergence. Because js divergence equals to KL(p || (p+q)/2) + KL(q ||, (p+q)/2), but the code shows KL(p || q) + KL(q || p).

Yes, it's a little bit difference here, we found that the realization in PaddleClas is slightly better, so we simply use the method.

Yes, it's a little bit difference here, we found that the realization in PaddleClas is slightly better, so we simply use the method.

Thank you so much!

Thank you so much!


Unable to load official pre-trained checkpoint using load_trained_model_from_checkpoint

When I try to use load_trained_model_from_checkpoint() to load the official BERT-base uncased model (https://storage.googleapis.com/bert_models/2018_10_18/uncased_L-12_H-768_A-12.zip), I get the following error:
Traceback (most recent call last):
  File "ner_training_code_BERT.py", line 139, in <module>
    model, loss = build_model()
  File "ner_training_code_BERT.py", line 67, in build_model
    bert_model = load_trained_model_from_checkpoint(_bert_config_path, _bert_checkpoint_path, training=False)
  File "/Users/scguo/miniconda3/envs/py36/lib/python3.6/site-packages/keras_bert/loader.py", line 26, in load_trained_model_from_checkpoint
    tf.train.load_variable(checkpoint_file, 'bert/embeddings/word_embeddings'),
  File "/Users/scguo/miniconda3/envs/py36/lib/python3.6/site-packages/tensorflow/python/training/checkpoint_utils.py", line 81, in load_variable
    return reader.get_tensor(name)
  File "/Users/scguo/miniconda3/envs/py36/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 334, in get_tensor
    status)
  File "/Users/scguo/miniconda3/envs/py36/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 519, in __exit__
    c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: bert/embeddings/word_embeddings not found in checkpoint file

Seems like the op names that we're expecting does not match with the official model?

I was not able to reproduce the error with the given checkpoint.
MD5:
b14dd4db03c41fd7ec9e2fb0610a4474 uncased_L-12_H-768_A-12_1.zip

57f8025e6f0e7ed9cf2fb9fa6fed0f79 bert_model.ckpt.data-00000-of-00001
c5b9933019001067c99a11d0c133cedd bert_model.ckpt.index
1ae500078214cfd9db4b45014820fc80 bert_model.ckpt.meta

My package has the same Md5 checksum. I found out that I got the above error because I was trying to load the ckpt.index file. However, when I try to load the ckpt.data file, I get a file format error as below:
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file /Users/scguo/Documents/smartmd/keras_ner/bert_models/uncased_L-12_H-768_A-12/bert_model.ckpt.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?

The only solution I found is to make a copy (or symlink) of the ckpt.data file and have the file extension end in ".ckpt" only. Loading the renamed copy will work, but loading the original will result in file format error.

You don't need to rename or copy anything. bert_checkpoint_path should end with .ckpt just like tensorflow's checkpoint loading.

Hi,
my file structure is:
load_and_pool.py
-bert
--config.json
--bert_model.ckpt.data-00000-of-00001
--bert_model.ckpt.index
--bert_model.ckpt.meta
--vocab.txt
and try:
python load_and_pool.py bert/config.json bert/ bert/vocab.txt
but it always gets Error:
[ ValueError: Couldn't find 'checkpoint' file or checkpoints is given directory /bert ]
Can give me some example? plz thx.

@aurora314156
python load_and_pool.py bert/config.json bert/bert_model.ckpt bert/vocab.txt

THX!


Revert "start: wait until pods ready"

Reverts kubernetes-incubator/bootkube#1030
Prior discussion: https://github.com/kubernetes-incubator/bootkube/pull/1035#issuecomment-448331133
In lieu of figuring out better checkpointing behavior right now. I still think the change in #1035 is correct - reverting this should make bootstrap less flaky in near term (even if we're without an API endpoint during the pivot for a little bit).
Longer term I like the direction the OpenShift folks are going with a static-pod deployer of sorts - but changing out checkpoint behavior is a bigger effort.

/lgtm
/approve


AudioPlayer plays over itself

Full Description
I created an AudioController for a puzzle game that I made. The AudioController is a Singleton object. It behaves normally if I were to go from the title screen to Level 0, but when I advance from Level 0 to Level 1, the Level 0 music keeps on playing and the Level 1 music starts. But when I advance from Level 1 to Level 2, the Level 1 music stops and the Level 2 music plays, but the Level 0 music is still playing. And then when I go from Level 2 to Level 3, the Level 2 music stops, and the Level 3 music starts, while the Level 0 music is still playing. This continues throughout the rest of the game. When the game finishes, it goes back to the title screen and the Level 0 music still plays.
Code to Reproduce
import 'package:audioplayers/audioplayers.dart';

import 'main.dart';

class AudioController {
  static final AudioController _audioController = AudioController._internal();
  AudioCache? _musicCache;
  AudioPlayer _instance = AudioPlayer(mode: PlayerMode.LOW_LATENCY, playerId: 'main');

  factory AudioController(){
    return _audioController;
  }

  AudioController._internal(){
    doNothing();
    //print("Audio Controller is now implemented");
  }

  Future<void> playLoop(int song) async {
    if(_musicCache == null) {
      _musicCache = AudioCache(prefix: "assets/");
    }
    int? result = await _instance.stop();
    print("STOP PLAYING RESULT: $result");
    if(song == -1){
      _instance = await _musicCache!.play("intro.mp3");
    } else {
      _instance = await _musicCache!.loop("alpha$song.ogg");
    }
  }

  void pauseMusic(){
    print("music paused");
    _instance.pause();
  }
}

These are the times I use the AudioController in my code:
//main.dart
AudioController audioController = AudioController();

void doNothing(){}

void main() async {
  runApp(DBall());
}

class DBall extends StatefulWidget {

  Future<InitializationStatus> _initGoogleMobileAds() {
    // TODO: Initialize Google Mobile Ads SDK
    return MobileAds.instance.initialize();
  }

  @override
  _DBallState createState() => _DBallState();
}

class _DBallState extends State<DBall> with SingleTickerProviderStateMixin {
  bool gameComplete = GameView.lvlQuantity < GameView.lvl;
  late ConfettiController _controller;
  late BannerAd _bannerAd;
  bool _isBannerAdReady = false;

  void playIntroAudio() async {
    _controller = ConfettiController(duration: Duration(seconds: 5));
    if(gameComplete){
      _controller.play();
      GameView.lvl = 0;
      GameView.lvlComplete.value = false;
    }
    audioController.playLoop(-1);
  }
...

//view.dart
class _GameViewState extends State<GameView> {
  late Level level;
  late BannerAd _bannerAd;
  bool _isBannerAdReady = false;
  late BannerAd _bannerAd2;
  bool _isBannerAd2Ready = false;
  Color _backgroundColor = Color(0xFF151515);
  AudioController audioController = AudioController();

  Color setBackgroundFX(){
    print('Floor value: ${(GameView.lvl/2).floor()%3+1}');
    if(!GameView.lvlComplete.value){
      audioController.playLoop((GameView.lvl/2).floor()%3+1);
...

Logs
`flutter run --verbose`
I couldn't fit everything into here so I had to upload it as a text file to my school drive: http://elvis.rowan.edu/~michar52/misc/audioplayerslogs

**Platforms**
* OS: Android
* OS version: 30
* Device: Emulator Google Pixel XL
* flutter version: 2.3.0-16.0.pre
* dart version: 2.14.0-136.0.dev
* audioplayers version: 0.19.0
* release or not release: debug

That is not a bug, that is how AudioCache works. if you want to use the same player, please set the AudioCache.fixedPlayer property.

@ luanpotter

That is not a bug, that is how AudioCache works. if you want to use the same player, please set the AudioCache.fixedPlayer property.

In the docs it says a new instance is created (version ^0.17.4).. if i'ts not set.


Tweedie loss

Does gluon-ts provides DeepAR with Tweedie loss ?
Tweedie distribution

It is a type exponental dispersion model (ED). ED is a very general type of probability distribution models where the PDF (probab. distribution function) is represented using exponents. A very common example would be the normal distrbution whose PDF is well known (and exponential).
It has a special relation between mean and variance. i.e. the variance ~ some power of mean (Variance=k*Mean^p). This constant, "p" is important and is the tweedie_variance_power parameter in the lightgbm's API (default value 1.5).
The well known poisson (p=1) and gamma (p=2) distributions can be considered special cases of tweedie. (Now we know why the kernels using poisson regression works better than L2 regression and tweedie works even better)
The distribution is not defined for p>2 and p<1

The data in tweedie distribution is "concentrated" (technically speaking, has a high point mass) at 0.
Tweedie loss
The loss function of tweedie is created for the aim of maximizing the negative log likelihood of the tweedie distribution. Lightgbm computes tweedie loss as follows:
def tweedie_eval(y_pred, y_true, p=1.5):
    y_true = y_true.get_label()
    a = y_true*np.exp(y_pred, (1-p)) / (1-p)
    b = np.exp(y_pred, (2-p))/(2-p)
    loss = -a + b
    return loss

Source
Kaggle
References

list known implementations:
3th place kaggle

@kaleming Tweedie distributions are not implemented in GluonTS, but I agree that this would be really cool to have. Is this something you would be interested in contributing with a PR?

Hi @lostella,
I will have a look on MxNet docs and see if I can help on it.

just wanted to mention that tweedie loss is -2*logloss. so you should probably multiply it by 2?

wanted to check-in on this, since there was some interested voiced on this at ISF. @kaleming is this something that you were able to make progress on?

Hi @timoschowski ,
Sorry my late reply @statgirl30. I was busy these last months, and I couldn't handle to learn mxnet and pydantic/pytest to convert this code of tweedie into gluon-ts format.
Please feel free guys to go ahead on this feature request.

This is mainly for self-documentation as I didn't make much progress looking into this.
The Tweedie loss comes from:

https://arxiv.org/pdf/1508.06378.pdf equation (10) and (11) are the key equations. This assumes the power parameter to be given (set to 1.5 typically, it seems) and same for the rate parameter phi
Section 4.2 of the above paper discusses how to estimate (p, phi) via profile likelihood
LightGBM uses log of the input in its implementation https://github.com/microsoft/LightGBM/blob/1c27a15e42f0076492fcc966b9dbcf9da6042823/src/metric/regression_metric.hpp#L300-L318
a comprehensive python package that also contains sampling and other methods is here: https://github.com/thequackdaddy/tweedie


Fix typo in Cassandra replication factor property name

This PR fixes an apparent typo in one of three property names related to Cassandra replication that could lead to confusion during configuration/implementation.

workflow.cassandra.replication.strategy
workflow.cassandra.replication.factor.key
workflow.cassandra.replicaton.factor.value

Pull Request Test Coverage Report for Build 2935

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 69.745%

Totals

Change from base Build 2932:
0.0%

Covered Lines:
9765

Relevant Lines:
14001

💛  - Coveralls


Moved imagedims to OL8 base image

Added OL8 based function for imagedims

@metamemelord I am merging this PR. Please leave a comment here once the new Fn Python FDK OL8 slim base images are available in docker hub.

@metamemelord I noticed one small thing in the readme. It says "The Dockerfile that "fn build" would automatically generate to build a Python 3.6 function container image looks like this:" but the Dockerfile shown has the image magick installation steps. We should show the default Fn-generated Dockerfile as-is first before adding the custom steps for image magick.

Thanks for bringing that to my notice, I will change the documentation to reflect correct information.

Hi @metamemelord I tested your changes and here's my feedback. This is what the final Dockerfile should look like:
FROM fnproject/python:3.6-dev as build-stage
WORKDIR /function
ADD requirements.txt /function/

RUN pip3 install --target /python/  --no-cache --no-cache-dir -r requirements.txt &&\
  rm -fr ~/.cache/pip /tmp* requirements.txt func.yaml Dockerfile .venv &&\
  chmod -R o+r /python
ADD . /function/
RUN rm -fr /function/.pip_cache

FROM fnproject/python:3.6
RUN microdnf install oracle-epel-release-el8 &&\
      microdnf install ImageMagick &&\
      microdnf remove oracle-epel-release-el8 &&\
      microdnf clean all
WORKDIR /function
COPY --from=build-stage /python /python
COPY --from=build-stage /function /function
RUN chmod -R o+r /function
ENV PYTHONPATH=/function:/python
ENTRYPOINT ["/python/bin/fdk", "/function/func.py", "handler"]

@metamemelord can you please review my changes and confirm?

Yes, I fixed the dockerfile. I tested the function locally and it is working fine.

I think your changes accidentally overwrote mine :-) I will add mine back and merge the PR. Please check the diff.


Create a page with instructions to register

Create a top menu that opens a page with the instructions to register.
There will be screenshots and videos with the steps as shown in this doc
There is also a video that I have shared with @ehab-hassan that should also be shared here
The look should be clean, for example, similar to this

done at staging
https://www.staging.freeflowpages.com/threebot_login/how
and waiting @Hamdy  to merge to production

done at production
https://www.freeflowpages.com/user/auth/login


WIP

WIP on the blacklist.

That test failure is
 (AesonException "Error in $['mainnet_staging_short_epoch_wallet_win64'].txp: key
   \"blacklistSrcAddrs\" not present")

can be fixed by adding blacklistSrcAddrs: [] to the txp section of configuration.yaml.
Eg:
--- a/lib/configuration.yaml
+++ b/lib/configuration.yaml
@@ -84,6 +84,7 @@ dev: &dev

   txp: &dev_txp
     memPoolLimitTx: 200 # mem pool will be limited to this many transactions
+    blacklistSrcAddrs: []

   dlg: &dev_dlg
     dlgCacheParam: 500


Create or delete lists script error

Hello,
I I run create lists script (and also delete lists script) I run into this error:
Creating 169 lists for 168793 domains...
Could not create "CGPS List - Chunk 1" - Error: HTTP error! Status: 400
file:///srv/cloudflare-gateway-pihole-scripts/lib/helpers.js:106
    throw new Error(`HTTP error! Status: ${response.status}`);
          ^

Error: HTTP error! Status: 400
    at request (file:///srv/cloudflare-gateway-pihole-scripts/lib/helpers.js:106:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async createZeroTrustListsOneByOne (file:///srv/cloudflare-gateway-pihole-scripts/lib/api.js:48:7)
    at async file:///srv/cloudflare-gateway-pihole-scripts/cf_list_create.js:140:5

The error is the same as above for the delete lists script.

Hello,
I'm sorry. I was using API Global Key. Using a newly created API token worked :)

Happy to hear! I just updated the README to make it clear that a token has to be used.


The Refinery isn't working

The Refinery isn't working

Video:
Uploading 13-06-31.mp4…

you did not explain the problem or provide evidence about it

bruh


Make ScalingMode more flexible

Adds ability to specify scaling factor for WindowSize, size of the fixed axis for FixedVertical and FixedHorizontal and a new ScalingMode that is a mix of FixedVertical and FixedHorizontal
The issue
Currently, only available options are to:

Have one of the axes fixed to value 1
Have viewport size match the window size
Manually adjust viewport size

In most of the games these options are not enough and more advanced scaling methods have to be used
Solution
The solution is to provide additional parameters to current scaling modes, like scaling factor for WindowSize. Additionally, a more advanced Auto mode is added, which dynamically switches between behaving like FixedVertical and FixedHorizontal depending on the window's aspect ratio.

How are these new fields different to the scale field which already exists?
That being said, the auto mode seems useful.

These fields are there because scale is usually used for zooming, so it is better to separate "zoom" scale and "viewport" scale.

Right now, in this pull request there is Auto mode, which uses the smallest possible viewport size that is at least the provided size while keeping the aspect ratio. Here is the question: can a viewport that uses the biggest possible viewport size that is at most the provided size be useful and should it be added as well?

What about the parameters in FixedVertical and FixedHorizontal? There it is not just the scale, but the desired length of a specific side, should that be removed as well?

Hmm. I personally think we should keep those; I can see the appeal there.

Apparently, right now FixedHorizontal and FixedVertical will give you different total widh/height depending on the window_origin field of the projection (Bounds would be -1.0..1.0 if WindowOrigin::Center is used, but 0..1.0 if WindowOrigin::BottomLeft is used). In this implementation however, it does not work that way, so I added additional commit to account for this.

Excellent, I'm happy with this now.

@Daniikk1012 can you please rebase this so it can be merged?

bors r+

Apparently more merge conflicts. You have my sympathies @Daniikk1012...

Sorry, I still do not understand how to work with git properly (My first time resolving a merge conflict). This should work now

Git can be a bit of a pain; it's not just you :) This looks good now, thanks!
bors r+


Re-orginize includes

Some include reorg. (Better to agree on it before any new commits ;) I hope I integrated correctly with d4d8b338103c06320c25b611e982236da21f54e6 - maybe worth to double check )
So summary:
ZABAPGIT_PERSISTENCE_OLD for obsolete persistence classes
ZABAPGIT_GUI_ROUTER - separate router
lcl_log moved to ZABAPGIT_UTILS (as it is util)
lcl_html_action_utils went to own include (because it refers persistence and to be closer to pages code where it is used)
page_diff and page_explore got own includes
all page includes went to zabapgit_gui_pages
own includes for lcl_object_prog, fugr, clas
zabapgit_object renamed to zabapgit_objects_impl (and contains only object_impl now)
All serializations went to zabapgit_object_serialization
Moved deferred definitions to zabapgit_app (arguable, but it is where they are used first, and that's quite early level class so I think it should be ok)
Did touch zabapgit_objects and zabapgit_git but there is some space for improvement.
If ok, I'll PR

Ah yes ! Stage didn't work from 1 try - it is OK ? After 1st commit htere were still objects to stage, so I did it second time. Strange. Is it some new feature ? Or a bug ? I hope I didn't break anything ;)

will take a look later today, didnt have time yesterday

ok, no prob :)


Error importing from interpreter

Calling import lackey from the interpreter results in an AttributeError:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "lackey\__init__.py", line 24, in <module>
    from .PlatformManagerWindows import PlatformManagerWindows
File "lackey\PlatformManagerWindows.py", line 16, in <module>
    from .Settings import Debug
File "lackey\Settings.py", line 126, in <module>
    class SettingsMaster(object):
File "lackey\Settings.py", line 160, in SettingsMaster
    BundlePath = os.path.dirname(os.path.abspath(os.path.join(os.getcwd(), __main__.__file__)))
AttributeError: 'module' object has no attribute '__file__'

Fixed with version 0.5.2 (just released to Pypi).


x/tools/gopls: server exits if empty method receiver

Hi,
I've been trying outgopls master for a bit and noticed it crashed when editing a receiver. I could not find any open issue similar to what I saw so here is a summary.
gopls version
Current master 1e0dff28f4f920fb7a7f132f775bd68e3b1e1fff.

Renaming the reciever for a method, removing everything between the parens. Like so
func (f Foo) Bar(baz int) int {
     ...
}
// ->
func () Bar(baz int) int {
     ...
}

What did you expect to see?
n/a
What did you see instead?
gopls: remote disconnected: failed reading header line: EOF

Process gopls stderr finished

Editor and settings
Emacs 28.2 with lsp-mode 20230107.2052.
Gopls flags -v -remote=auto -remote.logfile=/home/viktor/gopls.log
Logs
Enabling logging gives:
analysis.go:844: internal error writing shallow export data: gcimporter: unexpected method: func()

Running go run ./gopls/main.go check tmp.go on a file like:
package tmp

func () Foo() {}

reliably fails (on my machines) with
2023/01/10 22:35:02 internal error writing shallow export data: gcimporter: unexpected method: func()
exit status 1

Bisecting points at 61e2d3f4f: gopls/internal/lsp/cache: a new analysis driver. Before that the check above just prints
/home/viktor/local/tools/tmp/tmp.go:3:6-8: method is missing receiver

Maybe something has escalated this from warning to error?

Thanks for the report. master is rather unstable right now (but we're making big improvements!)
CC @adonovan

Indeed, many thanks for this very helpful report.
@findleyr: I'll fix this one, but I think we are going to need fuzz testing of export/import of types.Packages containing type errors as this functionality has never been used in production before.

Fuzz testing is a great idea. We can start with a valid program that exercises all aspects of the type checker, and fuzz edits to it. We might discover more go/types crashes this way as well...
There must also be prior art.


Query falling on prismic

Hello ))
Some day ago a update from gatsby-source-prismic-graphql on gatsby-source-prismic v3.3.3
With new plugin I can't reqest field if that field is empty in all documents, but field initialized in custom type. I get error that field is unknown argument.

Hey @IlyaGit01 )
Could you please copy / screenshot the exact error message?
Did you add your schemas to the gatsby-config and to the schema folder?
'Unknown argument' sounds like an awkward error to get in this context as it should normally return undefined or something along those lines and it shouldn't be an argument at all.
Could you please also copy your query?

This is scheme

Query

Error

What does the GraphQL-playground tell you about the query? (localhost:8000/__graphql)
Could you please also console.log the complete data object and post it?

GraphQL-playground tell me "Cannot query field name"

Your config suggests that the name of the custom types is example_type. This means that allPrismicTesto should be invalid for this type. Try prismicExampleType / allPrismicExampleType instead.
I would suggest, that you rebuild your whole query in the GraphQL playground. If you press ctrl + space, you will get suggestions for available queries and fields. Alternatively you could check the integrated docs on the right side.

So it's some strange, because all prismic custom types is valid and I can get fields which not initialized in scheme. I have only one scheme in project now.
My custom types

Types in GraphQL-playground

I would suggest, that you remove all of them but one and make sure that the things I have described above are consistent.
After that, you should be able to move forward with debugging much more confident, if still necessary.
GraphQL can behave strange, if you are not careful with keeping your schemas in Gatsby, in Prismic and in the Gatsby config in sync.

Today I have tested app like you suggested and get strange QraphQl behavior. Situation one, in gatsby-config.js using only one scheme of custom types, but in playground I see all types and not all types have all fields. Situation two, my scheme have some fields like in prismic JSON editor, I rename fields like in documentation. For example, page-title on pageTitle or page_title, it not matter, because fields return null value. But when I request dataRaw instead data, all fields return valid values.
gatsby-config.js

Scheme

Graphql playground

My query with empty fields in data and all fields in dataRaw.

Very often qraphql behavior change, it really hard to debugging.

The path you are using in the config does suggest, that you custom_types folder is outside of src?

And how can I get fields with a hyphen in their name? Such fields cannot be specified in the schema, because there will be an error. If such fields are written via camelCase or snake_case in the schema, they will return with a null value, and not what it actually is. But these fields are in dataRow

Did moving the folder into src work?
Hyphens should normally not be a problem.
What error is there? Can you please provide screenshots again?

moving the folder into src not working
In prismic my field is meta-description, but in scheme I get error

because of it I tred to rename field to metaDescription and meta_description, but it not working.

In this screenshot, you can see that all the fields in data are empty, and in DataRow, the names of these fields are written with a hyphen and the data returned correctly.

We need to go step by step here and ignore some of those issues for the moment.
Please follow the following steps so that we can ensure the basic function, receiving data for a simple request, in a controlled environment

Delete all types, that you have created for testing
Create a new repeatable type called "test_type". Please make also sure that the API ID is "test_type"
Make sure that test_type contains only a single title field called "test_title" in Prismic and nothing else:

Make sure that there is a folder called "schemas" in your src folder
Make sure that in this folder there is a file with the name "test_type.json"
in this file you should have this code:

{
  "Main": {
    "test_title": {
      "type": "StructuredText",
      "config": {
        "single": "heading1, heading2, heading3, heading4, heading5, heading6",
        "label": "test_title"
      }
    }
  }
}

Make sure that in gatsby-config.js only this one type is added and that the path is declared as follows:

schemas: {
    test_type: require("./src/schemas/test_type.json")
 }

Go to your documents and create an instance of test_type. Save and publish it.

Start up your gatsby server with "npm run start"
Go to localhost:8000/__graphql
Enter this query

{
  allPrismicTestType {
    edges {
      node {
        data {
          test_title {
            text
          }
        }
      }
    }
  }
}

Check for the response:

Please also remember, that if you change something about the json file or anything related to pulling content from Prismic in, you will likely have to restart your Gatsby server.
If this works, then all other oddities, that still exist, can be cleared up.

Running gatsby clean can sometimes help :)

Thanks @Hahlh and @MarcMcIntosh for helping here!
Yes, my first suggestion is to clear your Gatsby cache. Sometimes Gatsby's cache of the types gets out of sync with what you provided in your JSON files.
Run gatsby clean in your project to clear the .cache and public folder. They will be rebuilt the next time you run gatsby develop or gatsby build. This isn't something that is required every time.
If that doesn't work, are you able to share your repository on GitHub? If not, are you able to create a sample repository with the same problem? Everything @Hahlh is recommending is correct, but it may be easier for us to check your code if we can view it directly.

Re: hyphenated field names, this is unfortunately a limitation of GraphQL, not Prismic or the plugin, so it isn't something that can be supported. What we can do, however, is automatically replace hyphens with something else, such as __. So a field like my-field could be renamed to my__field.
This can be included in the next major version of the plugin being worked on now if you think that would help.

This would be great because in the working version of the site on prismic, the fields use a hyphen, which does not support the new plugin. This would allow you to keep the old field names and not change the code in the working version of the site, but only deal with the new version of the site.

@IlyaGit01 When you query for fields with hyphens using the GraphQL plugin, what does your query look like? It's probably a good idea for us to match how the official GraphQL API handles the hyphens.

The prismic graphql-api transforms kebab-case (hyphens)  to camelCase, that's how we approached the issue here :)


[IPU] _handle_relation is incorrectly relying on relation-broken

Bug Description
On relation-broken, we set current_urls to {}:
https://github.com/canonical/traefik-k8s-operator/blob/3f0cc21a6aac645525107fd1f70097a5af5e1dd7/lib/charms/traefik_k8s/v1/ingress_per_unit.py#L737-L742
And then we emit a custom event with self.realtion - which is None on relation-broken:
https://github.com/canonical/traefik-k8s-operator/blob/3f0cc21a6aac645525107fd1f70097a5af5e1dd7/lib/charms/traefik_k8s/v1/ingress_per_unit.py#L761-L762
Now, with ops v2.10.0 (specifically ops/1091), this fails:
  File "/home/ubuntu/code/o11y/traefik-k8s-operator/.tox/unit/lib/python3.10/site-packages/ops/charm.py", line 434, in snapshot
    'relation_name': self.relation.name,
AttributeError: 'NoneType' object has no attribute 'name'

To Reproduce
Run the traefik-k8s-operator/tests/unit/test_lib_per_unit_requires.py utest with ops pinned to 2.10.0.
Environment
ops 2.10.0.
Relevant log output
File "/home/ubuntu/code/o11y/traefik-k8s-operator/tests/unit/test_lib_per_unit_requires.py", line 193, in test_ipu_events
    self.harness.remove_relation(self.rel_id)
  File "/home/ubuntu/code/o11y/traefik-k8s-operator/.tox/unit/lib/python3.10/site-packages/ops/testing.py", line 892, in remove_relation
    self._emit_relation_broken(relation_name, relation_id, remote_app)
  File "/home/ubuntu/code/o11y/traefik-k8s-operator/.tox/unit/lib/python3.10/site-packages/ops/testing.py", line 926, in _emit_relation_broken
    self._charm.on[relation_name].relation_broken.emit(relation, app)
  File "/home/ubuntu/code/o11y/traefik-k8s-operator/.tox/unit/lib/python3.10/site-packages/ops/framework.py", line 351, in emit
    framework._emit(event)
  File "/home/ubuntu/code/o11y/traefik-k8s-operator/.tox/unit/lib/python3.10/site-packages/ops/framework.py", line 853, in _emit
    self._reemit(event_path)
  File "/home/ubuntu/code/o11y/traefik-k8s-operator/.tox/unit/lib/python3.10/site-packages/ops/framework.py", line 943, in _reemit
    custom_handler(event)
  File "/home/ubuntu/code/o11y/traefik-k8s-operator/lib/charms/traefik_k8s/v1/ingress_per_unit.py", line 753, in _handle_relation
    self.on.revoked_for_unit.emit(self.relation)  # type: ignore
  File "/home/ubuntu/code/o11y/traefik-k8s-operator/.tox/unit/lib/python3.10/site-packages/ops/framework.py", line 351, in emit
    framework._emit(event)
  File "/home/ubuntu/code/o11y/traefik-k8s-operator/.tox/unit/lib/python3.10/site-packages/ops/framework.py", line 848, in _emit
    self.save_snapshot(event)
  File "/home/ubuntu/code/o11y/traefik-k8s-operator/.tox/unit/lib/python3.10/site-packages/ops/framework.py", line 717, in save_snapshot
    data = value.snapshot()
  File "/home/ubuntu/code/o11y/traefik-k8s-operator/.tox/unit/lib/python3.10/site-packages/ops/charm.py", line 434, in snapshot
    'relation_name': self.relation.name,
AttributeError: 'NoneType' object has no attribute 'name'

Additional context
No response

Hi @sed-i ! Sorry about this - we tried to identify where charms might have issues with this change, but missed both this and also a similar case in mysql-router-k8s (hopefully that's it, but I'm trying to dig more to see if there are others - both of these were in a lib and the .relations usage was in a property, which contributed to me missing it) :disappointed:.
For what it's worth, I think you can fix this fairly simply like:
diff --git a/lib/charms/traefik_k8s/v1/ingress_per_unit.py b/lib/charms/traefik_k8s/v1/ingress_per_unit.py
index 987bf46..2a93e46 100644
--- a/lib/charms/traefik_k8s/v1/ingress_per_unit.py
+++ b/lib/charms/traefik_k8s/v1/ingress_per_unit.py
@@ -63,7 +63,7 @@ import typing
 from typing import Any, Dict, Optional, Tuple, Union

 import yaml
-from ops.charm import CharmBase, RelationBrokenEvent, RelationEvent
+from ops.charm import CharmBase, RelationEvent
 from ops.framework import (
     EventSource,
     Object,
@@ -734,9 +734,7 @@ class IngressPerUnitRequirer(_IngressPerUnitBase):
         # we calculate the diff between the urls we were aware of
         # before and those we know now
         previous_urls = self._stored.current_urls or {}  # type: ignore
-        current_urls = (
-            {} if isinstance(event, RelationBrokenEvent) else self._urls_from_relation_data
-        )
+        current_urls = self._urls_from_relation_data
         self._stored.current_urls = current_urls  # type: ignore

         removed = previous_urls.keys() - current_urls.keys()  # type: ignore
@@ -750,7 +748,7 @@ class IngressPerUnitRequirer(_IngressPerUnitBase):
                 )

             if this_unit_name in removed:
-                self.on.revoked_for_unit.emit(self.relation)  # type: ignore
+                self.on.revoked_for_unit.emit(event.relation)  # type: ignore

         if self.listen_to in {"all-units", "both"}:
             for unit_name in changed:
@@ -759,7 +757,7 @@ class IngressPerUnitRequirer(_IngressPerUnitBase):
                 )

             for unit_name in removed:
-                self.on.revoked.emit(self.relation, unit_name)  # type: ignore
+                self.on.revoked.emit(event.relation, unit_name)  # type: ignore

         self._publish_auto_data()

This does get the tests passing again, and I think is what was intended. If you want to work with older ops then you could keep the isinstance check in place. This should actually be more reliable, since the relation-broken event will always have the appropriate relation attached but getting the relations from Juju would lose that (e.g. if the event was deferred) since relation-broken is the very end.


Shadow DOM - Where are web components?

I am so very sorry for this more than likely being in the wrong place, but I've reached out to various twitter accounts, commented on the shadow DOM status page, and haven't heard back from anyone.

As of writing, Shadow DOM has 11,796 votes on Edge's platform status page. This makes it the highest voted listing on there.
MS seems to have made promises about implementing web components, but there have been 0 updates on it in over 2 years. All we know is that it's been on the backlog for two years, with no end in sight.
Can we get an official update on an ETA?
Chrome has it
Firefox is working on it, and it should land in v 59 or 60
Will MS at least commit to working on it in the near future? It feels like self sabotage so they can continue to market Angular, though this is obviously conjecture.
Since this is probably the wrong place to open this discussion, is there someone I can reach out to that is actually interested in responding who can help work out an ETA for the arrival of web components?
Again, sorry for posting this here, but I'm not having any luck anywhere else.

This is not the right place. As you suspected, the UserVoice is the correct place for Edge Platform feedback.


make localsystem: wipe all user config state

CI is experiencing failures in the system_test step, caused by
podman commands issuing the following warning:
time="2019-07-09T13:30:19-04:00" level=error msg="User-selected graph driver "overlay" overwritten by graph driver "vfs" from database - delete libpod local files to resolve
Hypothesis: integration tests, which run just before us, are
leaving user config files in an unstable state.
Workaround: delete all user cache and config and db before
running system tests. This should be safe, and should be
a NOP when running as root.
Signed-off-by: Ed Santiago<EMAIL_ADDRESS>

LGTM
On Tue, Jul 9, 2019, 14:07 OpenShift CI Robot<EMAIL_ADDRESS>wrote:

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: edsantiago
https://github.com/containers/libpod/pull/3536#
To complete the pull request process
https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process,
please assign umohnani8
You can assign the PR to them by writing /assign @umohnani8 in a comment
when ready.
The full list of commands accepted by this bot can be found here
https://go.k8s.io/bot-commands?repo=containers%2Flibpod.
Needs approval from an approver in each of these files:

OWNERS https://github.com/containers/libpod/blob/master/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/containers/libpod/pull/3536?email_source=notifications&email_token=AB3AOCBTLCKTXKTLR23Y5ELP6THXXA5CNFSM4H7IA2MKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZRB63Y#issuecomment-509747055,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB3AOCA4LODSNCPAUHJPB3DP6THXXANCNFSM4H7IA2MA
.

LGTM

/lgtm
/hold
/approve

Thanks.
LGTM.

/hold

/lgtm

/retest

/lgtm

/hold cancel


Additional settings for mypiazetta

Hello,
Is it possible to access these types of settings (energy saving, night mode,...) on the stove like this user on jeedom with the same plugin?
Thanks in advance
Ethan.

Hi, can you add a link to what you are referring to?

Sorry, I've completely forgotten the link (in french)
https://community.jeedom.com/t/pilotage-de-mypiazzetta-avec-le-plugin-poele-agua-iot/91413

If you attach the HA diagnostics file for your stove here and tell me which settings you would like to adjust specifically, I can take a look.

Hello,
I want to adjust the energy saving (start and stop) and the natural mode.
Here the file : config_entry-aguaiot-b7d56dc5345da7541780671c914a2e6c.json.txt
I deleted some information because I didn't know if it was linked to my piazetta account.
Thanks a lot.

Hello,
Thanks a lot. It works for the energy saving start and stop.

For natural mode, I have the switch, the state is the right one (if I enable/disable natural mode in the mypiazetta app, it updates in HA) but I can't switch on/off the mode in HA, I get this error:
Echec de l'appel du service switch/turn_on. name 'boolean' is not defined

And this error if i disable the natural mode :
Echec de l'appel du service switch/turn_off. name 'boolean' is not defined

Should be fixed in v0.1.8-beta2

I have now this error :
Échec de l'appel du service switch/turn_on. Blocking calls must be done in the executor or a separate thread; Use await hass.async_add_executor_job(); at custom_components/aguaiot/switch.py, line 76: setattr(self._device, self.entity_description.key, True)

I will take a closer look later. Since my stove doesn’t have the features it is a bit hard to test. But i will fix it.

Ok no problem, thank you ! :)

Fix: v0.1.8-beta3

Thank you very much, everything works!


Generic that extends a type with a generic

Say I have an interface
interface Applicative<T> {}

Now I want to define a function f that:

takes a Function and takes a type U extending an Applicative wrapping any
returns an U wrapping Function

My naive attempts were
  function f<U extends Applicative>(fn: Function, a: U<any>): U<Function>

and
  function f<T, U<T> extends Applicative<T>>(fn: Function, a: U<any>): U<Function>

but none is valid
Can we have a Generic extend a type with a generic ?

No, typescript doesn't have higher-kinded types.

Duplicate of #1213 and probably others.

Duplicate of #1213 and probably others.

Yes it is.  This can be closed