Bug report: # and % characters are not supported for file or folder commands

Priority
(Urgent) I can't use the CLI
Description
Originates from Discord member without GitHub account: https://discord.com/channels/1022486301536178246/1113583852586283059

Almost all spo file and spo folder commands suffer from this issue. The command returns weird responses when a file or folder has a # or % sign in its name.
Example:
m365 spo folder list --webUrl {MY SITE} --parentFolderUrl '/Shared Documents/General/Equipment Data/MiSeq - #0692' --recursive
It always returns an empty result, even where there are child folders.
Even worse, the command is stuck in an endless loop when the parentFolderUrl parameter has a value where a folder starts with a # character (e.g. /Shared Documents/General/Equipment Data/#0692).
Steps to reproduce
Empty result:

Create a folder with a # in its name. E.g. Folder#.
Create a child folder under this folder. E.g. My subfolder.
Run m365 spo folder list --webUrl {MY SITE} --parentFolderUrl '/Mylibrary/Folder#' --recursive

Endless loop:

Create a folder with a name starting with #. E.g. #Folder.
Create a child folder under this folder. E.g. My subfolder.
Run m365 spo folder list --webUrl {MY SITE} --parentFolderUrl '/Mylibrary/#Folder' --recursive

Expected results
Expect the command to return all subfolders recursively.
Actual results
Either an empty result, or no result at all because it's in an endless loop.
Diagnostics
No response
CLI for Microsoft 365 version
v6.9.0
nodejs version
v18.16.0
Operating system (environment)
Windows, Linux
Shell
PowerShell, Debian Linux command line
cli doctor
No response
Additional Info
This is because we use GetByServerRelativeUrl endpoint almost everywhere. This endpoint doesn't support # and % characters at all. We should use GetByServerRelativePath to support these characters. This issue has been noticed for the command spo folder list, but nearly all spo folder and spo file commands use the same (bad) endpoint.
Extra info: https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/supporting-and-in-file-and-folder-with-the-resourcepath-api

Couldn't we decode the string before passing it to the API to ensure that it's not encoded?

Couldn't we decode the string before passing it to the API to ensure that it's not encoded?

I don't know if there's a proper way to determine whether a string is encoded or decoded. If we provide for example a value like Testfolder%23, we could decode it to Testfolder#, but Testfolder%23 is also a valid folder name 🤷
Using GetByServerRelativeUrl Microsoft accepts both encoded and decoded URLs, but since they support # and % characters in file names and folder names they realized they cannot know whether a string is encoded or decoded.
That's why GetByServerRelativePath only accepts decoded URLs.

Great catch, this one!
So if I look at spo file get, the GetByServerRelativePath endpoint is already used. Oddly though, the fileurl is encoded before calling it, and still it works okay on my end:

The API Url that is called:
"url": "https://blimped.sharepoint.com/sites/Learning/_api/web/GetFileByServerRelativePath(DecodedUrl=<EMAIL_ADDRESS>

Ok, check, we do have an issue indeed.

Ok, check, we do have an issue indeed.

Correct, and when using GetByServerRelativeUrl, both of these scenarios will work. With the huge drawback that any file or folder with # or % would break it.

OK, so the only route would be to allow the user to enforce that the URL is decoded or encoded already.
We can assume that there are less folders and files that contain # and % characters though. So the impact should be with users wanting to work with those files. Agreed?
So it seems to me we should be using GetByServerRelativeUrl by default and only use GetByServerRelativePath if the user specifically requests it.

The challenge is to find a good way to do this. the verb path is sometimes already used in these commands to denote a path on the filesystem, so we cannot just add an extra option: (Specify either 'url' or 'path')

There is an interesting route that we could use:
m365 spo file get --url.decoded "some#file.pdf"
Would get translated by minimist to an object:
args.options.url = { decoded: "some#file.pdf" }
We have not used that till now, but it might be an interesting route to fix these kinds of things.

We can assume that there are less folders and files that contain # and % characters though. So the impact should be with users wanting to work with those files. Agreed?

We can also assume that people don't provide encoded values to the command. As far as I know, SharePoint never returns an encoded URL 🤷

So it seems to me we should be using GetByServerRelativeUrl by default and only use GetByServerRelativePath if the user specifically requests it.

If we consider it as a breaking change, it's something we can do yes.  I think we should definitely use the Path API endpoint in the future. Whether that's now or when releasing v7, that's the question 😊

We can also assume that people don't provide encoded values to the command. As far as I know, SharePoint never returns an encoded URL 🤷

I find myself copy pasting encoded urls sometimes. (from the browser) In my head this is quite common. I'm not sure what are other peoples experiences.

I don't like the fact that there are 2 ways for a user to provide a URL 😃 and us using the Url and Path endpoint depending on whether they use option A or B.

There is an interesting route that we could use:
m365 spo file get --url.decoded "some#file.pdf"

Would get translated by minimist to an object:
args.options.url = { decoded: "some#file.pdf" }

We have not used that till now, but it might be an interesting route to fix these kinds of things.

what do you think of this route?

It's a bug as it is either way. Some commands fail one way, some commands fail the other way... But changing it may be a breaking change indeed, as a lot of people may be impacted who currently don't experience this issue.

any other opinions @pnp/cli-for-microsoft-365-maintainers? @waldekmastykarz (you were already participating in this issue)

OK, so to recap: the problem is that special characters, that are typically encoded in the URL, are also accepted as valid characters in SharePoint. So if we assume that the specified string is not encoded, and we encode it, we inadvertently break it, when it contains a special character that should be passed as-is.
What if we tried to detect if the string is decoded, and if it is, encoding it ourselves so that we can safely pass it to the URL? If the string is already encoded, we'd pass it as-is?

Sounds like a good plan, we can check for url-encoded characters from the official list.
If we find encoded characters, should we assume that the string is encoded in its entirety? For example: I usually copy urls from here and there, and type additions... which might or might not be encoded. Or am I making it too difficult 😀

OK, so to recap: the problem is that special characters, that are typically encoded in the URL, are also accepted as valid characters in SharePoint. So if we assume that the specified string is not encoded, and we encode it, we inadvertently break it, when it contains a special character that should be passed as-is.

Yes using the current API, it's impossible to work with files and folders that contain a # or % in the name. Therefore they created a new API that only accepts decoded URLs.

What if we tried to detect if the string is decoded, and if it is, encoding it ourselves so that we can safely pass it to the URL? If the string is already encoded, we'd pass it as-is?

To be honest, I don't really know if there's a way for us to determine whether a URL is encoded or decoded. This is an approach Microsoft used with the URL API, but since they accept special characters in file names, they had to move away from this approach and create a new API (the Path API). This one accepts decoded URLs only.
Imagine I pass the string /TestLib/Document%20file.docx. How can we know whether the document name is Document file.docx or Document%20file.docx? The reason that the new API doesn't accept encoded URLs anymore is that it became kinda impossible to tell whether an URL is encoded or decoded.

How can we know whether the document name is Document file.docx or Document%20file.docx?

Ah, you are correct @milanholemans, if we assume %20 means that a url is encoded, it will be real hard to find a file that is actually named like that. As it will be passed through as is.

So even if that's a situation that will not occur often, we'd still need to build a way to allow people to work with the CLI in such a scenario.
Coming back to the way to deal with this, we could start using the option dot-notation for this.
What if we implemented that as a 'function' that the user can execute on the option value? That would allow for interesting things.
Just like @-tokens, this would be a special way to work with option inputs.
For example:
m365 spo file get --url.encodeURIComponent '/library/document%20.docx'

This would allow the user to force the cli to encode the content before passing it through.
Below the surface, minimist would convert this to an object, so we could build a generic way for the CLI to get the actual option value and execute the function on it.
My example uses the JavaScript function name just as an example, we could name it differently. And we could add extra functions where necessity arises.

This would allow the user to force the cli to encode the content before passing it through.

To be honest, I don't think people should/will know when/why they have to do this. We shouldn't make it too complex. In fact, in both API endpoints, we should encode the value.
In my opinion, we should check if this is a breaking change. if so, we should provide an extra option for people to use and deprecate the current option. In the next release, we should just get rid of the GetByServerRelativeUrl API and enforce our users to provide only decoded URLs. Microsoft kinda enforces us to do this by their API. This is what we are actually doing right now already for spo file copy for example. We used a new (better) endpoint there, but it also accepts only decoded URLs.
Quote from the blog post about the Path API:

The existing API will NOT support files and folders with % and # in names.  For backwards compatibility reasons, files with URLs containing a # or % will be interpreted as either a URL fragment or an encoding hint, respectively.  With existing APIs, your code will not be able to save a file to SharePoint with a # or a % in them.

The existing API will be marked “Obsolete” in the future and will eventually be removed.

While removing this API won't be for any time soon, this encourages me, even more, to get rid of the URL API and thus only accept decoded URLs.

To be honest, I don't think people should/will know when/why they have to do this.

I do agree with you on this sentiment. ☺
But on the other hand: won't we throw up additional hurdles as well if we force users to enter decoded urls. Many users may not know how to decode a url easily. I myself may not want to leave context to go somewhere to decode it.
(Also: I do agree that we should move to only use the Path endpoint.)

Oh and also: only allowing decoded input impacts every user. While my proposed solution only impacts the few people who run into this specific url scenario.

we check if the url is encoded
If encoded we pass it into the Path function
If not we encode it and pass it into the Path function
People who have paths that include chars like %20 but 'mean' it like a special %-char can use the encoding function to force encoding.

But on the other hand: won't we throw up additional hurdles as well if we force users to enter decoded urls. Many users may not know how to decode a url easily. I myself may not want to leave context to go somewhere to decode it.

I don't know, if we are kinda forced to do it, why not. Also, I can't think of any SharePoint API endpoint that returns an encoded URL. I think it's just a mind switch. Decoded URLs are also much more readable than encoded ones.

we check if the url is encoded

There is no way for us to tell whether a value is encoded or not 😊
I fear this will overcomplicate things. I don't think users will understand when to use which option. It would add a lot of explaining text for, every command.
I think users want to pass a file/folder path and expect the command to work without thinking about what happens behind the scenes. If we provide multiple options to reach the same result, I think it will overcomplicate things and makes the command much less user-friendly.

I don't agree with you on everything, but maybe I'm making to big a deal of it. spo file list and spo file get already don't accept encoded Url's, and nobody complained 😊 So maybe it's not a problem.

I don't agree with you on everything, but maybe I'm making to big a deal of it. spo file list and spo file get already don't accept encoded Url's, and nobody complained 😊 So maybe it's not a problem.

spo file list and spo file get already don't accept encoded Url's, and nobody complained 😊 So maybe it's not a problem.

And spo file copy as well, there are probably some more. One thing we should definitely do is align them so they work the same.
About this discussion, someone else is willing to give his/her opinion on this one @pnp/cli-for-microsoft-365-maintainers

Definitely a fan of streamlining this. I would vote that we start with only accepting decoded URLs. If the question arises from users we could extend the functionality but that seems a bit out of scope for resolving this bug.

Definitely a fan of streamlining this. I would vote that we start with only accepting decoded URLs. If the question arises from users we could extend the functionality but that seems a bit out of scope for resolving this bug.

There isn't really another way. If we want to accept both decoded and encoded URLs, we probably have to provide 2 options encodedFileUrl and decodedFileUrl. Which I'm not a fan of at all.
Any other opinions @pnp/cli-for-microsoft-365-maintainers @waldekmastykarz? 😊
The person who logged this issue said he could wait a few weeks for the fix but right now the issue is becoming a bit stale 😊

Opinions @pnp/cli-for-microsoft-365-maintainers?

@milanholemans you mentioned that there's a new API that supports both encoded and decoded URLs, right? What if we moved all commands to use that API for v7?

@milanholemans you mentioned that there's a new API that supports both encoded and decoded URLs, right? What if we moved all commands to use that API for v7?

Not really, currently, we use the GetByUrl API endpoint which supports both decoded and encoded URLs but cannot work with special characters in the name. The new way of working is using the GetByPath endpoint which only supports decoded URLs and works for all cases.
As mentioned above, Microsoft tries to push everyone to use the Decoded URL endpoint with an extra remark: The existing API will be marked “Obsolete” in the future and will eventually be removed.. So I'm really not a fan of still supporting encoded URLs.
Currently, a few commands use the old endpoint, while others use the new one. We should definitely align them so an URL for command X works, but not for command Y.

So, should we plan this for v7?

Greetings,
  I'm the OP on Discord.   It would be great if this could kindly be resolved sooner, even if in a beta release.   Sadly, *many* of our Sharepoint directories have # in them, e.g.

machine_make_and_id #some_id_number
and I would very much like to pull from those directories data via your lovely CLI.   Many thanks,
        Toshi

@pnp/cli-for-microsoft-365-maintainers @martinlingstuyl @waldekmastykarz what do you think? Is it a bug or not?
Do we agree that we should accept only decoded URLs? If it's not a bug, I suggest that we temporarily add a new option decodedUrl and remove the encoded variant in v7.

I'd say this bahavior is a bug, so fixing it directly is on the table as far as I'm concerned. But as there's a slight chance we might break other peoples scripts though...better to be safe...

Yes, correct. Instead of introducing duplicate options for all commands, we can do it for some. And refactor them all in v7.
@tohsumi-bebio is spo folder list the only command you are using for this? Or do you use others as well?

Greetings, I'm currently using
spo folder list
spo file list
spo file get
At some point, I would like to use
spo search
too.   Many thanks!

@cli-for-microsoft-365-maintainers @martinlingstuyl @waldekmastykarz should we update just update

spo folder list
spo folder get
spo file get
spo file list

And do the other commands later at v7?

@pnp/cli-for-microsoft-365-maintainers @martinlingstuyl @waldekmastykarz what do you think? Is it a bug or not? Do we agree that we should accept only decoded URLs? If it's not a bug, I suggest that we temporarily add a new option decodedUrl and remove the encoded variant in v7.

sorry for the late reply. All in on this one. I am not sure if I would consider this as a bug, maybe rather an enhancement 🤔. For sure I agree with @martinlingstuyl opinion to be on the safe side and for now adding an additional option is the way to go, if you ask me 👍.
BTW thanks @milanholemans for awesome management on this issue 👍

should we update just update

Let's only fix what is used currently, to lessen the load of the work. V7 is quite close, after the holidays.

All right, thanks for the discussion folks, I'll open it up!

Late to the party: thinking of it... if # is a valid character and we don't support it, then it's a bug that we should fix, in one way or the other. I suggest we don't introduce a new option that we'll remove in 3 months time. That would be introducing unnecessary work. Instead, I suggest we fix it correctly the right way.

All right thanks for the input @waldekmastykarz!

I'm splitting this into 2 issues to reduce the PR size.
1 PR for file commands.
1 PR for folder commands.

@tohsumi-bebio the fix has been merged and is now available in the beta release.
You can install is by running npm i -g @pnp/cli-microsoft365@next.
It was quite a tough discussion whether we could break existing scripts. It also took us some time to fix and review every affected command. Hopefully this fix is still in time for you.
Thanks again for reporting this issue.

Thank you everybody for fixing this issue.   All the best.

One quick question: I'm getting a weird error in that if I run the install npm command as myself, I get the error
Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/@pnp/cli-microsoft365' -><EMAIL_ADDRESS>which makes sense since that directory is owned by root.   However, the really weird thing is if I do sudo npm {rest of command}, then I get
npm ERR! enoent ENOENT: no such file or directory, chmod<EMAIL_ADDRESS>which makes no sense since
ls -l<EMAIL_ADDRESS>-rwxr-xr-x 1 root root 1144 Oct 26  1985<EMAIL_ADDRESS>I'm attaching the output of the log file, but was wondering if I am missing something here.    I'm not an experienced Linux user so I'm afraid I won't be much of a help. Are you able to uninstall the tool using npm?
Worst case, the current beta will be our new stable release at the end of the month. So within 2 weeks you can just upgrade to the latest stable.

Dear Milan,
   Hmm, OK.   No worries, I can definitely wait until the end of the month.   I will then upgrade to the latest stable release.   Many thanks,

            Toshi

From: Milan Holemans @.>
Date: Monday, August 14, 2023 at 4:56 PM
To: pnp/cli-microsoft365 @.>
Cc: Toshiro K. Ohsumi @.>, Mention @.>
Subject: Re: [pnp/cli-microsoft365] Bug report: # and % characters are not supported for file commands (Issue #4968)
That's odd. I'm not an experienced Linux user so I'm afraid I won't be much of a help. Are you able to uninstall the tool using npm?
Worst case, the current beta will be our new stable release at the end of the month. So within 2 weeks you can just upgrade to the latest stable.
—
Reply to this email directly, view it on GitHubhttps://github.com/pnp/cli-microsoft365/issues/4968#issuecomment-1678047959, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASY3BLTGFKUHRYZ4T3DX7ELXVKGG3ANCNFSM6AAAAAAYXNJGQ4.
You are receiving this because you were mentioned.Message ID: @.***>
The information contained in this communication from Be Biopharma is confidential and is intended solely for use by the recipient.


Inject in Nuxt context

Hello.
Do you have idea how I can inject you package in nuxt context. I tried created plugin like:
import Vue from 'vue'
import VuetifyToast from 'vuetify-toast-snackbar'

Vue.use(VuetifyToast, {
  x: 'right',
  y: 'top',
  color: 'info',
  icon: 'info',
  timeout: 3000,
  dismissable: true,
  autoHeight: false,
  multiLine: false,
  vertical: false,
  shorts: {
    custom: {
      color: 'purple',
    },
  },
  property: '$toasted',
})

export default function (ctx, inject) {
  inject('toast', Vue.prototype.$toasted)
}

inspired: https://github.com/nuxt-community/modules/blob/master/packages/toast/plugin.js
But it doesn't work :(

Hi, sorry took me some time to take a look at it. It's pretty simple, put this in plugins/vuetify.js:
import Vue from 'vue'
import Vuetify, { VSnackbar } from 'vuetify/lib'
import VuetifyToast from 'vuetify-toast-snackbar'

Vue.use(Vuetify, {
  components: {
    VSnackbar
  }
})

Vue.use(VuetifyToast)

Hi, @eolant . Thanks for the answer. But you provide solution not for my question. I need [Combined inject](Combined inject).

Sorry @votintsev , I misunderstood. Please try example from nuxt documentation:
export default ({ app }, inject) => {
  inject('toast', Vue.prototype.$toasted)
}

It works for me and I'm able to call toast from store context too. Note that you'll still need my previous answer to define VSnackbar component. Just add export at the end of the file.


IFusionCachePlugin Usage

https://github.com/JoeShook/FusionCacheMetricsPlayground/blob/7a9c2362765afa00645d61cffe65c72fbec750f9/examples/EventCountersPluginExampleDotNetCore/Startup.cs#L41
@jodydonetti check this area out.  I am injecting a IFusionCachePlugin two ways.  I have two caches in all these examples.  The first cache named "domain" is injected via the AddFusionCache.  The second cache is called "email" and I have to hand wire because I can't inject IFusionCachePlugin twice.  Seems OK.   Tell me what you think.  It is working fine.   Both cache's metrics are reporting correctly.
There are plenty of opinions about one cache vs multiple caches but in this use case I very much want to record metrics about "domain" separate from "email".  And trying to make FusionCacheEventSource work with a collection of named counters turns into a nightmare and increases the CPU cycles and locks to resolve the correct counter.  Anyway IFusionCachePlugin does work.
Thinking more about this... I am not familiar with how to register multiple IFusionCachePlugins as singletons.

@jodydonetti also note in the project I am referencing the feature_plugin branch of FusionCache  on my desktop.

@jodydonetti also note in the project I am referencing the feature_plugin branch of FusionCache on my desktop.

Well now that I've release v0.1.5 (with official plugins support) you can reference directly the official nuget package!

I have two caches in all these examples. The first cache named "domain" is injected via the AddFusionCache. The second cache is called "email" and I have to hand wire because I can't inject IFusionCachePlugin twice. Seems OK. Tell me what you think. It is working fine.

Without DI there's no problem at all: multiple caches, multiple plugins, multiple everything, no problem.
With native .NET DI? Yep, you are right about it being kinda weird to have multiple singletons components, but that is just the way it is right now and we can't do anything about it, at least not without taking another path.
Basically it all boils down to this: in the native .NET DI container the way to go is via ctor injection, and with ctor injection you can only specify a param with a type, and that type will be used to resolve an instance. That's it.
Because of this there's no native way to have more than one of them (except via different scopes, or by making the service transient, but that is not what we are talking about here).
Something I'm thinking about (but haven't had the time yet to clear my mind) is maybe an additional approach similar to the multiple named HttpClient way (see here).
It would also be familiar to existing .NET users, so maybe there's a point in that.

Both cache's metrics are reporting correctly.
[...]
Anyway IFusionCachePlugin does work.

Yeah! Good to know 🎉

Thinking more about this... I am not familiar with how to register multiple IFusionCachePlugins as singletons.

If we are talking about a single cache with multiple plugins (think a metrics plugin + a notifications plugin or whatever) it's very simple: you just do a services.AddSingleton<IFusionCachePlugin>([...]) twice, and all of them will be picked up by the DI container when resolving an IFusionCache instance.
Example:
[...]
services.AddSingleton<IFusionCachePlugin, MyMetricsPlugin>();
services.AddSingleton<IFusionCachePlugin, MyNotificationsPlugin>();
services.AddSingleton<IFusionCachePlugin, MyWhateverSuperDuperPlugin>();
[...]

Then, when working with your FusionCache instance, you will have 3 plugins running automatically.
Let me know how it goes, hope this helps.


Schema validation with Yup

https://github.com/jquense/yup
seems like a good fit, better than jsonschema.

nice


IDP not authenticated while SP is, on external SAMP2p

I am just using the sample repo (No customization) given here with demo license. Got interesting behavior of IDP.
Steps:

Navigate to SP (port 5001)
Navigate to login page and click external SAML2p
Its redirects us to idp (port 5000) login page and enter credentials (alice-alice)
Upon clicking login, it redirect back to sp page, SP is logged in
Navigate to idp and no track of just logged in user alice ("idsrv" cookie is there but no "idsrv.session")

Following is the log of IDP, moment before it says logged in and after navigating/refreshing the idp page, its unauthenticated.

@scottbrady91 Any insight on this please.

It's because both IdentityServer instances are running on localhost, and since they're using the same cookie names, they are overwriting each other's cookies.
I've changed the name of the IdP cookie to demo that functionality: https://github.com/RockSolidKnowledge/Samples.IdentityServer4.Saml2pIntegration/blob/57568185fc3cf6560f0541f54c57dfcf00fc67a5/idp/Startup.cs#L60

Thanks @scottbrady91, Your change worked. I though port numbers would make difference for cookie management but seems it just goes for host name.


Fix benchmark yew dependecy version setting step

This file no longer uses path for benchmark
https://github.com/krausest/js-framework-benchmark/blame/master/frameworks/keyed/yew/Cargo.toml
or just does not work, i cant put my finger on it
Description

Checklist

[ ] I have run cargo make pr-flow
[ ] I have reviewed my own code
[ ] I have added tests

I cant figure this out :/

OK so here is what im thinking:
@yewstack/core-maintainers  need to revisit https://github.com/yewstack/js-framework-benchmark and merge pr's there, our current CI does not even use our repo, it uses @bakape s.
Then it also need to be updated for<EMAIL_ADDRESS>because curerntly build fails because its outdated.
As per this PR i think it can be merged.

OK so here is what im thinking: @yewstack/core-maintainers need to revisit https://github.com/yewstack/js-framework-benchmark and merge pr's there, our current CI does not even use our repo, it uses @bakape s.
Then it also needs to be updated for<EMAIL_ADDRESS>because currently build fails because its outdated.
As per this PR i think it can be merged.

@yewstack/yew now has full access to the js-framework-benchmark repository :tada:


Add full time pressure

okey Mones good job. Thank you..

@Mones-Hamd I merged master into this branch, now the styling of the timer is a bit odd. Could you pull the changes, and try to fix the styling so that it fits better with the other UI elements?

Hi Mones, thanks for your work! We're getting there :-) It's not how I imagined yet though.
As a start you can merge master into your branch, it will have a lot of conflicts. If it is too hard to solve you might want to consider to copy your code changes into a new branch which is based on the latest master branch.
In the master branch, in the storage module, you will find addStartTimeToStorage and getTimerFromStorage. @iakancay made these I think. When starting the quiz (in master) the start time is stored in the localStorage. When showing the time in the top of the page on the question pages you can use this value to calculate how much time has passed. Using:
const totalTime = 5 * 60 * 1000; // 5 minutes
const timePassed = new Date().getTime() - getTimerFromStorage(); // how much time passed since we started the quiz
const timeLeft = totalTime - timePassed; // how much time there is left until the timer runs out

Using timeLeft you can then update the UI, initially when the progress element is rendered, but also later using a setInterval (like you currently do in creatTimeElement). Ideally you use clearInterval in the nextQuestion function to remove the interval, and you just start a new interval when the next question page is rendered (so that we don't have random setIntervals lingering around).


Correction for raw affiliation PHIM Plant Health Institute Montpellier, University of Montpellier, INRAE, CIRAD, Institut Agro, IRD, CEDEX 5, 34398 Montpellier, France

Correction needed for raw affiliation PHIM Plant Health Institute Montpellier, University of Montpellier, INRAE, CIRAD, Institut Agro, IRD, CEDEX 5, 34398 Montpellier, France
raw_affiliation_name: PHIM Plant Health Institute Montpellier, University of Montpellier, INRAE, CIRAD, Institut Agro, IRD, CEDEX 5, 34398 Montpellier, France
new_rors: 05kpkpg04;051escj72;03fkrcm40;03rnk6m14;003vg9w96;05q3vnk25;05y5s3h28
previous_rors: 05kpkpg04;051escj72;03fkrcm40;03rnk6m14;003vg9w96;05q3vnk25
works_examples: W3126514720
contact: 3562441a888e650938d679ee0ccf358b:5c835f1b60389a7169a8eb285206c0340767 @ inrae.fr

This issue was accepted and ingested by the OpenAlex team on 2024-10-09. The new affiliations should be visible within the next 7 days.


reduce memory & CPU requirement

[x] allows selecting a free-tier GH Codespace machine

64 -> 32GB disk
4 -> 2 CPU cores

[x] tidy up devcontainer spec

add 8888 port forward
drop ASTRA (GPU) dependency & implicit CUDA Toolkit (saves ~800MB and ~5min postCreate)
extensions -> customizations.vscode.extensions
drop separate postCreateCommand.sh

[x] test before merging

btw @KrisThielemans I'd recommend adding some basic instructions on selecting /opt/conda/bin/python for notebook kernels :)

We have this
https://github.com/SyneRBI/SIRF-Exercises/blob/master/DocForParticipants.md?plain=1#L81
but it can be improved...

But the readme file (not docForParticipants) is opened by default on codeapace launch.

I've removed the nice and shiny button in the main README, such that changes are higher they read the doc!


Little cleanup work

Changed Chunk default-constructor exitcode according to the wiki

Added wall.cpp [got an error due to not initialized virtual functions in thing.hpp]

Not ready for merging (Error above)


[Collab Ticket] NPC Giving Items

Description
Task:  Functionality of NPC giving Items
Feature: NPC + Dialogue
Creating a functionality where the NPCs are able to give items to the player. It consists of different NPCs giving a different kinds of items to the player after their interaction with them. The items could be weapons, materials, buffs, armour, and etc. The item will then be shown in the player's inventory where they can use the items on their own will.
Dependencies

[x] Crafting Materials

Milestones
List of steps that need to be completed for this task.

[x] Step 1 (Aug. 19)
[x] Step 2 (Aug. 20)
[x] Step 3 (Aug. 23)
[x] Step 4 (Aug. 23)

Completion Deadline: Aug. 23
Documentation
Dialogue + NPC
Member

Hazeem bin Suffian @uq-haze
Pengxu Chen @viachen1

@jgapusan yo is it cool if i can use your materials for the NPCs to give the player?

no

@uq-haze yeye wat materials did you have in mind?

no

wow

actually you convinced me, yes

bruhhh

actually what materials do you think would be good for the NPCs to give the player @jgapusan @rkoll55

toilet paper + golden poop, we should add a backstory too

yea seems like a good idea

case closed

wait back up @rkoll55 @uq-haze we're just gonna give them the strongest materials just like that --- i think giving some weaker materials from the start so at least they have a starting weapon would be good

@rkoll55 @jgapusan

nah i think what @rkoll55 means is we lock the god tier materials to npcs but only after the kill a boss

@uq-haze

seems like a good idea... so what materials would be needed to craft a pipe

do you have any level 2 specific npcs ? we can have them give pooop and toilet paper to reward player for getting to level 2

@uq-haze

one plastic and one rubber ! either make it so you can get both from one npc or maybe one each from two npc's idmmmm

yea i have an npc which can probably give the player both materials

do you have any level 2 specific npcs ? we can have them give pooop and toilet paper to reward player for getting to level 2

currently we have 2 npcs in level 2 and 4 in level 1. maybe i can get one npc from level 1 to give the poop and an npc in level 2 to give the toilet paper

currently we have 2 npcs in level 2 and 4 in level 1. maybe i can get one npc from level 1 to give the poop and an npc in level 2 to give the toilet paper

sounds good ! technically the poop does nothing unless it has the toilet paper, so that'd be good and would techincally lock those weapons until level 2 - would be pretty cool game design/progression to see you're missing a material that you can only attain in level 2

awesome! yea it kinda gives the NPCs an important role in the game since the player can only gain access of those certain materials from the npcs


Run Template as different user

Hi @bguidinger ,
thank you for this connector, it's very useful.
I have a enhanchment to propose, I'd like to run my Excel Template as a different user, this way I can use the same view (filtered by "Owned by current user") but having a different context of data for each user that i extract from a List Record action.
Is this possibile?
Best regards,
Andrea

I don't think this is possible the way you're looking to use it.  The only way it could work like that -- and this would required a code change first -- is if each user configured their own Flow with their own connection (and hence the Flow would run as their user when connected to CRM to run the report).

Hi @bguidinger,
I took your code and made a few changes in the plugin "Render" to get it done, in particular:

in the switch of OnExecute
        case "documenttemplate":
              var templateColumns = new ColumnSet("documenttype", "associatedentitytypecode");
              var template = service.Retrieve(target.LogicalName, target.Id, templateColumns);
              switch (template.GetAttributeValue<OptionSetValue>("documenttype")?.Value)
              {
                  case 1:
                      var savedView = Guid.Parse(context.InputParameterOrDefault<string>("ViewId"));
                      var callerId = context.InputParameterOrDefault<string>("CallerId");
                      output = renderer.RenderExcelTemplate(template.Id, savedView, callerId);
                      break;
                  case 2:
                      var typeCode = template.GetAttributeValue<string>("associatedentitytypecode");
                      var metadata = service.GetEntityMetadata(typeCode);
                      var recordId = Guid.Parse(context.InputParameterOrDefault<string>("RecordId"));
                      output = renderer.RenderWordTemplate(template.Id, recordId, metadata.ObjectTypeCode ?? 0);
                      break;
                  default:
                      throw new Exception("Invalid document template type.");
              }
              break;

I've added a parameter and modified the JSON to support it:

var callerId = context.InputParameterOrDefault("CallerId");

Then edited the function RenderExcelTemplate as follows:

public string RenderExcelTemplate(Guid templateId, Guid viewId, string callerId)
        {
            var url = "/api/data/v9.0/RenderTemplateFromView";
            var data = "{ \"Template\": {<EMAIL_ADDRESS>\"Microsoft.Dynamics.CRM.documenttemplate\", \"documenttemplateid\": \"" + templateId.ToString("D") + "\"  }, \"View\": {<EMAIL_ADDRESS>\"Microsoft.Dynamics.CRM.savedquery\", \"savedqueryid\": \"" + viewId.ToString("D") + "\"  } }";

            var request = GetRequest("POST", url, data, true, callerId);
            try
            {
                using (var response = request.GetResponse())
                using (var stream = response.GetResponseStream())
                using (var reader = new StreamReader(stream))
                {
                    var body = reader.ReadToEnd().Parse();
                    return body["ExcelFile"];
                }
            }
            catch (WebException ex)
            {
                using (var stream = ex.Response.GetResponseStream())
                using (var reader = new StreamReader(stream))
                {
                    _logger.Write(reader.ReadToEnd());
                    throw;
                }
            }
        }

Finally, the GetRequest this way:

private HttpWebRequest GetRequest(string method, string url, string data = null, bool isJson = false, string callerId = null)
        {
            var request = WebRequest.CreateHttp($"{_token.Resource}{url}");
            request.Method = method;
            request.CookieContainer = _cookies;
            if (_token != null)
            {
                request.Headers.Add("Authorization", $"Bearer {_token.AccessToken}");
            }
            if (callerId != null)
            {
                request.Headers.Add("MSCRMCallerID", $"{callerId}");
            }
            request.AutomaticDecompression = DecompressionMethods.GZip;

            _logger.Write($"{request.Method} {request.RequestUri.ToString()}");
            if (string.IsNullOrEmpty(data) == false)
            {
                if (isJson)
                {
                    var body = Encoding.ASCII.GetBytes(data);

                    request.ContentType = "application/json";
                    request.ContentLength = body.Length;

                    using (var stream = request.GetRequestStream())
                    {
                        stream.Write(body, 0, body.Length);
                    }
                }
                else
                {
                    var body = Encoding.ASCII.GetBytes(data);

                    request.ContentType = "application/x-www-form-urlencoded";
                    request.ContentLength = body.Length;

                    using (var stream = request.GetRequestStream())
                    {
                        stream.Write(body, 0, body.Length);
                    }
                }

                //_logger.Write(data);
            }

            return request;
        }

With those changes I'm able to impersonate a CRM User by his GUID in Flow or in CRM, setting the Flow to run as ADMIN.
Hope it helps, best regards,
Andrea

Ah...yes, this would work for Excel and Word templates.  Good catch!  However, if I remember right, I tried this with the SSRS reports, but that service does not respect the MSCRMCallerID header.
Would you mind submitting a PR for this?

Done, I've done 3 PR because I'm not so good with GitHub but I've included all the changes I've made!
Andrea

@andreaPorini pls can you tell me the steps on how you installed in dynamics without installing the solution as a whole, i want to debug the code but needs these steps first.
Thanks.

Hi @onyebuchiboss,
to debug the code you're obliged to install the solution, if you download the code from GitHub you can use the Console Application that @bguidinger has made for us :)
All the logic is in the plugins so the CA is all you need!
Andrea


Word "import" in comments confuses resolve-tspaths

This is similar to #311.
Steps to Reproduce
To reproduce, build this commit of gristlabs/grist-electron. Make sure to use Node.js version 18.
git clone https://github.com/gristlabs/grist-electron
cd grist-electron
git checkout 6673928
git submodule init
git submodule update
yarn install
yarn run setup
yarn build
yarn run electron:preview

The last command should give the following error:
Error: Cannot find module 'app/common/gutil'

This is because resolve-tspaths failed to expand the import properly.
More Info
To take a closer look, go to core/_build/ext/app/electron/main.js. This file is compiled from ext/app/electron/main.ts. On line 38, there is a word "import" in the comments. All imports after that line will not be correctly expanded by resolve-tspaths. The problem goes away if the word "import" is removed.
The minimal commands to see the problem are tsc --build tsconfig-ext.json, then resolve-tspaths in the core directory. You need to make core/ext point to ext in the grist-electron root before doing this.

Hi @SleepyLeslie, thanks for your issue and providing a reproducible example.
Hopefully this is now resolved in the latest release - v0.8.19!


Logout button not working

My actions before raising this issue

[ X ] Read/searched the docs
[ X ] Searched past issues

Expected Behaviour
When clicking on the Logout but, get the user session closed.
Current Behaviour
When clicking on the Logout but, nothing is happening.
Possible Solution
Steps to Reproduce (for bugs)
Follow the default installation process.

No

Operating System and version (e.g. Linux, Windows, MacOS):
Ubuntu 18.04.04

Other diagnostic information / logs:
No errors in the cvat logs
Server version: 1.1
Core version: 3.1.0
Canvas version: 1.2.1
UI version: 1.4.2

i have same issue on windows 10, does your issue resolved?

Check this : https://github.com/opencv/cvat/pull/1812


Doesn't fire onChange event in IE11

Hi, Could you check please with version 2.4.2 onChange event doesn't works in IE11 🐛

also you could please add  polyfill for find method like import 'core-js/fn/array/find'
because IE11 doesn't support find method

It will be checked this week. Thanks for your report @slesarevns


UVI Request

--- UVI JSON ---
{
  "vendor_name": "Linux",
  "product_name": "Kernel",
  "product_version": "versions from v4.9 to before v4.19.199",
  "vulnerability_type": "unspecified",
  "affected_component": "unspecified",
  "attack_vector": "unspecified",
  "impact": "unspecified",
  "credit": "",
  "references": [
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=54e19bc74f3380d414681762ceed9f7245bc6a6e",
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=11e9d163d631198bb3eb41a677a61b499516c0f7"
  ],
  "extended_references": [
    {
      "type": "commit",
      "value": "54e19bc74f3380d414681762ceed9f7245bc6a6e",
      "note": "introduced"
    },
    {
      "type": "commit",
      "value": "11e9d163d631198bb3eb41a677a61b499516c0f7",
      "note": "fixed"
    }
  ],
  "reporter": "joshbressers",
  "reporter_id": 1692786,
  "notes": "",
  "description": "net: qcom/emac: fix UAF in emac_remove\n\nThis is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven.\nThis ID is fixed in Linux Kernel version v4.19.199 by commit 11e9d163d631198bb3eb41a677a61b499516c0f7, it was introduced in version v4.9 by commit 54e19bc74f3380d414681762ceed9f7245bc6a6e. For more details please see the references link."
}
--- UVI JSON ---

This issue has been assigned UVI-2021-1001377


Design stark-cairo-nodes logo proposal 1

📄 Description
This is a Design issue aimed at creating a logo for our project. Currently, we lack an official logo, so we want to design one that reflects the essence of the project.
Points to Consider When Designing the Logo:

The project focuses on learning and teaching.
The primary programming language used is Cairo.
The smart contracts are developed for Starknet.
The design should be minimalist and modern.
Deliverables should include the logo in PNG format with variations for different use cases:

Icon.
Full logo.
Black version.
White version.
Color palette version.

✅ Best Design = Higher Reward! 💰
We’ve created three design issues to gather multiple logo proposals. This will be an exciting "mini-hackathon" within ODHack! 🎨✨
Prizes:

🥇 First Place: $180 for the best logo design proposal.
🥈 Second Place: $115
🥉 Third Place: $75

📤 Results
Once your proposal is ready, share it privately via Telegram with the main maintainer, danielcdz. Keeping proposals confidential ensures fairness and creativity!
📜 Additional Notes
⚠ Do not apply until the ODHack begins.
⚠ Read our guidelines before applying.

Hello! I’m Micaela Descotte, and I have over 4 years of experience in UX/UI design. I would love to contribute to the design of the Stark-Cairo-Nodes logo. You can visit my cover letter at https://drive.google.com/file/d/1YNEIfJf9ecuznVKvI-EKRX3sOV-C2cug/view?usp=sharing

@micadl you win this mini-design-hackathon, 🥇 for you!


No obvious way to use a glob or regexp pattern in exclude

With many Django apps in one project,  one usually has a lot of auto-generated DB migrations, each under its own app directory. It looks like so:
apps/foo/migrations/...
apps/bar/migrations/...

It would be great to be able to match them in one exclude pattern, like apps/*/migrations, or, **/migrations/,  or even just /migrations/.
None of these appears to work right now; the only to list every app explicitly.

Good feedback, will add!


"Small Icicle" Issue

i feel like the small icicle should be improved, maybe as a separate entity from the current one to prevent compatibility problems.
the way it works is unchanged from when the only icicles that existed were Super Mario Bros. Special's.
as a solution, maybe it could be worked off of the mario maker/big icicle?
with the way it is right now, the options for whether or not it can fall, as well as its gravity don't make much sense, especially when considering that there isn't even an option for it being able to stay still, despite graphics for it existing. i feel like these should be "brought over" from the other icicle, too.

They are meant to function differently, they'd lack much use if they behaved the same.
But I do understand the graphic change doesn't exactly convey that.
If I were to improve them in any way I'd make the gravity option a slider. And the extra graphic is only there because it uses the same sprite format as goombas, but I could add a 'not fall' option too

nice ideas.. id also like for them to throw 2 small icicle pieces as well so they dont simply disappear..


no voice using our matrix server

Hello this is great, a friend and myself logged in using our server matrix.hispagatos.org using the thirdroom webclient https://thirdroom.io/  instead of the test one for thirdroom, there were no assets so I uploaded a low poly one I had from mozilla hubs, it work, good so we enter the room but even do we are unmuted we can't hear or see each other.. Im guessing the see is because we need to load .glb for the characters, but the webrtc part not sure why is not working, sorry to ask here but I will like alpha/beta test this using our server for many reasons, is a dendrite server I been running 2 years plus, so I know it well, and second because I like to help cool proyects kind of such we started to use dendrite when it was alpha, and have helped all the way until now. Cheers.

Nevermind got it working with a relay turn server for now...  thanks!


Convert constant '\n'.join() expressions

We still have a few join expressions for constant multi-line strings. I propose we change them thus:
embed.description = '\n'.join((
    'Lorem ipsum dolor sit amet, consectetur adipiscing elit,'
    'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'
))

to
embed.description = (
    'Lorem ipsum dolor sit amet, consectetur adipiscing elit,\n'
    'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'
)

omg just use https://github.com/ambv/black

Closing as #106 will change the format of the code using the tool mentioned above


Strange error message when using a node of the wrong type with a C# script

Godot version:
14b230f
OS/device including version:
Windows 10
Issue description:
When a C# script is put on a node of the wrong type (let's say the C# script inherits AnimatedSprite but the node is just a Node) and the project is run, instead of getting an appropriate error you end up with this in the debugger (nothing appears in the right panel):

and the following error in the command prompt:
ERROR: No loader found for resource: res://
At: core\io\resource_loader.cpp:186

While using the wrong type of node with a script should probably be an error, there should probably be a specific error message for it. As it is right now, it looks like this specific case isn't handled for C#.
If I try to replicate the same situation using gdscript, I end up with an error that makes much more sense:
Script inherits from native type 'AnimatedSprite', so it can't be instanced in object of type: 'Node'

It looks like this case just isn't being handled for C# (or it is being handled incorrectly).
Minimal reproduction project:
TestProject.zip

Seems that's the only place we're calling the ScriptDebugger from CSharpLanguage.
It's looping indefinitely in the debug method and the proper error can't be shown.

This was my problem, had a //nameme : notANode//script inside a 'node', changed ": notANode" -> ": node" fixed the error.

@redxdev Can you (or anyone else) still reproduce this bug in Godot 3.2.1 or 3.2.2beta4?

@Calinou looks like this has indeed been fixed, closing.


Logging message with Params shows nothing when using lookup_users

I noticed that when I call lookup_users, the params aren't in my log like other functions.
Code:
def get_info(master_acct, tweepy_conn, friends_list):     """     Takes list of ids and looks up info for each one, writing results to db as it goes     :param master_acct:     :param tweepy_conn:     :param friends_list:     :return:     """     # Break friend list into chunks the twitter API can work with     chunked_list = utils.chunk(friends_list, 100)     processed_counter = 1     logging.info("Processing {0} chunks.".format(len(chunked_list)))     user_data_list = []     chunk_counter = 0     #look up users in batches     while chunk_counter < len(chunked_list):         user_list = []         chunk = chunked_list[chunk_counter]         # Get user daata for sqlite         logging.info("Processing Chunk {0} of {1}".format(int(chunk_counter) + 1, len(chunked_list)))         for result in tweepy_conn.lookup_users(user_ids=chunk):             logging.info("Processing #{0} of {1}: {2}".format(processed_counter, len(friends_list), result.screen_name))             #do cool shit             user_data_list.append(user_data_dict)             logging.info("Added #{0} of {1}: {2}".format(processed_counter, len(friends_list), result))         chunk_counter += 1     return user_data_list
Log:
[22:06:18] {C:\VM_Gateway\demo_code\app\bin\tw_func.py:194} INFO - Processing 37 chunks.
[22:06:18] {C:\VM_Gateway\demo_code\app\bin\tw_func.py:202} INFO - Processing Chunk 1 of 37
[22:06:18] {C:\Python27\lib\site-packages\tweepy\binder.py:107} INFO - PARAMS: {}
Using usertimeline:
[22:06:19] {C:\Python27\lib\site-packages\tweepy\binder.py:107} INFO - PARAMS: {'count': '200', 'include_retweets': 'False', 'screen_name': 'INF1N1TEMUSIC'}
Am I doing something wrong?

This is a side effect of how the actual bound method for API.lookup_users is called indirectly, without directly passing the parameters:
https://github.com/tweepy/tweepy/blob/1a2fa720f16abeb1035b25d46ef8b904a691e1b0/tweepy/api.py#L326-L352


Adding self-hosted runners section

This looks good but needs a few changes:

Please title-case, as described in CONTRIBUTING.md
The description is not linked (anything beyond the dash), as in line 112

Thanks!


Update substring filter to match spec

This PR closes #4

Thanks for your feedback! I have added and tested the deprecation messages.


Content pack vs apps

Dear Power BI Team,
You plan to replace content packs by apps, which is totally understandable to keep only one way of sharing multiple contents. But if you do that, could you please explain me how and when you will add bellow missing functionalities in the apps:

in the app it's not possible to use the dataset available in the same way than in the Content Packs. With the content pack you can reuse the dataset to create your own report (via Power BI Desktop and Service). The only feature available in the apps regarding dataset is the "Analyze in Excel. This is a non sense, why you can access through Excel and not trough Power BI Desktop ?
in the app I cannot pin a visual to a dashboard. Despite what I've read in a in the "Spring '18 Release Overview" page 228 (https://docs.microsoft.com/en-us/business-applications-release-notes/april18/release-overview). If I try that I cannot because the pin is greyed-out with the message "read-only content can't be pinned". Which will be the case every time you share an element, because a share is "read-only".

Could someone from the Power BI team comment on this ?
Thanks in advance,
Daniel

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 72ff3e88-8793-8e2b-bdb2-0e3d09372b93
Version Independent ID: 0e1245cb-d7af-c73c-39c4-39f5665ae51a
Content: Create and publish apps with dashboards and reports in Power BI - Power BI
Content Source: powerbi-docs/service-create-distribute-apps.md
Service: powerbi
GitHub Login: @maggiesMSFT
Microsoft Alias: maggies

Hi, @danievalle -- thanks for your question! When we replace content packs with apps, apps will be changing, too. Stay tuned!


LINK : fatal error LNK1181: cannot open input file 'cuda_tromp_75.lib'

Nvm

I have the same issue, tell me what's wrong and how to solve it please

The solution is to go to: Properties : ConfigurationProperties : Linker : Input : Additional Dependencies and remove the line that says: cuda_tromp_75.lib
If you get the same problem for any of the others then you can do the following:
cpu_tromp_SSE2.lib
C:\Users\XXXXXXXXXXXXX\Documents\nheqminer-master\nheqminer\x64\Debug\cpu_tromp_SSE2.lib
of course changing the location to the location of the file on your pc.


DatePicker not working with ja-JP culture

[Enter feedback here]
DatePicker not working with ja-JP culture:
Following code return digit instead of digit with text:
string day=date.Day.ToString();
string year=date.Year.ToString();
Current result:
day =14
year=2021
Expected result:
day =14日
year=2021年
Verified on Device 📱 8
Document details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 465e759c-e3d6-d9d6-5a45-e15e8b9156ef
Version Independent ID: bb77c744-4cb8-49b9-7f00-b42664e5cb2f
Content: Automating Xamarin.Forms Date & Time Pickers with Xamarin.UITest - Visual Studio App Center
Content Source: docs/test-cloud/frameworks/uitest/features/date-time-pickers.md
Service: vs-appcenter
Sub-service: app-center-test
GitHub Login: @lucen-ms
Microsoft Alias: lucen

Here two issue with sample code:
first:
Following code return digit instead of digit with text:
string day=date.Day.ToString();
string year=date.Year.ToString();
Second:
we need to swipe with following hake "inComponent' for day 1->2 and year  2->1
//Hake for ja-JP culture
year = date.ToString("Y").Replace(month, string.Empty);
day = date.ToString("M").Replace(month, string.Empty);
@lucen-ms please help to provide a robust solution which will work with all supported cultures.

Closing as stale.


Revert "acl: Add ptest"

This reverts commit 39675e4403061d4600a3bebb3e9e77635a5590f8.
The above commit has been merged in meta-debian.

Thanks !


Loosen warden requirement and some cosmetic changes

I've done this mainly so that I can use this with latest devise gem.
Other changes include:

upgrade rspec from 1 to 2.8
add travis support (see http://travis-ci.org/#!/pitr/warden-github)

ruby-head is failing because of ruby-debug gem (can we remove it completely?)
no idea why jruby1.9 is failing

move ruby-debug back to Gemfile, so that ruby1.9 would work

0.3.1 is published to rubygems.org.

awesome, thanks!


Update OoT and MM's cutscene names (Draft)

This also uses the enums for the types where it fits, currently it's hardcoded but I will use the config files later. Since this is the only thing left to do I was thinking why not opening the PR to get some feedback on things to improve. Also I tried to be accurate to both decomps to keep things understandable

I removed the hardcoded enums for OoT and instead I'm using a config file, it's an XML file since it makes things easier to manage imo, here's how the file looks like, I'll port these changes to MM later

I think this is ready for review now, I did everything I had in mind for cutscenes I believe


Bulk admin operations for function state

Is your feature request related to a problem? Please describe.
At the moment you can only querystate if you know in advance the name of the key you're looking for.
So I would like to be able to:

List / iterate over all stored state belonging to a function
Delete all stored state belonging to a function

It is apparently possible via bk interfaces.
Describe the solution you'd like
Add commands to pulsar-admin / REST API

list all keys/values (which could be millions of keys; would need some sort of paging mechanism in the API)
I noticed[^1] that GET /admin/v3/functions/public/default/<functionname>/state (without a key) currently returns a 404 - maybe it could be used to return the first N key/value pairs

Delete all state for a given function
Note: whilst the Pulsar functions context object has deleteState, there is currently no way from the CLI to delete even a single key, so that ought to be rectified too.

Describe alternatives you've considered
Document the bk way of doing this, with examples.

[^1] Found using pulsarctl:
./pulsarctl functions querystate --name womble
error: Unknown pulsar error

and tcpdump:
GET /admin/v3/functions/public/default/womble/state HTTP/1.1
Host: localhost:8080
User-Agent: Pulsarctl-Go-v0.1.0
Accept: application/json
Content-Type: application/json
Accept-Encoding: gzip

HTTP/1.1 404 Not Found
Date: Sat, 02 Nov 2019 08:27:18 GMT
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 0
Server: Jetty(9.4.12.v20180830)

Closed as stale. Please create a new issue if it's still relevant to the maintained versions.


Ensure InputStreamSerializer closes its streams

Alternative version of #978 , incorporating the feedback in that PR.
This makes the InputStreamSerializer responsible for closing the streams it is passed.  Also includes a couple of simple tests.

:+1:
Thanks for contributing!

Thanks for merging! I'm excited to see this roll out!


Changes server to exit after depart

Previously, when we received a self depart message, we kept running even after executing the depart logic. Threads now return 0; once they finish the self_depart_handler routine.

I think we need to "join" all threads after line 648 of server.cpp to gracefully shut down the program. Otherwise I remember seeing some segfaults happening.

Good call. I have a few more changes to make to this first anyway. Forgot to mention that it was still a WIP.

@cw75, made the change to call join after returning from the run loop.


Possibility to add babel plugins via registry

This allows Ember-CLI addons to add custom babel transformations to the
ember-cli-babel pipeline by registering a plugin using the
babel-plugin type:
// my-addon/index.js
module.exports = {
  name: 'my-addon-using-babel-transformer',

  setupPreprocessorRegistry: function(type, registry) {
    var BabelTransformerPlugin = require('./babel-transformer-plugin');

    registry.add('babel-plugin', {
      name: 'my-addon-using-babel-transformer',
      plugin: BabelTransformerPlugin
    });
  }
}

// my-addon/babel-transformer-plugin.js
module.exports = function(babel) {
  var t = babel.types;
  return new babel.Transformer('troll-transformer', {
    Literal: function(node) {
      if (node.value === true) {
        return t.literal(false);
      } else if (node.value === false) {
        return t.literal(true);
      }
    }
  });
}

I will add a section to the README if this is accepted.
This addresses pangratz/ember-cli-htmlbars-inline-precompile#7

mind adding a test of some kind?

@pangratz - This looks good.

mind adding a test of some kind?

done

Do NOT merge yet, I have to check if the plugin lookup works as expected ...

Ok, so from my side this is good to go. I tested this within another addon and adding babel-plugins to the transformation pipeline works as expected :raised_hands:

WOOT

@stefanpenner - Any additional feedback / tweaks?

I'll take a thorough look today.

@stefanpenner - Any concerns after your review?

have not had time to review.

Since babel is moving so fast and features are added on an hourly basis, should there be some kind of check if the currently installed babel version satisfies the needs of the specific plugin? Something like:
registry.add('babel-plugin', {
  name: 'my-addon-using-babel-transformer',
  plugin: BabelTransformerPlugin,
  babelVersion: '5.2.10'
});

Currently all registered plugins of babel-plugin type are added to the pipeline. This means that also the answer-to-the-universe plugin of this PR is added (I will check if this is true in a sample app later). If there is a string like THE-answer in the app, it will be replaced by 42...

Having the allowed babel version range be required sounds nice.  We could then use the semver package to ensure we are in compliance of that range (and if not warn + skip).
Though, I think that could be done in a follow-up PR if @stefanpenner has had a chance to review this and is OK with it landing...

Having the allowed babel version range be required sounds nice. We could then use the semver package to ensure we are in compliance of that range (and if not warn + skip).

:+1:

@stefanpenner - Ping

I spoke with @stefanpenner about this at our last face to face meeting.  We need an example app that has addons with differing versions of ember-cli-babel and using different plugins to make sure everything is handled correctly. Double checking that things are not shared is the main blocker for this PR.
@pangratz - Do you think that you might be able to put together a demo app like that?

I'm on it

@rwjblue @stefanpenner I created a sample app at https://github.com/pangratz/ember-cli-babel-plugins-sample, which uses the ember-cli-babel version of this PR. Two addons are installed:

babel-plugin-demo1 which also uses the ember-cli-babel version of this PR
babel-plugin-demo2 which uses a different version of ember-cli-babel of this PR (an empty commit has been added)

The sample app has a test case, which can only succeed when both plugins work (the first plugin replaces babel-plugin-demo1 with demo1; and the second replaces babel-plugin-demo2 with demo2).
As the Travis run shows, everything works as expected...

@pangratz this is a great start, thank you.
The test case should at the very least, include another level of addons.
app -> my-cool-addon -> some-babel-plugin
some-babel-plugin should affect the addon/ directory of my-cool-addon but not the host application.

my-cool-addon may also choose to op into different babel options.

Do you have an idea how to check that options enabled in my-cool-addon are not available/enabled in the host application?

Do you have an idea how to check that options enabled in my-cool-addon are not available/enabled in the host application?

one idea, is to disable something like arrow functions in the parent, but enable them in one of the children.

:flushed: I think I need help on how to set/overwrite the babel options from inside an addon. Where is the right place for that?

I think I need help on how to set/overwrite the ember-cli-babel options from inside an addon. Where is the right place for that?

I am pressed for time today, if you can put together an app that has the 3 layers described. (even if the options stuff doesn't work yet) I will attempt to dedicate some hours this weekend to it :)

Ok, I gave it a try and removed the babel-plugin-demo2 dependency from the sample app and created a babel-demo-addon which depends on the babel-plugin-demo2 addon.
The babel-demo-addon provides a {{my-component}}, which has a leProperty which is replaced via the babel-plugin-demo2: https://github.com/pangratz/babel-demo-addon/commit/b6cb25a5476778b13cd9ac7a8f2ab14a4f51c2fc
The sample app uses babel-demo-addon to check if the babel-plugin-demo2 is correctly setup for within this addon, but not for the sample app itself, which it seems that currently doesn't work as expected (failing travis run for https://github.com/pangratz/ember-cli-babel-plugins-sample/commit/ae80ab7ae040205b72ae3e3c19557723e94fdfef).

I hope I understood you correctly regarding setup up the hierarchy and gave you both access to the relevant repos so you can check around if you have time ...

@pangratz I will confirm, but I believe this is the scenario I was concerned we missed.

there is a path, where we merge this in early. ANd explicity disallow the addon case, or hard-wire some of the common plugins we want.

Let's just have a separate PR explicitly add the inline precompiler for now. I want to unblock the component integration test situation....

I want to unblock the component integration test situation....

:+1:

Let's just have a separate PR explicitly add the inline precompiler for now

Will create such a PR tomorrow ...

Instead of creating a new PR I've updated this one by only adding whitelisted babel-plugins to the transformation pipeline (currently only ember-cli-htmlbars-inline-precompile)...

@rwjblue r?

@rwjblue did you have time to think about the proposed interim solution in this PR?

I haven't followed the latest developments in ember-cli, but have there been any changes regarding the addon-dependency-situation?

Very interested by this PR... what's the status?

same question as above.

What's the status? I would like to integrate babel-plugin-typecheck to my Ember apps and allowing for custom babel plugins is the only option I'm aware of.

+1
very interested in this

I'm also interested in the status of this pull request :)

An update on this would be great! 😄

I would really need an update on this issue. Because if it is not going to happen in the near future I'll have to rearrange my work packages. It is no problem but I just need to know. Thanks :)

@mguida22 @lucasm-iRonin @Cryrivers @ffaubry @Iftahh what I ended up doing is the following: I created an in-repo-addon and applied my babel-transformations after the ember-cli-babel plugin and before ember-cli-uglify. For me this works fine, maybe this is an solution for you as well

Going to close this for now...


Date Picker Calendar/Dialog Size Bug

As far as I've been fiddling around to this point, I haven't found a way to adjust the size of the date picker dialogue as it appears on the screen. As soon as I change the size of the hint/textfield font, the font inside the calendar text blows up to the same size, but it does not adjust the length and width (scale) of its own element and everything becomes squished and unclickable as a result. Is there a temporary solution to this in the meantime, and can this be implemented for an upcoming release as a style prop? Thank you.

+1

NAVER - http://www.naver.com/
<EMAIL_ADDRESS>님께 보내신 메일 <Re: [material-ui] Date Picker Calendar/Dialog Size Bug (#2231)> 이 다음과 같은 이유로 전송 실패했습니다.

받는 사람이 회원님의 메일을 수신차단 하였습니다.

@yoavgurevich : I cannot see this issue any more in the docs. I also tried increasing the font size of the hintText and it did not affect the calendar in any way. I am closing the issue for now. If you feel , its not been addressed completely just leave a comment below.
![screen shot 2016-04-19 at 12 49 43 pm]
(https://cloud.githubusercontent.com/assets/15271922/14649543/34840ffe-062d-11e6-8024-bd6b5d408ee0.png)

would be helpful to add tags based on the release version

Its v0.14.4 and above.

well the 0.15 have other directory structure. And use different versions of react.
I saw some bugs related to key in 0.15.beta.
I guess I can just mention that on the issue description

@vasco3 : I would suggest that you post a separate issue based on your observations and also mention the version of Material-UI,React and the browser that you are using.
If you have questions regarding posting and issue, please refer to this: https://github.com/tintin1343/material-ui/blob/master/CONTRIBUTING.md
MUI-0.14.4 and above is based on react 0.14 and above. The above mentioned issue looks to be resolved in them.

got it thanks


Tabulator sometimes doesn't work with Fixed state

Kinda a minor issue with Tabulator, the fixed state not working in some table or instance.

result using listSQL


fix: fix based on the latest pandas dataframe syntax

works on #59
Either this patch will fix the issue with the latest pandas or you can specify the exact pandas version in place.

Thanks!


Adding cleanup() method to RiakCluster & RiakClient for container environments

Fixes #660 (CLIENTS-962), abstracts away the calls needed to cleanup Netty's thread local variables, so we don't leak classloaders into permgen memory upon container reload.
cc/ @monday0rsunday

:shipit: once you nuke that newline :-)


Android Interactive Notifications

Hi! Thank you for this awesome project. We're currently using the iOS version and it works really great so far. I was just wondering if you'll also be adding Interactive Notifications feature for Android, and if so what an ETA might be? Can also help you guys beta test if needed.

Hi @mistyleaf, you can check out https://github.com/wix/react-native-notifications/issues/4 along with the android branch as it seems that thanks to @amitdwix it is making great progress.

Hi @mistyleaf and thanks for the warm words!  We're working on more advanced features for android, and you're more than welcome to help us and submit PRs.

Hi all, thanks for the positive feedback! :-)
Our Android code is in fact already highly extensible! While lacking description in our README, it does enable users to apply any feature specified by the Android notification's native API over the incoming notifications. I'll update the README soon to explain how this can be easily done.

Great! One more thing - when could we expect local notifications as this is crucial for my use case. Unfortunately I am not very well versed in Android, otherwise I would be already submitting a PR.

I'm pretty certain we'll get it sometime next week.

@dininski Please check out this new wiki which explains how to customize the notifications. There's no JS API to support customizations (e.g. interactive notifications) but natively, everything is supported.

hi @d4vidi, I have been closely following this project as I plan to use it once you guys have support for local notifications for Android. One of the features I currently use in my app is notification actions. I have gone through the wiki and understand how could one achieve customizations within the Android notifications and really like the API as it allows a user to support all kind of notifications related workflows that Android supports. My question is that would I be able to send events to the JS side when a user clicks on any actions? I am not sure if I will be able to do that right now. I guess that may be one of the ways the user would want to handle the action from the user by sending an event to the JS side and the JS side can take appropriate actions for the user action.

@varungupta85 this is something I am also actively looking forward to. From what I have seen in RN there is currently no simple way to have a notification for music control for an android app, other than writing a lot of Java code to implement the notification as well as the bridge yourself. This seems pretty crippled in terms of functionality for the android version of RN. I have no doubt that the guys will have something that can solve this! Once again thanks @d4vidi for your awesome work so far!

So currently local notification are supported on Android (in 1.1.4). But unlike on iOS, the API doesn't attempt at allowing for customizations inherently. Instead, it is simply an endpoint that forwards your data object (e.g. a title and message) onto the same process as of receiving a remote push notification.
Adding customization is therefore up to the user - the way you override the PushNotification (as explained by the wiki) will determine which notification(s) will be posted.
While this approach is super flexible, I'm currently inspecting ways for providing convenience flows for posting action buttons (and perhaps even the Android 7+ reply).

How do I implement a JS callback to detect if a user selected a notification action (similar to iOS)?

What's the current progress for interactive-notifications for Android? I am looking for a push notification with action button.
As per @d4vidi , this wiki contains the customization in the case for Android. But, I couldn't quite figure it out. Can you guide me to a working project implementing interactive push notification for android?
Also, if you have added this feature, then please guide me to the example.
BTW, great project.


delete only waiting jobs

Related to https://github.com/huggingface/datasets-server/issues/2387
As per internal conversation, only waiting jobs should be deleted on backfill to avoid started processes without a related Job record.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (2a03140) 90.15% compared to head (b9d7959) 90.21%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2403      +/-   ##
==========================================
+ Coverage   90.15%   90.21%   +0.06%
==========================================
  Files         180      165      -15
  Lines       10286     9504     -782
==========================================
- Hits         9273     8574     -699
+ Misses       1013      930      -83

Flag
Coverage Δ

jobs_cache_maintenance
94.40% <ø> (ø)

jobs_mongodb_migration
86.11% <ø> (ø)

libs_libapi
?

libs_libcommon
92.73% <100.00%> (-0.35%)
:arrow_down:

services_admin
87.60% <ø> (ø)

services_api
86.01% <ø> (ø)

services_rows
82.95% <ø> (ø)

services_search
80.95% <ø> (ø)

services_sse-api
94.19% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


[WIP] Redesign for Swift 2

NOTE: currently, this PR is a rough sketch of new design.
Swift 2 is coming! I think redesigning APIKit for Swift 2 is necessary to take full advantage of it.

protocol extension makes Reuqest protocol more flexilble.
ErrorType is useful to express errors in APIKit.
do-try-catch introduced easier error handling model (if process is synchronous).

Here are tasks:

[x] Move default configuration of request to extension of Request.
[x] Detailed and comprehensive errors using ErrorType.
[x] Adopt do-try-catch in synchronous error handling.

Any comments are welcome.

@ikesyo This PR is ready for review! Major changes are listed below:

Change steps to create NSURLRequest from an instance of Request.

Add baseURL, method, path and parameters properties to Request protocol.
Replace URLRequest property with buildURLRequest() method, which is an internal method.
Add configureURLRequest(_:) to add arbitrary configurations to NSMutableURLRequest.

Move configurations of serializing HTTP body to Request protocol.

Move requestBodyBuilder in API class to Request protocol.
Move responseBodyParser in API class to Request protocol.
Change parameter of sendRequest(_:URLSession:resposeBodyParser:handler:) to sendRequest(_:URLSession:handler:)

APIKitError is introduced.
Method is now HTTPMethod to avoid conflict.
Refactor using throw-catch error handling model.

This PR will be released in 1.0.0-beta1.

"ENABLE_BITCODE" should be set to YES I think.

I'm sorry, I'm still in review now... :sweat_smile:

Thank you for reviewing carefully. I've fixed codes you pointed out until now.

Oh, Errors.swift is not added to Mac target. :astonished:

Good catch :bow:

I noticed name of APIKitError is too common. Is it that ok to change name to something like SendRequestError?

I noticed name of APIKitError is too common. Is it ok to change the name to something like SendRequestError?

Is that really too common? Even so, because that error is name-spaced in the module (yes, its full name is APIKit.APIKitError), we don't need to care about name conflict IMHO.

My concern is name collision inside APIKit. Currently, APIKitError represents errors in sendRequest() only, but methods throws error may increase in future version of APIKit. For example, suppose cancelRequest() throws some errors. I think errors for sendRequest() and cancelRequest() should be separated like below:
enum SendRequestError {
    case InvalidRequest
    case UnexpectedResponse
    case ConnectionError(NSError)
    case ResponseError(ErrorType)
}

enum CancelRequestError {
    case CancelError1
    case CancelError2
}

Ah, I see. For that case, wrapping specific errors in a APIKitError case is another option:
public enum APIKitError: ErrorType {
    case InvalidRequest
    case UnexpectedResponse
    case ConnectionError(NSError)
    case ResponseError(ErrorType)
    case RequestError(SendRequestError) // Added
}

OK, we'll take the option you suggested when other kind of errors appear. BTW, APIKitError represents errors in API class, so is it better to change it to API.Error?

BTW, APIKitError represents errors in API class, so is it better to change it to API.Error?

It that improves the library's semantics/readability from your viewpoint, :+1: for it.

I've reviewed almost all the changes. :sparkling_heart: for the general direction and protocol extensions!
But IMHO we should continue considering about error definitions/designs as above.

Associating details to error is very nice. I'll work on it!

Now that you are planning a "rethink" for Swift 2, is there still a need for the Result dependency? with throw/s the dependency seems a bit redundant

@raulriera IMO asynchronous operations like sendRequest() with callbacks does not work well with try/catch/throws. So Result is still needed here.

.UnexpectedResponse lacks meaningful info about what is unexpected. The caller can't detect the root cause of that error without debugging and stack traces. So I think there are two points we could address here:

Whether notifying "unexpected response" from errorFromObject() is implementor's responsibility or not. They may have a following error type and throw it in errorFromObject():

enum ErrorResponse: ErrorType {
case InvalidRawResponse(object: AnyObject, URLResponse: NSHTTPURLResponse)
case BadRequest(message: String)
}
In this scenario, only APIKitError.ResponseError(ErrorType) will be passed to handlers.
> 2. Add an/some associated values to .UnexpectedResponse. Is it ErrorType or NSURLResponse? or (object: AnyObject, URLResponse: NSHTTPURLResponse)?

> How do you think about my thought above?

@ikesyo Thank you for this nice feedback. I found the 3rd idea:

```swift
public class API {
    public enum Error {
        case RequestError(API.RequestError)
        case ResponseError(API.ResponseError)
        case ConnectionError(NSError)
    }

    public enum RequestError {
        case InvalidBaseURL(NSURL)             // Request.baseURL()
        case ConfigurationError(ErrorType)     // Request.configureURLRequest()
        case BodySerializationError(ErrorType) // RequestBodyBuilder.buildBodyFromObject()
        case FailedToCreateURLSessionTask      // NSURLSession.dataTaskWithRequest()
    }

    public enum ResponseError {
        case ApplicationError(ErrorType)         // errorFromObject()
        case BodyDeserializationError(ErrorType) // ResponseBodyParser.parseData()
        case NotHTTPURLResponse(NSURLResponse)   // failed to cast URLResponse to NSHTTPURLResponse
    }

    ...

@raulriera Yes, Result is still necessary in asynchronous code like sendRequest() because it is impossible to catch an error from a different scope. FYI, you can use try-catch model with Result like this:
sendRequest(request) { result in
    do {
        let response = try result.dematerialize()
        print(response)
    } catch {
        print(error)
    }
}

You can get away by wrapping it in a closure themselves https://gist.github.com/amberstar/7861aee759b5d363d316, but I agree that it reads a bit uglier with that approach :/

Yes, I already knew that approach. Though that seems very hard to use or to understand for the library users, as you said.

 This contains 3 large change:

Introduce detailed error for API.
Stop throwing errors from responseFromObject().
Refactor sendRequest() to keep type info about an error.

First, I chose flat enum APIError for the error type of API for 2 reasons:

Easy to choose the error to handle from many variations.
Detailed enough.

public enum APIError: ErrorType {
    case ConnectionError(NSError)

    case InvalidBaseURL(NSURL)
    case ConfigurationError(ErrorType)
    case RequestBodySerializationError(ErrorType)
    case FailedToCreateURLSessionTask

    case UnacceptableStatusCode(Int, ErrorType)
    case ResponseBodyDeserializationError(ErrorType)
    case InvalidResponseStructure(AnyObject)
    case NotHTTPURLResponse(NSURLResponse?)
}

Next, I noticed it is not clear what kind of error should be thrown in responseFromObject(). If an user want to throw a some error there, to define custom ErrorType is required. I think it is too awkward, so I change responseFromObject() throws -> Response to responseFromObject() -> Response?. With the new version of this method, an user don't have to define custom ErrorType to notify error. And if it returns nil, the error in handler of sendRequest will be case InvalidResponseStructure(AnyObject).

I definitely like the changes made in 39d9ab2. :sparkles: I left just some minor notes about request canceling/documentations. Let's gonna merge this after you address them. :wink:

And also merging master into this is needed to resolve conflicts?

Thank you for reviewing! I'll merge this soon.


link edit profile in all section and error solve of advanced search p…

…opup

Also add dynamic calendar popup


Change the decimal to a percentage under the demographics bar

Two clients have asked for the decimal to be changed to a percentage under the demographics bar (see image)
age_profile_uk_total*(100*age_18to24_15min/total_age_15min)/age_profile_uk_18to24

Will be in next release.


chore(libscap): Check handle for NULL in scap API

/kind cleanup
/area libscap
The API is very inconsistent about checking for NULL. Most of the time the handle is unchecked. There was one specific function which was checked, but then new code got added before the check: https://github.com/draios/agent-libs/commit/d98fb0761bc454230ca1f069cc393d0f0ff286ca#diff-c478647d3c515b80e0b8377839cfdb4936cf1b1f5999a89b56a72ccf42f76e04R2557
This new code ended up breaking a test which relied on the check. Rather than fix that one function, I thought the ideal fix would be to consistently check the handle for NULL at the top of each API function.
NONE

Signed-off-by: Nathan Baker<EMAIL_ADDRESS>

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: nathan-b
Once this PR has been reviewed and has the lgtm label, please assign gnosek for approval by writing /assign @gnosek in a comment. For more information see:The Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.
:memo: Please follow instructions in the contributing guide to update your commits with the DCO
Full details of the Developer Certificate of Origin can be found at developercertificate.org.
The list of commits missing DCO signoff:

e399322 chore(libscap): Check handle for NULL in scap API

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Don't we completely abort execution if the scap handle fails to allocate? I think a more reasonable approach would be to use ASSERT so that if we ever call any of those functions before initializing we can catch it during the development cycle and not have the additional runtime cost of constantly checking if the pointer is null, (even if checking for null is a relatively cheap operation).

Don't we completely abort execution if the scap handle fails to allocate? I think a more reasonable approach would be to use ASSERT so that if we ever call any of those functions before initializing we can catch it during the development cycle and not have the additional runtime cost of constantly checking if the pointer is null, (even if checking for null is a relatively cheap operation).

Yeah, some context about this. Turns out we have some tests for a wrapper around sinsp. The wrapper doesn't bother setting up an actual scap handle (we don't read any events in these tests) but some initialization happens anyway (like setting the event mask). In the tests we ignore the inevitable failure since we're interested in other things.
Doing a full blown open of libscap is overkill for these tests and the event mask initialization is hardcoded enough to be inconvenient to skip, while mocking an entire sinsp isn't particularly feasible either with the massive API surface it has right now.
Still, ignoring all the above, it's an API breakage (we crash where we used to return an error).

IMHO if this could be easily solved by updating your test suite, i'd go with that. I find it cleaner than polluting whole libscap API with avoidable checks.

Understood. I thought the checks would be acceptable because the existing code already includes at least one NULL handle check (https://github.com/falcosecurity/libs/blob/master/userspace/libscap/scap.c#L1417), but it's in the wrong place. If you prefer no checks at all, should probably remove that check as well for consistency.

/milestone 0.10.0

Do remember though that scap and sinsp are libraries, so the fact that your higher-level code prevents this from happening in our specific application does not mean that all client code will behave the same. Libraries should have a degree of defensive coding which prevents crashes from occurring inside the library if possible.

While i surely agree, let's be honest: all scap APIs needs a scap handle to work, otherwise it is just a dummy library that would return SCAP_FAILURE with your patch, or segfault with current master.
I am not sure what is better in this case; i think that, given that the whole API operates on scap handle, having a NULL scap handle trigger a segfault is good.
@leogr wdyt on this one?

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.
:memo: Please follow instructions in the contributing guide to update your commits with the DCO
Full details of the Developer Certificate of Origin can be found at developercertificate.org.
The list of commits missing DCO signoff:

6d99777 Remove extra null checks

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

IMHO this LGTM!
I'd move this to milestone 0.9.0.
@leogr

LGTM label has been added.  Git tree hash: 9279e4c6caed3383d510b8760fcaeeb73c573f01

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Andreagit97, FedeDP, nathan-b
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [Andreagit97,FedeDP]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Add configuration to control if mirror should resolve tag

Adds option to disable resovle capability in mirror configuration.
Fixes #147

Closing in favor of #153


Vulnerability roundup 110: brave-1.31.91: 1 advisory [7.5]

search, files

[ ] CVE-2021-45884 CVSSv3=7.5 (nixos-21.11)

CVE details
CVE-2021-45884
In Brave Desktop 1.17 through 1.33 before 1.33.106, when CNAME-based adblocking and a proxying extension with a SOCKS fallback are enabled, additional DNS requests are issued outside of the proxying extension using the system's DNS settings, resulting in information disclosure. NOTE: this issue exists because of an incomplete fix for CVE-2021-21323 and CVE-2021-22916.

Scanned versions: nixos-21.11: 3ddd960a3b5.
Cc @jefflabonte
Cc @nasirhm
Cc @rht
Cc @uskudnik

Resolved in #155469


No 'num_batches_tracked' in state_dict

Native torch BatchNorm has  num_batches_tracked in it's state_dict, while ABN doesn't. It makes loading weights trained with usual BN+Activation inconvenient. Is there any reason why you didn't add this item into the dict?

The reason why there's no num_batches_tracked is that we don't support the "cumulative moving average" mode, i.e. momentum=None in Pytorch's standard BN layer, introduced in Pytorch 1.0. Support for loading BN weights from both pre-1.0 (i.e. without the num_batches_tracked parameter) and post-1.0 models is not straightforward, but we are working on a fix.
In the meanwhile, a simple work-around for you should be to pass strict=False as an additional parameter to load_state_dict().

I just found an easier solution to this issue, please update to v1.0.4 for a fix.

Thx for a quick fix!


Add APIs and classes for querying history states

Add 3 APIs for querying sates:

ThingIFAPI#queryHistoryStates
ThingIFAPI#groupHistoryStates
ThingIFAPI#aggregateHistoryStates

Add 3 query objects for calling APIs:

HistoryStatesQuery
GroupedHistoryStatesQuery
AggregatedHistoryStatesQuery

Other new classes:

TimeRange, needed for groupHistoryStates and aggregateHistoryStates
Aggregate, and AggregateType, needed for aggregateHistoryStates
GroupedHistoryStates is the result of groupHistoryStates
AggregatedResult is the result of aggregateHistoryStates

@yongpingchen
It is OK to name all 3 methods query. query is more familiar name.

@satoshikumano should we need separate Clause for history states query? Since the clause in trigger is based on trait/nontrait, however, query clause in history states query not need. If we need separate Clause, so the sub classes of clause: equal, not equal, range need to be separated.

Design is changed, so I close this PR


Refactor storage options

The Options struct in config.go has very specific storage interface definitions. There's a DynamoDB struct.
This sort of stuff should come from the actual interface if anything...But I think a map[string]interface{} should suffice here for passing about options. Each interface can then handle and use those as needed, making the proper assertions, etc.
Move toward making a more extensible system.

It's now just AWS because they are AWS options. The read and write capacity units have been removed and all options for DynamoDB are passed as JSON to the commands (map[string]interface{}). That's how other storage interfaces will also get their options. However AWS options are broad and could mean DynamoDB or S3 or even RDS.
I might have even removed AWS and kept a more generic interface{} type but this made sense since the goal of discfg is to use cloud services. Perhaps in the future more than just AWS options struct will be found on Options.Storage. Who knows.


chore: release v0.0.8

:robot: I have created a release beep boop
0.0.8 (2023-12-04)
What's Changed

fix(ci): use correct working directory when publishing release artifacts by @coffeebeats in https://github.com/coffeebeats/gdpack/pull/39

Full Changelog: https://github.com/coffeebeats/gdpack/compare/v0.0.7...v0.0.8

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/coffeebeats/gdpack/releases/tag/v0.0.8 :sunflower:


StyleSheetRegistry is added to bundle when using babel

Do you want to request a feature or report a bug?
Bug
What is the current behavior?
StyleSheetRegistry is bundled along with the code the exported file when bundling a component with webpack and babel plugin: styled-jsx/babel
What is the expected behavior?
When bundling a component library with styled-jsx as peerDeps, shouldn't be added. It is causes flash on unstyled content when using component from libraries.
Environment (include versions)

styled-jsx (version): 2.6.6

Did this work in previous versions?
No

#225

can you share your setup to compile the component?

could you use https://webpack.js.org/configuration/externals/ ?

I tried the externals but it didn't work, the problem is that externals need to be setup like this:
externals: {     "styled-jsx/style": { commonjs: "styled-jsx/style", commonjs2: "styled-jsx/style" }   },
That is: "styled-jsx/style" and not just "styled-jsx".
Also, styled-jsx must be ommited out from the project's node_modules so the one from parent's node_modules will be picked up by the resolver.


Update distributed-availability-groups.md

Adding cautions about using Distributed AG to migrate to a new (higher) version of SQL Server

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

#label:"aq-pr-triaged"

Hi @kfarlee - This pull request was opened in the public repo. PMs should work in the private repo, per the Microsoft Docs contributor guide. We can keep this PR open for review and merge, but would you make future content updates in the private repo? Thank you!

thx @Kevin-Farlee @ktoliver


Issue with k8s.io/docs/tutorials/services/source-ip/

This is a...

[ ] Feature Request
[x] Bug Report

Problem:

If the client pod and server pod are in the same node, the client_address is the client pod’s IP address. However, if the client pod and server pod are in different nodes, the client_address is the client pod’s node flannel IP address.

From Cluster Networking, all containers can communicate with all other containers without NAT.
In this respect, the client_address should be always client pod's IP address, not the node flannel IP address, even the client pod and server pod are in different nodes.
I have tested in On-Premises Cluster (flannel / weave net), AKS and aliyun with 1.12. All backed my conclusion.
Proposed Solution:
The client_address is the client pod's IP address, whether the client pod and server pod are in the same node or not.
Page to Update:
https://kubernetes.io/docs/tutorials/services/source-ip/

1.12

I am interested to work on this issue. Shall i submit a pull request for the same?
Thanks

Close issue because PR has been merged.


There is way to cleanly evict all elements

I would like to cleanly drop the complete cache and call the evict callback on all elements.
This is not currently possible, because:

the Purge function doesn't call the evict callback
Iterating over the Keys doesn't work, because there is no way to Get or Peek expired elements

Please add an option to Purge to call the eviction callback, or add a new function such as EvictAll

Thanks for the request, sounds reasonable. I'll have a closer look at it soon.

@esp32wrangler Please let me know if #49 satisfies your needs

@esp32wrangler Please let me know if #49 satisfies your needs

Thanks for the quick fix! It looks good, please merge and tag it so I can properly test it in my app.