destination_service_namespace becomes unknown when service has no healthy backends

Is this the right place to submit this?

[X] This is not a security vulnerability or a crashing bug
[X] This is not a question about how to use Istio

Bug Description
We noticed that the metrics from reporter=source for requests have  destination_service_namespace=foobar  become destination_service_namespace=unknown  during an outage of the target service where the target workload pods are gone. This caused some of our alarms that report on 5xx responses (as returned from the client workkloads) to not fire off because the label selector for destination_service_namespace=foobar no longer matched any metrics.
Version
Istio 1.20.3

Additional Information
Slack Thread: https://istio.slack.com/archives/C37A4KAAD/p1709769357941709 (no responses though)

Image from our metrics ...  the light-blue is where the namespace becomes unknown:

tags_.push_back({context_.destination_service_namespace_, context_.namespace_ and tags_.push_back({context_.destination_workload_namespace_, context_.namespace_});
So our code makes the assumption service namespace == workload namespace. Instead we should get the service namespace from the clsuter metadata (which is already there:
  metadata:
    filterMetadata:
      istio:
        services:
        - host: vm.echo.svc.cluster.local
          name: vm
          namespace: echo

)

cc @kyessenov @zirain looks like an easy fix if my assumption is correct that we should change it to the cluster metadata

I think the idea was to report namespace using SPIFFE only since it cannot be forged. Why did they use service namespace and not workload namespace?

For workload namespace that makes sense, but Service_namespace is a service property not a workload one so seems appropriate to use the service metadata?

@diranged is the idea behind using destination_service_namespace to monitor xDS configuration or data path itself?

@diranged is the idea behind using destination_service_namespace to monitor xDS configuration or data path itself?

We're monitoring the request flow and responses - so looking for 5xx responses for example. We realized that when the service was down (no active hosts behind it due to a buggy release), we did not get a 5xx alarm because the alarm was tied to destination_service=<svc>, destination_service_namespace=<ns>. The metrics reported by reporter=source suddenly had the wrong destination_service_namespace in the metrics, which didn't match the alarm, and it did not fire off.

@kyessenov Any further houghtst here?

cc @keithmattix @whitneygriffith

Oh actually I bet the source is getting these from endpoint metadata and if there are no endpoints then we have no data. I wonder if we can add some of this info to cluster metadata and merge that with endpoint metadata as a fallback?

The info is already in cluster metadata, so we just need to do the fallback

Yeah +1 service metrics should come from cluster metadata

The info is already in cluster metadata, so we just need to do the fallback

Sorry I deleted my other message because I didn't read the context. We're in agreement


allow ssh key import to fail

We import ssh keys by default if openssh is enabled. However if users are using age keys while using sops to deploy ssh keys we have a catch-22.
While users could use lib.mkForce to empty the list, this is not intuitive

@mergify queue


Add support for High Performance Blockchain

homepage: https://hpb.io
block explorer: https://hpbscan.org
network statistics : https://hpbscan.org
git: https://github.com/hpb-project
slip0044 index : 100
chain ID: 100

Creating a signed commit


Incorrect cell width calculation when using css border in DataGrid

Steps to reproduce
Steps:

Open this link to live example: (https://codesandbox.io/p/sandbox/winter-cache-c9vdl3)
Either examine the css properties of cells or observe that the cell border (blue) on right side and bottom is not visible.

Current behavior
When adding css border to row and cell, cell width does not change. As a result cells are wider than provided width.
In provided example Table width is 600px. Row has 1px border, the width of row is 598px (correct behavior).
There are 2 cells in a row, each with 1px border. First cell width 200px (incorrect, should be 198px). Second cell has flex = 1 property, calculated width 398px (incorrect, should be 396px).
Expected behavior
When adding css border to row and cell, cell width is correctly calculated. Meaning cell width shrinks when cell border is added.
Context
Our Style-Guidelines require that both rows and cells have borders. Rows when they are selected and cells when keyboard focus is applied, as example for keyboard navigation. Having both properties active is in our case not unusual.
Your environment

npx @mui/envinfo
Browser used: Firefox

System:
    OS: Windows 10 10.0.19045
  Binaries:
    Node: 14.17.0 - C:\Program Files\nodejs\node.EXE
    npm: 6.14.13 - C:\Program Files\nodejs\npm.CMD
    pnpm: Not Found
  Browsers:
    Chrome: 130.0.6723.117
    Edge: Chromium (131.0.2903.51)
  npmPackages:
    @emotion/react: ^11.10.6 => 11.11.4
    @emotion/styled: ^11.10.6 => 11.11.5
    @mui/base:  5.0.0-alpha.124
    @mui/core-downloads-tracker:  5.15.18
    @mui/icons-material: 5.11.16 => 5.11.16
    @mui/lab: 5.0.0-alpha.125 => 5.0.0-alpha.125
    @mui/material: 5.11.16 => 5.11.16
    @mui/private-theming:  5.15.14
    @mui/styled-engine:  5.15.14
    @mui/styles: 5.11.16 => 5.11.16
    @mui/system:  5.15.15
    @mui/types:  7.2.14
    @mui/utils:  5.15.14
    @mui/x-data-grid:  6.9.2
    @mui/x-data-grid-premium: 6.9.2 => 6.9.2
    @mui/x-data-grid-pro:  6.9.2
    @mui/x-license-pro:  6.9.0
    @types/react: ^18.0.26 => 18.3.2
    react: ^18.2.0 => 18.3.1
    react-dom: ^18.2.0 => 18.3.1
    typescript: 4.4.3 => 4.4.3

Search keywords: DataGrid width

Is this what you're going for? (I added padding to make it easier to see the borders.)
https://codesandbox.io/p/sandbox/epic-hodgkin-z2gl5d?file=%2Fsrc%2Findex.tsx%3A20%2C26
Check out the MDN box-sizing docs for more info.
(I should note that this is the repo for Material UI, which is separate from the MUI X repo where the Data Grid lives; and we generally reserve GitHub issues for bug reports and feature requests. In the future, if you find a bug in the Data Grid, the MUI X repo is the best place to report it. If you need help with implementation, as is the case here, then Stack Overflow is the best place to go—be sure to add the mui-x-data-grid tag to your post so others can find it.


docs(storybook): refactor styling and assets loading

closes #353

👋 Thanks for creating a pull request! 🚀 Checkout the storybook we created for it here.


⚠ SceneTime has degraded performance

In 0c8a05b, SceneTime ($ST) experienced degraded performance:

HTTP code: 200
Response time: 2139 ms

Resolved: SceneTime performance has improved in 52ed43d after 6 minutes.


Backup stuck in "activating" state when S3 backup fails.

Rancher server version: Master
Steps:

Create a single node cluster with S3 backup configured but invalid credentials
Create few workloads
Perform a backup through UI.

Backup fails as invalid credentials are provided, but the backup entry is stuck in "Activating" state. [Backups are listed in backups page at the cluster level]
Backup state should change to "Error" state in the API and UI.
Relevant error message should be provided to the user that a backup has failed
API snippet below:
"state": "activating",
"status": {
"conditions": [ 2 items
{
"lastUpdateTime": "2019-02-28T00:15:32Z",
"status": "True",
"type": "Created"
},
{
"lastUpdateTime": "2019-02-28T00:44:54Z",
"message": "Failed to take one-time snapshot, exit code [1]: time=\"2019-02-28T00:44:53Z\" level=info msg=\"invoking set s3 service client\" \n",
"reason": "Error",
"status": "False",
"type": "Completed"
}
],
"type": "/v3/schemas/etcdBackupStatus"
},

Moving out. We can implement error state in 2.3. For now, Activating state + the error of why it is stack, is already present.


Some of tags are missing

Hi! Thanks for these amazing TS type definitions which save me a ton of time :)
I realized some of the tags are missing such as <header> , <time> , <footer> or maybe some other which I haven't come across yet. Im currently using  ElementProps for them. I can do a pull request and add them if you want.

Added all missing tags listed by Mozilla


Peer Review - Milestone 3

Hey team, could you give me the link where I can access the project? I can't seem to find it on the Milestone 3 wiki.

I have mailed you the credentials and updated the wiki

Thanks!
When I try to register on the website, no action takes place. Could you take a look into it?

Kubernetes is working well and so is the fault tolerance!
The UI could be improved however!


Fix cheetah_cheats mode to resolve local placeholders

When compiled with -Xcheetah-cheats (or when options.cheetah_cheats
is True) and no optimizations are applied, the template source
  #set $a = 'foo'
  #set $b = $a

produces the template code
  _self_search_list = self.search_list + [_globals]
  a = u'foo'
  b = resolve_placeholder(_self_search_list, 'a')

which causes a runtime error.
Fix this by adding locals() to the search list during
placeholder resolution.  Also fix a bug where a runtime error
occurs if self.search_list is None by conditionally adding
it to the search list.  After, the template code is
  if self.search_list:
    _self_search_list = self.search_list + [_globals]
  else:
    _self_search_list = [_globals]
  a = u'foo'
  b = resolve_placeholder([locals()] + _self_search_list, 'a')

Closes #6

lgtm


Files in a folder not aligned to the folder they belong

VSCode Version: 1.6.1 and prev as well
OS Version: Win10

The files in a folder are not aligned to the folder they belong. This gives the impression that the files belong to a subfolder that is actually at the same level of files.
See this sample:

all files seem to be under the "typings" folder when they are actually at root level

https://github.com/Microsoft/vscode/issues/11762

thanks, I did a quick search and didn't find a similar one.


Fixed bug in HTTP path lookup

Hi there,
I found a bug the middleware classes. I discovered it while I was deploying my application in a non-root environment. I this case the method call django.core.urlresolvers.resolve(request.path) throws an exception, because request.path is not the variable you are looking for. The correct lookup is request.path_info. In a common scenarion where the appication is deployed at the root of webserver the are the same.
Example:
Apache config: WSGIScriptAlias / /usr/local/share/myapp/wsgi.py
Request URL: www.mysite.org/admin
-> request.path = '/admin'
-> request.path_info = /admin'
Apache config: WSGIScriptAlias /testing /usr/local/share/myapp/wsgi.py
Request URL: www.mysite.org/testing/admin
-> request.path = '/testing/admin'
-> request.path_info = /admin'

Thanks!

I'll push to PyPi as soon as Ive fixed Travis issue.


Place methods in folders?

I think there is a case to be made for placing the files associated with a method in a folder. It's getting pretty difficult to navigate around through the flat src directory, and I only plan to make it harder as I use our generator strategy to eliminate the duplication present in our typescript types. At that point each method will contribute 5 files to the src directory.
The folder structure I propose would look like this:
method/
    async.js
    async.d.ts
    index.js
    index.d.ts
    index.template.js
    index.template.d.ts

I can think of several benefits. In most editors folders show up above files, making it easier to find the main index.js and index.d.ts files (they would be at the bottom). It would be easier to read the src directory as a listing of the supported methods too.
A downside would be that this would be significantly less clear for methods which have only async variants. Putting them in a folder whose name is stripped of the async prefix suggests that there is a sync version when there isn't, but naming the folder asyncMethod creates two different ways of importing async files from inside the library, which is unreasonable to expect people to keep track of.
I need to keep thinking about what a reasonable solution to this particular problem might be.

Actually I think we can just change the template naming convention from method.template.js to $template.js. This way all the templates will be sorted above the non-templates, and also all the whole import structure resolves again.

I have that change to $method.js queued up. @sithmel can you confirm that you don't have any concerns around shifting the naming convention?

not at all. Go for it


docs: add navigation failures

Based on https://github.com/vuejs/rfcs/pull/150

Thanks a lot @NataliaTepluhina @shentao, @trygveaa  and @bencodezen for the feedback!

@posva: Hm, I tried import { NavigationFailureType, isNavigationFailure } from 'vue-router' in typescript, but it says they're not exported. Looking at the types, it seems that they're only static types on the VueRouter class. Is that correct?

Fixed at ecc8e27


Change repo type to Template

In the README, there is a mention of generating your own from this template, but this repo is unable to be generated from since it isn't a Template repository.

Thanks for opening this issue, @filiptronicek! This project is a WIP and will be production-ready by tomorrow. I'll make sure I mark it as a template then!

Awesome, excited for that!


Implement CondIndepTensor data structure for use by Trace*_ELBO

This implements a CondIndepTensor data structure for internal use by Trace*_ELBO implementations. This will replace MultiViewTensor in the more flexible iarange setting since #863.
Tasks

[x] Allocate iarange dims at the first __enter__() rather than later at each pyro.sample() statement. This is needed so that iarange CondIndepStackFrames always have their .dim field set (no more 'auto').
[x] Implement CondIndepTensor keyed on cond_indep_stack tuples.
[ ] Add unit tests.
[ ] Integrate into TraceGraph_ELBO.
[ ] Integrate into Trace_ELBO.

@fritzo yup. i can integrate into trace_elbo too (to replace #865). added a task accordingly


Update PreDeployment File with last error

If the agent updates the pre-deployment file with pre-flight errors, then they will be displayed correctly in the UX.

Include front end API type update if needed (so a PreDeployment can include the error field).


Add Publish Crate Workflow

Create reusable workflow for publishing to the crates.io registry

Few issues here, that I will fix in the next PR


OS Error when attempting to push trained agent using package_to_hub() function

The following error is shown when attempting to push the trained agent using the package_to_hub() function:
For reference I am using Google Colab and Mac OS Big Sur 11.5.2
CalledProcessError: Command '['git', 'pull']' returned non-zero exit status 128.
During handling of the above exception, another exception occurred:
OSError                                   Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/huggingface_hub/repository.py in git_pull(self, rebase, lfs)
1076                 logger.info(result.stdout)
1077         except subprocess.CalledProcessError as exc:
-> 1078             raise EnvironmentError(exc.stderr)
1079
1080     def git_add(
OSError: warning: no common commits
From https://huggingface.co/Sicko-Code/PPO-lunarlander-v2

3823c08...4b3486e main       -> origin/main  (forced update)
fatal: refusing to merge unrelated histories

In what scenario did this happen? Did you already have something pushed up to that repo and you were trying to update it? Perhaps from a different local copy? I think perhaps adding rebase=True to the repo.git_clone in huggingface_sb3 could fix this problem in the future...I'll PR it.

I'm closing the issue, we updated the huggingface_sb3 repo 🤗


Change variant display in WordInfo popover

Partially implements Tweak WordInfo Popover. Lemma links for variants are only displayed if the lemma is different from the reconstruction word's lemma.

Trigger CI run


Upgrading from 1.9.71 to 2.2.1

According to Semantic Versioning:

MAJOR version when you make incompatible API changes,

I want to update my package:

It is going a major version number change. Is my project not going to compile? I can't see the changelog.

Is there any update on this matter? I reverted back to the old library because of the issues I encountered.

I agree the structure of the new api seems a little odd to me. It appears that in order to use it you are required to nest calls for via lambdas for a successful parse or unsuccessful parse. This seems to obfuscate the normal control flow of the program. E.g. parse the arguements, if not successful display the help text and return otherwise proceed executing Main().  Unless I am missing something, it looks like I will continue using the older version as the api is much cleaner.

I used the following approach which is buried in the wiki:
public static void Main(string[] args)
{
    Parser.Default.ParseArguments<Options>(args)
       .MapResult(
         options => RunAndReturnExitCode(options),
         _ => 1 ); // This will automatically print an error message based on the meta data if the argument are incorrect
}
public static int RunAndReturnExitCode(ApplicationArguments args)
{
    // add your code here
    return 0;
}

Yes, I found this. But I struggle to get that to work with the code that I have. The whole thing blew up. 😞

From: John Donaghy<EMAIL_ADDRESS>Sent: 26 February 2018 16:24
To: commandlineparser/commandline
Cc: ajtruckle; Author
Subject: Re: [commandlineparser/commandline] Upgrading from 1.9.71 to 2.2.1 (#225)
I used the following approach which is buried in the wiki:
public static void Main(string[] args)
{
Parser.Default.ParseArguments(args)
.MapResult(
options => RunAndReturnExitCode(options),
_ => 1 ); // This will automatically print an error message based on the meta data if the argument are incorrect
}
public static int RunAndReturnExitCode(ApplicationArguments args)
{
// add your code here
return 0;
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcommandlineparser%2Fcommandline%2Fissues%2F225%23issuecomment-368558803&data=02|01||70e22da99b1f47ae4b2308d57d3563c7|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636552590607548717&sdata=I1%2FglwuKaY19g7fClY%2FdlKDsD0YhF0%2B9PW%2BDOy1SrcM%3D&reserved=0, or mute the threadhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHnYs4Z2VoOejj9or5fszbRPzywjk_80ks5tYtpUgaJpZM4Re-JY&data=02|01||70e22da99b1f47ae4b2308d57d3563c7|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636552590607548717&sdata=0oBrqKZGCzn7IWfZu5yB%2FvuC7R15AdJuwohciYLtjjM%3D&reserved=0.

Did you manage to get a simple example working? How exactly did it blow up?

I've only started looking at the new API and it is definitely confusing. There does not seem to be a way to meet your needs which, if I understand correctly, requires being able to access the parsed object in the case where there are failures. This would allow you to get the path of the log file even if other arguments weren't provided.

Yes. So I am frustrated that this upgrade is so fundamentally code breaking for me.
What we had before worked and I understood. This new way I don’t for my needs. And I don’t know how to change it to accommodate the new dll.
Sent from my iPhone
On 26 Feb 2018, at 18:18, John Donaghy <notifications<EMAIL_ADDRESS>wrote:
I've only started looking at the new API and it is definitely confusing. There does not seem to be a way to meet your needs which, if I understand correctly, requires being able to access the parsed object in the case where there are failures. This would allow you to get the path of the log file even if other arguments weren't provided.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcommandlineparser%2Fcommandline%2Fissues%2F225%23issuecomment-368597055&data=02|01||3a4a3a13a3464aa9601d08d57d455689|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636552659105077976&sdata=52iPYe3nd%2F0Vzw0tpajbHnpW8doegU0m3XTSsQaQIl8%3D&reserved=0, or mute the threadhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHnYs5pnVj707HbNOFUTbrlBKy8gRCBjks5tYvVzgaJpZM4Re-JY&data=02|01||3a4a3a13a3464aa9601d08d57d455689|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636552659105077976&sdata=Zh8cqXk%2BtxF3hH3GlsLVCzAa66qJ0J5XCRqRdWg6SO4%3D&reserved=0.

I'm in this exact position, it's extremely frustrating and i also don't know where to go from here. I have a library that has to be ported and the non existent documentation is not helping.

Got to a solution that works using the example from @GuyTe in this issue
Instead of having a [HelpOption] GetUsage method in your options you can print the HelpText directly in the WithNotParsed anonymous function you declare. And do what you want you need to in the WithParsed. I simply broke out what i previously did into a method and called it with the parsed Options as a parameter like so parserResult.WithParsed<MyOptions>(options => DoSomething(options));. I'm quite rushed while writing this so if you want to clarify something or try to do a better example with your code let me know.

A fleshed out example would help me if you have the time. 😊
Thank you!

From: Dundret<EMAIL_ADDRESS>Sent: 28 February 2018 15:46
To: commandlineparser/commandline
Cc: ajtruckle; Author
Subject: Re: [commandlineparser/commandline] Upgrading from 1.9.71 to 2.2.1 (#225)
Got to a solution that works using the example from @GuyTehttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fguyte&data=02|01||cb2a63970f534ed7525a08d57ec26da0|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636554295876337749&sdata=YDeLBTx7v9pH3f5wKRJY9EELpBU7%2FXTxAiDqqbVIB70%3D&reserved=0 in this issue https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcommandlineparser%2Fcommandline%2Fissues%2F182&data=02|01||cb2a63970f534ed7525a08d57ec26da0|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636554295876337749&sdata=eAGZ4%2FnGryLLzQ0rU7MAj%2Bs2da%2FcVWoZVm3Mssysxxs%3D&reserved=0
Instead of having a [HelpOption] GetUsage method in your options you can print the HelpText directly in the WithNotParsed anonymous function you declare. And do what you want you need to in the WithParsed. I simply broke out what i previously did into a method and called it with the parsed Options as a parameter like so parserResult.WithParsed(options => DoSomething(options));. I'm quite rushed while writing this so if you want to clarify something or try to do a better example with your code let me know.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcommandlineparser%2Fcommandline%2Fissues%2F225%23issuecomment-369279340&data=02|01||cb2a63970f534ed7525a08d57ec26da0|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636554295876337749&sdata=umC3uAFgTbBmmyQRLrzwGUhtBLJ%2BubEdRJerzABbi1A%3D&reserved=0, or mute the threadhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHnYs6r1EZCMXMPcJxKgRRtCnQGjgUAYks5tZXNfgaJpZM4Re-JY&data=02|01||cb2a63970f534ed7525a08d57ec26da0|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636554295876337749&sdata=JBX8uzKS3zz6tuPGHCmHxvLh3HMAbaDzJKz4%2BOU548A%3D&reserved=0.

Made an attempt for a better example here, haven't run it so might be some small issue but you should get the gist. And you could probably improve the error handling by some experimentation. Hope it helps.
`static int Main(string[] args)
{
var parserResult = CommandLine.Parser.Default.ParseArguments<Options/Or whatever you've named your options class/>(args);
if(parseResult.Tag == ParserResultType.NotParsed)
{
ReturnErrorCode = ErrorCode.CommandLineArguments;
}
	parserResult.WithParsed(options => OnSuccessfulParse(options));
	parserResult.WithNotParsed(errs =>
                {
                    var helpText = HelpText.AutoBuild(parserResult, h =>
                    {
                        return HelpText.DefaultParsingErrorsHandler(parserResult, h); //This you previously did in the GetUsage method.
                    }, e =>
                    {
                        return e;
                    });
                    Console.WriteLine(helpText);
                }
                );

		}
    }

	private static void OnSuccessfulParse(Options options) //The code you run on a successful parse
	{
		try
        {
                SimpleLog.SetLogFile(logDir: Program.Options.ErrorLogFolder, check: false);

                var program = new Program();
                var task = Task.Run(program.Run);
                task.Wait();

                // We don't need the file anymore
                if(File.Exists(Options.CalendarEventsPath))
                    File.Delete(Options.CalendarEventsPath);
            }
        }
        catch(Exception ex)
        {
            // The problem I have is if the command line parser returns false or
            // raises an exception (argument null). If the log path has not been
            // specified then it will default to the "current working folder".
            // So we display the log folder in the console window.
            SimpleLog.Log(ex);
            Console.WriteLine($"OutlookCalIFConsole: See error logs. Folder: {SimpleLog.LogDir}");
            ReturnErrorCode = ErrorCode.CommandLineArguments;
        }

        return (int)ReturnErrorCode;
	}`

It compiles, thanks. But for some reason line:
if(parserResult.Tag == ParserResultType.NotParsed) //Move this to where it fits
Is always true.

Yes, for some reason once it has parsed my arguments my Options featur eis not filled.

I think I got it. Firstly, I tweaked the code:
        static int Main(string[] args)
        {
            Console.WriteLine(args.ToString());
            var parserResult = CommandLine.Parser.Default.ParseArguments<Options>(args);
            if (parserResult.Tag == ParserResultType.NotParsed)
            {
                ReturnErrorCode = ErrorCode.CommandLineArguments;
            }

            parserResult.WithParsed<Options>(options => OnSuccessfulParse(options));
            parserResult.WithNotParsed<Options>(errs =>
            {
                var helpText = HelpText.AutoBuild(parserResult, h =>
                {
                    return HelpText.DefaultParsingErrorsHandler(parserResult, h);
                }, e =>
                {
                    return e;
                });
                Console.WriteLine(helpText);
            });

            return (int)ReturnErrorCode;
        }

Then I did the following:
        private static void OnSuccessfulParse(Options options)
        {
            try
            {
                Program.Options = options;

                SimpleLog.SetLogFile(logDir: Program.Options.ErrorLogFolder, check: false);

                var program = new Program();
                var task = Task.Run(program.Run);
                task.Wait();

                // We don't need the file anymore
                if (File.Exists(Options.CalendarEventsPath))
                    File.Delete(Options.CalendarEventsPath);
            }
            catch (Exception ex)
            {
                // The problem I have is if the command line parser returns false or
                // raises an exception (argument null). If the log path has not been
                // specified then it will default to the "current working folder".
                // So we display the log folder in the console window.
                SimpleLog.Log(ex);
                Console.WriteLine($"OutlookCalIFConsole: See error logs. Folder: {SimpleLog.LogDir}");
                ReturnErrorCode = ErrorCode.CommandLineArguments;
            }
        }

As you can see, I had to copy the options over into the public options. I don't know why I had to do that? The ones passed into the method were OK and once i copied them my app worked.
Thoughts?

Hmm, i think you can remove
if (parserResult.Tag == ParserResultType.NotParsed)             {                 ReturnErrorCode = ErrorCode.CommandLineArguments;             }
And instead set the ReturnErrorCode = ErrorCode.CommandLineArguments; in the WithNotParsed.
I Would also fix the private static void OnSuccessfulParse(Options options) method to return an int, because if you look in the catch  it sets the ReturnErrorCode = ErrorCode.CommandLineArguments; and then does nothing with it, after some more looking it seems the parserResult.Tag is used mostly in tests together with some other validation on the parse, the two "cases" WithParsed and WithNotParsed should have sufficient logic to handle when the parse is successful and when it's not.
Don't know why you had to copy the options over, you should be able to access them directly, is your Options class not set to public by chance?
Other than that i think it looks fine, i would recommend doing some extensive testing to make sure it does what you expect and want it to do.

Thanks for the suggestions. I have adjusted the first bit like you said:
        static int Main(string[] args)
        {
            var parserResult = CommandLine.Parser.Default.ParseArguments<Options>(args);

            parserResult.WithParsed<Options>(options => OnSuccessfulParse(options));
            parserResult.WithNotParsed<Options>(errs =>
            {
                var helpText = HelpText.AutoBuild(parserResult, h =>
                {
                    return HelpText.DefaultParsingErrorsHandler(parserResult, h);
                }, e =>
                {
                    return e;
                });
                Console.WriteLine(helpText);
                ReturnErrorCode = ErrorCode.CommandLineArguments;
            });

            return (int)ReturnErrorCode;
        }

Out of interest, what would the code look like if we moved it into a OnUnsuccessfulParse method?

I Would also fix the private static void OnSuccessfulParse(Options options) method to return an int

This is fine I think because that variable is decalred liek this:
public static ErrorCode ReturnErrorCode = ErrorCode.NoError;
So it doesn't need to return the value.

Don't know why you had to copy the options over, you should be able to access them directly, is your Options class not set to public by chance?

Is it public. See:
public static Options Options = new Options();

Okay then the ReturnErrorCode is fine. I Didn't mean your instantiated Options variable, i meant your Options class, i scrolled up and saw you pasted it there, it's not set to public class Options, might have something to do with that but not sure, trying to think of what else could cause you not being able to access the options. I haven't tried doing a method that the WithNotParsed calls but you should be able to do the same thing as we do in the WithParsed.

Well, This is the parsing code:
        var parserResult = CommandLine.Parser.Default.ParseArguments<Options>(args);

        parserResult.WithParsed<Options>(options => OnSuccessfulParse(options));
        parserResult.WithNotParsed<Options>(errs =>

So there is no instance above where it actually populates my options variable:
       public static Options Options = new Options();

We then pass options in like this:
       parserResult.WithParsed<Options>(options => OnSuccessfulParse(options));

I am not quite sure what exactly "options" literally is here. Eitherway, it is not my own variable.
Now, I could have adjusted all my code to use the passed in "options" variable in OnSuccessfulParse but I did not see the point in changing my code for that. So I just copied it to the original public variable.

From: Dundret<EMAIL_ADDRESS>Sent: 02 March 2018 09:28
To: commandlineparser/commandline
Cc: ajtruckle; Author
Subject: Re: [commandlineparser/commandline] Upgrading from 1.9.71 to 2.2.1 (#225)
Okay then the ReturnErrorCode is fine. I Didn't mean your instantiated Options variable, i meant your Options class, i scrolled up and saw you pasted it there, it's not set to public class Options, might have something to do with that but not sure, trying to think of what else could cause you not being able to access the options. I haven't tried doing a method that the WithNotParsed calls but you should be able to do the same thing as we do in the WithParsed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcommandlineparser%2Fcommandline%2Fissues%2F225%23issuecomment-369868171&data=02|01||3de1bad9194141c2cbe808d5801fe8c9|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636555796886443310&sdata=5LxvJnlXclsbMxZ4tu4TjprgcCSBZIRIop2ryVnbksk%3D&reserved=0, or mute the threadhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHnYs234L52NjmNJpdnmwb1fQeitKzC7ks5taRClgaJpZM4Re-JY&data=02|01||3de1bad9194141c2cbe808d5801fe8c9|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636555796886443310&sdata=rUrwIGtL%2BYB45IEDug6GyNaZdelFNqasI2zvgB0TFeM%3D&reserved=0.

True true, well then it works and if you're satisfied you can mark another one done on ye old task board ;)


Cache ttl get error when use CACHE_DRIVER=memcached

Laravel Version: 5.8.14
PHP Version: 7.2.17-1+ubuntu18.04.1+deb.sury.org+3
Database Driver & Version: None
Libmemcached version: 1.0.18

Description:
When use CACHE_DRIVER=memcached set ttl not return correct value.
Steps To Reproduce:
$ php artisan tinker
Psy Shell v0.9.9 (PHP 7.2.17-1+ubuntu18.04.1+deb.sury.org+3 — cli) by Justin Hileman
>>> cache(['aaa'=>'bbb'], 3600)
=> true
>>> cache('aaa')
=> null
>>> cache(['aaa'=>'bbb'], 28800)
=> true
>>> cache('aaa')
=> null
>>> cache(['aaa'=>'bbb'], 28810)
=> true
>>> cache('aaa')
=> "bbb"
>>> Cache::set('aaa', 'bbb')
=> true
>>> Cache::get('aaa')
=> "bbb"

When the ttl set small than 28800, it always expired return null.
Change the CACHE_DRIVER to others, it works  fine.

This works for me:
$<EMAIL_ADDRESS>artisan tinker
Psy Shell v0.9.9 (PHP 7.2.15 — cli) by Justin Hileman
>>> cache(['aaa'=>'bbb'], 3600)
=> true
>>> cache('aaa')
=> "bbb"
>>> cache('aaa')
=> "bbb"
>>> cache(['aaa'=>'bbb'], 28810)
=> true

Can you first please try one of the following support channels? If you can actually identify this as a bug, feel free to report back and I'll gladly help you out.

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

Thanks!


User friendly dataset, dataframe generation for csv datasources without explicit StructType definitions.

What changes were proposed in this pull request?
Many users frequently load structured data from csv datasources. It's is very common with current APIs to load csv as Dataframe where schema needs to be defined as StructType object. Many users then convert Dataframe to Dataset with objects of Product (case classes).
Loading CSV files becomes relatively complex which can be easily simplified. This change would help to work with csv files more user friendly.
Input -
csv file with five columns - {id: Int,
 name: String,
 subject: String,
 marks: Int,
 result: Boolean}

Current approach -
val schema = StructType(StructField(id,IntegerType,false),
StructField(name,StringType,false),
StructField(subject,StringType,false),
StructField(marks,IntegerType,false),
StructField(result,Booleanype,false))

val df = spark.read.schema(schema).csv(<file_path>)
case class A(id: Int, name: String, subject: String, marks: Int, result: Boolean)
val ds = df.as[A]

Proposed change -
case class A (id: Int, name: String, subject: String, marks: Int, result: Boolean)
val df = spark.createDataframe[A](optionsMap, <file_paths>)
val ds = spark.createDataset[A](optionsMap, <file_paths>)

No explicit schema definition with StructType is needed as it can be resolved by Product classes.
Redundant codebase in applications to define verbose structType can be avoided with this change.
Proposed APIs are similar to current APIs so easy to use. All current and future csv options can be used as is with no changes needed. (exception - inferSchema is internally disabled as it's useless/confusing with this api)
Similar to current createDataset/createDataframe APIs, it would make loading csv files for debug purpose more convenient.

How was this patch tested?
This change is manually tested. I didnt see similar createDataset/createDataframe unit test cases. Please let me know best place to add unit test cases for this and existing similar APIs.

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Hi, @swapnilushinde . Thank you for making a PR, but do you the following? It's one-liner.
scala> spark.version
res0: String = 2.4.3

scala> spark.read.schema("id int, name string, subject string, marks int, result boolean").load("/tmp/csv").printSchema
root
 |-- id: integer (nullable = true)
 |-- name: string (nullable = true)
 |-- subject: string (nullable = true)
 |-- marks: integer (nullable = true)
 |-- result: boolean (nullable = true)

Hi, @dongjoon-hyun Thanks for reply. Yes, I use this API sometimes as well. Passing schema as DDL string is one-liner but would require to define case class for Dataset creation anyways. So, creating dataset would require to define schema as both DDL string and case class. Above change would need to define schema just once with Product class and dataset/dataframes can be created easily.
Furthermore, this API is in line with all other similar APIs of creating dataset/dataframe.

First of all, the followings are the most frequent use cases.

HEADER and INFERSCHEMA

scala> spark.read.option("header", true).option("inferSchema", true).csv("/tmp/csv").as[Person]
res0: org.apache.spark.sql.Dataset[Person] = [name: string, age: int]

USER-DEFINED SCHEMA or Hive MetaStore

scala> case class Person(name: String, age: Long)
scala> spark.read.schema("name string, age long").csv("/tmp/csv").as[Person]
res0: org.apache.spark.sql.Dataset[Person] = [name: string, age: bigint]

I believe the above two are more natural.
Anyway, cc @HyukjinKwon and @MaxGekk

API itself is two lines. It's one liner or two liner - workaround is easy. I don't think we need this and I would like to avoid to introduce some other variants like this.

There's virtually no diff:
case class Person(name: String, age: Long)
val df = spark.createDataFrame[A]("/tmp/csv")

vs
case class Person(name: String, age: Long)
spark.read.schema("name string, age long").csv("/tmp/csv").as[Person]

and it's super confusing that createDataFrame takes CSV. how about JSON and other formats?

Hello @HyukjinKwon @MaxGekk -
Above simple example was just for an illustration purpose. DDL format schema is not a good choice for many applications where CSV data contains many fields. However, case classes are required to be defined for those applications anyways for type safety. Maintaining schema definitions with both case class and DDL string is not an idea case.
What's the recommended way to load tab delimited data with 10+ fields into spark dataset? Only options that I know are to define StructType for all those fields or long DDL statement. For type safety, case class needs to be defined anyways. This causes schema for single dataset to be defined twice in a given application. Wouldn't it be beneficial to just a have simpler API that only need case class to load CSV file?
Proposed API gives single way to define schema using case class and load csv without StructType or DDL definitions.
Parquet and json formats: It is already easy to load these formats with schema so no need or confusion to create equivalent API like proposed.

The idea looks interesting, especially, getting schema from a case class. How about new schema() method for passing schema as a Product like:
case class Person(name: String, age: Long)
spark.read.schema[Person].csv("/tmp/csv").as[Person]

Why don't we just call
import org.apache.spark.sql.Encoders
val schema = Encoders.product[Person].schema
scala> spark.read.schema(schema).csv("/tmp/csv").as[Person]

?
Once we allow, we have to consider allowing this all the ways. createDataFrame, from_json, DataFrame[Stream]Reader.schema, UDFs, etc. Is this something really worthy?

Why don't we just call

I just think users are not aware of it. It would be nice to add an example to http://spark.apache.org/docs/latest/sql-data-sources-load-save-functions.html

Yes, then, I would leave a note for schema = Encoders.product[Person].schema usage somewhere else if there are appropriate places to note. It'd be useful for all other cases I mentioned.

+1 for @HyukjinKwon 's comment about adding a note instead of this code.

@swapnilushinde Will you open a PR for comments? Please, let us know if you don't have time for that, I will do that.

@swapnilushinde Will you open a PR for comments? Please, let us know if you don't have time for that, I will do that.

Hello @MaxGekk, I am not able to see options to reopen PR for comments. Could you please do it from your end and let me know how to proceed.
Thanks..

@swapnilushinde Will you open a PR for comments? Please, let us know if you don't have time for that, I will do that.

Hello @MaxGekk, I am not able to see options to reopen PR for comments. Could you please do it from your end and let me know how to proceed.
Thanks..

@MaxGekk - Following up. please let me know how to proceed on this.

@MaxGekk - Following up. please let me know how to proceed on this.

@swapnilushinde Open new PR with updated comments, add an example of using Encoders.product[Person].schema as a parameter for schema().  Cover the cases mentioned in the comment https://github.com/apache/spark/pull/24724#issuecomment-496446607


support append to array on update (set array_field += new_element)

It would be great if was possible to append to array (set array_field += new_element) on update instead  of doing the append operation client side and then update the whole array

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/26624396-support-append-to-array-on-update-set-array_field-new_element?utm_campaign=plugin&utm_content=tracker%2F505659&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F505659&utm_medium=issues&utm_source=github).

Hi @gmrodrigues
Thanks for your suggestion. We'll put array functions / operators into our backlog.
Unfortunately, we cannot estimate when this is going to be implemented. However, you're very welcome to contribute :)
Best,
Christian

closing this, since it is implemented with https://github.com/crate/crate/pull/2619


Clean up profile protobuf

I suggest bundling colors together:
"colors": {
    "primary": "#AF854C",
    "secondary": "#E3E3E3",
    "text": "#FFFFFF",
    "highlight": "",
    "highlightText": ""
}

I also suggest bundling stats:
"stats": {
    "followers": 2,
    "following": 1,
    "listings": 0,
    "ratings": 2,
    "averageRating": 4.5
}

@jjeffryes @rmisio what do you think?

I'm a pretty big fan of this proposal. I definitely prefer to structure my data as much as possible and treating colors and stats info as separate objects seems to me to be a good implementation. Additionally, it's nice that like-types (specifically hexcodes) are grouped.

One advantage of bundling stats together is the implicit semantic understanding that these are not authoritative numbers, and can be trivially faked. As I understand, these stats are there just for convenience. For example, if someone wants to get an authoritative listing count, they'd have to look into listings/index.json, or count the number of files in listings/ (minus one for index.json).

While I don't have a burning desire to get this one in, because it will require a bit of client re-work... it does make sense.
FWIW, to minimize future refactoring, let's get changes like this brought up sooner rather than later. The longer we wait, the more potential re-work.

Great suggestion @JustinDrake

done


swc_ecma_quote tests are failing

Describe the bug
1 Clone repo
2 run the tests
cargo test -p swc_ecma_quote
Finished test [unoptimized + debuginfo] target(s) in 0.15s
 Running unittests src/lib.rs (target/debug/deps/swc_ecma_quote-2430af88bd0b5ea1)

running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests swc_ecma_quote
running 4 tests
test crates/swc_ecma_quote/src/lib.rs - quote (line 91) ... FAILED
test crates/swc_ecma_quote/src/lib.rs - quote (line 75) ... FAILED
test crates/swc_ecma_quote/src/lib.rs - quote (line 35) ... FAILED
test crates/swc_ecma_quote/src/lib.rs - quote (line 59) ... FAILED
failures:
---- crates/swc_ecma_quote/src/lib.rs - quote (line 91) stdout ----
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:98:13
|
10 |   let _stmt = quote!(
|  ^
11 | |                 "import thing from "$thing";" as ModuleItem,
12 | |                 thing: Str = "foo".into(),
13 | |             );
| |^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:98:13
|
10 |   let _stmt = quote!(
|  ^
11 | |                 "import thing from "$thing";" as ModuleItem,
12 | |                 thing: Str = "foo".into(),
13 | |             );
| |^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::ModuleItem;
|
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:98:13
|
10 |   let _stmt = quote!(
|  ^
11 | |                 "import thing from "$thing";" as ModuleItem,
12 | |                 thing: Str = "foo".into(),
13 | |             );
| |^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::ModuleDecl;
|
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:98:13
|
10 |   let _stmt = quote!(
|  ^
11 | |                 "import thing from "$thing";" as ModuleItem,
12 | |                 thing: Str = "foo".into(),
13 | |             );
| |^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::ImportSpecifier;
|
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:98:13
|
10 |   let _stmt = quote!(
|  ^
11 | |                 "import thing from "$thing";" as ModuleItem,
12 | |                 thing: Str = "foo".into(),
13 | |             );
| |^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this struct
|
2  + use swc_ecma_ast::Ident;
|
error: aborting due to 5 previous errors
For more information about this error, try rustc --explain E0433.
Couldn't compile the test.
---- crates/swc_ecma_quote/src/lib.rs - quote (line 75) stdout ----
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:82:13
|
10 |   let _stmt = quote!("const $name = 4;" as Stmt, name =
|  _____________^
11 | | Ident::new("ref".into(), DUMMY_SP));
| |___________________________________^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:82:13
|
10 |   let _stmt = quote!("const $name = 4;" as Stmt, name =
|  _____________^
11 | | Ident::new("ref".into(), DUMMY_SP));
| |___________________________________^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::Stmt;
|
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:82:13
|
10 |   let _stmt = quote!("const $name = 4;" as Stmt, name =
|  _____________^
11 | | Ident::new("ref".into(), DUMMY_SP));
| |___________________________________^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::Decl;
|
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:82:13
|
10 |   let _stmt = quote!("const $name = 4;" as Stmt, name =
|  _____________^
11 | | Ident::new("ref".into(), DUMMY_SP));
| |___________________________________^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::VarDeclKind;
|
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:82:13
|
10 |   let _stmt = quote!("const $name = 4;" as Stmt, name =
|  _____________^
11 | | Ident::new("ref".into(), DUMMY_SP));
| |___________________________________^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::Pat;
|
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:82:13
|
10 |   let _stmt = quote!("const $name = 4;" as Stmt, name =
|  _____________^
11 | | Ident::new("ref".into(), DUMMY_SP));
| |___________________________________^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::Expr;
|
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:82:13
|
10 |   let _stmt = quote!("const $name = 4;" as Stmt, name =
|  _____________^
11 | | Ident::new("ref".into(), DUMMY_SP));
| |___________________________________^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::Lit;
|
error: aborting due to 7 previous errors
For more information about this error, try rustc --explain E0433.
Couldn't compile the test.
---- crates/swc_ecma_quote/src/lib.rs - quote (line 35) stdout ----
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:42:13
|
10 | let _stmt = quote!("const $name = 4;" as Stmt, name = Ident::new("ref".into(), DUMMY_SP));
|             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:42:13
|
10 | let _stmt = quote!("const $name = 4;" as Stmt, name = Ident::new("ref".into(), DUMMY_SP));
|             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::Stmt;
|
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:42:13
|
10 | let _stmt = quote!("const $name = 4;" as Stmt, name = Ident::new("ref".into(), DUMMY_SP));
|             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::Decl;
|
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:42:13
|
10 | let _stmt = quote!("const $name = 4;" as Stmt, name = Ident::new("ref".into(), DUMMY_SP));
|             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::VarDeclKind;
|
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:42:13
|
10 | let _stmt = quote!("const $name = 4;" as Stmt, name = Ident::new("ref".into(), DUMMY_SP));
|             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::Pat;
|
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:42:13
|
10 | let _stmt = quote!("const $name = 4;" as Stmt, name = Ident::new("ref".into(), DUMMY_SP));
|             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::Expr;
|
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:42:13
|
10 | let _stmt = quote!("const $name = 4;" as Stmt, name = Ident::new("ref".into(), DUMMY_SP));
|             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::Lit;
|
error: aborting due to 7 previous errors
For more information about this error, try rustc --explain E0433.
Couldn't compile the test.
---- crates/swc_ecma_quote/src/lib.rs - quote (line 59) stdout ----
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:66:13
|
10 |   let _stmt = quote!(
|  ^
11 | |                 "const $name = $val;" as Stmt,
12 | |                 name = Ident::new("ref".into(), DUMMY_SP),
13 | |                 val: Expr = 4.into(),
14 | |             );
| |^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:66:13
|
10 |   let _stmt = quote!(
|  ^
11 | |                 "const $name = $val;" as Stmt,
12 | |                 name = Ident::new("ref".into(), DUMMY_SP),
13 | |                 val: Expr = 4.into(),
14 | |             );
| |^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::Stmt;
|
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:66:13
|
10 |   let _stmt = quote!(
|  ^
11 | |                 "const $name = $val;" as Stmt,
12 | |                 name = Ident::new("ref".into(), DUMMY_SP),
13 | |                 val: Expr = 4.into(),
14 | |             );
| |^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::Decl;
|
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:66:13
|
10 |   let _stmt = quote!(
|  ^
11 | |                 "const $name = $val;" as Stmt,
12 | |                 name = Ident::new("ref".into(), DUMMY_SP),
13 | |                 val: Expr = 4.into(),
14 | |             );
| |^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::VarDeclKind;
|
error[E0433]: failed to resolve: use of undeclared crate or module swc_core
--> crates/swc_ecma_quote/src/lib.rs:66:13
|
10 |   let _stmt = quote!(
|  ^
11 | |                 "const $name = $val;" as Stmt,
12 | |                 name = Ident::new("ref".into(), DUMMY_SP),
13 | |                 val: Expr = 4.into(),
14 | |             );
| |^ use of undeclared crate or module swc_core
|
= note: this error originates in the macro $crate::swc_ecma_quote_macros::internal_quote which comes from the expansion of the macro quote (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum
|
2  + use swc_ecma_ast::Pat;
|
error: aborting due to 5 previous errors
For more information about this error, try rustc --explain E0433.
Couldn't compile the test.
failures:
crates/swc_ecma_quote/src/lib.rs - quote (line 35)
crates/swc_ecma_quote/src/lib.rs - quote (line 59)
crates/swc_ecma_quote/src/lib.rs - quote (line 75)
crates/swc_ecma_quote/src/lib.rs - quote (line 91)
test result: FAILED. 0 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
error: doctest failed, to rerun pass -p swc_ecma_quote --doc
Input code
No response
Config
No response
Playground link
main branch
SWC Info output
No response
Expected behavior
tests pass for all packages
Actual behavior
tests are failing
Version
main
Additional context
No response

This is not a bug and I don't this maters

One solution is to add ,ignore to all of them, but I'm not sure if it worths

Can we change the type of this issue to something else then? I would like to at least improve the CONTRIBUTING.md scripts to make it easier to contribute to this project

Ok I understand this issue now better. The contributing doc has a script which runs all the tests, but CI script runs the tests only for specific set of crates and some of them has special parameters too. It would be nice to extract those steps somewhere so CI pipeline could be easily replicated locally.


data_restore will fail when the length of Verified event is longer than Committed event

https://github.com/matter-labs/zksync/blob/59e6def837099021169c35b7db7d7641f1a03b3b/core/bin/data_restore/src/events_state.rs#L364-L374
when   self.verified_events.len() >   self.committed_events.len()
self.committed_events[0..count_to_get].to_vec() will overflow.
I meet this condition when restore databae.

Hello!
Thanks for your issue.
Could you provide more information about the situation when you met this problem?
What was the environment?

Sometimes,  http request is timeout. sometimes,  My mac is powerdown expected.

After that failings, you tried to continue restoring with data-restorer flag --continue, am I right?
And it looks like the continue mode in the data restorer does not work correctly.

yes, I use continue, I commit a fix on pull request and test it works. Please review:)

Hey @yaanhyy!
We are very glad for your vigilance and support. But there can not be more verification events than commit events. Before each block verification, there is a corresponding block commit.
Could you please elaborate more on the steps to reproduce the issues? There are likely other problems that are the reason

Sure I can reproduce the issues on follow steps:

I run the data_restore service.
the  service  run update_operations_state and change data_restore_storage_state_update to operations
then service run update_tree_state , use the operations to produce blocks. when service produce some blocks but not finish. the service be shutdown for some unexpected reason(for example kill -9).
then restart the data_restore service with --continue, the data_restore load  the storage_state_update in  operations state. 5. the service will load all  operations by function update_operations_state but some operations have been used to produce blocks already. then data_restore service will fail on update_tree_state.

@yaanhyy
We appreciate so many details. It seems that your PR has not resolved the issue because the reason for the error is that the program is trying to work with an inconsistent state. We have to look into our code and find where we are forgetting about a database transaction.


Roll Engine from 8bb5760c0920 to 7e252b58745f (1 revision)

https://github.com/flutter/engine/compare/8bb5760c0920...7e252b58745f
2021-07-15<EMAIL_ADDRESS>Reland enable DisplayList by default (flutter/engine#27407)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jsimmons<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Closing roll so it can rebase on a framework commit that doesn't have a known issue.


WeekView events onEventTap does not get triggered for the current week.

When using the last version 1.1.0 and using a WeekView, when i add an event to this week's calendar so for instance yesterday or tomorrow,
onEventTap does not get called, but when i move the event to either next weeks calendar (For instance adding Duration of 6 days)
or to a previous weeks calendar (Removing duration of 7 days)
Then the onEventTap works as expected.
This issue does not happen if I rollback to version 1.0.4
DayView works fine as well so this seems to only effect the WeekView.

have you found the solution?

I'm using the version  calendar_view: 1.0.4 which works as expected

When using the last version 1.1.0 and using a WeekView, when i add an event to this week's calendar so for instance yesterday or tomorrow,
onEventTap does not get called, but when i move the event to either next weeks calendar (For instance adding Duration of 6 days) or to a previous weeks calendar (Removing duration of 7 days)
Then the onEventTap works as expected.
This issue does not happen if I rollback to version 1.0.4
DayView works fine as well so this seems to only effect the WeekView.

This is because of Live time line indicator as if we set it for all days than  event click alse not work for next week or previous week event like in current week. i have tried on previous version but the problem still exist.

There is a new commit on master branch that seems to fix this, I'm using that now that it's working as expected
Note as of now that is not live on pub.dev so you would need to reference the git repo directly

Closing this issue as issue got fixed in #335.


Clarify conditions goto uses to call load

Describe the problem
While trying to make use of goto and invalidateAll, I couldn't get my page to call its load function predictably. It turns out, my page's load method had no dependencies that would trigger it to change, even though it's a navigational change with different params.

Details for those curious
My example project
The layout and page files are in this file structure:

src/routes/[branch]/+layout.svelte
src/routes/[branch]/+layout.server.js
src/routes/[branch]/thing/[id]/+page.svelte
src/routes/[branch]/thing/[id]/+page.server.js

The broken behaviour:

Given the current page is /main/thing/abc123
When the user clicks a button in a 'Switch branch' dropdown (kinda like GitHub branches)
Then it calls goto('/otherbranch/thing/abc123')
And the target [branch] param has changed, and [id] stayed the same.
But the target +page.server.js's load method was not called again

In +page.server.js, I have:
/** @type {import('./$types').PageServerLoad} */
export async function load ({ params, locals }) {
  if (!params.id) {
    // No id
    throw error(400, 'No ID provided')
  }

  // get db connection passed in from `src/hooks.server.js@handle`
  // which actually makes use of `params.branch` but isn't explicitly utilized in this `load`
  const { db } = locals

  // ... do db stuff

  return { rows }
}

It calls params.id, but it does not call params.branch, so I assume SvelteKit is aggressively optimizing this load to not invalidate if params.branch ever changes; and I was unaware. I made this adjustment, and now load runs after I call goto('/different-branch-from-before/thing/abc123'):
+ export async function load ({ params, locals, depends }) {
+   depends(params.branch) // this is probably wrong and I'm sorry

I came across this insightful comment: https://github.com/sveltejs/kit/issues/1684#issuecomment-862472061
It describes how goto calls a page (or layout's) respective load under the following conditions:

goto() will only run load() if page.params, page.path, page.query, session or context is used inside of load and one of those values has changed since the last run of the load function.

On the surface this makes sense, the load method needs to have some sort of changed params in order for goto to call it again. However, I could not find this behaviour in the docs, and I still have uncertainties:

Does page.params refer to the $page store used on that load method's respective +page.svelte? Or does it (more likely) refer to event.params used in load?
How do I tell my page and its parent layout to call load when goto navigates to that page?
Is there a way to tell a load to always refetch values if the user navigates to it? I understand it's optimal to make use of depends, but I don't understand its functionality, either.
How do I make use of depends so that if a path param changes, that load should invalidate? I assume it's depends(params.targetParam), but I don't know.

Describe the proposed solution
I'm happy to work with the team to add some details to the docs to better capture the behaviour of goto and when it would or would not call load on the target route, how to assign path params to depends within load, and any applicable side-effects of these features.
Alternatives considered
I guess I could do without the event.locals trickery and be more explicit with my dependencies in load, but I wanted to avoid some boilerplate.
Importance
would make my life easier
Additional Information
This comment was also very informative and parts of it should probably make it to the docs: https://github.com/sveltejs/kit/issues/2560#issuecomment-937389988
Specifically the detail on how hard copies of store values will get properly recognized as changed in SvelteKit's optimization logic.

Thanks for the explanation 😃, I have a better grasp of how depends and goto work now. Though I think the lessons here deserve some elaboration on the docs; and I'd like to help if possible.
I couple of suggestions I have for the docs are:
1. I'm guessing this should be invalidateAll() and not invalidate():

https://github.com/sveltejs/kit/blob/fdb166cb80949c2f54093a7787bcd5eb43524666/documentation/docs/05-load.md?plain=1#L345

2. Add a second code snippet to the depends explanation
A page code snippet would help fully illustrate the relationship between depends('my-stuff:foo') in a load, and invalidate('my-stuff:foo') on a page or layout. I agree this statement covers that succinctly:

This function declares that the load function has a dependency on one or more URLs or custom identifiers, which can subsequently be used with invalidate() to cause load to rerun.

But the added code snippet would really help close the loop in my mind as I read through its explanation and see it being applied.

Thanks for lending a hand with my particular SvelteKit dilemma:

The 'correct' fix would be to access that information inside load functions where the tracking applies. But I get that you want to avoid boilerplate.

After thinking it over, I don't think I can avoid boilerplate, nor do I want to anymore; the benefits of connecting to a database in handle doesn't significantly outweigh connecting within load, especially when I look at it side-by-side:
+{page|layout}*.js
+import connect from '$lib/server/db'

export async function load({ locals, params }) {
- depends(params.branch) // should be `params.branch`
- const { db } = locals
+ const db = await connect(params.branch)
}

Writing my code this way:
✅ adds the params.branch dependency implicitly, fixing my goto issue
✅ cleans up handle logic, preventing it from getting stuffy if I ever have to write logic to NOT connect to my database
✅ -2/+2 lines of code, but better


docker-machine doesn't clean cloud resources

Rancher server: 2.0.2
Cloud provider: openstack
It happens frequently that Rancher provisioning leaves some cloud resources behind, like cloud instances or keypairs.
It seems to happen when docker-machine encounters some errors while speaking to the cloud API. These errors appear briefly in the Rancher UI, like 403 errors when trying to create a resource but quota is reached in the project.
There are 3 kind of openstack cloud resources created by Rancher:

keypair
instance
floating ip

If there's a problem while creating or associating the floating IP (e.g intermittent network failures, http 404 or 5xx errors), then it seems like the current node provisioning is marked as failed and Rancher retries again after a brief moment. However, the previous chain of resources are never cleaned up properly, so there will be the previous cloud instance still hanging in the project.
I'm not sure if the docker-machine child process crashes at this moment, like when floating ip creation/associate failed, but perhaps it does and this could have side effects with #13971
The problem is that the user will have bad server resources in his project which he has to clean up by himself. Also, since Kubernetes+openstack cloud provider integration requires looking up the instance name/hostname in the metadata service, it will see that there's a duplicate machine name in the project and kubelet will refuse to register the node. This means that cluster provisioning is broken at this point until someone cleans up the resources in the cloud project, or change the node pool name to avoid the duplication.
Rancher and docker-machine floating IP resource management is problematic too. If the user provides a bad floating ip pool name in its node template (e.g doesn't exist), then provisioning will fail indefinitely and will exhaust all cloud server resources until it hits quota.

FYI this still occurs in v2.0.7

Linked to https://github.com/rancher/rancher/issues/14100


Possible memory leak error message

Using Browserify 1.8.0 and node 0.6.1 I'm getting the following messsage logged to the console.
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
18 Nov 10:43:51 - [ERROR] Trace
Trace:
at StatWatcher. (events.js:133:17)
at Object.watchFile (fs.js:731:8)
at Array.0 (/Users/itaylor/menu/node_modules/browserify/index.js:102:24)
at EventEmitter._tickCallback (node.js:192:40)
After rolling back to 1.7.4 I don't get the error anymore

I have a fix for this. See pull request https://github.com/substack/node-browserify/pull/104
This is the same error as issue #101


Stopping by index terminates multiple processes (0.14.1)

$ forever --version
v0.14.1

$ forever list
info:    Forever processes running
data:        uid  command         script forever pid   id logfile                       uptime
data:    [0] yinz /usr/bin/nodejs app.js 13778   13780    /home/kegsay/.forever/yinz.log 0:0:4:3.199
data:    [1] kABa /usr/bin/nodejs app.js 13801   13803    /home/kegsay/.forever/kABa.log 0:0:3:45.139

$ forever stop 0
info:    Forever stopped process:
    uid  command         script forever pid   id logfile                       uptime
[0] yinz /usr/bin/nodejs app.js 13778   13780    /home/kegsay/.forever/yinz.log 0:0:4:12.408
[1] kABa /usr/bin/nodejs app.js 13801   13803    /home/kegsay/.forever/kABa.log 0:0:3:54.348

$ forever list
info:    No forever processes running

Expected: That the first process [0] would be killed by forever stop 0.
Actual: Both processes were terminated.
This may be related to: https://github.com/foreverjs/forever/issues/481
Running node v0.10.25

This doesn't appear to be based on having the same name such as app.js. This only seems to happen if you try to forever stop 0. In other words, forever stop 1 works correctly (stopping the 2nd process marked [1] in the list).

I suspect the bug is at https://github.com/foreverjs/forever/blob/509eaf24deaf1ea8515298d5fcf16708715e658c/lib/forever.js#L692 which is doing an == check when I think it really needs ===. The variables when reproducing this bug are:
> p.id
false
> id
0

Related to  #659?

@Kegsay  I can confirm that your fix solves this problem for me. I consistently had all processes stopped when issuing a 'forever stop 0'. Modifying forever.findById() from 'return p.id == id;' to 'return p.id === id;' results in 'forever stop 0' killing only the process at index 0.
Many thanks!

We're also experiencing this issue.

Fixed in 0.14.2

I have 0.14.2, and forever stop 0 still stops everything.

Sounds like this simply needs a failing test.  Does anyone mind writing one?

I can confirm that the latest NPM version does not contain the fix yet! Code of the affected file does not match the file in master branch.

This issue still exists in v0.15.1 where #756 is fixed.
root@freja:/srv/freshHQ/main# forever --version
v0.15.1

root@freja:/srv/freshHQ/main# forever restart 0
info:    Forever restarted process(es):
data:        uid  command                                  script    forever pid   id logfile                 uptime
data:    [0] ZX72 /root/.nvm/versions/node/v6.9.1/bin/node websrv.js 28449   28455    /root/.forever/ZX72.log 0:0:0:15.776
data:    [1] OoP3 /root/.nvm/versions/node/v6.9.1/bin/node btcapi.js 28475   28481    /root/.forever/OoP3.log 0:0:0:8.245

I don't think #756 landed in 0.15.1:

31 Jul 2015 : Bumped to 0.15.1 : https://github.com/foreverjs/forever/commit/6c157fafe909eb555b9e73028338377b05d51f51
29 Aug 2015 : Fix landed https://github.com/foreverjs/forever/commit/a957354623cf1de189ee277eb16262f832409b1b
26 May 2016 : Bumped to 0.15.2 https://github.com/foreverjs/forever/commit/66e8c0b72aeaa43f814f99ef4bc412db717ebd97


pip install langflow[local] gives: no matches found: langflow[local]

langflow installs fine, however, pip install langflow[local] results in "no matches found: langflow[local]"
I am on a m2 macbook air.

Hey @cahitakin19
That's weird. I just ran it and it works. Could you try  pip install "langflow[local]" ?

Yes, adding the quotations around langflow[local] did the trick! Thanks for the speedy response/resolution. Adding that extra information to the readme page might be a good idea.

Amazing, thank you from my end too!


Cherry pick fix for native notebook support into release branch

For #15364

Dang it, wrong destination.


dart2js should support metadata on type variables

The compiler fails to parse:
class A <@Tag("typeParam") T> {}

Fixed in the CFE!


Update error in example in the README.md for cdevents.AsCloudEvent(event)

In the readme file the example of sending the event as a cloudevent is wrong as it cannot initialize 1 variables with 2 values.  It is missing the reference to err.
Current:
ce := cdevents.AsCloudEvent(event)

Should be:
ce, err := cdevents.AsCloudEvent(event)

as per pkg/api/bindings.go line 153
// AsCloudEvent renders a CDEvent as a CloudEvent
func AsCloudEvent(event CDEventReader) (*cloudevents.Event, error) {
	if event == nil {
		return nil, fmt.Errorf("nil CDEvent cannot be rendered as CloudEvent")
	}
	// Validate the event
	err := Validate(event)
	if err != nil {
		return nil, fmt.Errorf("cannot validate CDEvent %v", err)
	}
	ce := cloudevents.NewEvent()
	ce.SetSource(event.GetSource())
	ce.SetSubject(event.GetSubjectId())
	ce.SetType(event.GetType().String())
	err = ce.SetData(cloudevents.ApplicationJSON, event)
	return &ce, err
}

Fixed


Update doctrine annotation usage to avoid memory leaks

https://github.com/doctrine/annotations/pull/162

I just don't know why travis fails. I can't reproduce the failure locally and it seems like it failed a while ago.

Travis fails because of BC break in PHPUnit. I will work when next version of Codeception is out.

Also I don't think this change is necessary. The registerLoader method is only called for tests of this package.
This could be relevant for Kdyby/Annotations though. Could you send a PR there?

@enumag will do

Thanks!


Do not call the resource popup when it is not shown.

Summary of changes
Do not call the resource popup when it is not shown.
Context and reason for change
It just makes the app slow. Comparison:

Very nice.


can't install js-sdk

After poetry update when I try to run poetry install it failed with permission error
➜  js-sdk git:(development) ✗ poetry install
/home/mahmoud/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.
  "program uses threads.", RuntimeWarning)
The currently activated Python version 2.7.17 is not supported by the project (^3.6).
Trying to find and use a compatible version.
Using python3 (3.6.9)
Installing dependencies from lock file

No dependencies to install or update

  - Installing js-sdk (0.1.0)

[EnvCommandError]
Command ['/home/mahmoud/.cache/pypoetry/virtualenvs/js-sdk-LPK7RVwh-py3.6/bin/pip', u'install', u'-e', '/home/mahmoud/Documents/js-next/js-sdk'] errored with the following return code 1, and output:
Obtaining file:///home/mahmoud/Documents/js-next/js-sdk
    Complete output from command python setup.py egg_info:
    running egg_info
    writing js_sdk.egg-info/PKG-INFO
    writing dependency_links to js_sdk.egg-info/dependency_links.txt
    writing entry points to js_sdk.egg-info/entry_points.txt
    error: [Errno 13] Permission denied: 'js_sdk.egg-info/entry_points.txt'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /home/mahmoud/Documents/js-next/js-sdk/

➜  js-sdk git:(development) ✗ ls -al /home/mahmoud/Documents/js-next/js-sdk/

total 180
drwxrwxr-x  8 mahmoud mahmoud   4096 Jun 28 13:30 .
drwxrwxr-x  4 mahmoud mahmoud   4096 Jun 14 11:17 ..
drwxrwxr-x  3 mahmoud mahmoud   4096 Jun 22 12:23 docs
drwxrwxr-x  8 mahmoud mahmoud   4096 Jun 28 13:30 .git
-rw-rw-r--  1 mahmoud mahmoud   1465 Jun 22 12:23 .gitignore
drwxr-xr-x  2 mahmoud mahmoud   4096 Jun 25 10:39 js_sdk.egg-info
drwxrwxr-x 10 mahmoud mahmoud   4096 Jun 24 17:01 jumpscale
-rw-rw-r--  1 mahmoud mahmoud    105 May 28 17:45 Makefile
-rw-rw-r--  1 mahmoud mahmoud 123131 Jun 28 13:24 poetry.lock
-rw-rw-r--  1 mahmoud mahmoud    486 Jun 22 12:23 .pre-commit-config.yaml
-rw-rw-r--  1 mahmoud mahmoud    714 Jun 25 16:50 pyproject.toml
-rw-rw-r--  1 mahmoud mahmoud    774 Jun 22 12:23 README.md
drwxrwxr-x  4 mahmoud mahmoud   4096 Jun 28 13:22 tests
-rw-rw-r--  1 mahmoud mahmoud    182 May 28 17:45 .travis.yml
drwxrwxr-x  2 mahmoud mahmoud   4096 Jun 22 12:23 .vscode
➜  js-sdk git:(development) ✗ cat /home/mahmoud/Documents/js-next/js-sdk/js_sdk.egg-info/entry_points.txt
[console_scripts]
threebot = jumpscale.entry_points.threebot:cli

➜  js-sdk git:(development) ✗ poetry shell
/home/mahmoud/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.
  "program uses threads.", RuntimeWarning)
The currently activated Python version 2.7.17 is not supported by the project (^3.6).
Trying to find and use a compatible version.
Using python3 (3.6.9)
Spawning shell within /home/mahmoud/.cache/pypoetry/virtualenvs/js-sdk-LPK7RVwh-py3.6
➜  js-sdk git:(development) ✗ . /home/mahmoud/.cache/pypoetry/virtualenvs/js-sdk-LPK7RVwh-py3.6/bin/activate
(js-sdk-LPK7RVwh-py3.6) ➜  js-sdk git:(development) ✗ poetry install
Installing dependencies from lock file

No dependencies to install or update

  - Installing js-sdk (0.1.0)

[EnvCommandError]
Command ['/home/mahmoud/.cache/pypoetry/virtualenvs/js-sdk-LPK7RVwh-py3.6/bin/pip', 'install', '-e', '/home/mahmoud/Documents/js-next/js-sdk'] errored with the following return code 1, and output:
Obtaining file:///home/mahmoud/Documents/js-next/js-sdk
    Complete output from command python setup.py egg_info:
    running egg_info
    writing js_sdk.egg-info/PKG-INFO
    writing dependency_links to js_sdk.egg-info/dependency_links.txt
    writing entry points to js_sdk.egg-info/entry_points.txt
    error: [Errno 13] Permission denied: 'js_sdk.egg-info/entry_points.txt'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /home/mahmoud/Documents/js-next/js-sdk/

os: ubuntu 18.04
git commit:6efaf031c71bbeda81790b58d3845764309badd2

after fire sudo chown -R mahmoud:mahmoud /home/mahmoud/Documents/js-next/js-sdk/  install completed

the installation is working fine.


Install Ollama on OSTree systems

There's a large plethora of OSTree OSes in the Fedora family:
Silverblue, Kinoite, CoreOS, IoT, Onyx, Sericea, Vauxite
In the CentOS Stream family:
Automotive Stream Distribution
CoreOS
In the Red Hat family:
Red Hat In-Vehicle Operating System
Red Hat Enterprise Linux CoreOS
RHEL for Edge
Then there's the Universal Blue family also https://github.com/ublue-os/.
Things like podman-machine and podman-desktop on Windows and macOS use Fedora CoreOS as the host OS so there is that also.
The list goes on and on.
These OSes are ideal for containerized AI LLMs like Ollama.
I eventually got this working with podman, which is probably the best route to use on these OSes (or an rpm when someone packages it).
This change gets the install script working.
/usr/bin and /usr/share aren't writable on these systems, but /usr/local/bin and /usr/local/share are.
So this change ensures if /usr/local/share is used during installation, that we also use /usr/local/share. And then everything seems to work fine on these OSes for non-containerized installs.

I really know nothing about golang and got stuck on building the code:
$ go build main.go
llm/llm_linux.go:5:12: pattern build/linux/*/*/bin/*: no matching files found

so if someone could double check my golang changes are correct I'd appreciate it :sweat_smile:

Funnily enough Ollama had no issue with my golang code, but had issue with my shell script changes (which I had some confidence in):
podman-ollama.sh "Review my golang changes, tell me if there are issues: $(git diff HEAD~)"
8d25babb29ded9b0da96df2c250cd14c0bf86ad192a25eaf30399d6f1fbc672d
The changes in the `gpu/amd_linux.go` file look good, but there are a few issues with the `scripts/install.sh` file:

1. The `SHAREDIR` variable is not defined in the `configure_systemd` function, so it's not clear where the installation directory for OLLama should be created. You may want to define `SHAREDIR` as a constant
somewhere in the script, or use a more flexible method for determining the installation directory (e.g., using the `os.Getwd()` function).
2. The `rm -rf /usr/share/ollama/lib` command is dangerous and should be avoided. It could potentially remove important system files, so it's better to use a more targeted approach for cleaning up the OLLama
installation directory (e.g., using the `find` command to delete only the files in the `ollama` directory).
3. The `install_success` variable is not defined anywhere in the script, so it's not clear what this variable should be set to. You may want to define it as a constant somewhere in the script, or use a more
flexible method for indicating success (e.g., using a boolean value or a message printed to console).
4. The `exit 0` statement at the end of the script is not necessary, since the `install_success` variable is not defined. You may want to remove this line to avoid confusion.

Here's an updated version of the `scripts/install.sh` file that addresses these issues:
```bash
#!/bin/bash

# Define constants for installation directory
SHAREDIR="/usr/share"
BINDIR="/usr/local/bin"
TEMP_DIR="/tmp"

# Check if OLLama is already installed
if id ollama >/dev/null 2>&1; then
    # If OLLama is already installed, remove the old installation
    $SUDO rm -rf /usr/share/ollama/lib
fi

# Install OLLama
$SUDO install -o0 -g0 -m755 -d $BINDIR ollama

# Configure systemd service
configure_systemd() {
    if ! id ollama >/dev/null 2>&1; then
        # Create OLLama user and group
        $SUDO useradd -r -s /bin/false -U -m -d /usr/share/ollama ollama
        $SUDO chmod o+x /usr/share/ollama
    fi
}

# Download AMD GPU dependencies
curl --fail --show-error --location --progress-bar "https://ollama.com/download/ollama-linux-amd64-rocm.tgz${VER_PARAM}" | $SUDO tar zx --owner ollama --group ollama -C /usr/share/ollama/lib/rocm

# Install OLLama GPU dependencies
install_success=true
if [ "$1" = "--force" ]; then
    install_success=false
fi
if [ "$install_success" = true ]; then
    $SUDO install -o ollama -g ollama -m 755 -d $BINDIR ollama
else
    $SUDO install -o ollama -g ollama -m 755 -d $BINDIR
fi

Note that I've also changed the install_success variable to be a boolean value, so that it can be easily tested in the if statement.
ollama

Something like this is probably a better solution for OSTree systems:
https://github.com/ericcurtin/podman-ollama


Add f-droid download logo

hi, please add f-droid logo on f-droid sbw page
on github

and on https://sbw.app

Because right now i have filling that someone (not you) published a fake app on f-droid. So i don't understand why f-drod not present as safe download page for your app? best regards.

It's fine, it was me. I've added google auth library which I plan to utilize in future and this made an app incompatible with f-droid standards. They have stopped publishing updates and I've removed f-droid links.

Yes, it will. All that auth stuff is optional and can be totally disregarded.


Ubuntu 24.04 actions killed after 4 minutes

Description
Yesterday, our actions that use Ubuntu 24.04 started being killed if they ran for more than 4 minutes. We reverted the build to use 22.04 and they completed, so it appears to be something specific to those runners
Platforms affected

[ ] Azure DevOps
[X] GitHub Actions - Standard Runners
[ ] GitHub Actions - Larger Runners

Runner images affected

[ ] Ubuntu 20.04
[ ] Ubuntu 22.04
[X] Ubuntu 24.04
[ ] macOS 11
[ ] macOS 12
[ ] macOS 13
[ ] macOS 13 Arm64
[ ] macOS 14
[ ] macOS 14 Arm64
[ ] Windows Server 2019
[ ] Windows Server 2022

Image version and build link
Current runner version: '2.316.1'
Runner Image
  Image: ubuntu-24.04
  Version: 20240516.4.0

Is it regression?
Yes, started yesterday and the successful builds have the same version info
Expected behavior
Build run to completion and aren't cancelled after 4 minutes
Actual behavior
All builds using Ubuntu 24.04 are cancelled after 4 minutes
Repro steps
With 24.04 and it was killed after 4 minutes:
https://github.com/awresports/awresports-server/actions/runs/9292154743
With 22.04 and it finished:
https://github.com/awresports/awresports-server/actions/runs/9292165631

Same report for repository opentelemetry-cpp.

https://github.com/open-telemetry/opentelemetry-cpp

Seems to be the duplicate of: https://github.com/actions/runner-images/issues/9959.

Agreed that it's a duplicate


Can't build jar

Describe the bug
Some script are not found while trying to build a jar (decompile.sh for instance). I tried to use decompile.sh from other paper forks, but without success.
To Reproduce
git clone https://github.com/nopjmp/Dionysus.git
cd Dionysus
./dionysus jar

> java -version
openjdk version "1.8.0_332"
OpenJDK Runtime Environment (build 1.8.0_332-b03)
OpenJDK 64-Bit Server VM (build 25.332-b03, mixed mode)

> mvn -version
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: /opt/maven
Java version: 1.8.0_332, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-8-openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.16.12-arch1-1", arch: "amd64", family: "unix"

Build with openjdk 17 failed at even earlier stage.
Misc
Full command output https://paste.md-5.net/ikimufiwow

nvm, I switched to another java 8 compatible jdk and it works again. with openjdk it doesn't for some reason

It requires some things not included in distro openjdks unfortunately. I
was working on moving it to the newer solution for forks but lost
interest and time.
On March 8, 2022, GitHub Notifications @.***> wrote:

nvm, I switched to another java 8 compatible jdk and it works again.
with openjdk it doesn't for some reason

—
Reply to this email directly, view it on GitHub
https://github.com/nopjmp/Dionysus/issues/21#issuecomment-1062222787,
or unsubscribe <https://github.com/notifications/unsubscribe-
auth/ABHSAGO6S7VHFYMFIJTNRILU67AAHANCNFSM5QHPYJYQ>.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


[Feature Request] Reduce space taken up by empty options structs

@tg-msft "could we gray out "future proof" options/responses, render them on a single line, and not put as much extra space before/after? These cause a lot more visual noise than they're worth today."

We can't gray them out, and #2998 eliminates the extraneous whitespace. We could render them on a single line though, by which I mean:
// today
type FooOptions struct {
    // no exported fields
}

// could do this instead
type FooOptions struct {}

The question then is, does explicitly calling out a struct's lack of exported fields help someone to the extent that we want to keep doing it? Or, from another angle, is type FooOptions struct {} intuitive or does it look like a bug? Personally, I think the single line is reasonably intuitive.
We could also make these empty structs implicit by simply not rendering their uninteresting definitions:
// readers can infer a ThingOptions type having no fields
type NewThing(options *ThingOptions)

I think that's probably too radical but it would significantly declutter some reviews.

Thanks for filing this @seankane-msft!
I agree we probably don't want to fully remove them.  But if we can't gray them out, could we do a strikethrough like Java does for things that have been deprecated (see the Size property at https://apiview.dev/Assemblies/Review/d1b94cf46b5a462a9f3d663794d97fc7#com.azure.storage.blob.models.Block for an example)?  Something like type FooOptions struct { /* no exported fields, here for futureproofing */ } would make it easier to skim through looking for good stuff.

I'd like to save strikethrough to indicate deprecation and don't want to imply these structs are somehow dubious. They don't need to occupy so much space though, so I implemented a single line format in #2998: type FooOptions struct {}


error warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/Podfile while initializing a new react native project

Description
✖ Installing CocoaPods dependencies (this may take a few minutes)
error warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md

✖ Installing CocoaPods dependencies (this may take a few minutes)
error Error: Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/next/environment-setup and follow the React Native CLI QuickStart guide for macOS and iOS.
Error: Error: Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/next/environment-setup and follow the React Native CLI QuickStart guide for macOS and iOS.
    at createFromTemplate (/Users/anis/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:169:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.initialize [as func] (/Users/anis/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:222:3)
    at async Command.handleAction (/Users/anis/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/index.js:140:9)
info Run CLI with --verbose flag for more details.

Version
0.70.2
Output of npx react-native info
System:
    OS: macOS 12.6.2
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 483.90 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.12.1/bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
    Watchman: 2<IP_ADDRESS> - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /Users/anis/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.3 AI-213.7172.25.2113.9123335
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 18.0.1 - /usr/local/opt/openjdk/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.71.2 => 0.71.2
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce
npx react-native init newProject

Snack, code example, screenshot, or link to a repository

Yes, I'm facing similar problem albeit successfully building the app.
I got this warning when I run pod install:

Which React native version are you using ?

Hi there!
The warning about multiple Podfile should not stop you from building the app. However, I put up a PR to fix this for new apps.
@anisamirouche, your problem is a misconfiguration of the environment, probably you have the wrong version of Ruby installed. To make sure of it, could you try to manually install the pods by (from a Terminal):

navigate to your app folder
cd ios
bundle install (you need to run this only once)
bundle exec pod install

This should give us a better diagnostic of your problem.
Thank you so much.