Improve non root path handling

What this PR does / why we need it:
kubevirt is reducing required privileges on virt-launcher pods. The latest work in that direction is the NonRoot feature, where basically no additional privileges are required. In order to prepare virt-handler for this change, path traversal on virt-handlers privileged operations will be improved, since as soon as virt-launcher does not require additional privileges, "normal" users can enter the virt-launcher pod. Once in the pod, they can move paths around, create symlinks and other things. While this is not recommended, virt-handler has to be prepared to cope with such actions on paths which are partially owned by users.
For that purpose a safepath package is introduced. It adds safepath.Path and safepath.File types which it is safe to operate with. It builds an abstraction around all kinds of unix.*At() file functions. These abstractions will not follow symlinks and always preserve an initial root context.
In some cases it is necessary to access a safepath.Path object in unsafe ways. For example passing paths over commandline, where the  receiving tool will then re-create the safe path. For that purpose an unsafepath package is introduced. It encapsulates all ways to access such unsafe properties and can be tightly controlled by banncheck.
safepath.Path
A successfully created safepath.Path is a resolved real path (no symlinks) at the time of creation. If any symlinks appear on later traversal, they are known to be unintentional or malicious. For example: safepath.Path can be passed to safepath.OpenAt to create a safepath.File object. This file object has an open filedescriptor. The open filedescriptor will lead to the existence of a filedescriptor-pseudo-file in /proc/self/fd/*. This pseudo-file is strongly connected with the underlying file. Even moving around the file will not remove the association. This SafePath can be passed to system calls which requires a path and can't take a file descriptor (like the mount command). Other safepath.*At functions exist too and work in a similar fashion.
The general mechanism is pretty nice explained in this post: https://blogs.gnome.org/jamesh/2018/04/19/secure-mounts/
In order to create a safepath.Path, either use safepath.JoinWithRelativeRoot() to create out of arbitrary paths a real path, or use safepath.NewFile() to create a path object out of a given real and already resolved path. In both chases, the returned objects are safe to use, or the initialization will fail already.
Affected places:

virt-chroot will get for its mount operations resolved real paths. These paths are then opened with safepath.NewFile to get a safe handle and passed to the actual mount syscalls.
containerdisks code operates fully on safe paths now
the isolation detector provides safepath.Path objects instead of simple string paths for more safe operation.
the hotplug code will use the safepath package too.
virt-api will not accept relative paths anymore, since the meaning is not clear.
host-disks will no longer relabel selinux labels automatically, to not unintentionally work against the intent of node admins.

unsafepath.Path
In order to make it in future code reviews easier to review, all attempts to get an "unsafe" string representation from a safepath.Path will result in calling functions from the new unsafepath package: unsafepath.UnsafeAbsolute(mypath.Raw()), unsafepath.UnsafeRelative(mypath.Raw()) and so forth. In some places it is necessary to directly access the underlying paths, but this way it should be easier to ensure that they are only called where they should be.
banncheck
The banncheck linter is added to nogo to restrict the usage of the unsafepath package. Later it can be extended to also completely ban the usage of path/filepath in the node-parts of kubevirt.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Release note:
Improve path handling for non-root virt-launcher workloads

/cc @vladikr
/cc @davidvossel
/cc @vasiliy-ul

/retest

/cherry-pick release-0.55

thanks @rmohr, do you also think you could follow up with a brief write up that that we can put in the docs directory to point people to when people have questions about safepath usage? So after this PR is merged, follow up with basically putting bits of the PR description into a md doc so there's a reference for why we do this.

Will do that.


[Question] Batch inference for vit

It seems like all the tests in the repository related to processors and image models use one image per input.

Do the models support feeding a batch of images as input during inference? Is there a speed benefit from this?
Are there any other optimization/parallelization tools in transformers.js that I can use to process a set of images?

Used model: vit base (google/vit-base-patch16-224-in21k), tiny and small distillations (WinKawaks/vit-tiny-patch16-224), exported in onnx format with optimum

Hi there 👋

Yes you can feed a batch of images during inference. Here's an example:
import { pipeline } from '@xenova/transformers';

const classifier = await pipeline('image-classification', 'Xenova/vit-base-patch16-224')
const urls = [
    'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/tiger.jpg',
    'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg',
];
const output = await classifier(urls)
// [
//   { label: 'tiger, Panthera tigris', score: 0.6074584722518921 },
//   { label: 'Egyptian cat', score: 0.8246098756790161 }
// ]

To measure performance improvements:
// Preload images to accurately measure inference time
const imgs = await Promise.all(urls.map(url => RawImage.fromURL(url)))

{
    const start = performance.now();
    await classifier(imgs);
    const end = performance.now();
    console.log('Running in parallel:', end - start); //<PHONE_NUMBER>780655
}
{
    const start = performance.now();
    for (const img of imgs) {
        await classifier(img);
    }
    const end = performance.now();
    console.log('Running sequentially:', end - start); //<PHONE_NUMBER>1544952
}
{
    const start = performance.now();
    await Promise.all(imgs.map(img => classifier(img)));
    const end = performance.now();
    console.log('Running with Promise.all()', end - start); //<PHONE_NUMBER>8922348
}

Since everything runs on the CPU at the moment, you most likely won't see dramatic speedups when running with batched inputs. But, I encourage you to do some testing to see what the best batch size is for you.

We rely on onnxruntime-web for running inputs in parallel, but there does seem to be a bug which prevents multiple threads from being used.
Fortunately, the webgpu backend is nearly ready, and that handles parallelization much better (since it runs on your GPU). And that would really help for vision tasks like image classification.

thank you for your answer


Can I use the 3D perspective of deck.gl while using this library?

Hi
I've made some tests with this library and I understood that I can can create deck.gl layers on a Leaflet map. However, it's not clear to me if the 3D perspective from deck.gl is possible to use with this library. Is it possible to do? Or the only way of using the 3D perspective would be using deck.gl without integrating it with Leaflet?
It's a conceptual doubt only... The advantage of using this library would be being capable of creating layers that deck.gl can make and Leaflet can't, is that so? I'd like to understand the benefits and limitations of using it so far if possible...

Hi, you're right. This plugin enables to add deck.gl layers on top of Leaflet basemaps, i.e. no 3D.

Cool, in case I'm creating simple layers with polygons, polylines and points... Is there any difference in performance? I mean, Leaflet cannot create layers with a lot of data on it... When I use a deck.gl layer on a Leaflet map with this plugin is it going to have a better performance? Or is it converting the deck.gl layer to a Leaflet layer?

The difference is in the underlying rendering technology. I don't have exact numbers at hand, but Leaflet uses SVG by default, or you can opt-in for Canvas. deck.gl uses GPU-accelerated WebGL rendering, which can scale to even larger number of features.

I see... So when using this plugin, the deck.gl layers that are created are still using GPU-accelerated WebGL rendering? Even though it's being created on top of a Leaflet map?

Exactly, this plugin allows to create a deck.gl context as a Leaflet layer, and render on top of Leaflet basemap, for the purpose of adding deck.gl layers to an previously existing Leaflet application.
For a new application, it's better to use deck.gl directly.


VS code is not running

idk why double tapping on the vs code icon, nothing's happening.
the output of
$code --verbose
setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /usr/share/code/chrome-sandbox is owned by root and has mode 4755

@htr-tech @BDhackers009  help please : (

use
code --no-sanbox
for running vscode.....
On Sun, Mar 27, 2022, 10:26 AM malay9418 @.***> wrote:

idk why double tapping on the vs code icon, nothing's happening.
the output of
$code --verbose
setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but
is not configured correctly. Rather than run without sandboxing I'm
aborting now. You need to make sure that /usr/share/code/chrome-sandbox is
owned by root and has mode 4755
[image: Screenshot_2022-03-27-09-31-13-100_com realvnc viewer android]
https://user-images.githubusercontent.com/97306538/160266597-90672024-c500-43dc-a876-5740ef231bec.jpg
[image: Screenshot_2022-03-27-09-31-17-967_com realvnc viewer android]
https://user-images.githubusercontent.com/97306538/160266605-bcee61e0-bea1-4fa4-aa8b-45f70f97c2c6.jpg
@htr-tech https://github.com/htr-tech @BDhackers009
https://github.com/BDhackers009 help please : (
—
Reply to this email directly, view it on GitHub
https://github.com/modded-ubuntu/modded-ubuntu/issues/58, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQAS3W7RDXFMP4V2LDUIF2TVB7PQXANCNFSM5RYFVP7A
.
You are receiving this because you were mentioned.Message ID:
@.***>

@BDhackers009 yah, your solution worked, but can you please explain me what is sandbox and why is this type of error occuring?:

Honestly I dont know actually what that thing is but I know how to fix it. btw sanbox is an isolated environment with which you can run a piece of code or a software without affecting your system.

https://youtu.be/Fd59maVTG58
See this video from start

https://youtu.be/Fd59maVTG58 See this video from start

💁 Thanks for showing us the easier fix we will patch this in the next update


Fix seeting of json serializer to ignore self referencing loop

Issue:

https://github.com/Microsoft/vstest/issues/706
https://github.com/Microsoft/vstest/issues/618

Fix:
Don’t serialize the type if that have self-referencing loop

@Faizan2304,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@dotnet-bot test Windows_NT / Debug Build


Adding AutoCompleteRestore and LastBackupName params to ManagedDatabase model

Openapi spec PR: https://github.com/Azure/azure-rest-api-specs/pull/9911


Telenor Gateway: Add support for specifying a delivery status url

According to Telenor docs we can send a header value delivery_status_url which will be used as the endpoint where delivery reports are sent to.
This is needed for an app of ours where we need to specify a custom endpoint since the Telenor account is shared for multiple projects.
I put this in the constructor to match how the $supplementaryInformation argument is used, but I put it last since this would technically otherwise be a breaking change warranting a new major.
If you think we should put the argument before the mocks, please tell me and I will update the PR.

Thank you! 🙏
Will consider changing parameter order when the next major version is due. Tagging a minor version with this change until then.


A problem about clipping the eta in Basic Iterative Method.

We will clip the eta in every iteration, but it seems that for ord = 1 or 2, the eta will access the bound eps directly.  In the other word, the l1 (or l2) norm of eta equals to eps after each iteration.
            # Clipping perturbation eta to self.ord norm ball
            if self.ord == np.inf:
                eta = tf.clip_by_value(eta, -self.eps, self.eps)
            elif self.ord in [1, 2]:
                reduc_ind = list(xrange(1, len(eta.get_shape())))
                if self.ord == 1:
                    norm = tf.reduce_sum(tf.abs(eta),
                                         reduction_indices=reduc_ind,
                                         keep_dims=True)
                elif self.ord == 2:
                    norm = tf.sqrt(tf.reduce_sum(tf.square(eta),
                                                 reduction_indices=reduc_ind,
                                                 keep_dims=True))
                eta = eta * self.eps / norm

Maybe we just need clip the eta when it is out of bound,I'm not sure if this is a mistake or I misunderstood the algorithm. Thanks in advance.

For reference, the code quoted is from here:
https://github.com/tensorflow/cleverhans/blob/a18f3319015cebc4a83dae3b7217019b5654f641/cleverhans/attacks.py#L404
I agree that it looks like a bug, and instead we should call the clip_eta function:
https://github.com/tensorflow/cleverhans/blob/master/cleverhans/utils_tf.py#L380
@AlexeyKurakin can you confirm?

Yes, this is a bug.
I'll fix it today

This was fixed by https://github.com/tensorflow/cleverhans/pull/387


Unit testing

Thank you for this great addition to angular, I love the flexibility and ease of use.
I am trying to write unit tests for a controller I'm using in a modal and cannot figure out how to inject the close provider into my tests since it looks like there's some angular magic going on.  Any tips to help?
it('should implement close()', function () {
      inject(function ($controller, $rootScope) {
        var scope;

        scope = $rootScope.$new();
        $controller('TemplateController', { $scope: scope } );

        expect(angular.isFunction(scope.close)).toBeTruthy();
      });
    }); // should implement close()

The controller is as simple as:
TimelineControllers.controller('TemplateController', ['$scope', 'close', function($scope, close) {
    $scope.close = function () {
      close('i was closed');
    };
  }]);

first define below line
  var element = angular.element('

');

 hadithListCtrl = $controller('hadithListCtrl', { $element:element });

after write mentioned lines in before function you donot see this error

I also have the same issue, the only difference is that using custom modal, so, I don't need a $element.
Error: [$injector:unpr] Unknown provider: closeProvider <- close <- changePasswordController
while running unit testing. Can you help please me. Stuck here.
Thank you in advance.


Test run fails on import

Using default settings for jest-runner on an nx-setup repo.
Seems to work fine, just when I try to import library files, I get
Cannot find module '...'
Working fine when running the test file with nx test or ng test.
What do I have to configure to make this work?

i don't have xp with nx/ng test but...  my understanding its just a wrapper for jest in the angular cli.
jest-runner is basically creating the jest commands like you would regularly execute them over your terminal.
if such a command fails i could have something todo with your test/jest config?

I installed jest-cli now and run the test with:
jest my-file.component.spec.ts
This gives the same error of missing component.
I had to add
"modulePaths": [
"./"
],
in the root level jest.config.js
To let jest also search for the modules defined in my root.
Furthermore I am using alias so I had to add:
moduleNameMapper: {
'^@my-lib/(.*)$': '/libs/$1/src/lib/$1.module',
},
But even then more dependencies from zone.js etc. are requested, so I think I am giving up at this point and going back to nx test, where it works fine.
Thanks for your help though.

normally jest don't need much config. there are certain presets you can use. to me it sounds your issue is releated to your project config, not with my addon.

please reopen, if you have some findings how you can make my extention work with nx-setup


Select options is not scroll-able when inside an small container, like small modal

General summary of the issue
I have some modals, most of them are small, Like:

When I try to open the select:

In there, I have a select & 5-10 options, It seems that when I open the modal & then the select there's no scrollbar to scroll through all options, But there's all options has been rendered, I checked it by inspecting element.
Expected Behavior
That select dropdown should display an scrollbar & open in a reasonable size, so I can see 3-5 options at once & scroll, as I have plenty of space, because the small modal is in the center of the screen.
Steps to Reproduce (for bugs)
code to reproduce

Make a tiny modal of any type
Place a material select element in there
That select should have plenty of options
Refresh the page & try to open the select, Bam... You seen a big bug.

**Please dont close this issue before it fully fixed, (I seen few issues closed without a really useful solution)

Which version are you running?


Magic string in query and response

Hi,
I am sorry if I am posting to wrong forum but this is the only part that I could find to ask my question. I am doing some research about the DNSCurve and I have run Wireshark to capture the dnscrypt-proxy traffic between the client and server. What is bugging me is the so called magic string in queries and responses. As per the IETF memo (https://tools.ietf.org/id/draft-dempsky-dnscurve-00.txt) and DNSCurve page (http://dnscurve.org/in-implement.html), the magic string in the query should be Q6fnvWj8 and in the response R6fnvWJ8.
However, Wireshark shows different data. While reply from the server is similar (being r6fnvWj8), the queries are completely different and vary whether I use dnscrypt-proxy in Windows or Linux. I'd be grateful if someone can shed some light on why this is so and how can I make sure the packet really contains DNSCrypt data or something else using only network sniffing tools.
Thanks.

DNSCrypt and DNSCurve are different protocols, with different purposes.
DNSCurve authenticates responses sent by an authoritative servers to a recursive server, whereas DNSCrypt authenticates responses sent by a recursive server to a client (local/stub resolver).
DNSCurve "magic" sequence is not hardcoded. For a given provider, each certificate has a different "magic" sequence. This is useful for key rollovers, where 2 or more certificates can be used at the same time.
So, each certificate includes a public key, supported versions, and the magic to be sent by the client when sending a query using this certificate.
The protocol is described here: https://github.com/jedisct1/dnscrypt-proxy/blob/master/TECHNOTES

Thanks. That was quick...
Sorry, I've mixed things a bit  - I thought DNSCrypt was directly linked to DNSCurve project. This makes some things clearer for me now. Since the query magic string is basically random (based on the client key that is always different for every runtime), is there any way of detecting DNSCrypt through the packet information?

There is no easy way to do so, and the intent is to eventually make it ever more difficult to fingerprint.

OK, thank you for your time and responses. I'll close the issue now.


Loading the Plugin Context failed. Failed to get token from cookie

How to solve this

@scthi @0x46616c6b @monotek @Jonher937

Hi @blackqw can you maybe share the configuration you are using? It would also be helpful if you can share how you run kobs, via the Helm chart, locally, etc.?


Some events not triggering after first trigger.

I just noticed some events as swipeleft / swiperight / tap / etc...
Will trigger on the first move but not on the second and it will re-trigger on the third move and not on the fourth etc...
I didnt noticed it happening with release event this is why i say "Some events".
You can check thir url (All my tests have been done on Iphone):
http://ns3262575.ip-5-39-77.eu/
=> try to swipe right, menu opens.
=> close menu then retry to swipe right, nothing happens.
=> retry again, menu reopens...
As i said before, this is happening on my Iphone.
Does anyone know how to fix this ?
Thanks.

Closing this due to age and inactivity this is from V1


document how to follow a connection through the handshake using ConnContext

See https://github.com/quic-go/quic-go/pull/4507.

Resolved by #60.


Use New Relic for analytics

Is your feature request related to a problem? Please describe.
Per @k3KAW8Pnf7mkmdSMPHz27's request, let's set up New Relic for analytics.
Describe the solution you'd like
Seems like accounts exist on a per brigade basis and that this project needs to be adopted by a brigade. Maybe @themightychris can adopt the Statusboard on behalf of Code for Philly?
Describe alternatives you've considered
We could use Google Analytics or something, but this kind of begs the same questions about what account to use. Potentially we could set up a Google Group to be the account manager?
Additional context
In the long term, post brigade revisioning, CfA might need to re-think how we set up accounts. IMO we can cross that bridge when we come to it.

@themightychris can set up NewRelic through Code for Philly. The missing part right now is someone having time to do it and figure out all the necessary details. (it is on my todo list, but I am not sure when I'll have time)

I am closing this. We can open a new issue to make the information we collect more transparent in the future.


PHP Fatal error:  Class 'PDO' not found...'

I'm running composer in a docker container and it appears as if Composer cannot find the php class PDO:
PHP Fatal error:  Class 'PDO' not found in /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php on line 172

This is strange because when running:

composer show -p lists

I get the output:
...

ext-PDO             7.0.11   The PDO PHP extension
...

Running:

docker "php7 -m"

lists PDO and pdo_mysql (as well as many other packages).
Any clues why the class 'PDO' cannot be found in spite the fact that PDO is listed as an installed Composer package?

Closing as the issue had nothing to do with Doctrine. I was using an image containing nginx and php-fpm which appeared to use both php5 and php7 packages. Using only php5 packages solved my issues.


Corrected the method name for source implementation

Motivation
Corrected the method name for source implementation in io-develop.md

ping @Anonymitaet

ping @Anonymitaet

She has approved the commit but some tests have failed.  I am unable to figure out from the logs. Seems unrelated to the changes I made in the documentation. Can anyone help?


ENH: Adding logging for emprirical measurement

@gggodhwani added it as part of logging.

will reopen in sometime


Update the build

I always end up having problems with the compilations and libraries, I don't know why, and I finish with many headaches. So if you could update this with the last commits, I would appreciate it so much.
Thanks!

Build has been updated. You're right about it being a headache, had to update to the dev build of pyinstaller to get it to work with python 3.6 and my anti-virus kept deleting the 32 bit version. :weary:


Add ViT

This task is part of the KerasHub project ( Consolidating all of KerasCV and KerasNLP models in to one place)
Models from KerasCV will be added to KerasNLP in KerasNLP infrstructure style. The development is now under the keras-hub branch in KerasNLP - https://github.com/keras-team/keras-nlp/tree/keras-hub
Steps to complete this Task

Destination : A model folder here https://github.com/keras-team/keras-nlp/tree/keras-hub/keras_nlp/src/models
Example PR : https://github.com/keras-team/keras-nlp/pull/1737, please follow the style from here and take a look at the comments on the PR for any design clarifications
copy the model over
use KerasNLP test routines to update the tests
for reformatting the code run shell/api_gen.sh, shell/format.sh and shell/lint.sh
The backbone will be added as a model, any downstream task model will be under the same model folder.

Add either @divyashreepathihalli, @mattdangerw  or @SamanehSaadat for review of any PR.

@sineeli - hey, just wanted to check if there are any updates?
If you're busy, I could take it off your plate and write up a quick PR :)


accelerate integration

What does this PR do?
This PR integrates trl with accelerate to make it compatible with the tools provided by the library to be able to train models using PPOTrainer. This would enable users to train their models in mixed precision, using Data Parallelism etc in a very simple manner.
Users should design their own training script and run them using accelerate launch xxx.py based on the example scripts provided in examples/scripits.
This PR also integrates Data Parallelism paradigm, enabling users to benefit from multi-GPU training if they want to speedup training.
TODOs

[x] add example script
[x] Improve API
[x] document code
[x] document example (check accelerate examples)
[x] Input safety checkers (very important)

DeepSpeed tests (check where it works)

[ ] zero-0
[x] zero-1
[x] zero-2
[ ] zero-3

wandb run after the latest commit: https://wandb.ai/distill-bloom/trl/runs/1mps4h09?workspace=user-younesbelkada

Wandb log of the final run: https://wandb.ai/distill-bloom/trl/runs/dcd2gqn1?workspace=user-younesbelkada

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


New API for clean handling of variable length keys

In this diff, we propose the new API for clean handling of VariantLengthKey.
Previously, handling VariantLengthKey is extremely tricky and fragile (if possible at all),
and requires writing code that any project with reasonable code quality standards would not tolerate.
This is even causing bugs in our own codebase (e.g. Compaction contexts, and even the test that tests VariantLengthKey is buggy itself).
We propose a backward-compatible new API to handle VariantLengthKey cleanly.
We add a new concept -- ShallowKey. This class is required to provide the same APIs
as the Key class (size(), GetHash() and operator==()), but unlike Key class,
which raw contents (interpreted as a uint8_t* string) is directly written into the log,
ShallowKey's internal representation does not matter.
In addition to the existing APIs, a new API with prototype
void write_deep_key_at(Key* dst) const
is required, which should write the bytestream-representation of the Key into address 'dst'.
In order to use the new API, all you need to do is to change the key() API in Context to return
ShallowKey type, instead of key_t type. Example:
struct UpsertContext
{
using key_t = Key;
// uncomment below to use new API
// ShallowKey key();

// uncomment below to use old API
// key_t key();

};

Amazing work, thanks for your contribution!

YCSB in-memory, 50:50 read:upsert, zipf, 1 thread, 30 secs, no checkpoints
Before: 3785703.42 ops/second
After: 3784560.88 ops/second

YCSB in-memory, 50:50 read:upsert, zipf, 72 threads, 30 secs, no checkpoints
Before: 174636416.16 ops/second
After: 173332831.68 ops/second


iOS orientation issue when custom action sheet opens

I'm using actionsheet custom in one of the screens in my app. It's working absolutely perfect in android in any orientation. In iOS, it's working perfectly in portrait mode. But when I try to open actionsheet when the iOS device is in landscape mode, the device orientation automatically turning into portrait..I don't understand this mischievous behaviour.

I am also facing the same issue. Does anyone has any solution for it?


Players can't see or interact with the terrain - Shadow of the Demon Lord rules

Hi, I have the terrain setup on the map and I walk the token through it on the GMs account.  Everything applies and is removed as the token moves through the terrain.  When I have one of my players try it, or i log in on one of their accounts it doesn't work.  When they choose to view the terrain by selecting the terrain layer icon they also do not see it.  Its like its doesn't exist on the players side.  Any help would be appreciated.  I'm using the shadow of the demon lord rule set.  Thanks

Try in v12 once the system is updated.


Fix a German translation issue, resolving #1095

Any German speakers want to approve this?  Doesn't seem wrong to me, but I don't read German 😆

Oops, I see you had an explination in that other issue, which I forgot about.  I will just merge this since it seems reasonable.


Add graceful fallback response for API calls

Description
This PR adds an explicit fallback response to avoid page crashing errors on failed API requests, such that the app can handle them more gracefully. For the main API route, the previous behaviour remains for compatibility.
Development notes
An example use case is to avoid page crashes when loading JSON files in place of a real API, without needing to export all of the files for each possible API request. In practice this then allows the metadata panel to be used with a single main JSON file for testing while falling back gracefully for missing data.
All request errors are still visible in the console logs as normal, we could potentially add more information through an additional console.error if needed. Later on if needed, we could also add an error flag to the fallback response.
We could also consider extending this behaviour to the main route too, but for now it remains a special case to retain the previous behaviour (an informative error), avoiding this being a breaking change for that route.
QA notes
Using a public/main JSON test file, test all features that use API requests (first load, pipeline select, metadata panel).
Checklist

[x] Read the contributing guidelines
[ ] Opened this PR as a 'Draft Pull Request' if it is work-in-progress
[ ] Updated the documentation to reflect the code changes
[ ] Added new entries to the RELEASE.md file
[ ] Added tests to cover my changes

Legal notice

[x] I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.

I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.

I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.

Great stuff @bru5 !
tested on running viz on a JSON file with setting the meta flag to true ( which is the scenario this fix will cater for, which is enabling the metadata panel while running viz against a JSON file instead of a Kedro project), and it works well!


HMR for server middleware fails, restarting nuxt works

Version
v2.12.1
Reproduction link
https://codesandbox.io/s/nuxt-hmr-servermiddleware-bug-8v1pz
Steps to reproduce

Open https://codesandbox.io/s/nuxt-hmr-servermiddleware-bug-8v1pz

I've created a minimal testcase that shows the issue.
You may need to fork the codesandbox, or download the files. In that case, run the nuxt dev server.

On the "browser preview" pane, click on the button.

That button will fetch the /api endpoint, implemented in a server middleware.
Alternatively, just open that URL directly on the browser.

Observe how it returns HTTP 200 response with the proper response body.
Open the server_middleware/api.js file and edit anything in there.
Save. Observe how nuxt detects the change and hot-reloads the module (and prints HMR on the terminal).
Click on the button again.

Or just try fetching /api endpoint again.

What is expected ?
It should just work, with the new hot-reloaded code.
What is actually happening?
It returns 404 not found.
This shows the HMR of server middlewares is not working correctly.
As a workaround, we can stop and restart the dev server, and then it works again (until the next HMR).
Additional comments?
Maybe this happens when other middlewares are hot-reloaded. Maybe this happens more often when the list of middlewares is longer. I don't know what causes it.

This bug report is available on Nuxt community (#c10450)

Thanks @denilsonsa for proper issue and repro. It seems an interesting issue. It is happening because connect removes trailing slash src:

so when you register API and on first HMR a mismatch happend. I would suggest to simply expose prefix to default export of app.js like this:
const app = connect()

export default {
  path: '/api',
  handler: app
}

app.use("/", function(req, res, next) { ...

This is also much better for performance as API middleware will be called only for /api/* routes.
I will try to investigate more for a possible edge case fix.

Update: #7146


assemble should ignore CriticalManufacturing and Cmf.Environment dependencies

We have some packages that assemble shouldn't take care, because we have the assumption that packages are already installed.
In case that are not installed the installation will fail.

closed by #85


Fix for hanging when printing large SQL quires

When printing large quires it would hang, this just cuts it off to ensure it doesn't go out of hand. A common large query is bulk insert.

Coverage decreased (-0.01%) to 38.56% when pulling ad3c3068fe2453fe3d42416edffa916df0b0e77b on maxnordlund:truncate-large-sql into e79cf5141b3aa056fd50f332111165fec9cafcbf on django-extensions:master.

Can you add a configuration option for the cutoff point ? Then if users want to set it to truncate to shorter (or longer) queries they could do so.
Thanks !

Sure thing, what would be a good name you recon?

Was thinking something like settings.EXTENSIONS_PRINT_SQL_TRUNCATE.
For shell_plus there is already settings.SHELL_PLUS_PRINT_SQL however there is no runserver_plus equivalent of that.
Maybe settings.SHELL_PLUS_PRINT_SQL_TRUNCATE and settings.RUNSERVER_PLUS_PRINT_SQL_TRUNCATE ?
But I'm completely open to other suggestions as well :)

Sounds like a plan.

Coverage decreased (-0.2%) to 38.41% when pulling 76a837f212e88aae1f919e420622230a3a1dc2a5 on maxnordlund:truncate-large-sql into e79cf5141b3aa056fd50f332111165fec9cafcbf on django-extensions:master.

Thanks !

No problemo


some songs are unplayable

sprites doesn't load instead there are bunch of black boxes everywhere. some of the songs are 7 fps and i randomly die on turbulance. please help i love the mod but i cannot play it :(((

Bad pc


can't setup calico related pods in k8s

Here we are using calico as network plugin for k8s based on KB: https://docs.tigera.io/calico/latest/operations/image-options/alternate-registry by using local registry as calico dockers images. We adjust based on that KB in tigera-operator.yaml and custom-resources.yaml. But calico related pods can't be in normal status after apply custom-resources.yaml. Below are the detail error info, any suggestion?
[root@k8sma manifests]# kubectl get pods --all-namespaces
NAMESPACE         NAME                                      READY   STATUS                      RESTARTS   AGE
calico-system     calico-kube-controllers-576f6b4cc-kzbdp   0/1     Pending                     0          11m
calico-system     calico-node-vh5j4                         0/1     Init:CreateContainerError   0          11m
calico-system     calico-typha-c8775554c-lrd6c              0/1     CreateContainerError        0          11m
calico-system     csi-node-driver-6fblr                     0/2     ContainerCreating           0          11m
kube-system       coredns-7b5944fdcf-rmgxx                  0/1     Pending                     0          11m
kube-system       coredns-7b5944fdcf-spc2h                  0/1     Pending                     0          11m
kube-system       etcd-k8sma                                1/1     Running                     38         12m
kube-system       kube-apiserver-k8sma                      1/1     Running                     43         12m
kube-system       kube-controller-manager-k8sma             1/1     Running                     46         12m
kube-system       kube-proxy-tbcxw                          1/1     Running                     0          11m
kube-system       kube-scheduler-k8sma                      1/1     Running                     45         12m
tigera-operator   tigera-operator-5847fb7754-f67jj          1/1     Running                     0          11m

[root@k8sma manifests]# kubectl describe pod calico-typha-c8775554c-lrd6c -n calico-system
Name:                 calico-typha-c8775554c-lrd6c
Namespace:            calico-system
Priority:<PHONE_NUMBER>
Priority Class Name:  system-cluster-critical
Service Account:      calico-typha
Node:                 k8sma/<IP_ADDRESS>
Start Time:           Wed, 17 Jul 2024 14:26:37 +0800
Labels:               app.kubernetes.io/name=calico-typha
                      k8s-app=calico-typha
                      pod-template-hash=c8775554c
Annotations:          hash.operator.tigera.io/system: fdde45054a8ae4f629960ce37570929502e59449
                      tigera-operator.hash.operator.tigera.io/tigera-ca-private: bc1830f9e6cb4590e3f0da8a12e44e08ecb12eaa
                      tigera-operator.hash.operator.tigera.io/typha-certs: 84e83e8f72477d38dcd30a197b85919b25f006ed
Status:               Pending
IP:                   <IP_ADDRESS>
IPs:
  IP:           <IP_ADDRESS>
Controlled By:  ReplicaSet/calico-typha-c8775554c
Containers:
  calico-typha:
    Container ID:
    Image:           localhost:5000/calico/typha:v3.28.0
    Image ID:
    Port:            5473/TCP
    Host Port:       5473/TCP
    SeccompProfile:  RuntimeDefault
    State:           Waiting
      Reason:        CreateContainerError
    Ready:           False
    Restart Count:   0
    Liveness:        http-get http://localhost:9098/liveness delay=0s timeout=10s period=60s #success=1 #failure=3
    Readiness:       http-get http://localhost:9098/readiness delay=0s timeout=10s period=30s #success=1 #failure=3
    Environment:
      TYPHA_LOGSEVERITYSCREEN:          info
      TYPHA_LOGFILEPATH:                none
      TYPHA_LOGSEVERITYSYS:             none
      TYPHA_CONNECTIONREBALANCINGMODE:  kubernetes
      TYPHA_DATASTORETYPE:              kubernetes
      TYPHA_HEALTHENABLED:              true
      TYPHA_HEALTHPORT:                 9098
      TYPHA_K8SNAMESPACE:               calico-system
      TYPHA_CAFILE:                     /etc/pki/tls/certs/tigera-ca-bundle.crt
      TYPHA_SERVERCERTFILE:             /typha-certs/tls.crt
      TYPHA_SERVERKEYFILE:              /typha-certs/tls.key
      TYPHA_FIPSMODEENABLED:            false
      TYPHA_SHUTDOWNTIMEOUTSECS:        300
      TYPHA_CLIENTCN:                   typha-client
      KUBERNETES_SERVICE_HOST:          <IP_ADDRESS>
      KUBERNETES_SERVICE_PORT:          443
    Mounts:
      /etc/pki/tls/cert.pem from tigera-ca-bundle (ro,path="ca-bundle.crt")
      /etc/pki/tls/certs from tigera-ca-bundle (ro)
      /typha-certs from typha-certs (ro)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-ptcm5 (ro)
Conditions:
  Type                        Status
  PodReadyToStartContainers   True
  Initialized                 True
  Ready                       False
  ContainersReady             False
  PodScheduled                True
Volumes:
  tigera-ca-bundle:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      tigera-ca-bundle
    Optional:  false
  typha-certs:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  typha-certs
    Optional:    false
  kube-api-access-ptcm5:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              kubernetes.io/os=linux
Tolerations:                 :NoSchedule op=Exists
                             :NoExecute op=Exists
                             CriticalAddonsOnly op=Exists
Events:
  Type     Reason       Age                   From               Message
  ----     ------       ----                  ----               -------
  Normal   Scheduled    12m                   default-scheduler  Successfully assigned calico-system/calico-typha-c8775554c-lrd6c to k8sma
  Warning  FailedMount  12m                   kubelet            MountVolume.SetUp failed for volume "tigera-ca-bundle" : failed to sync configmap cache: timed out waiting for the condition
  Warning  Failed       12m                   kubelet            Error: failed to generate container "9a30eed862e93fc8248b64e0bd5d7de2fe090d24a618f810476f1e20508451e3" spec: failed to generate spec: no command specified
  Warning  Failed       12m                   kubelet            Error: failed to generate container "43d0f89a95da40b10f82636bfc37e7da5767643495df669dd6bc8acafbca829c" spec: failed to generate spec: no command specified
  Warning  Failed       12m                   kubelet            Error: failed to generate container "a67cbab6ceec0ed297105cdac05275306e06cad1b46480775c5c5cf82b88bcc8" spec: failed to generate spec: no command specified
  Warning  Failed       12m                   kubelet            Error: failed to generate container "47551a347907b903f4d840a06f49366013147f985940c4dfa798d81b8c898f01" spec: failed to generate spec: no command specified
  Warning  Failed       11m                   kubelet            Error: failed to generate container "59093a5b73bafab6fb02c4d1bbae407600ecb074bb68ecd7e9b19ead8605db69" spec: failed to generate spec: no command specified
  Warning  Failed       11m                   kubelet            Error: failed to generate container "83ff673c79fb6437472347b8448e73bdff761f0a3a90ff112c1990c0a9a87197" spec: failed to generate spec: no command specified
  Warning  Failed       11m                   kubelet            Error: failed to generate container "3071ec15367613b8e0ba5092edbb008124a2df6b5595cc217970b82f8e41cd6d" spec: failed to generate spec: no command specified
  Warning  Failed       11m                   kubelet            Error: failed to generate container "77b8c8428e6a2b1499c5461cc57ae79dc1aae6cac16371c5125d056fce94892c" spec: failed to generate spec: no command specified
  Warning  Failed       11m                   kubelet            Error: failed to generate container "ff4b01d90db08f46f2a0f24b1cd9e66f2bcad7091b1eee1ef6e38996b605c1c6" spec: failed to generate spec: no command specified
  Warning  Failed       10m (x3 over 10m)     kubelet            (combined from similar events): Error: failed to generate container "37eafe5c181ee2edb9cc0559622ed142c75064ba72ba37ffc395d57cf4c43a43" spec: failed to generate spec: no command specified
  Normal   Pulled       2m25s (x48 over 12m)  kubelet            Container image "localhost:5000/calico/typha:v3.28.0" already present on machine

[root@k8sma manifests]# kubectl describe pod csi-node-driver-6fblr -n calico-system
Name:                 csi-node-driver-6fblr
Namespace:            calico-system
Priority:<PHONE_NUMBER>
Priority Class Name:  system-node-critical
Service Account:      default
Node:                 k8sma/<IP_ADDRESS>
Start Time:           Wed, 17 Jul 2024 14:26:39 +0800
Labels:               app.kubernetes.io/name=csi-node-driver
                      controller-revision-hash=74fbb6df98
                      k8s-app=csi-node-driver
                      name=csi-node-driver
                      pod-template-generation=1
Annotations:          <none>
Status:               Pending
IP:
IPs:                  <none>
Controlled By:        DaemonSet/csi-node-driver
Containers:
  calico-csi:
    Container ID:
    Image:           localhost:5000/calico/csi:v3.28.0
    Image ID:
    Port:            <none>
    Host Port:       <none>
    SeccompProfile:  RuntimeDefault
    Args:
      --nodeid=$(KUBE_NODE_NAME)
      --loglevel=$(LOG_LEVEL)
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Environment:
      LOG_LEVEL:       warn
      KUBE_NODE_NAME:   (v1:spec.nodeName)
    Mounts:
      /csi from socket-dir (rw)
      /var/lib/kubelet from kubelet-dir (rw)
      /var/run from varrun (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-rjd5s (ro)
  csi-node-driver-registrar:
    Container ID:
    Image:           localhost:5000/calico/node-driver-registrar:v3.28.0
    Image ID:
    Port:            <none>
    Host Port:       <none>
    SeccompProfile:  RuntimeDefault
    Args:
      --v=5
      --csi-address=$(ADDRESS)
      --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Environment:
      ADDRESS:               /csi/csi.sock
      DRIVER_REG_SOCK_PATH:  /var/lib/kubelet/plugins/csi.tigera.io/csi.sock
      KUBE_NODE_NAME:         (v1:spec.nodeName)
    Mounts:
      /csi from socket-dir (rw)
      /registration from registration-dir (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-rjd5s (ro)
Conditions:
  Type                        Status
  PodReadyToStartContainers   False
  Initialized                 True
  Ready                       False
  ContainersReady             False
  PodScheduled                True
Volumes:
  varrun:
    Type:          HostPath (bare host directory volume)
    Path:          /var/run
    HostPathType:
  kubelet-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/kubelet
    HostPathType:  Directory
  socket-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/kubelet/plugins/csi.tigera.io
    HostPathType:  DirectoryOrCreate
  registration-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/kubelet/plugins_registry
    HostPathType:  Directory
  kube-api-access-rjd5s:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              kubernetes.io/os=linux
Tolerations:                 :NoSchedule op=Exists
                             :NoExecute op=Exists
                             CriticalAddonsOnly op=Exists
                             node.kubernetes.io/disk-pressure:NoSchedule op=Exists
                             node.kubernetes.io/memory-pressure:NoSchedule op=Exists
                             node.kubernetes.io/not-ready:NoExecute op=Exists
                             node.kubernetes.io/pid-pressure:NoSchedule op=Exists
                             node.kubernetes.io/unreachable:NoExecute op=Exists
                             node.kubernetes.io/unschedulable:NoSchedule op=Exists
Events:
  Type     Reason           Age                    From               Message
  ----     ------           ----                   ----               -------
  Normal   Scheduled        13m                    default-scheduler  Successfully assigned calico-system/csi-node-driver-6fblr to k8sma
  Warning  NetworkNotReady  3m45s (x302 over 13m)  kubelet            network is not ready: container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized

@huanghaiqing1 are you using custom built images? Or are these the official Calico images we host?

Warning  Failed       10m (x3 over 10m)     kubelet            (combined from similar events): Error: failed to generate container "37eafe5c181ee2edb9cc0559622ed142c75064ba72ba37ffc395d57cf4c43a43" spec: failed to generate spec: no command specified

This suggests potentially a problem with the container, as the image we provide has a CMD directive to provide a default command.

On Jul 23, 2024, at 1:01 AM, Casey Davenport @.> wrote: Hello, here I'm using official Calico images. And based on official KB: https://docs.tigera.io/calico/latest/operations/image-options/alternate-registry , I need to modify yaml: tigera-operator.yaml and custom-resources.yaml. But the instructions is too short or maybe I didn't get its point. Here I modify according to the BK's suggestion, but related pods about calico part don't startup normally. @huanghaiqing1 are you using custom built images? Or are these the official Calico images we host? Warning Failed 10m (x3 over 10m) kubelet (combined from similar events): Error: failed to generate container "37eafe5c181ee2edb9cc0559622ed142c75064ba72ba37ffc395d57cf4c43a43" spec: failed to generate spec: no command specified This suggests potentially a problem with the container, as the image we provide has a CMD directive to provide a default command. — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you were mentioned. Message ID: @.>

Could you run the following for me to see the output:
docker inspect localhost:5000/calico/typha:v3.28.0

Specifically looking to see what the "Cmd" section of the output shows.

Also, to be sure - have you specified the --pod-infra-container-image argument on the kubelet by chance?

Hello, below is the output. CMD session shows null. I'm not sure the download calico package for private registry is complete or not. Because based on official KB, it requires. But my unzip calico folder about images only gives 7 tar ball. docker tag quay.io/tigera/operator:v1.34.0 $REGISTRY/tigera/operator:v1.34.0 docker tag calico/typha:v3.28.0 $REGISTRY/calico/typha:v3.28.0 docker tag calico/ctl:v3.28.0 $REGISTRY/calico/ctl:v3.28.0 docker tag calico/node:v3.28.0 $REGISTRY/calico/node:v3.28.0 docker tag calico/cni:v3.28.0 $REGISTRY/calico/cni:v3.28.0 docker tag calico/apiserver:v3.28.0 $REGISTRY/calico/apiserver:v3.28.0 docker tag calico/kube-controllers:v3.28.0 $REGISTRY/calico/kube-controllers:v3.28.0 docker tag calico/dikastes:v3.28.0 $REGISTRY/calico/dikastes:v3.28.0 docker tag calico/pod2daemon-flexvol:v3.28.0 $REGISTRY/calico/pod2daemon-flexvol:v3.28.0 docker tag calico/csi:v3.28.0 $REGISTRY/calico/csi:v3.28.0 docker tag calico/node-driver-registrar:v3.28.0 $REGISTRY/calico/node-driver-registrar:v3.28.0 @.*** images]# docker images | grep -i localhost localhost:5000/calico/pod2daemon v3.28.0 651b8c0ee75e 14 minutes ago 13.4MB localhost:5000/calico/flannel-migration-controller v3.28.0 d0c308187ddb 15 minutes ago 128MB localhost:5000/calico/dikastes v3.28.0 3f03f0b0cf90 19 minutes ago 41.9MB localhost:5000/calico/kube-controllers v3.28.0 2bd71868d777 22 minutes ago 79.2MB localhost:5000/calico/cni v3.28.0 b144a54fe61f 23 minutes ago 209MB localhost:5000/calico/node v3.28.0 5bc4d7581211 26 minutes ago 355MB localhost:5000/calico/typha v3.28.0 337aa4a7808a 29 minutes ago 71.2MB @.*** images]# docker images | grep -i "^calico" calico/pod2daemon v3.28.0 651b8c0ee75e 14 minutes ago 13.4MB calico/flannel-migration-controller v3.28.0 d0c308187ddb 16 minutes ago 128MB calico/dikastes v3.28.0 3f03f0b0cf90 20 minutes ago 41.9MB calico/kube-controllers v3.28.0 2bd71868d777 22 minutes ago 79.2MB calico/cni v3.28.0 b144a54fe61f 23 minutes ago 209MB calico/node v3.28.0 5bc4d7581211 26 minutes ago 355MB calico/typha v3.28.0 337aa4a7808a 29 minutes ago 71.2MB @.*** images]# docker inspect localhost:5000/calico/typha:v3.28.0 [ { "Id": "sha256:337aa4a7808a28ab0c30f9348c9157600e1ed0882b2e780fcbd7f1b4e63626b5", "RepoTags": [ "calico/typha:v3.28.0", "localhost:5000/calico/typha:v3.28.0" ], "RepoDigests": [], "Parent": "", "Comment": "Imported from -", "Created": "2024-07-24T00:55:07.84429967Z", "DockerVersion": "26.1.1", "Author": "", "Config": { "Hostname": "", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": null, "Cmd": null, "Image": "", "Volumes": null, "WorkingDir": "", "Entrypoint": null, "OnBuild": null, "Labels": null }, "Architecture": "amd64", "Os": "linux", "Size": 71173819, "GraphDriver": { "Data": { "MergedDir": "/var/lib/docker/overlay2/9b965a65bcffe20919974634876e91d53ed0f939cf5bf4f3933c9674dbbe6106/merged", "UpperDir": "/var/lib/docker/overlay2/9b965a65bcffe20919974634876e91d53ed0f939cf5bf4f3933c9674dbbe6106/diff", "WorkDir": "/var/lib/docker/overlay2/9b965a65bcffe20919974634876e91d53ed0f939cf5bf4f3933c9674dbbe6106/work" }, "Name": "overlay2" }, "RootFS": { "Type": "layers", "Layers": [ "sha256:5f6c59d25589c88a42e4bafba0dd87729c844bf77be55c5e22847dcd0e65e240" ] }, "Metadata": { "LastTagTime": "2024-07-24T09:24:41.47737321+08:00" } } ] Jul 24, 202412:59 AM，Casey Davenport @.> 写道： Also, to be sure - have you specified the --pod-infra-container-image argument on the kubelet by chance? — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you were mentioned. Message ID: @.>

I didn't include " --pod-infra-container-image" in my kubectl realetd service and I also didn't include it manually. Is there a way to provide an complete calico download tar-ball, which can be used for setup private registray and deploy from local. I'm in China and technically I can't get these images from calico directly, if not use VPN. Jul 24, 202412:59 AM，Casey Davenport @.> 写道： Also, to be sure - have you specified the --pod-infra-container-image argument on the kubelet by chance? — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you were mentioned. Message ID: @.>

@huanghaiqing1 I downloaded and loaded the images from release-v3.28.0.tar from here: https://github.com/projectcalico/calico/releases/tag/v3.28.0
This is the output I get for the calico/typha image:
[
    {
        "Id": "sha256:a9372c0f51b54c589e5a16013ed3049b2a052dd6903d72603849fab2c4216fbc",
        "RepoTags": [
            "calico/typha:v3.28.0"
        ],
        "RepoDigests": [],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2024-05-11T00:15:52.055728329Z",
        "DockerVersion": "",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "999",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Cmd": [
                "/usr/bin/calico-typha"
            ],
            "ArgsEscaped": true,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "/",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "description": "Calico Typha is a fan-out datastore proxy",
                "maintainer"<EMAIL_ADDRESS>                "name": "Calico Typha",
                "release": "1",
                "summary": "Calico Typha is a fan-out datastore proxy",
                "vendor": "Project Calico",
                "version": "v3.28.0"
            }
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 71143933,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/e4a8269bcc993b26c93df9883fa4f2386e26673d1cf6b73c5dc3d69a6f2c286a/diff",
                "MergedDir": "/var/lib/docker/overlay2/7c4bf0a7dee90c680d744ff2c0ec6476f661281ae6a28e5b1a9bd9ceac7ddd55/merged",
                "UpperDir": "/var/lib/docker/overlay2/7c4bf0a7dee90c680d744ff2c0ec6476f661281ae6a28e5b1a9bd9ceac7ddd55/diff",
                "WorkDir": "/var/lib/docker/overlay2/7c4bf0a7dee90c680d744ff2c0ec6476f661281ae6a28e5b1a9bd9ceac7ddd55/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:29ebc113185d6c09c2f84abf7d4fbbb49e2d6e4a169c0a5f9d14d1358d70827e",
                "sha256:31719a1450dd2c929a14d1bd057b3b663cb7b99286198effa4e9e10b62007641"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

Note that the "Cmd" section is not null. I think the images you have loaded into your registry have been modified in some way to remove the embedded command.

Hello, I compared the release-v3.28.0.tar with my current downloaded one. It’s same size. And I use "docker import calico-typha.tar calico/typha:v3.28.0” to import it and other tar.ball as docker images and then push them to my private registry. But inspect calico/typha, the cmd becomes “null”. What’s the problem? If you think this is the cause for invalid applying tigera-operator.yaml and custom-resources.yaml based on KB: https://docs.tigera.io/calico/latest/operations/image-options/alternate-registry.  How should I bypass?
￼
￼

2024年7月25日 01:13，Casey Davenport @.***> 写道：
@huanghaiqing1 https://github.com/huanghaiqing1 I downloaded and loaded the images from release-v3.28.0.tar from here: https://github.com/projectcalico/calico/releases/tag/v3.28.0
This is the output I get for the calico/typha image:
[
{
"Id": "sha256:a9372c0f51b54c589e5a16013ed3049b2a052dd6903d72603849fab2c4216fbc",
"RepoTags": [
"calico/typha:v3.28.0"
],
"RepoDigests": [],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2024-05-11T00:15:52.055728329Z",
"DockerVersion": "",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "999",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/usr/bin/calico-typha"
],
"ArgsEscaped": true,
"Image": "",
"Volumes": null,
"WorkingDir": "/",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"description": "Calico Typha is a fan-out datastore proxy",
"maintainer": @.***",
"name": "Calico Typha",
"release": "1",
"summary": "Calico Typha is a fan-out datastore proxy",
"vendor": "Project Calico",
"version": "v3.28.0"
}
},
"Architecture": "amd64",
"Os": "linux",
"Size": 71143933,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/e4a8269bcc993b26c93df9883fa4f2386e26673d1cf6b73c5dc3d69a6f2c286a/diff",
"MergedDir": "/var/lib/docker/overlay2/7c4bf0a7dee90c680d744ff2c0ec6476f661281ae6a28e5b1a9bd9ceac7ddd55/merged",
"UpperDir": "/var/lib/docker/overlay2/7c4bf0a7dee90c680d744ff2c0ec6476f661281ae6a28e5b1a9bd9ceac7ddd55/diff",
"WorkDir": "/var/lib/docker/overlay2/7c4bf0a7dee90c680d744ff2c0ec6476f661281ae6a28e5b1a9bd9ceac7ddd55/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:29ebc113185d6c09c2f84abf7d4fbbb49e2d6e4a169c0a5f9d14d1358d70827e",
"sha256:31719a1450dd2c929a14d1bd057b3b663cb7b99286198effa4e9e10b62007641"
]
},
"Metadata": {
"LastTagTime": "0001-01-01T00:00:00Z"
}
}
]
Note that the "Cmd" section is not null. I think the images you have loaded into your registry have been modified in some way to remove the embedded command.
—
Reply to this email directly, view it on GitHub https://github.com/projectcalico/calico/issues/9017#issuecomment-2248521013, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHFAPJE222UBI4N4OZFSBOLZN7ODLAVCNFSM6AAAAABK76WBSWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBYGUZDCMBRGM.
You are receiving this because you were mentioned.

@huanghaiqing1 I think the problem is the docker import command.
docker import simply loads the filesystem contained within the tar file, but does not retain any metadata from the original image.
I would recommend using docker load instead, which will load the image as well as the metadata (including the Cmd).
For example:
docker load < calico-typha.tar

Very thanks for your remind. Here I use docker load to push imanges to local from  downlaod folder release-v3.28.0/images. And I also create tag and push to my local private registry. And I can use "docker inspect" to see related local dockers have conten in "cmd". But when I follow KB: https://docs.tigera.io/calico/latest/operations/image-options/alternate-registry and use customized yamls: tigera-operator.yaml and custom-resources.yaml. But there are still different warnings during calico pods setup in k8s.
my steps:

kubeadm init --pod-network-cidr=<IP_ADDRESS>/16 --image-repository registry.aliyuncs.com/google_containers
2.
adjust tigera-operator.yaml and custom-resources.yaml then create calico pods from local registry. You can also refer to attached modifed yaml files.
@.*** manifests]# diff tigera-operator.yaml tigera-operator.yaml.orig
25450c25450
<           image: localhost:5000/tigera/operator:v1.34.0

      image: quay.io/tigera/operator:v1.34.0

@.*** manifests]# diff custom-resources.yaml custom-resources.yaml.orig
13c13
<       cidr: <IP_ADDRESS>/16

  cidr: <IP_ADDRESS>/16

17,19d16
<   variant: Calico
<   imagePath: calico
<   registry: localhost:5000
29a27

kubectl create -f ./tigera-operator.yaml
kubectl create -f ./custom-resources.yaml

kubectl get pod -n calico-system
NAME                                      READY   STATUS                      RESTARTS   AGE
calico-kube-controllers-b7fd956f5-xpqgg   0/1     Pending                     0          15s
calico-node-c975x                         0/1     Init:CreateContainerError   0          16s
calico-typha-55458bc957-crc4k             0/1     CreateContainerError        0          18s
csi-node-driver-2gbzt                     0/2     ContainerCreating           0          16s
  4.  I output pod descrption and local docker inspect info to output.log for your reference. Maybe you can give some additional advice. Thanks.

change in tiger-operator.yaml:
Configure use of your image registry | Calico Documentationhttps://docs.tigera.io/calico/latest/operations/image-options/alternate-registry
Configure Calico to pull images from a public or private registry.
docs.tigera.io

From: Casey Davenport @.>
Sent: Friday, July 26, 2024 11:06 PM
To: projectcalico/calico @.>
Cc: Huang Haiqing @.>; Mention @.>
Subject: Re: [projectcalico/calico] can't setup calico related pods in k8s (Issue #9017)
@huanghaiqing1https://github.com/huanghaiqing1 I think the problem is the docker import command.
docker import simply loads the filesystem contained within the tar file, but does not retain any metadata from the original image.
I would recommend using docker load instead, which will load the image as well as the metadata (including the Cmd).
For example:
docker load < calico-typha.tar
—
Reply to this email directly, view it on GitHubhttps://github.com/projectcalico/calico/issues/9017#issuecomment-2252961278, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHFAPJH33OJRH5NQ4PKJ2MLZOJQX5AVCNFSM6AAAAABK76WBSWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJSHE3DCMRXHA.
You are receiving this because you were mentioned.

@huanghaiqing1 I don't see any diagnostics on your last comment - you likely need to embed them as links into the GitHub post rather than via email.

output.log
yaml.zip
Here I submit related attachments here for your reference.
I use docker load to push imanges to local from  downlaod folder release-v3.28.0/images. And I also create tag and push to my local private registry. And I can use "docker inspect" to see related local dockers have conten in "cmd". But when I follow KB: https://docs.tigera.io/calico/latest/operations/image-options/alternate-registry and use customized yamls: tigera-operator.yaml and custom-resources.yaml. But there are still different warnings during calico pods setup in k8s. What I'm curious is even I switch to docker load mode,  I still see "spec: failed to generate spec: no command specified"  when use "kubectl describe pod calico-typha-67f78bf575-2d6jz -n calico-system". But when I use "docker inspect calico/typha:v3.28.0", I can see "cmd="/usr/bin/calico-typha" in image defination.
my steps:
1.kubeadm init --pod-network-cidr=<IP_ADDRESS>/16 --image-repository registry.aliyuncs.com/google_containers
2.adjust tigera-operator.yaml and custom-resources.yaml, then create calico pods from local registry. You can also refer to attached modifed yaml files from here.
[root@k8sma manifests]# diff tigera-operator.yaml tigera-operator.yaml.orig
25450c25450
<           image: localhost:5000/tigera/operator:v1.34.0

      image: quay.io/tigera/operator:v1.34.0

[root@k8sma manifests]# diff custom-resources.yaml custom-resources.yaml.orig
13c13
<       cidr: <IP_ADDRESS>/16

  cidr: <IP_ADDRESS>/16

17,19d16
<   variant: Calico
<   imagePath: calico
<   registry: localhost:5000
29a27

3.kubectl create -f ./tigera-operator.yaml
kubectl create -f ./custom-resources.yaml
kubectl get pod -n calico-system
NAME                                      READY   STATUS                      RESTARTS   AGE
calico-kube-controllers-b7fd956f5-xpqgg   0/1     Pending                     0          15s
calico-node-c975x                         0/1     Init:CreateContainerError   0          16s
calico-typha-55458bc957-crc4k             0/1     CreateContainerError        0          18s
csi-node-driver-2gbzt                     0/2     ContainerCreating           0          16s
  4.  I output pod descrption and local docker inspect info to output.log for your reference. Maybe you can give some additional advice. Thanks.

Hello, I have updated in github's comment. You can check there.

From: Casey Davenport @.>
Sent: Wednesday, July 31, 2024 5:01 AM
To: projectcalico/calico @.>
Cc: Huang Haiqing @.>; Mention @.>
Subject: Re: [projectcalico/calico] can't setup calico related pods in k8s (Issue #9017)
@huanghaiqing1https://github.com/huanghaiqing1 I don't see any diagnostics on your last comment - you likely need to embed them as links into the GitHub post rather than via email.
—
Reply to this email directly, view it on GitHubhttps://github.com/projectcalico/calico/issues/9017#issuecomment-2259202265, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHFAPJFJIW4XWRIDV3T4HNLZO75LDAVCNFSM6AAAAABK76WBSWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJZGIYDEMRWGU.
You are receiving this because you were mentioned.Message ID: @.***>

when use "kubectl describe pod calico-typha-67f78bf575-2d6jz -n calico-system". But when I use "docker inspect calico/typha:v3.28.0", I can see "cmd="/usr/bin/calico-typha" in image defination.

What about docker inspect localhost:5000/calico/typha:v3.28.0?
I think your custom-resources.yaml and tigera-operator.yaml both look correct to me. I suspect that this is a problem with the way the images are loaded into the registry, and it not pushing the manifest contents correct.

[root@k8sma ~]# docker inspect localhost:5000/calico/typha:v3.28.0
[
{
"Id": "sha256:a9372c0f51b54c589e5a16013ed3049b2a052dd6903d72603849fab2c4216fbc",
"RepoTags": [
"calico/typha:v3.28.0",
"localhost:5000/calico/typha:v3.28.0"
],
"RepoDigests": [
"localhost:5000/calico/typha@sha256:dc37e0ef67d141bea4bccee6f6488007b5ce7f560768a654246fa65ccf157b63"
],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2024-05-11T00:15:52.055728329Z",
"DockerVersion": "",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "999",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/usr/bin/calico-typha"
],
"ArgsEscaped": true,
"Image": "",
"Volumes": null,
"WorkingDir": "/",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"description": "Calico Typha is a fan-out datastore proxy",
"maintainer"<EMAIL_ADDRESS>"name": "Calico Typha",
"release": "1",
"summary": "Calico Typha is a fan-out datastore proxy",
"vendor": "Project Calico",
"version": "v3.28.0"
}
},
"Architecture": "amd64",
"Os": "linux",
"Size": 71143933,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/cc4b4480639c02341b04e33d0e4b840838fcf66973876738235bfd75e036d628/diff",
"MergedDir": "/var/lib/docker/overlay2/b005e6ed593572d788e0ae6b18d2c7d6b6ea7a5c24986e5dd96eac2063d37cfa/merged",
"UpperDir": "/var/lib/docker/overlay2/b005e6ed593572d788e0ae6b18d2c7d6b6ea7a5c24986e5dd96eac2063d37cfa/diff",
"WorkDir": "/var/lib/docker/overlay2/b005e6ed593572d788e0ae6b18d2c7d6b6ea7a5c24986e5dd96eac2063d37cfa/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:29ebc113185d6c09c2f84abf7d4fbbb49e2d6e4a169c0a5f9d14d1358d70827e",
"sha256:31719a1450dd2c929a14d1bd057b3b663cb7b99286198effa4e9e10b62007641"
]
},
"Metadata": {
"LastTagTime": "2024-07-27T07:50:01.289194125+08:00"
}
}
]
[root@k8sma ~]#

@huanghaiqing1 do you change the image contents/Dockerfile in any way before pushing to your custom registry?

Hello, not clear about your detail intention. I modifed tigera-operator.yaml and custom-resources.yaml. based on KB: https://docs.tigera.io/calico/latest/operations/image-options/alternate-registry. Then try create and failed to setup calico pods inside k8s cluster. Do you have a example tigera-operator.yaml and custom-resources.yaml for my reference?

The only example I have is the one from the documentation, which I believe to be correct and I know has worked successfully for other users.
I'm still pretty sure this has something to do with how you are loading the images into your private registry somehow removing the Cmd section of the manifest.


500 after Deploy to Azure

After deploying to Azure I get a 500 from the site.
KUDU logs show this application error below. I tried to follow the instructions as close as possible.
Mon Apr 18 2016 08:12:11 GMT+0000 (Coordinated Universal Time): Unaught exception: TypeError: Cannot read property 'name' of undefined
at D:\home\site\wwwroot\node\slack.js:60:31
at Request.callback (D:\home\site\wwwroot\node_modules\superagent\lib\node\index.js:746:30)
at Request. (D:\home\site\wwwroot\node_modules\superagent\lib\node\index.js:135:10)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
at Stream. (D:\home\site\wwwroot\node_modules\superagent\lib\node\index.js:938:12)
at emitNone (events.js:72:20)
at Stream.emit (events.js:166:7)
at Unzip. (D:\home\site\wwwroot\node_modules\superagent\lib\node\utils.js:124:12)
at emitNone (events.js:72:20)
Update: just to be clear, I used this as my api token

Fixed. you actually have to take a Token for Test & development not the client secret...


Update the ISSUE_TEMPLATE formatting

What:
Bolding the titles in the ISSUE_TEMPLATE.md

Why:
To provide a better overview and match the PR template

How:
Bolding the titles

Checklist:

[x] Documentation N/A
[x] Tests N/A
[x] Ready to be merged

[x] Added myself to contributors table

:tada: This PR is included in version 2.0.11 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Kouretchian

Hello Jong Wook
I downloaded the model you shared as a checkpoint and tried to apply it to a music file to see the result. However, when I run the "transcribe.py" file I get the error " 'LSTM' object has no attribute '_flat_weights' ". I appreciate it if you help me with this matter.

Hi, it's probably a torch version problem. Can you try with 1.2.0 and see if that still happens?


Graceful exit

party::run_session_as_authority awaits its components to finish gracefully.

There are some ERRORs in the logs thrown by AlephBFT (seemingly after exiting) -- would be good to take a look if this can be fixed.

There are two separate bugs related with this. One of them was fixed in aleph-node by this PR. The other can be only fixed inside of alephbft.


Wikibase schema serialization issues

In the migration to arbitrary Wikibase support, some changes to the Wikibase schema serialization were introduced.
The following fields were added:

mediaWikiApiEndpoint
editGroupsURLSchema

I can see two problems with this:
Lack of serialization of editGroupsURLSchema
This field is currently marked as @JsonIgnore so it is not serialized to the schema. This means that when re-opening a project, the schema will be restored without this parameter, causing OpenRefine to edit without EditGroups link.
Potential lack of backwards-compatibility with schemas serialized with previous versions
It would be nice to still support schemas serialized by previous versions. We should ensure that we can still import the schema without these two parameters. Namely, these could be retrieved from the list of installed manifests (since we have the siteIri to identify which instance we are talking about). Or even simpler: the absence of the mediaWikiApiEndpoint parameter indicates that the schema was made by a version of OpenRefine which only supported Wikidata, so we can directly prefill those parameters with constants in that case.

I'm surprised the backward compatibility is considered a "nice to have."  OpenRefine has traditionally tried to always migrate smoothly from one version to the next.
If we're going to address this, it needs to be done for OpenRefine 3.5.

Yes, my wording was imperfect, I agree with you on the severity of this. I did not to phrase it too harshly because I haven't actually checked that we currently have a backwards-incompatibility here. Perhaps @afkbrb has thoughts about this?

Or even simpler: the absence of the mediaWikiApiEndpoint parameter indicates that the schema was made by a version of OpenRefine which only supported Wikidata, so we can directly prefill those parameters with constants in that case.

That's exactly what the following code is doing:
https://github.com/OpenRefine/OpenRefine/blob/1e47c612d9bd7dc3fddf9897604ffec20ebc183f/extensions/wikidata/module/scripts/schema-alignment.js#L259-L265
https://github.com/OpenRefine/OpenRefine/blob/1e47c612d9bd7dc3fddf9897604ffec20ebc183f/extensions/wikidata/module/scripts/dialogs/import-schema-dialog.js#L41-L47

As for mediaWikiApiEndpoint and editGroupsURLSchema, now I think both could be marked as @JsonIgnore. They are kept in the WikibaseSchema class because they are needed in the following code:
https://github.com/OpenRefine/OpenRefine/blob/1e47c612d9bd7dc3fddf9897604ffec20ebc183f/extensions/wikidata/src/org/openrefine/wikidata/schema/WbLanguageVariable.java#L59-L62
https://github.com/OpenRefine/OpenRefine/blob/1e47c612d9bd7dc3fddf9897604ffec20ebc183f/extensions/wikidata/src/org/openrefine/wikidata/operations/PerformWikibaseEditsOperation.java#L195-L207
Serializing siteIri should be enough, because:

It is the "key" to get the manifest
The values of mediaWikiApiEndpoint and editGroupsURLSchema are decided in the frontend, provided by the manifest.

Thanks a lot for the explanations @afkbrb!
It feels to me like this fallback logic should be in the backend, not the frontend, otherwise it is likely to be missed in some workflows.
Example:

I create a project and save a Wikibase schema there
I shut down OpenRefine and start it again the next day
I make edits on the target Wikibase without editing the schema again.

In this scenario I think the schema used for the editing is the one that is obtained by deserialization from the project data, directly in the backend. So it is deserialized without the EditGroups link, and so edits are made without EditGroups support. Do I understand this correctly @afkbrb?

@afkbrb have you got thoughts about the workflow above? If you can confirm that the fallback will not work in such a case, I will try to fix this by moving this fallback to the backend.

It feels to me like this fallback logic should be in the backend, not the frontend, otherwise it is likely to be missed in some workflows.
Example:

I create a project and save a Wikibase schema there
I shut down OpenRefine and start it again the next day
I make edits on the target Wikibase without changing the schema again.

I did forget to consider these scenarios. The fallback does need to appear in the backend. We should still keep mediaWikiApiEndpoint and editGroupsURLSchema serialized then.


Named impls

As of right now all impls are anonymous and public. I propose named impls and named public impls:
impl X as Y for Z for a private impl
pub impl X as Y for Z for a public impl
This is similar to how traits currently work: you need to import them to use them.
With a non-pub impl, you can use it within your module. With a pub impl, you can use it outside your module. In any case, you need to explicitly import it with use. You can also import them from an external crate, but it follows the same rules - only available where you use them.
Later we could also add !pub impl Y for Z if we want crate-wide, anonymous impls. (Sadly, since they're already public by default, we can't have impl Y for Z and pub impl Y for Z, except maybe in Rust 2.0.)

Rust used to have named impls. (Ancient history; I'm having trouble even finding a proper record of when they were removed.)
My memory is that they were removed, at least in part, because one could express such functionality via traits: instead of naming an impl and exporting it, you would instead define a trait, impl it, and export the trait (and then clients who wanted that implementation code would import the trait).
You yourself even note that "this is similar to how traits currently work."
Can you elaborate on what the advantage(s) are of your proposal over the status quo of using traits to express this?

When crate A defines struct X, crate B defines trait Y, crate C defines impl Z as X for Y, you can use Z if you don't wanna make your own newtype struct and impl and so on.
They're contextual impls, just like traits are contextual.

@SoniEx2 Can't one run into coherence issues then? I.e. you have crate C adding its own named impl (of trait) Y for (struct) X, but then crate D can add its own conflicting impl of that same trait for the same struct?
A typical example of where incoherence like that can cause a problem: Hashtables. Lets say the trait is Hash. If two different crates implement Hash in different ways for the same type, then passing a hashtable around between the two crates is going to cause them to use inconsistent hash-values when attempting to lookup entries for the same key.

To be clear: I do not want to shoot down new ideas.
I am just trying to remember, and document, the reasons for why this feature was removed in the first place, which is what is pushing me to construct examples such as the aforementioned incoherent hashtable...

The named impl is part of the (generic) type.
HashMap<usize(X)> is different from HashMap<usize(Y)>.

This seems some kind of anonymous newtypes like proposal. I think its best solved via delegation of implementation instead: https://github.com/rust-lang/rfcs/pull/1406

Keep in mind you'd be able to use named impls for the same type from multiple different crates. This means you don't have to juggle 3 (or more) types around.
use a::Base;
use b::Append;
use c::Prepend;

let x = Base::new();
x.append(0);
x.prepend(1);

So would this solve following problem:
// crate A
trait A {…}

// crate B
struct B;

// crate C
use A::A;
use B::B
impl A as C for B {…}

Then you could just use type C as B, but the trait A is also implemented for it, which is not possible when using multiple crates

btw: it's X as (Y for Z) not (X as Y) for Z (altho this can be argued)

Will this allow something like this:
// crate A
trait A {…}

// crate B
struct B;

//crate C
use A::A;
use B::B;

// following not possible

trait C {…}

impl<T> A for T where T: C {…}

impl C for B  {…}

// the proposed syntax, does the same, but would work

impl A as C for B {…}

Did I understand it correctly?

eh maybe we should just go for impl C = A for B tbh, way less confusing >.<

I think there should be an explicit syntax for choosing named impls? It should be implicit by default, except when you use two conflicting impls, in which case you should use explicit ones.

Dupe of https://github.com/rust-lang/rfcs/issues/493 I think.


silder image not work

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ch.name' in 'field list' (SQL: select sl.id as slider_id, sl.title, sl.locale, ch.name, ch.code from sliders as sl left join channels as ch on sl.channel_id = ch.id order by slider_id desc limit 10 offset 0) (View: C:\wamp64\www\ecom2\packages\Webkul\Admin\src\Resources\views\settings\sliders\index.blade.php)

@shubham110019
could you mention the bagisto version on which you're getting this.

1.2.0

Hi @shubham110019,
Please complete the issue template and mention the steps, how you reproduce that issue. So that we can further help. Because an error looks like some columns are missing from the table.

getting the same issue in master branch https://prnt.sc/wcannt

@shubham110019
the issue has been fixed, you may with the master branch.

@shubham110019
the issue has been fixed, you may with the master branch.


"ref"  callback functionality is not working after upgrading from "v1.0.0-beta25"

Hi,
I like Inferno because of its performance. I am doing some example and i am learning the framework and its concepts. I am having one issue after i upgraded from beta 24. Below is the error description. Please help if i am doing any mistake.
Issue:
ref functionality is not working when i upgraded to v1.0.0-beta25 version. it is working before beta24. Below is the code:

import  Inferno from 'inferno';
import Component from 'inferno-component';

class MyComponent extends Component {
  componentDidMount() {
    this.node.scrollIntoView();
  }
  render() {
    return <div ref={node => this.node = node} />
  }
}
Inferno.render(<MyComponent/>, document.getElementById('app'));

@srinukanta please can you try beta32?

@srinukanta Also make sure you have the latest babel-plugin-inferno installed. Had a similar problem yesterday with inferno@beta32, the solution was to upgrade to babel-plugin-inferno@beta13.

Thank you @trueadm for your quick reply. I tried till beta31. I will try with beta32.

Thanks @wasd171. Fixed the issue after upgrading babel plugin to babel-plugin-inferno@beta13

@srinukanta awesome, thanks!


Update Visual Studio Enterprise

Tool information

Tool name: Visual Studio Enterprise
Add or update? Update
Desired version: 16.10.0 / 16.9.4

Question, Bug, or Feature?:
The change the VS studio version on these runner has caused a regression.
https://developercommunity.visualstudio.com/t/Toolset-169-regression-vcxproj-producin/1356639
Virtual environments affected

[ ] Ubuntu 16.04
[ ] Ubuntu 18.04
[ ] Ubuntu 20.04
[ ] macOS 10.15
[ ] macOS 11.0
[ ] Windows Server 2016 R2
[x] Windows Server 2019

Can this tool be installed during the build?
Unsure
Are you willing to submit a PR?
No sure how : )

Hey, @jakemumu !
We always try to install the latest available VS version. Currently the VisualStudio/16.9.4+31205.134 is installed on Windows 2019 image and as far as I can see on Microsoft docs page, 16.10 version is not released yet. Comments from the link that you have provided tell that 16.9.4 is ok, so you can use Windows 2019 image for your app.
Could you please check your build with Windows 2019 image?

I'm not sure if this would resolve my issue as well, but there are bugs in the Windows SDK version 10.0.17763.0 that cause C5105 warnings with the new standards conforming preprocessor (enabled with /Zc:preprocessor), which are fixed in a later version (locally I have 10.0.18362.0 and that reports no such warnings).

@friendlyanon we have a lot of SDKs preinstalled and 10.0.18362.0 is one of them:

Yes, you are correct and my comment is unrelated to this issue. Sorry for that.
I should look into how to set a newer version to be the default used by CMake.


Painter's Partition Problem

Please Resolve the conflicts

Please Resolve the conflicts

What exactly is the conflict here? Any suggestions to resolve it would be greatly helpful sir


Upgrade to LTS 7.19/GHC-8.0.1

This upgrades collegevine/twilio-haskell to LTS 7.19/GHC-8.0.1, so that we can upgrade later collegevine/vines, and fixes the following error while trying to run the tests:
While constructing the build plan, the following exceptions were encountered:

In the dependencies for twilio-<IP_ADDRESS>:
    http-client-tls-0.3.3 must match >=0.2.0 && <0.3 (latest applicable is <IP_ADDRESS>)

Plan construction failed.

After fixing it, this is the output for the tests run:
Tests: Maybe.fromJust: Nothing

Completed 2 action(s).
Test suite failure for package twilio-<IP_ADDRESS>
    Tests:  exited with: ExitFailure 1
Logs printed to console

I'm not sure how that affects as we were unable to run the tests before the fix

@nebtrx do the tests complete successfully on the original repo?

@ralphmorton both repos, markandrus/twilio-haskell and collegevine/twilio-haskell(our fork), failed to pass the tests. In ours, there was even an issue with a dependency(http-client-tls) if you wanted to run the test suite.
This is the output for the tests run in the original one:
Preprocessing library twilio-<IP_ADDRESS>...

src/Twilio/Internal/Resource.hs:3:13: warning:
    -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
Preprocessing test suite 'Tests' for twilio-<IP_ADDRESS>...
Running 1 test suites...
Test suite Tests: RUNNING...
"{\"first_page_uri\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Queues.json?PageSize=50&Page=0\", \"end\": 0, \"previous_page_uri\": null, \"queues\": [], \"uri\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Queues.json?PageSize=50&Page=0\", \"page_size\": 50, \"start\": 0, \"next_page_uri\": null, \"page\": 0}"
Queues {queuesPagingInformation = PagingInformation {pageNumber = 0, numberOfPages = Nothing, pageSize = 50, total = Nothing, start = 0, end = 0, pageURI = Just /2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Queues.json?PageSize=50&Page=0, firstPageURI = Just /2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Queues.json?PageSize=50&Page=0, nextPageURI = Nothing, previousPageURI = Nothing, lastPageURI = Nothing}, queueList = []}
GET /Accounts
"{\"first_page_uri\": null, \"end\": 0, \"previous_page_uri\": null, \"uri\": \"/2010-04-01/Accounts.json\", \"page_size\": 50, \"start\": 0, \"accounts\": [{\"sid\": \"AC79e7d4944876025656bb760c0fcfb5d6\", \"owner_account_sid\": \"AC79e7d4944876025656bb760c0fcfb5d6\", \"friendly_name\"<EMAIL_ADDRESS>Account\", \"status\": \"active\", \"date_created\": \"Fri, 30 Oct 2015 20:14:52 +0000\", \"date_updated\": \"Tue, 14 Feb 2017 22:22:50 +0000\", \"auth_token\": \"4a26efaceeed5015ad24024e94387e3c\", \"type\": \"Full\", \"uri\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6.json\", \"subresource_uris\": {\"applications\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Applications.json\", \"authorized_connect_apps\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/AuthorizedConnectApps.json\", \"available_phone_numbers\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/AvailablePhoneNumbers.json\", \"calls\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Calls.json\", \"conferences\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Conferences.json\", \"connect_apps\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/ConnectApps.json\", \"incoming_phone_numbers\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/IncomingPhoneNumbers.json\", \"media\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Media.json\", \"messages\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Messages.json\", \"notifications\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Notifications.json\", \"outgoing_caller_ids\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/OutgoingCallerIds.json\", \"queues\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Queues.json\", \"recordings\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Recordings.json\", \"sip\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/SIP.json\", \"sms_messages\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/SMS/Messages.json\", \"transcriptions\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Transcriptions.json\", \"usage\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Usage.json\"}}], \"next_page_uri\": null, \"page\": 0}"
Accounts {pagingInformation = PagingInformation {pageNumber = 0, numberOfPages = Nothing, pageSize = 50, total = Nothing, start = 0, end = 0, pageURI = Just /2010-04-01/Accounts.json, firstPageURI = Nothing, nextPageURI = Nothing, previousPageURI = Nothing, lastPageURI = Nothing}, list = [Account {sid = AccountSID {getAccountSID = "AC79e7d4944876025656bb760c0fcfb5d6"}, dateCreated = 2015-10-30 20:14:52 UTC, dateUpdated = 2017-02-14 22:22:50 UTC, friendlyName =<EMAIL_ADDRESS>Account", type' = Full, status = Active, authToken = AuthToken {getAuthToken' = "4a26efaceeed5015ad24024e94387e3c"}, uri = /2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6.json, ownerAccountSID = Just (AccountSID {getAccountSID = "AC79e7d4944876025656bb760c0fcfb5d6"})}]}
GET /Keys
"{\"first_page_uri\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Keys.json?PageSize=50&Page=0\", \"end\": 0, \"previous_page_uri\": null, \"keys\": [{\"sid\": \"SK8b2835efb042b21e7e73ebc2c98396c0\", \"friendly_name\": \"twiliochat-node\", \"date_created\": \"Thu, 11 Feb 2016 19:35:40 +0000\", \"date_updated\": \"Thu, 11 Feb 2016 19:35:40 +0000\"}], \"uri\": \"/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Keys.json?PageSize=50&Page=0\", \"page_size\": 50, \"start\": 0, \"next_page_uri\": null, \"page\": 0}"
APIKeys {pagingInformation = PagingInformation {pageNumber = 0, numberOfPages = Nothing, pageSize = 50, total = Nothing, start = 0, end = 0, pageURI = Just /2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Keys.json?PageSize=50&Page=0, firstPageURI = Just /2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Keys.json?PageSize=50&Page=0, nextPageURI = Nothing, previousPageURI = Nothing, lastPageURI = Nothing}, list = [APIKey {sid = APIKeySID {getAPIKeySID = "SK8b2835efb042b21e7e73ebc2c98396c0"}, friendlyName = "twiliochat-node", secret = Nothing, dateCreated = 2016-02-11 19:35:40 UTC, dateUpdated = 2016-02-11 19:35:40 UTC}]}
POST /Calls
Tests: StatusCodeException (Status {statusCode = 400, statusMessage = "BAD REQUEST"}) [("Access-Control-Allow-Credentials","true"),("Access-Control-Allow-Headers","Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since"),("Access-Control-Allow-Methods","GET, POST, DELETE, OPTIONS"),("Access-Control-Allow-Origin","*"),("Access-Control-Expose-Headers","ETag"),("Content-Type","application/json"),("Date","Mon, 06 Mar 2017 14:56:52 GMT"),("Twilio-Request-Duration","0.086"),("Twilio-Request-Id","RQ5a8bdf4a7f2c46da9d8d864fc1e331b7"),("X-Powered-By","AT-5000"),("X-Shenanigans","none"),("Content-Length","277"),("Connection","keep-alive"),("X-Response-Body-Start","{\"code\": 21210, \"message\": \"The source phone number provided, +14158059869, is not yet verified for your account. You may only make calls from phone numbers that you've verified or purchased from Twilio.\", \"more_info\": \"https://www.twilio.com/docs/errors/21210\", \"status\": 400}"),("X-Request-URL","POST https://api.twilio.com:443/2010-04-01/Accounts/AC79e7d4944876025656bb760c0fcfb5d6/Calls.json")] (CJ {expose = []})
Test suite Tests: FAIL
Test suite logged to: dist/test/twilio-<IP_ADDRESS>-Tests.log
0 of 1 test suites (0 of 1 test cases) passed.

@nebtrx thanks for the update!
@mohanzhang i am relatively sure that the changes in this PR haven't broken anything that wasn't already broken. we can merge and run tests on staging? alternately we can purge the evil of twilio-haskell from this land, we only make a few REST calls to twilio, and they are pretty constrained.


Update azure-csi-files-storage-provision.md

Inline yaml pod definition is wrong and i tried to copy or select all from yaml and it fail with kubectl -f apply
i corrected it

@MGoedtel
Can you review the proposed changes?
When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

#sign-off


Allow sampling of RGB and Image outside of bounds?

Right now, if we call sample on an RGB or Image object, it works fine inside the bound, but raises an exception outside:
x,y = np.mgrid[-50:51, -50:51] * 0.1

r = 0.5*np.sin(np.pi  +3*x**2+y**2)+0.5
g = 0.5*np.sin(x**2+2*y**2)+0.5
b = 0.5*np.sin(np.pi/2+x**2+y**2)+0.5

hv.RGB(np.dstack([r,g,b])).sample(x=10,y=10)

IndexError: index 1060 is out of bounds for axis 1 with size 101

This is clearly the right default behavior, because outside the bounds the value is not defined.  However, in certain settings, it would be nice to be able to explicitly define what the value outside of the image area is.  For instance,  when the image is embedded in a larger plot and we have hover or click enabling a connection to a different plot, we probably want to be able to sample anywhere in the space and return a reasonable value, not raise an exception.
So, maybe Image and RGB could accept a value that determines the result of sample() outside the bounds?  For consistency with the visual representation that might also need to be the value actually shown in a plot when looking outside the bounds, which can be useful in its own right. E.g. one could define the background color for an image that way, and have it surrounded by that color...

For now I've added an explicit IndexError when sampling out-of-bounds that shows the sampled coordinates and the actual bounds rather than letting it error on array indexing (https://github.com/ioam/holoviews/pull/1961).

So, maybe Image and RGB could accept a value that determines the result of sample() outside the bounds?

I don't see any possible way to achieve this as I do not want to shove random metadata onto elements, so I think I want to close this as out-of-scope. The current behavior is correct imo and anything else would be too much special handling imo.

I think I agree with @philippjfr here.

Okay that's 2:1, sorry @jbednar, closing as out-of-scope.

I don't see any possible way to achieve this as I do not want to shove random metadata onto elements, so I think I want to close this as out-of-scope. The current behavior is correct and anything else would be too much special handling imo.

I won't try to argue you out of it, but I don't think this information would qualify as "metadata". The main intended usage of an Image is as a discrete approximation of a continuous function of two variables, and the proposed behavior merely allows specification of such a function with an infinite extent.  E.g. imagine having a 2D Gaussian with an offset in the z direction, such that the value of the function approaches 1.0 near the borders of the image, and is truly 1.0 for all distant locations outside the boundary of the array.  The proposed behavior simply allows a user to specify that the value is not zero outside the boundary, but that it is 1.0, which is the correct declaration for the data in this case, not the metadata.  It's not simply a hint or some arbitrary bonus information, in such a case it's a concise specification for the entire function that the element represents.
A similar capability would be valid for a Curve or other finite approximations of functions of potentially infinite extent, defining what values should be used outside the bounds of the data points provided when sampled or rendered onscreen.  Again, I'm not arguing that we have to provide this functionality, just that it's very well defined, interpretable, and completely in the scope of data, not metadata.
In terms of implementation, if we're already raising an exception in such cases, it seems trivial to return an explicitly declared value for out-of-bounds areas instead.  But there are probably other tricky aspects.

The problem is with finding a general way to store this data. It clearly can't be declared as part of a NumPy array and only through special conventions could it be stored on .data for other formats like xarray and dictionaries. That leaves a special parameter on Dimension or directly on the Element, which I'm fairly strongly against since I agree that it's not technically metadata and should therefore be stored on the .data.