I18N work

Added toString() methods to Faction and Type entities, which app:import:std command requires, and added is_primary to the mandatory fields of Faction entity in order to import it.

I18N work in progress:

DoctrineExtensions Translatable configuration
Repositories for all translatable entities
New command app:import:trans to import translations from json data repository
New I18N routes: only for locales that not are the default, en, so decklist are in /decklists for English and /es/decklist for Spanish. API routes doesn't change for backward compatibility with current users. But the site internally use ?_locale=es if the locale is not en
The format chosen for translations files was YAML because the translations would not be done by professional translators and YAML is more programmer-friendly (to edit en plain text).
The path for image has change to bundle/cards/<locale>/<code>.<ext>, so current english pictures must be moved to en subdirectory.

Thank you for your awesome work!
I merged to branch 'i18n'.
I want the locales to be accessible from a subdomain, not a subpath. So a spanish decklist would be at http://es.thronesdb.com/decklist/view/111 instead of http://thronesdb.com/decklist/view/111, which is an alias for http://en.thronesdb.com/decklist/view/111

I don't think I'm going to support spanish images. There's no official repository for these images, AFAIK. So updating is a pain and is totally dependent on your work, availability and good will.

Regarding the URL, I had set up the service src/AppBundle/Listener/LocalePrefixListener.php to handle the locale in the subdomain. I'm not sure what to do with JMSI18nRoutingBundle, then.

Well, the I18N sites on subdomains is easy, only change one line in config.yml, in the jms_i18n_routing entry (see http://jmsyst.com/bundles/JMSI18nRoutingBundle/master/configuration).
About images, I have all of them scanned by me (I used them to make an OCTGN image pack), so the only problem with spanish cards would be the server space, or how to upload them to the server (I noticed that image cards aren't in the repo, I suppose you fetch them directly on server with symfony command, or direct upload by FTP).

I haven't seen that Listener... looking at it, I think jms_i18n_routing is unnecesary, I will remove it then. Then only drawback is that I have to work with fake domains in my hosts file, but I can live with it :)

Thank you again for your awesome work!
The bundle can indeed be configured to use different hosts for different locales. I don't like the fact that I have to hard-code the domain name in the configuration, though. My Listener was a bit better in this regard, because it worked for any domain name.
Anyway, I was able to set it up with this configuration:
jms_i18n_routing:
    default_locale: %default_locale%
    locales: %supported_locales%
    strategy: custom
    hosts:
        en: "%website_url%"
        es: "es.%website_url%"
    redirect_to_host: true

Regarding the images, the issue I faced earlier was with the "continuity of service". Right now, you have the spanish images. You scanned, cropped, converted all the images in a long and boring process. I know, I did it before FFG started publishing good images on CGDB ;) But what about in 1, 2, or 3 years? Translating is already a time-consuming task. I'm not ready to take that risk.
One aspect of this is that I have to provide a fallback in case the localized image isn't available. So I have to read the filesystem every time I send the url of an image. If the localized image is in the filesystem, I send its url, otherwise I send the fallback (english). Those filesystem accesses are draining the server resources.
Frankly, I've tried to make it work for NetrunnerDB for years, and in the end it was too much work and maintenance for too small a result.

I haven't seen that Listener... looking at it, I think jms_i18n_routing is unnecesary, I will remove it then. Then only drawback is that I have to work with fake domains in my hosts file, but I can live with it :)

That would be nice, but my question is: can you make the Locale Switcher work with my Listener?

I have being doing tests:

Without jms_i18n_routing and using only your Listener, all works fine, but, as you said, the locale switcher needs some tricky changes to work
Configuring properly jms_i18n_routing and commenting out the listener body, all works fine, too. And the locale switcher still works.

Whichever approach was selected, I noticed that the setting locale by subdomain fixed several problems I face with url prefixing:

All url generated with fos_routing, that doesn't take into account the current locale to generate URLs... but with subdomains, the URL generated, as it is relative, maintains the subdomain and thus the locale. It needs a patch that I can remove it now.
API calls: the same as above.

So the subdomain approach to change locale seems to be very, very brilliant.

About images, I can assure and swart that, as long as I'm playing GoT, I will scans and translated files. It takes me only a couple of hours and it is a work I'm proud to have done it. But I cannot assure I'll be playing this game until its end... my intention is to do it, but nothing in life is sure...
I understand you with the image fallback problem... one solution could be copying by default english card in the localized folder, removing the double disk access in case the locale card image doen't exist.

Good. That's perfect. I'm going to remove my Listener and use exclusively I18nRoutingBundle. It's really good work :)
I'm going to move your work on the localized images to a new branch, and I'll think about it.

Perfect.
Now I have doubts about how to continue with work. All of these commits were merged into a i18n as you said, although I don't see that on the PR history...
And then you have done some changes on that branch... Maybe I must pull i18n branch on my local copy (from upstream), pushing to my forked copy on github, and continue with the work from there?
Sorry, I'm a github newbie, hehehe

I did a checkout your branch, so unless you just did some work on it, my i18n branch is simply ahead of you. You can do a checkout on it, and git will do a fast-forward.

And once your local repository is ok, you can push on Github, sure.

Hmm... I merged i18n into master, and I deleted i18n. So, actually, your commits are now merged into master.


Add functionality to render local data and override local-zone template:

Add a new param local_data which is an Array of Strings into localzone.pp. local_data will be add into a configuration file as defined in a template.
Add a new param template_name into localzone.pp. Therefore anybody can use a custom template.

This looks great.  Thank you for the PR.


GitHub-style preview template

Wanted the preview to look like if GitHub rendered it so I've prepared this small Gist:
https://gist.github.com/borekb/57bc575e38db2c99f1b5
(Just sharing it, this issue can be closed.)

BTW Markdown Edit is a lovely little editor, thank you for it!

Hi and Thanks. I like it better than current one. Will likely incorporate it into the next release.

available in next release.

For anyone interested, styles have been reverted in 1.30. Here's a GitHub repo with the up-to-date GitHub template (using native fonts as per mid-2016 style update.)

I've updated the 1.30 release notes to include this link. Thanks!

The link currently points to a tweet instead of the template but it's great that you added this info to the release notes, thanks.

Fixed...


fix memory error in single_stage_multi_reduction_kernel

Describe the changes
This PR...
Linked Issues
Resolves #231

@ImmanuelSegol - formatting works well for me for all langs, followed readme - except had to
$ sudo apt-get install clang-format

@ImmanuelSegol - formatting works well for me for all langs, followed readme - except had to $ sudo apt-get install clang-format

did this, it didnt work :/

@ImmanuelSegol After installing clang-format, you should make sure your git core.hooksPath is set correctly (see here). Once that is set, before pushing to remote, this script is run and will tell you what command to run if any files are not formatted correctly


UI Refactoring & Minor fixes

UI refactoring required to improve performance (e.g. when workspace gets loaded, sometimes workpace name and project names don't get loaded.)

When 1st column scrollbar appears, sometimes the space is left blank:

Badges get lost if request name edited. Should be dynamic.

Socket name css should be same as request name css.

Looks like most of the things are done. Close it and create new issue with pending item.


Fix example code syntax

Summary by CodeRabbit

Documentation

Updated the "Getting Started" guide for better clarity and stability.

Bug Fixes

Improved method calls related to the tevm API for enhanced stability.

Tyty


Why helm status and helm list

To get the status you need to run list.
How about returning the status in a separate column of the list output ?

Adding to that. The default helm list is a bit boring :) could make set --long to true by default at:
https://github.com/kubernetes/helm/blob/master/cmd/helm/list.go#L57
feels more user friendly.

Basically something like this:
$ bin/helm list -l
NAME            	UPDATED                 	STATUS 	CHART
errant-goose    	Wed May 18 23:02:48 2016	DELETED	alpine-0.1.0
exciting-tarsier	Thu May 19 09:08:04 2016	DELETED	alpine-0.1.0
washed-otter    	Thu May 19 11:44:24 2016	DELETED	alpine-0.1.0

which we easily get with the following in cmd/helm/list.go:
func formatList(rels []*release.Release) error {
	table := uitable.New()
	table.MaxColWidth = 30
	table.AddRow("NAME", "UPDATED", "STATUS", "CHART")
	for _, r := range rels {
		res, err := helm.GetReleaseStatus(r.Name)
		if err != nil {
			return prettyError(err)
		}
		c := fmt.Sprintf("%s-%s", r.Chart.Metadata.Name, r.Chart.Metadata.Version)
		t := timeconv.String(r.Info.LastDeployed)
		s := fmt.Sprintf("%s", res.Info.Status.Code)
		table.AddRow(r.Name, t, s, c)
	}
	fmt.Println(table)

	return nil
}

I will add the status column to the list output.
The helm status command is rather worthless at the moment. In the future, it's supposed to query Kubernetes and return the status of the various Kubernetes resources (real time). But we are not that far along yet.


Large images for gallery

Width of 1060px
Height of whatever

@sirtastic : if you want to regenerate your thumbnails/large/medium images after pulling this change, rake the following:
rake paperclip:refresh CLASS=Photo

commit b51b0bff6623ae9f8fcbd6129bdfc0d1bb3210e1
Date:   Wed Aug 5 15:54:15 2015 -0700
Large images for Drink photo gallery. Closes #42 (github)


Change the way --model is handled

As of now, the trainers have the option to load a pretrained model using the flag --model.
We haven't really used this feature so far, and the way it is implemented (as a flag) makes it hard to handle in the grid trainers, which results in not handling this for now.
So I like to handle this in the grid trainers, because it useful to load a pretrained model for each experiment (e.g. to finetune a pre-trained model).
I'm thinking of either:

adding a corresponding --models to the grid trainers, where the user could then use to indicate the trained models he wants to reuse, but this could be messy as we would have to check if all models are present, with which experiments they are compatible etc..
Moving --model in the trainers from being a flag to a config parameter, that the user could specify in the config file. I know that this wouldn't be consistent with the tester, but I find this cleaner, and easier to handle in the grid trainers.

We can discuss that :slightly_smiling_face:

Adressed in #42


Analyze the DFD for Scenario 5

Examine each automatically identified threat
Document mitigation strategies for the relevant threats
Pay special attention to elements that interact across threat boundaries
Generate a full HTML report using TMT
Host the HTML reports in your project github repo and link from your markdown submission.

Finished adjusting the DFD so that all threats were either mitigated, needs investigated, or NA to our OSS.


There're no generated routes in the dist/ssg directory

I am trying to generate some routes, so I added the following in the quasar.conf.js
ssg: { 			routes: ['/ar', '/ar/explore/10', '/ar/explore/11'] 		},
and used this command to  generate the above routes: npm run build:ssg
The build was completed but with an error:   Extension(ssg) · ⚠    TypeError: d.Cookies.has is not a function

Note: I am using Cookies helper from Quasar.
And I checked the dist/ssg folder, and found that the plugin has generated the needed static files (CSS, JS, Images), but it didn't generate the HTML pages

Data might be helpful:
"quasar": "^1.11.3"
"@quasar/app": "^1.8.10"
"@quasar/extras": "^1.8.1"

@saifobeidat,
How do you import and use the Cookies plugin ? There is a note  about how to do it for SSR in Quasar documentation.
Also you should keep in mind that no headers from the client are sent to the server when your pages are prerendered/generated. So, it means that there is no Cookies available from the client at server side.

@freddy38510 I am importing the Cookies plugin like this import { Cookies } from 'quasar' .. and yes it's mentioned that it should be changed to another form when using SSR mode.. but I am not using this mode,, Thanks.

@saifobeidat
This app extension is using SSR mode to prerender pages, so actually you are using it.
Let me clarify the difference between SSR mode and SSG mode:

In SSR mode, routes are rendered on a server then served to a client.
In SSG mode, routes are rendered on a server the same way as in SSR mode, but at build time, then saved to static html files.

If you need more explanations, do not hesistate to ask me.

@freddy38510 Thanks,
I have made some temporarily changes such as removing the usage of Coockie, and yes the errors have gone but and new errors related the window came out.. it seems those plugins/object are being called at the server side and cause errors as we don't have for example window object at the server-side.. so my question is how to avoid those objects from being called at the server-side? should I check the process.env. each time before I use a client side object/plugin ? or there's a global way to handle this?
sorry I am very new at these things.

You should write your code with SSR mode in mind. There is a good starting point in Quasar documentation about how to write universal code.
You might take a look at the components lifecycle hooks first.
Then, if you are using some boot files, you can let them run only on server or client like explained in the documentation.
At last resort, yes you can use process.env.SERVER and process.env.CLIENT.
Could you see from where the window object is called ?


Keyword arguments?

Sorry; I know this probably isn't the place for questions, but I couldn't find anything else, so this is what I'm going with...
Does Wren have a syntax like Python's keyword arguments? From what I've seen, this isn't possible except by passing a dictionary (e.g. f.call({"a": 1, "b": 2})), which isn't very concise. I'm looking for something like:
def f(...): ...

f(
    something=1,
    something_else=2,
    stuff=3,
    more_stuff=4,
    # etc.
)

Thanks in advance!

I couldn't find anything else, so this is what I'm going with...

The mailing list is the canonical answer for this, but here is OK too. :)

Does Wren have a syntax like Python's keyword arguments?

Not currently, no. For things like optional arguments, where you have a lot of different combinations of arguments that are all valid, then passing a map is a good solution, I think. There's a little bit of punctuation, but I don't think it's too bad. For what it's worth, that's the way to do it in JS too. (Though Wren is a little more verbose because it requires quoting the keys.)
For cases where you have a few different specific sets of arguments and you want them to be named to make the callsite easier to read, I have been pondering adding them to the language. I am thinking of them a similar to keyword selectors in Smalltalk (and by extension Objective-C) where the keywords form part of the method signature itself. It would let you do stuff like:
Point.new(x: 1, y: 2)
Point.new(theta: 0.234, radius: 5)

random.int(min: 1, max: 5)
random.int(max: 5)

Note that each of these would be totally different methods, with signatures new(x:,y:), new(theta:,radius:), int(min:,max:), and int(max:), respectively. This is really useful because it lets you implement them separately and speeds up dispatching to the right logic.
But it makes them a poor fit for a long list of optional parameters. To support every combination, you would need a separate method for each combination.

Python gets this right with *args and **kwds absorbing all extra arguments into an array and map.

Python gets this right with args and *kwds absorbing all extra arguments into an array and map.

Like many features, it's a trade-off.
Python's behavior does some things really well:

It's conceptually simple. Users already know how to work with lists and dicts, so it takes advantage of that by building on top of them.

It's very flexible for handling optional parameters.

It gives callers the freedom to choose whether to pass parameters by name or not.

But it has some downsides:

It's slower. A list and/or dict has to be allocated and the parameters added to it. That can require a lot of allocation and work.

It doesn't let an API define required but named parameters. Naming implies optionality.

It's much harder to statically analyze. Wren isn't statically-typed, but it was designed to be somewhat more declarative and amenable to static analysis than most other dynamic languages. Using imperative code to handle named parameters makes that nigh impossible.

Those downsides are all important to me, so I don't feel that Python's approach is a good fit for Wren.

I'm not sure what your assumptions are on the implementation side, and I'm guessing about when you are talking about the caller vs callee side , so keep that in mind with the following...

It's slower. A list and/or dict has to be allocated and the parameters added to it. That can require a lot of allocation and work.

But only when the coder adds the receivers *positional and **named. The coder can optimize later (the appropriate time for optimization) by refactoring the function to use exactly the parameters she found she needed in the end.

It doesn't let an API define required but named parameters. Naming implies optionality.

I'm not understanding you here. Each parameter (name) in a function definition is a required parameter.  The '=defaultvalue' part is what adds optionality. Exceptions are the * and ** which are not parameters but denote the willingness to accept 0 or more of each respective kind of argument. They are type designators in a language that otherwise has no types.
On the call side we use named aguments for convenience, to let us specify them out of sequence, or (in python) create ad-hoc arguments.
Do you have any plans for any kind of vararg functionality?

But only when the coder adds the receivers *positional and **named.

Yes, that's what I was referring to. I should have been clearer. I don't have a lot of Python experience, and I forgot that you can passed named parameters even without using **kwargs.

On the call side we use named aguments for convenience, to let us specify them out of sequence, or (in python) create ad-hoc arguments.

Maybe I'm too much of a stickler for consistency, but I've never found being able to specify them in arbitrary order to be much of a selling point. I do really like the readability of named parameters. But my preference is more of the Smalltalk/Objective-C variety where the named parameters form part of the method name and have an explicit ordering.
That style of keyword arguments is a better fit for Wren in general because it lines up with Wren's concept of signature and overloading by arity. Named parameters would just become part of the signature and would thus be different methods.

So you're really looking at a adding a little syntactic sugar (which can be nice).
class A{
  construct new(){}
  aaarg(r,g){ "aaa"+"r"*r+"g"*g }
  aaack(c,k){ "aaa"+"c"*c+"k"*k }
}

class B {
  construct new(){}
  aaa(r,g){ "aaa"+"r"*r+"g"*g }
  aaa(c,k){ "aaa"+"c"*c+"k"*k }
}

var a = A.new()
var b = B.new()

System.print( b.aaa(r: 2, g: 4) ) instead of System.print( a.aaack(2,4) )
How would one call a function with no keywords? (Or what would the definition syntax look like)?

@hauptmech, We lose variable names, so:
class B {
  construct new(){}
  aaa(r,g){ "aaa"+"r"*r+"g"*g }
  aaa(c,k){ "aaa"+"c"*c+"k"*k }
}

var b = B.new()

would still not compile (ambiguity), I suppose you would have to do:
class B {
  construct new(){}
  aaa(r:,g:){ "aaa"+"r"*r+"g"*g }
  aaa(c,k){ "aaa"+"c"*c+"k"*k }
}

var b = B.new()
System.print( b.aaa(r: 2, g: 4) ) // calls "aaa(r:,g:)"
System.print( b.aaa(2, 4) ) // calls "aaa(c,k)"

So you're really looking at a adding a little syntactic sugar (which can be nice).

Considering it, yes. :) It's not the highest priority, but I've definitely encountered APIs where I felt names with the parameters would make it clearer. For example, consider a random number generator that let you pick numbers in a range:
random.range(3, 5)

Is that min and max? Min and count? Something like this might be nice:
random.range(min: 3, max: 5)

How would one call a function with no keywords?

Just like you do today. Unlike languages like Python and C#, the approach we're talking about here would make named parameters explicit and distinct from positional ones. It's not that you can choose to pass an argument by name or not, it's that the API designer chooses which parameters are named and which are not.

(Or what would the definition syntax look like)?

We'd need to distinguish named parameters from unnamed ones, so it could look something like:
class A {
  construct new() {}
  foo(a, b) { System.print("positional %(a) %(b)") }
  foo(first: a, second: b) { System.print("named %(a) %(b)") }
}

var a = A.new()
a.foo(1, 2) // positional 1 2
a.foo(first: 1, second: 2) // named 1 2

That's just one option, though. I haven't put any real time or effort into this. :)


Linking.addEventListener not working: url event never fires

Description
Url event never fires
I followed the indicated setup to handle deep links in react native.
But when I have the app open in background or foreground and I execute command
npx uri-scheme open "mychat://bar" --ios, url event doesn't fire.
I saw there is a similar issue in react-navigation, but the fix indicated for AppDelegate.m doesn't work for me.
Version
0.76
Output of npx react-native info
System:
OS: macOS 12.5.1
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 1.30 GB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.18.1 - /usr/local/opt/node@16/bin/node
Yarn: 1.22.11 - /usr/local/bin/yarn
npm: 8.19.2 - /usr/local/opt/node@16/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
Android SDK:
API Levels: 28, 31, 33
Build Tools: 30.0.2, 31.0.0, 33.0.0
System Images: android-31 | Google APIs Intel x86 Atom_64, android-31 | Google Play Intel x86 Atom_64
Android NDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8815526
Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild
Languages:
Java: 13.0.2 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.6 => 0.70.6
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
clone repo https://github.com/leoparis89/deeplink

yarn
cd ios && pod install
yarn ios
put app in background
run command npx uri-scheme open "mychat://bar" --ios.
App gets focused but url event never fires in ./App.js line 121.

Snack, code example, screenshot, or link to a repository
https://github.com/leoparis89/deeplink

I want to add to this issue what I researched, having similar issue:

When the app is not running at all, and you select "share/open with" your app the following happens:

First, the (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions is called, having the path to the file in the launch options under "UIApplicationLaunchOptionsURLKey" key.
This path is not accessible (permission-wise to the app).
This path is also what you'd get if you call Linking.getInitialURL
Then, the (BOOL)application:(UIApplication *)application   openURL:(NSURL *)url   options:... is called.
This method receives a different URL, which is a copy of the file in your app's temp/inbox folder - fully accessible to your app.
And as suggested, it is implemented with one line: return [RCTLinkingManager application:application openURL:url options:options];, which triggers RCTLinkingManager to send notification via NSNotificationCenter with that (good) url.
Now comes the issue: at this point in time, the JS was not yet started and the JS part of the app did not register to listen to "url" event. That is why RCTEventEmitter did not call RCTLinkingManager.startObserving and the notification with the url is lost. and even if it would have been received, the JS did not register yet, and it would not have been fired to the JS part.

Here is how I solved it (and I suggest you implement something more generic/robust for Linking:

when RCTLinkingManager application:application openURL:url options:options is called, I save the url in a object's local variable. the when RCTLinkingManager.startObserving is called, if this variable is not nil, I fire the url event.

line 19: static NSString *savedEvent = nil;
at startObserving, at its end:

if (savedEvent != nil) {
        NSDictionary<NSString *, id> *payload = @{@"url": savedEvent};
        [self sendEventWithName:@"url" body:payload];
        savedEvent = nil;
    }

at application:openURL:options
    // if event was missed, save it for later firing
    savedEvent = URL.absoluteString;

I hope this helps.

I want to add to this issue what I researched, having similar issue:

When the app is not running at all, and you select "share/open with" your app the following happens:

First, the (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions is called, having the path to the file in the launch options under "UIApplicationLaunchOptionsURLKey" key.
This path is not accessible (permission-wise to the app).
This path is also what you'd get if you call Linking.getInitialURL
Then, the (BOOL)application:(UIApplication *)application   openURL:(NSURL *)url   options:... is called.
This method receives a different URL, which is a copy of the file in your app's temp/inbox folder - fully accessible to your app.
And as suggested, it is implemented with one line: return [RCTLinkingManager application:application openURL:url options:options];, which triggers RCTLinkingManager to send notification via NSNotificationCenter with that (good) url.
Now comes the issue: at this point in time, the JS was not yet started and the JS part of the app did not register to listen to "url" event. That is why RCTEventEmitter did not call RCTLinkingManager.startObserving and the notification with the url is lost. and even if it would have been received, the JS did not register yet, and it would not have been fired to the JS part.

Here is how I solved it (and I suggest you implement something more generic/robust for Linking:

when RCTLinkingManager application:application openURL:url options:options is called, I save the url in a object's local variable. the when RCTLinkingManager.startObserving is called, if this variable is not nil, I fire the url event.
line 19: static NSString *savedEvent = nil;
at startObserving, at its end:

if (savedEvent != nil) {
        NSDictionary<NSString *, id> *payload = @{@"url": savedEvent};
        [self sendEventWithName:@"url" body:payload];
        savedEvent = nil;
    }

at application:openURL:options
    // if event was missed, save it for later firing
    savedEvent = URL.absoluteString;

I hope this helps.

Could you specify in which file those modifications need to be made ?
Ideally could you also post a snippet of the modified code ?
Haven't been able to reproduce your instructions.
Thanks

The file is react-native/Libraries/LinkingIOS/RCTLinkingManager.mm
#import <React/RCTLinkingManager.h>

#import <FBReactNativeSpec/FBReactNativeSpec.h>
#import <React/RCTBridge.h>
#import <React/RCTUtils.h>
#import <React/RCTLog.h>

#import "RCTLinkingPlugins.h"

static NSString *const kOpenURLNotification = @"RCTOpenURLNotification";

static NSString *savedEvent = nil;

- (void)startObserving
{
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(handleOpenURLNotification:)
                                                 name:kOpenURLNotification
                                               object:nil];
    if (savedEvent != nil) {
        NSDictionary<NSString *, id> *payload = @{@"url": savedEvent};
        [self sendEventWithName:@"url" body:payload];
        savedEvent = nil;
    }
}

+ (BOOL)application:(UIApplication *)app
            openURL:(NSURL *)URL
            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
    postNotificationWithURL(URL, self);

    // if event was missed, save for firing later if event "url" is registered
    savedEvent = URL.absoluteString;

    return YES;
}

@ariel-bentu
I try you solution , but url event doesn't fire when I have the app open in background or foreground.
(when app closed , it's ok).
Do you have any suggestion ?

do you have this method added in your AppDelegate.mm:
- (BOOL)application:(UIApplication *)application
   openURL:(NSURL *)url
   options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  return [RCTLinkingManager application:application openURL:url options:options];
}

This is a prerequisite, also documented by react native (see here)

Yes, I do follow the document but still fail. I can't run in simulator, so I use browser with button to call the url scheme.
if app is closed, it works fine. But if app is in background, the url scheme called just bring app to foreground, but the url listener is not fired.
My RN is 0.68.2, older than yours. Will this be a problem?

Hi @edwardhsueh, I was using react native 0.68.0 and facing the same problem
One thing that you can try is adding the below code to the location that specified by React Navigation Documentation
as I am not familiar with Swift and placing the code in the wrong location
// Add the header at the top of the file:
#import <React/RCTLinkingManager.h>

// Add this inside `@implementation AppDelegate` above `@end`:
- (BOOL)application:(UIApplication *)application
   openURL:(NSURL *)url
   options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  return [RCTLinkingManager application:application openURL:url options:options];
}

It's working for me now

Unfortunately this is not working for me.
I modified RTCLinkingManager.mm as follows:

/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

#import <React/RCTLinkingManager.h>

#import <FBReactNativeSpec/FBReactNativeSpec.h>
#import <React/RCTBridge.h>
#import <React/RCTUtils.h>
#import <React/RCTLog.h>

#import "RCTLinkingPlugins.h"

static NSString *const kOpenURLNotification = @"RCTOpenURLNotification";

static NSString *savedEvent = nil;

static void postNotificationWithURL(NSURL *URL, id sender)
{
  NSDictionary<NSString *, id> *payload = @{@"url": URL.absoluteString};
  [[NSNotificationCenter defaultCenter] postNotificationName:kOpenURLNotification
                                                      object:sender
                                                    userInfo:payload];
}

@interface RCTLinkingManager() <NativeLinkingManagerSpec>
@end

@implementation RCTLinkingManager

RCT_EXPORT_MODULE()

- (dispatch_queue_t)methodQueue
{
  return dispatch_get_main_queue();
}

- (void)startObserving
{
  [[NSNotificationCenter defaultCenter] addObserver:self
                                           selector:@selector(handleOpenURLNotification:)
                                               name:kOpenURLNotification
                                             object:nil];

    if (savedEvent != nil) {
        NSDictionary<NSString *, id> *payload = @{@"url": savedEvent};
        [self sendEventWithName:@"url" body:payload];
        savedEvent = nil;
    }
}

- (void)stopObserving
{
  [[NSNotificationCenter defaultCenter] removeObserver:self];
}

- (NSArray<NSString *> *)supportedEvents
{
  return @[@"url"];
}

+ (BOOL)application:(UIApplication *)app
            openURL:(NSURL *)URL
            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  postNotificationWithURL(URL, self);

  // if event was missed, save for firing later if event "url" is registered
  savedEvent = URL.absoluteString;

  return YES;
}

// Corresponding api deprecated in iOS 9
+ (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)URL
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation
{
  postNotificationWithURL(URL, self);
  return YES;
}

+ (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
  restorationHandler:
    #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 12000) /* __IPHONE_12_0 */
        (nonnull void (^)(NSArray<id<UIUserActivityRestoring>> *_Nullable))restorationHandler {
    #else
        (nonnull void (^)(NSArray *_Nullable))restorationHandler {
    #endif
  if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) {
    NSDictionary *payload = @{@"url": userActivity.webpageURL.absoluteString};
    [[NSNotificationCenter defaultCenter] postNotificationName:kOpenURLNotification
                                                        object:self
                                                      userInfo:payload];
  }
  return YES;
}

- (void)handleOpenURLNotification:(NSNotification *)notification
{
  [self sendEventWithName:@"url" body:notification.userInfo];
}

RCT_EXPORT_METHOD(openURL:(NSURL *)URL
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)
{
  [RCTSharedApplication() openURL:URL options:@{} completionHandler:^(BOOL success) {
    if (success) {
      resolve(@YES);
    } else {
      #if TARGET_OS_SIMULATOR
        // Simulator-specific code
        if([URL.absoluteString hasPrefix:@"tel:"]){
          RCTLogWarn(@"Unable to open the Phone app in the simulator for telephone URLs. URL:  %@", URL);
          resolve(@NO);
        } else {
          reject(RCTErrorUnspecified, [NSString stringWithFormat:@"Unable to open URL: %@", URL], nil);
        }
      #else
        // Device-specific code
        reject(RCTErrorUnspecified, [NSString stringWithFormat:@"Unable to open URL: %@", URL], nil);
      #endif
    }
  }];
}

RCT_EXPORT_METHOD(canOpenURL:(NSURL *)URL
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(__unused RCTPromiseRejectBlock)reject)
{
  if (RCTRunningInAppExtension()) {
    // Technically Today widgets can open urls, but supporting that would require
    // a reference to the NSExtensionContext
    resolve(@NO);
    return;
  }

  // This can be expensive, so we deliberately don't call on main thread
  BOOL canOpen = [RCTSharedApplication() canOpenURL:URL];
  NSString *scheme = [URL scheme];
  if (canOpen) {
    resolve(@YES);
  } else if (![[scheme lowercaseString] hasPrefix:@"http"] && ![[scheme lowercaseString] hasPrefix:@"https"]) {
    // On iOS 9 and above canOpenURL returns NO without a helpful error.
    // Check if a custom scheme is being used, and if it exists in LSApplicationQueriesSchemes
    NSArray *querySchemes = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"LSApplicationQueriesSchemes"];
    if (querySchemes != nil && ([querySchemes containsObject:scheme] || [querySchemes containsObject:[scheme lowercaseString]])) {
      resolve(@NO);
    } else {
      reject(RCTErrorUnspecified, [NSString stringWithFormat:@"Unable to open URL<EMAIL_ADDRESS>Add %@ to LSApplicationQueriesSchemes in your Info.plist.", URL, scheme], nil);
    }
  } else {
    resolve(@NO);
  }
}

RCT_EXPORT_METHOD(getInitialURL:(RCTPromiseResolveBlock)resolve
                  reject:(__unused RCTPromiseRejectBlock)reject)
{
  NSURL *initialURL = nil;
  if (self.bridge.launchOptions[UIApplicationLaunchOptionsURLKey]) {
    initialURL = self.bridge.launchOptions[UIApplicationLaunchOptionsURLKey];
  } else {
    NSDictionary *userActivityDictionary =
      self.bridge.launchOptions[UIApplicationLaunchOptionsUserActivityDictionaryKey];
    if ([userActivityDictionary[UIApplicationLaunchOptionsUserActivityTypeKey] isEqual:NSUserActivityTypeBrowsingWeb]) {
      initialURL = ((NSUserActivity *)userActivityDictionary[@"UIApplicationLaunchOptionsUserActivityKey"]).webpageURL;
    }
  }
  resolve(RCTNullIfNil(initialURL.absoluteString));
}

RCT_EXPORT_METHOD(openSettings:(RCTPromiseResolveBlock)resolve
                  reject:(__unused RCTPromiseRejectBlock)reject)
{
  NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
  [RCTSharedApplication() openURL:url options:@{} completionHandler:^(BOOL success) {
    if (success) {
      resolve(nil);
    } else {
      reject(RCTErrorUnspecified, @"Unable to open app settings", nil);
    }
  }];
}

RCT_EXPORT_METHOD(sendIntent:(NSString *)action
                  extras:(NSArray *_Nullable)extras
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)
{
  RCTLogError(@"Not implemented: %@", NSStringFromSelector(_cmd));
}

- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const facebook::react::ObjCTurboModule::InitParams &)params
{
  return std::make_shared<facebook::react::NativeLinkingManagerSpecJSI>(params);
}

@end

Class RCTLinkingManagerCls(void) {
  return RCTLinkingManager.class;
}

The file is react-native/Libraries/LinkingIOS/RCTLinkingManager.mm
#import <React/RCTLinkingManager.h>

#import <FBReactNativeSpec/FBReactNativeSpec.h>
#import <React/RCTBridge.h>
#import <React/RCTUtils.h>
#import <React/RCTLog.h>

#import "RCTLinkingPlugins.h"

static NSString *const kOpenURLNotification = @"RCTOpenURLNotification";

static NSString *savedEvent = nil;

- (void)startObserving
{
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(handleOpenURLNotification:)
                                                 name:kOpenURLNotification
                                               object:nil];
    if (savedEvent != nil) {
        NSDictionary<NSString *, id> *payload = @{@"url": savedEvent};
        [self sendEventWithName:@"url" body:payload];
        savedEvent = nil;
    }
}

+ (BOOL)application:(UIApplication *)app
            openURL:(NSURL *)URL
            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
    postNotificationWithURL(URL, self);

    // if event was missed, save for firing later if event "url" is registered
    savedEvent = URL.absoluteString;

    return YES;
}

This solution is not working for me either.
I added the lines you described in RTCLinkingManager.mm.
I added the lines in AppDelegate.mm as instructed in RN Linking docs.
Is there possibly some extra setup to do ?
I find it surprising that a major feature like deeplinking is currently broken.
Any clue on a possible workaround ?

Hi,
Finally, I found that linking works correctly on iOS/android when I upgrade react-native from 0.68 to 0.70.1 and follow the setting requirement for Linking

Hi, Finally, I found that linking works correctly on iOS/android when I upgrade react-native from 0.68 to 0.70.1 and follow the setting requirement for Linking

Could you post a link to a repo with the working config ?
I tried the specific version 0.70.1 and url event still doesn't fire if app is open in background.

@leoparis89 :
the following is my react related repo.
"react": "18.1.0",
"react-native": "0.70.1",
I have url event fired in background by using
using Linking.addEventListener('url', callback)

working in android but only in killed state in iOS, very frustrating issue. do not know how to debug it.

Do we have some update?
I have same problem.Working on android in killed state and background on iOS doesn't work in background.
My enviroment is :
"react": "18.0.0",
"react-native": "0.70.6"
I use also some firebase packeges like (react-native-firebase/auth,react-native-firebase/app...) could this be a problem?

Solved. It was an error on my part:
the bellow snippet must be added in @implementatione AppDelegat not @interface AppDelegate
// For deep links
- (BOOL)application:(UIApplication *)application
   openURL:(NSURL *)url
   options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  return [RCTLinkingManager application:application openURL:url options:options];
}
// For universal links
- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity
 restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
 return [RCTLinkingManager application:application
                  continueUserActivity:userActivity
                    restorationHandler:restorationHandler];
}

Solved. It was error in my project. After upgrade of React Native version, I forgot to delete old settings file for iOS. (AppDelegat.m)
So, in project were AppDelegat.m and AppDelegat.mm. New version of React Native needs file with new extension .mm instead of .m and this caused problems with deep linking. When I removed old file with extension .m and move all logic for deep linking in file with extension .mm I got BINGO !!!

@SerafinAna I upgrade to RN 0.71.6 and move the deep linking code from AppDelegate.m to AppDelegate.mm
but the link is still unable to open
i got this
Error opening URL:  [Error: Unable to open URL: com.xxxxx://dev-xx.com/ios/com.xxxxx/login-callback?code=xxxxx. Add com.xxxxx to LSApplicationQueriesSchemes in your Info.plist.]
here is my AppDelegate.mm in case I missed out anything
#import "AppDelegate.h"

#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <React/RCTLinkingManager.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)app
            openURL:(NSURL *)url
            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  return [RCTLinkingManager application:app
                                openURL:url
                                options:options];
}

// For universal links
- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity
 restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
 return [RCTLinkingManager application:application
                  continueUserActivity:userActivity
                    restorationHandler:restorationHandler];
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  self.moduleName = @"nativeIntegration";
  // You can add your custom initial props in the dictionary below.
  // They will be passed down to the ViewController used by React Native.
  self.initialProps = @{};

  return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}

/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
///
/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
/// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`.
- (BOOL)concurrentRootEnabled
{
  return true;
}

@end

@ariel-bentu  how can you modified the library node_modules/react-native/Libraries/LinkingIOS/RCTLinkingManager.mm
this file will be restored when I run yarn
anyway, it will cause this build error in xcode
Use of undeclared identifier 'savedEvent'
so this is deep linking broken issue is still an issue in react native
I am using
"react": "18.2.0",
"react-native": "^0.71.6",

We're affected as well by the bug.

can we reopen this issue? this issue is not resolved yet

I also faced the same problem. In Android works but in iOS Linking.addEventListener is not working.
My RN Version: "0.70.6"

I manage to get it work on iOS
need to add the url to the xcode setting refer to
https://reactnavigation.org/docs/deep-linking/

if you use react native +0.71
change  AppDelegate.m to  AppDelegate.mm
// Add the header at the top of the file:
#import <React/RCTLinkingManager.h>

// Add this inside `@implementation AppDelegate` above `@end`:
- (BOOL)application:(UIApplication *)application
   openURL:(NSURL *)url
   options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  return [RCTLinkingManager application:application openURL:url options:options];
}
// Add this inside `@implementation AppDelegate` above `@end`:
- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity
 restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
 return [RCTLinkingManager application:application
                  continueUserActivity:userActivity
                    restorationHandler:restorationHandler];
}

I have the same issue on android - Linking.addEventListener('url', callback) doesn't fire callback when the app in background.
"expo": "~48.0.18",
"react-native": "0.71.8",
"react": "18.2.0"
Does anyone have decision?

after trying all of the solutions this worked for me solution


Update About Us page with personal details

Closes #54

Updated my section under about-us

LGTM!


Set connection expiration timeouts

Fixes: https://github.com/Azure/azure-sdk-for-net/issues/19457
300 sec was recommended by the arch-board
I did manual testing but don't know a good way to automate.

/check-enforcer evaluate


Microsoft.Diagnostics.Tracing.TraceEvent Version 2x not supported in WIN7

I had to go back to version <IP_ADDRESS>, good think it was just a matter of changing version nuget. will be good to upload doc to mention that.

I don't have easy access to a Win7 machine at the moment, however I know of no reason why traceEvent would not work on a Win7 machine.
I am going to close this, but feel free to reopen.  Just give me more information on what exactly you tried and how it failed so there is something to investigate.


Add dynamic NoC support for GS, WH, and BH

Problem description
Currently we can only assign one NoC to one DM core, we need DM cores to share the NoCs by splitting the cmd_bufs to two sets, one set for one DM core.
What's changed
we are going forward with the two NoC mode (DM_DEDICATED_NOC , DM_DYNAMIC_NOC ) for now, and add extra mode for FD later.
It won't be a general solution since when sharing buffers, we would need to reprogram some return address differently for different noc cmds. Making it a general case will require adding back all cmd fields to read/write/at, which cost perf
Note:
the soc desc for WH remains the same for now, later we need to change FD cores to right column and make the compute grid full size (7,10)or (8,10) for galaxy. This is because changing the grid size now will make tests fail on galaxy.
Note:
currently code size overflows for GS and N300 during profiler test which enables device profiling and dispatch profiling, which increases the code size. Need to find a way to reduce extra code size introduced by dataflow_api.h changes
Changed to use constexpr noc_index for kernel, extern noc_index for fw. Changed cmd_bufs to be constexpr
Checklist

[x] Post commit CI https://github.com/tenstorrent/tt-metal/actions/runs/11181173122
[x] Blackhole Post commit https://github.com/tenstorrent/tt-metal/actions/runs/11150906314
[x] Model regression https://github.com/tenstorrent/tt-metal/actions/runs/11152057360
[x] Device performance https://github.com/tenstorrent/tt-metal/actions/runs/11181351558/job/31089517101
[x] u-benchmark https://github.com/tenstorrent/tt-metal/actions/runs/11181972697/job/31087175696
[ ] t3k frequent https://github.com/tenstorrent/tt-metal/actions/runs/11152063117
[ ] t3k demo https://github.com/tenstorrent/tt-metal/actions/runs/11152067263
[x] tg frequent https://github.com/tenstorrent/tt-metal/actions/runs/11152085556
[x]  tgg frequent https://github.com/tenstorrent/tt-metal/actions/runs/11152071561

@pgkeller addressed the above comments, please let me know what else needs change?


feature: optimise the logic of using prometheus

Signed-off-by:  fengzixu<EMAIL_ADDRESS>
Ⅰ. Describe what this PR did

use the custom registry to replace the default.
upgrade the package called client-go of prometheus
add the new dependent package called promhttp
enable metrics about gRPC server

Related to:  https://github.com/alibaba/pouch/issues/2395
Ⅱ. Does this pull request fix one issue?

#2395 #2414
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗？)
Ⅳ. Describe how to verify it
First, I complied a new binary pouchd, and I run it with parameters:
 /home/xr/workspace/go-project/src/github.com/alibaba/pouch/bin/pouchd -l tcp://<IP_ADDRESS>:4243 -l unix:///var/run/pouchd.sock --enable-cri=true --cri-version=v1alpha2

Second, I visted successfully the url: http://<hostIP>:4243/metrics so that I can capture metrics produced by pouchd.

And then, I check some points about metrics:
Is there all metrics was registered successfully?
I saved the result about metrics: https://gist.github.com/fengzixu/ab018bd1d1fa8ddc56a6fe9150d36feb. I picked up some samples and compared with original metrics in code. There is no any difference.
Are the active metrics show commonly after I process some operations ?
I use the command pouch pull nginx to pull a image, and I re-captured the metrics from pouch. The figure of metrics about image has a little increase.
Whether the metrics about gRPC server show commonly?
I started up a k8s cluster together with pouch. And I created some pods. After that I found that the metrics about gRPC between pouchd and kubelet has some figures. It was beneficial for me when I debug this function.

Ⅴ. Special notes for reviews

@Starnop After I developed this PR and thought deeply about metrics of gRPC server. I considered that we should save the gRPC metrics. That was beneficial for developers when they want to develop some functions,  which perhaps were associated with communication between kubelet and pouchd.

Request review.

By the way, the main reason I upgrade the package called github.com/prometheus/client_golang/prometheus is that I want to use package called promehttp.

By the way, the main reason I upgrade the package called github.com/prometheus/client_golang/prometheus is that I want to use package called promehttp.

Sorry, I din't get the point about this PR. Could you explain more detail about what is good from using customize registry? Thanks

By the way, the main reason I upgrade the package called github.com/prometheus/client_golang/prometheus is that I want to use package called promehttp.

Sorry, I din't get the point about this PR. Could you explain more detail about what is good from using customize registry? Thanks

I describe some details about this PR in  https://github.com/alibaba/pouch/issues/2395. @fuweid

According to those comments about DefaultRegisterer, we can know that there is a big risk about using global variant in our code especially in the dependent package. If someone modifies this variant accidentally through some methods written in prometheus. That is a disaster. That is a reason, we should avoid using global variants as much as possible.

Good to know. Thanks

Except for the little problem above, LGTM. Thanks for your contribution. :)

@HusterWan @Starnop Request review again. I have fixed some problems above.

After I finished this PR, I have some throughts about using prometheus:
With the development of pouch,  we perhaps have more and more requirements about monitoring, especially prometheus and gRPC. Whether we shoud abstract and encapsulate a common package which can support some universal and standard approaches about add monitor to developers especially don't familar with Prometheus. @allencloud @Starnop @fuweid

lgtm

Thanks for your contribution. @fengzixu

@fengzixu could you follow up to change the name? thanks


QR code transfers

Generate a QR code for a signed transaction that then can be imported on the 'Generate & Send Offline Transaction' page (or a small phone app to send the transaction). This way using an offline device becomes even easier.

@jeee We are in the process of creating a phone app that is similar to what you are recommending. You can find out about it more here


[Bug] View field via one-to-one relationship

Bug report
What I did
I created a CrudController and a trait inside which I inserted the setupUpdateOperation method.
What I expected to happen
I entered 3 values from a belongsTo relationship
trait CompanyHierarchyControllerTrait
{
   /**
    * @throws \ReflectionException
    */
   private function getUpdateRequest()
   {
      $requestName = 'App\Http\Requests\Company\\' . collect(explode('_', $this->getSectionName()))->map(fn($section) => ucfirst($section))->join('') . 'UpdateRequest';
      return (new \ReflectionClass($requestName))->newInstance()::class;
   }

   /**
    * Define what happens when the Update operation is loaded.
    *
    * @see https://backpackforlaravel.com/docs/crud-operation-update
    * @return void
    * @throws \ReflectionException
    */
   protected function setupUpdateOperation()
   {
      CRUD::setValidation($this->getUpdateRequest());
      $this->crud->addFields([
         [
            'name' => 'company_id',
            'type' => 'hidden',
         ],
         [
            'name' => 'company.companyName',
            'label' => __($this->getResourcesLang() . '.updateOperation.label.name'),
            'type' => 'text',
            'attributes' => [
               'placeholder' => __($this->getResourcesLang() . '.updateOperation.placeholder.name'),
            ]
         ],
         [
            'name' => 'company.city',
            'label' => __($this->getResourcesLang() . '.updateOperation.label.city'),
            'type' => 'text',
            'attributes' => [
               'placeholder' => __($this->getResourcesLang() . '.updateOperation.placeholder.city'),
            ]
         ],
         [
            'name' => 'company.address',
            'label' => __($this->getResourcesLang() . '.updateOperation.label.address'),
            'type' => 'text',
            'attributes' => [
               'placeholder' => __($this->getResourcesLang() . '.updateOperation.placeholder.address'),
            ]
         ]
      ]);
   }

   /**
    * Define what happens when the List operation is loaded.
    *
    * @see  https://backpackforlaravel.com/docs/crud-operation-list-entries
    * @return void
    */
   protected function setupListOperation()
   {
      $this->setupButtonsVisibility();
      $this->crud->addColumns([
         [
            'name' => 'company.companyName',
            'label' => __($this->getResourcesLang() . '.listOperation.label.name'),
            'type' => 'text',
            'priority' => 1,
         ],
         [
            'name' => 'company.city',
            'label' => __($this->getResourcesLang() . '.listOperation.label.city'),
            'type' => 'text',
            'priority' => 2,
         ],
         [
            'name' => 'company.address',
            'label' => __($this->getResourcesLang() . '.listOperation.label.address'),
            'type' => 'text',
            'priority' => 3,
         ]
      ]);
   }
}

What happened
The values are not loaded into the edit form, but only the Model id.

Is it a bug in the latest version of Backpack?
After I run composer update backpack/crud the bug... is it still there?
YES
Backpack, Laravel, PHP, DB version
When I run php artisan backpack:version the output is:
PHP VERSION:
PHP 8.0.8 (cli) (built: Jun 29 2021 16:02:52) ( ZTS Visual C++ 2019 x64 )
Copyright (c) The PHP Group
Zend Engine v4.0.8, Copyright (c) Zend Technologies
LARAVEL VERSION:
v8.83.5@33b1b981266e3a19fbc826b60c4a6847e311ac95
BACKPACK VERSION:
5.0.16@ae6e01c21c6247727db23f23daa2bfc2500b1ccf

Hello @ThereSoftwareIEN
I think there must be some confusion between the writting/examples. You said one-to-one relation, and I don't think BelongsTo fits that bill.
If company is a BelongsTo relation that you want to be able to create on the current crud, you should be using the InlineCreate https://backpackforlaravel.com/docs/5.x/crud-how-to#what-field-should-i-use-for-a-relationship-1
Let me know,
Pedro

Hi @pxpm,
Excuse me. My fault. I understood that it also worked with BelongsTo.
Thanks


ReadTheDocs page + Documentation Generation

We need a read the docs (or similar style) page. That has:
-Installation instructions
-Descriptions of the agent API
-Descriptions of each agent
-Descriptions of each planner
-Descriptions of at least Operator implementations we plan on using going forward
-Descriptions of each learning mechanism type
-Descriptions of each learning mechanism implementation
-Descriptions of useful internal utilities like StateMultiView
There seems to be some start to auto documenting AL, but I don't know if this has reach the point of actually generating a document.

We have auto generating docs for each repo already: https://al-core.readthedocs.io/en/latest/ The install instructions are lifted straight from the repo's README. We can start putting do comments in code for the functional API docs but if you want things outside of that we need to make individual rst files and add them to the toc.


Crate versions vs features for each api-version

All of our other Azure SDK languages except Python (and I hear they are changing) ship a single binary that supports the latest REST API but does support passing a different api-version. Some languages like .NET use an enum that restricts the API versions you can pass to a known set, while others accept it as a string. In either case, neither provide guarantees it'll work, but it's offered more as an "escape hatch" for callers to use a specific API version.
We plan to do the same for Rust, but wanted to collect feedback if there is a strong reason why we should use features instead of shipping separate crates. Under the current design at the time this issue was opened, all supported API versions are made into features with the latest being the default e.g.,
[features]
package_2023_10_01 = []
package_2024_12_preview = []
package_2024_02_01 = []
default_tag = ["package_2024_02_01"]
default = ["default_tag"]
# Other features about reqwest elided as unnecessary for this example

Then in src/lib.rs:
#[cfg(feature = "package_2023_10_01")]
pub mod package_2023_10_01;
#[cfg(feature = "package_2023_12_15_preview")]
pub mod package_2023_12_15_preview;
#[cfg(feature = "package_2024_02_01")]
pub mod package_2024_02_01;
#[cfg(feature = "default_tag")]
pub use package_2024_02_01::*;

We have concerns about the default_tag feature, in that upgrading your crate means you get potentially breaking changes already. We try to mitigate breaking changes, of course, but it may happen not only with generated or hand-written code, but also the service and, thus, the generated code at least.
We are also worried that crates will only get bigger over time, and especially with ARM crates that rev often, that may be a problem with acquisition.
Additionally, what do we do with preview versions? In other languages, support for these only exist in beta packages and we drop support in stable releases (GA). We could do that even with the current plan, but now customers have to deal with both crate versions and "feature versions".
Thus, we don't see much difference with just doing what we do for other languages: the latest crate is generated from and targets the latest API version. The client and models are always in the crate root and if they update the crate version they may need to change some code either way, though we try to mitigate issues.
They could also still support multiple API versions with crate aliases:
[dependencies]
v1 = { package = "azure_security_keyvault", version = "1.0.0" }
v2 = { package = "azure_security_keyvault", version = "1.1.0" }

Then in their module:
use v1;
use v2;

let client1 = v1::SecretClient::new(...);
let client2 = v1::SecretClient::new(...);

The only disadvantage I can see is that we can't share types with crate aliases while we can with features; however, this isn't currently the case anyway because we generate complete copies of clients and models for each API version. I'm not convinced we'd want to share types e.g., models, anyway because it creates issues around properties that could be dropped and offers no benefit for unused properties: even if serialized, our REST API guidelines recommend failing on properties not supported by the requested api-version; though, most services choose to ignore them or even read/write them (not recommended).

We decided that crates will have a 1:1 relationship of crate version : latest spec version. Crates can be imported SxS so it shouldn't be a problem. Future user studies or beta feedback could change that.


Special character + is automatically removed from query string

Version
3.0.2
Reproduction link
https://codesandbox.io/s/zkl0jwwk43
Steps to reproduce
Add a query string with the special character "+" to the URL in Codesandbox, e.g. add<EMAIL_ADDRESS>to the end of the URL<EMAIL_ADDRESS>What is expected?
I can access the query parameter "test" with this.$route.query.test to get the value<EMAIL_ADDRESS>What is actually happening?
When I try to get the value of the query parameter "test" I only get "test<EMAIL_ADDRESS>(space instead of "+").

This is expected + produces spaces, you have to encode it with encodeURIComponent which yields %2B

@posva Thanks for checking. Does only "+" produce spaces or any other special character as well?
I'm also not sure why it's expected that "+" produces spaces. If I e.g. try to go to<EMAIL_ADDRESS>and type window.location.search in the console, I get the expected string<EMAIL_ADDRESS>and not "?parameter=test<EMAIL_ADDRESS>Any reason why Vue Routes behaves differently?

A bit long to explain but this does it pretty well: https://stackoverflow.com/questions/1211229/in-a-url-should-spaces-be-encoded-using-20-or

Saving future reads a click
https://www.w3.org/Addressing/URL/uri-spec.html

Within the query string, the plus sign is reserved as shorthand notation for a space. Therefore, real plus signs must be encoded. This method was used to make query URIs easier to pass in systems which did not allow spaces.


Cannot delete/kill an application in the UI

Because the UI is access via the YARN proxy, attempting to send a DELETE request results in a 405 (DELETE method not allowed). An option would be to send DELETE via web sockets. This means we would need to formalize a websocket protocol that for example sent a JSON structure like
{
"operation": "DELETE",
"uri": "/api/v1.0/appmaster/2"
"body":{}
}

I don't think we should compromise the REST api design just because the YARN web proxy don't support "DELETE".
What do think about make a redirection with javascript?

For the work around, we can use the command line tool.
Check http://www.gearpump.io/site/0.3/commandlinesyntax/#gear-kill

Yes, this will work as a work around. The problem with redirection is that the YARN use case (where there is a gateway proxy in front of the master UI) may be common. I do think we should have a WS protocol that can replace the REST one but have parity with functionality.

Eventually there is a solution with adding an extra line into response header.
path("ping"){
      get{
        respondWithMediaType(application/json){
          respondWithHeader(RawHeader("Access-Control-Allow-Origin","*")){
            complete{
                jsonPrefix + """{"result": "PONG"}"""
            }
          }
        }
      }
    }

I know that allows cross site scripting, but does it allow DELETE

This is YARN web proxy limitation, not Gearpump limitation. Close this.


Add template policy

Looks good to me as well. I think a few things we need to add, if everybody agrees with it.
IMO, the most important thing for the template policy would be to make sure that one can simply clone/dup it and start filling in the missing details, assuming they are already familiar with the basic principles of K8s resource assignment. For that I think we need to make sure a few things are in place. The policy implementation/struct:

has detailed comments in place in each Backend function explaining

what they are expected to do
and how, when this is not necessarily obvious (eg. just update containers in the cache, everything else should happen automatically)

stores/tracks everything a policy is expected to need, including

cache interface, system introspection interface, available and reserved resources
an instance of the CPU allocator (as a strong suggestion to use it)

hooks into configuration

IOW it has some config data, even if it is just dummy

logs all events/requests with reasonable details as they are received

@obaranov1 The current verification failure is due to go formatting errors. You can see them locally by running make verify-fmt and fix them by running make reformat if you have gofmt installed.

@obaranov1 the repo is moved, please resubmit this against https://github.com/containers/nri-plugins


⚠ Bofrost.lu has degraded performance

In 1f4a9a7, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1437 ms

Resolved: Bofrost.lu performance has improved in 324e590 after 6 minutes.


SQL Collation for SharePoint Databases – Latin1_General_CI_AS_KS_WS

Why there are no recommendations for SQL Collation for SharePoint databases?
Here is what I used to recommend to my customers for SharePoint 2013 and prior environments - SQL Collation for SharePoint Databases – Latin1_General_CI_AS_KS_WS for the SharePoint Databases
Supportability regarding SQL collation for SharePoint Databases and TempDB
https://nikpatel.net/2013/09/05/use-latin1_general_ci_as_ks_ws-collation-for-sharepoint-database-engine/
Thanks,
Nik

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

ID: 31588cac-efbb-da8f-8b1f-8f4a21298116
Version Independent ID: d5fead27-6212-5bc7-5bbf-9ce2066f479d
Content: Best practices for SQL Server in a SharePoint Server farm
Content Source: SharePoint/SharePointServer/administration/best-practices-for-sql-server-in-a-sharepoint-server-farm.md
Product: sharepoint-server-itpro
GitHub Login: @bentoncity
Microsoft Alias: stevhord

here is the missing link in above comment - Supportability regarding SQL collation for SharePoint Databases and TempDB - https://support.microsoft.com/en-us/help/2008668/supportability-regarding-sql-collation-for-sharepoint-databases-and-te

Nik, this also came up for SharePoint 2016 but according to this blog (https://social.technet.microsoft.com/Forums/office/en-US/4b7170a2-6df0-489d-88fb-cbb2d3e9521c/sql-server-collation-for-sharepoint-2016), SharePoint automatically applies this collation as needed.

I am confused.. Is that forum saying Latin1_General_CI_AS_KS_WS is automatically configured for the SharePoint Databases? This is no longer required for the DBAs to configure?

@patenik2 I took it to mean that, but now I'm not sure. In the forum Paul Stork says: "The standard default is supported for the system databases like master and tempdb. The alternate collation is only required for SharePoint content databases and will automatically be applied by SharePoint when those content databases are created."

SharePoint automatically uses the correct collation. The reason this recommendation is in place is that sometimes DBAs pre-create databases and this is guidance for them.

@tseward - Thanks. I have verified that SP2016 automatically applies SQL collation (Latin1_General_CI_AS_KS_WS) to SQL Server 2016 instance with SQL_Latin1_General_CP1_CI_AS collation. All SP databases including service applications and content databases have Latin1_General_CI_AS_KS_WS automatically applied. All four system databases (master, model, msdb, tempdb) uses SQL_Latin1_General_CP1_CI_AS collation including SQL server instance. I have tested SP installation and so far, I haven't seen any weird issues.

@patenik2 If your issue is resolved, can you go ahead and close this issue? Thanks!


Behavior of different gripper action servers unexpected and inconsistent

We're trying to grasp objects with unknown width using the standard Panda gripper. For this, we tried both the GraspAction and the GripperCommandAction described here.
The GraspAction closes, then keeps applying a force, which is desired. However, the command seems to keep running. When aborting it using the StopAction and then trying to open it using  GraspAction but the full width, it tries to close again, making it impossible to release the object. From this, we found out the this action server seems to ignore the width argument entirely. When sending the same width command multiple times in a row, the gripper opens and closes alternatingly, which is probably undesired.
The GripperCommandAction instead honors the width argument that it is passed. However, this one doesn't keep applying the force when reaching the width is impossible due to an object being present between the fingers. This causes the object to slip out of the fingers when lifting the arm. In https://github.com/frankaemika/franka_ros/issues/16 someone explained that this can be avoided by setting the correct width. However, for grasping unknown objects, this is not feasible.
A hack to work around this is to use the GraspAction to close the fingers, and the GripperCommandAction to open the again. It works for us, is however very unintuitive. Ideally, the GraspAction would follow the commanded width and apply the desired force, so that this hack would not be necessary.
Versions of software we use:
Ubuntu 18.04
ROS melodic
libfranka version 0.8.0
franka_ros branch noetic-devel
Franka panda firmware: 4.0.4

Hello there and thanks for your interest in franka_ros.
You are already on the right track. The issue is the way the Grasp action works. Grasp closes the fingers as far as possible until a contact is detected. Only then it will check if the with between the fingers is close (i.e. within the tolerance epsilon you specified) to the width you specified. If this condition is met, the gripper keeps applying the force thus holding any object between the fingers. Otherwise it will not exert any forces since it is assumed you grasped something unintentional.
If you want to bring the fingers to a predefined width, please use the Move action instead.
With the epsilon parameter you can essentially specify the uncertainty about the object you want to grasp. In the case you don't know anything about your object's size you can send an action goal with a width of 4cm and an epsilon tolerance of +/-4cm:
rostopic pub --once /franka_gripper/grasp/goal franka_gripper/GraspActionGoal "{ goal: { width: 0.04, speed: 0.1, force: 5, epsilon: { inner: 0.04, outer: 0.04 }}}"

This means, that the check above will always succeed for any object between the fingers. Whenever you are done grasping either call Stop or Move depending on your application.
Does this make things clearer to you?

I hope this could solve your issue, feel free to reopen if problems persist


Fix Stop JupyterHub Notebook Server keyword

Restore workarounds (Sleep, Wait, ...) that were present in previous version of this keyword to make it more reliable
Signed-off-by: Jorge Garcia Oncins<EMAIL_ADDRESS>

It's being tested here: https://opendatascience-jenkins-csb-rhods.apps.ocp4.prod.psi.redhat.com/job/rhods-ci-pr-test/171/console


partitions and splits ready for release, including txt file specifying exact intervals which are secret

@una-dinosauria This is what you are already working on! I am just tracking it here. :smile:
My proposal is to define secret intervals as follows:

an interval centered around each test-query
we denote the time of this query as t
the "secret interval" is the union of:

(t - 15s, t + 15s), and
(pose_t - 30m, pose_t + 30m)

Secret intervals could then be specified as a CSV with the following structure:
log_id,start_timestamp,end_timestamp

This way whenever I build a fresh index version, any row that would fall within that interval would be set to a blank pose. Of course, the pose data to actually build the indexes comes from the private raw pose files.
Let me know what you think!

I've updated https://github.com/pit30m/pit30m-internal/issues/4 with details on how to compute this using the internal package. Please let me know what you think!
The shared files are given per-log, and have the start_timestamp,end_timestamp with poses that are in the intersection of the query and test sets. This is ~1M poses with the current partitions.

@AndreiBarsan can we close this now that we have partitions from dense utm poses and robust code to compute them?

Yep, I also uploaded the sanitized all_poses, raw_utms and wgs84 files to the bucket so this is safe to close.


better bugs handling Improvement

Will be better, have shorter frequently pre-release for better error handling. The user who want to use a more updated T3D can use this, then we can manage the new bugs in a better way if exist.
What latest dev? the questions here is, what the commit that you were using?
If we need to hunt down an old bug, we can go through fewer commits and not pages and pages of commits :dart:
in the meantime I will be doing this in this post, hmm not sure how many times, but at least 2 times in a months. Please redirect the new people to my post if they want to use a more update version.
http://forums.torque3d.org/viewtopic.php?f=2&t=665

I was actually pondering on doing this myself once 3.9 finalized. If you wanted to spearhead this though, that'd be pretty rad!
Thanks for your help : D

We used to have CI servers that provided this sort of thing. They were always pretty wonky though. Having something set up that worked properly would be :ok_hand:

@eightyeight I remember we was using Jenkins....and what happened with the server?
BTW how can we do a proper unit test? for TS or C++? I saw a few info scattered around but none seems to work.
@Areloch yea I can do that, right now for windows though until I have a build config for Linux

Ok I think we can close this, basicatly the main point for this "issue for improvent" was to have/allow frecuently releases, and allow this way more test in the dev_branch, for those people that want to use this branch obviously not using the cmake/compile path...

For the final users that want use the new features only in dev_branch.
You need to upgrade to a new version, do a quick test of the features before upgrade your project.
Finding bugs, If you are unsure about what commit broke X feature, just download the unofficial release, and do a test or compare between releases.
Test others options like SDL, Bullet, etc
Helping in report bugs "more easily", just reporting what "unofficial release" have the issue. Broken down the dev_branch in "little release chunks"
Avoid have installed development dependencies (SDks), just download the dev_binary and load your scripts "exec("./myFolder/myScripts/myMainProyect.cs");" - if you are like me and have all your stuff in one folder for easy migrate your project.

Forum: http://forums.torque3d.org/viewtopic.php?f=2&t=665
T3D v3.9: http://forums.torque3d.org/viewtopic.php?f=2&t=665#p6230
Unofficial binary releases: https://github.com/John3/Torque3D_Unofficial/releases
We need at some point a properly configured CI... right now this can help.

BTW how can we do a proper unit test? for TS or C++?

For C++ unit tests: http://wiki.torque3d.org/coder:unit-testing
I was working on a unit testing framework for TorqueScript and it's somewhat functional, but I never integrated it into the templates in any meaningful way.


Build Concept for the fabric8 integration

Description
As a developer, I want to understand how the fabric8 services integrate to provide build facilities via the web frontend. I want to understand the architecture, incoming design decisions and requirements for creating the integrated build service and the technical tasks required for it.
Functional Acceptance Criteria

Along the existing build system document, the integration between the existing ALM systems and the fabric8 systems are described. That includes an architectural diagram and a description on how the usecases described by ALM are realized by the integrated system.
The tasks required for the integration are described in the document in a story granularity with the goal of creating userstories from that list.

Non-functional Acceptance Criteria

The resulting artifact is a document.
The resulting artifact is considered a architecture/definition overview that includes all above FACs. 3. Goal is to do detailed definitions in later stories.
Goal is to achieve a mutual understanding of the system at large and the needed definition / implementation work.

Note: this is a "technical userstory" that is not recommended in a Scrum process, but in reality very common. It provides means of doing technical groundwork that is not directly covered by user experiences. The "story" is needed to integrate the work entity into the existing process.

Closing this issue! As it is already in the pipeline


README: add openssf best practice badge.

To prepare LF AI & Data project proposal, openssf best practice should be registered.

:memo: TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #2670. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/.


Add bash completion

It would be very handy if the micro command provided bash completion.
In my view the best would be to adopt the echo 'source <(micro completion bash)' >>~/.bashrc technique [2].
It looks like the library being used supports automatic generation of completion for bash, zsh and others [1].
[1] https://github.com/urfave/cli/blob/master/docs/v2/manual.md#bash-completion
[2] https://kubernetes.io/docs/tasks/tools/included/optional-kubectl-configs-bash-linux/#bash

Thanks for providing the links.
The CLI has been moved over to https://github.com/go-micro/cli
Just added auto completion there.
source <(go-micro completion bash)


update user form issue

the password default should NOT be required ,
multiple-choice for Role
If there is an issue in the API, please open an issue in API https://github.com/dotkernel/api

Fixed in #19


Mocha command fixes

Based off #43, but also specifies the test directory to prevent mocha from trying to test .spec* files in node_modules.
@SimenB

You don't have to specify test,  it's the default. Which is why I renamed it from tests

You are correct. This branch had already fixed the issue I was seeing in other branches. It is a minor change though, and I will revert the commit fec29c8 in a later PR. It was the bithound check that was really blocking this branch.

#47 reverts this


[Question] How to broadcast refresh through all clients without webhook

I read the note from Spring-cloud-config

the default configuration also detects filesystem changes in local git repositories (the webhook is not used in that case but as soon as you edit a config file a refresh will be broadcast).

Does this mean no dependency of spring-cloud-config-monitor and no /endpoint of /monitor, just enable and config rabbitmq info it will refresh all spring-cloud-config client?
But indeed, it would not work..
Could u guys show me an example of how to fulfill this scenario??
Thanks a lot

Have your tried adding spring-cloud-bus and spring-cloud-monitor to the classpath?  Does it work then?

@ryanjbaxter
hi, Sure, it works, I followed this page asimio's toturial and everything goes fine
when I saw the official site Note about absence of webhook of git, I want to use this pattern cause I have many repos for huge of projects, it is not a best practice for configure webhook on these repos.

the default configuration also detects filesystem changes in local git repositories (the webhook is not used in that case but as soon as you edit a config file a refresh will be broadcast).

@ryanjbaxter
Does this default configuration means removing webhook  only?

So you are editing the file in your local git repo and not seeing a refresh event broadcasted?

@ryanjbaxter yes，so I posted a issue and question here.
Here is my configurations:

application.yml

spring:
  cloud:
    config:
      server:
        git:
          uri: http://<IP_ADDRESS>/devops/spring-cloud-configs.git
          search-paths: test1/
          username: leo
          password: 1366662Ti
    bus:
      enabled: true
      trace:
        enabled: true
  rabbitmq:
    host: localhost
    port: 5672
    username: guest
    password: guest
  profiles:
    active: config-monitor
server:
  port: 8003

bootstrap.yml

spring:
  application:
    name: configurations``

> and dependencies same as official

             <dependency>
		<groupId>org.springframework.cloud</groupId>
		<artifactId>spring-cloud-config-monitor</artifactId>
		<version>1.3.1.RELEASE</version>
	</dependency>
            <dependency>
                   <groupId>org.springframework.cloud</groupId>
                   <artifactId>spring-cloud-starter-bus-amqp</artifactId>
                   <version>1.3.1.RELEASE</version>
            </dependency>`

When config web hock as http://<IP_ADDRESS>:8003/monitor, everything goes fine, when remove hook, could not refresh

@dsyer, might u cc this issue？
I have hacked spring-cloud-bus and  found  it use this class RefreshRemoteApplicationEvent to refresh.

There is no way to broadcast refresh requests without /monitor or by triggering a manual refresh using /bus/refresh unless you code something by hand.

@spencergibb , Yeah I saw the code, I try to make a curl request to simulate the request to monitor like

curl -v -X POST "http://localhost:8003/monitor" -H "Content-Type: application/json" -H "X-Event-Key: repo:push" -H "X-Hook-UUID: webhook-uuid" -d '{"push": {"changes": []} }'

@spencergibb
I have finish this task with urlconnection and simulate the request above.
Thanks all you guys, I will close this question.


Permissions issues

Given a user with"Staff User" status and all available permissions, they cannot edit pages.
However, if that user goes to administration, he can then assign himself a global permission that would then allow him to add/edit/delete pages.
Very odd.

#4435 also raises some related questions around permissions.


fix-fstype: Added.

Update a collection of fonts fsType value to Installable Embedding.
Google Fonts requires Installable Embedding (0):
https://github.com/googlefonts/gf-docs/blob/master/ProjectChecklist.md#fstype
Microsoft OpenType specification:
https://www.microsoft.com/typography/otspec/os2.htm#fst
e.g:
python fontbakery-fix-fstype.py [fonts]
Needed for https://github.com/google/fonts/issues/641

great! :-)


Migrate codec-haproxy tests to JUnit 5

https://github.com/netty/netty/issues/10757#issuecomment-848445551

Thanks a lot!


AbortTx inlcuding some plutus validation

Obviously fails on error "where is this coming from?" and this is where this work stream ought to continue


Remove version: Principle.Lusun version 2.0.0

[Automated] It returns code over 400 in all urls
Microsoft Reviewers: Open in CodeFlow

URL: https://releases.lusun.com/lusun-2.0.0-win-x64.exe
Response Error: The remote server returned an error: (403) Forbidden.
(Automated message - build 911)


Add docker-multi-container-app example

Example for docker provider

Blocked by #224

It works now :)


benchmark doesn't work.

I follow the following installation guide to install the package on ubuntu18.04 with python3.7
If I try to train an agent using the benchmark offered in the benchmark directory.
It complains following errors in ./log/results/run/4lane-1/PPO_Simple_xxxx/error.txt. And I copy the corresponding files as follows.
$ python run.py scenarios/intersections/4lane -f agents/ppo/baseline-continuous-control.yaml /home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py:15: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
/usr/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
Traceback (most recent call last):
  File "run.py", line 31, in <module>
    from benchmark.agents import load_config
  File "/home/nics/work/RL/SMARTS/benchmark/agents/__init__.py", line 35, in <module>
    from . import common
  File "/home/nics/work/RL/SMARTS/benchmark/agents/common.py", line 30, in <module>
    from ray.rllib.agents.callbacks import DefaultCallbacks
ModuleNotFoundError: No module named 'ray.rllib.agents.callbacks'

Such a problem could be avoided by upgrading ray to a higher version(at least 0.8.5, I found such API in the official documents https://docs.ray.io/en/releases-0.8.4/search.html?q=ray.rllib.agents.callbacks&check_keywords=yes&area=default#)
However, it ray==0.8.5, it complains about a new problem as shown in this block:
$ python run.py scenarios/intersections/4lane -f agents/ppo/baseline-continuous-control.yaml
/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py:15: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
/usr/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
Traceback (most recent call last):
  File "run.py", line 31, in <module>
    from benchmark.agents import load_config
  File "/home/nics/work/RL/SMARTS/benchmark/agents/__init__.py", line 35, in <module>
    from . import common
  File "/home/nics/work/RL/SMARTS/benchmark/agents/common.py", line 31, in <module>
    from ray.rllib.evaluation.observation_function import ObservationFunction
ModuleNotFoundError: No module named 'ray.rllib.evaluation.observation_function'

Therefore, I upgrade again to ray==0.8.6
However, it complains following errors in ./log/results/run/4lane-1/PPO_Simple_xxxx/error.txt., when I train an agent.
$ python run.py scenarios/intersections/4lane -f agents/ppo/baseline-continuous-control.yaml

And I copy the corresponding files as follows.
Failure # 1 (occurred at 2020-12-16_22-54-33)
Traceback (most recent call last):
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/tune/trial_runner.py", line 468, in _process_trial
    result = self.trial_executor.fetch_result(trial)
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/tune/ray_trial_executor.py", line 430, in fetch_result
    result = ray.get(trial_future[0], DEFAULT_GET_TIMEOUT)
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/worker.py", line 1474, in get
    raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(ValueError): ray::PPO.train() (pid=24996, ip=<IP_ADDRESS>)
  File "python/ray/_raylet.pyx", line 446, in ray._raylet.execute_task
  File "python/ray/_raylet.pyx", line 400, in ray._raylet.execute_task.function_executor
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/rllib/agents/trainer.py", line 497, in train
    raise e
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/rllib/agents/trainer.py", line 486, in train
    result = Trainable.train(self)
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/tune/trainable.py", line 261, in train
    result = self._train()
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/rllib/agents/trainer_template.py", line 132, in _train
    return self._train_exec_impl()
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/rllib/agents/trainer_template.py", line 170, in _train_exec_impl
    res = next(self.train_exec_impl)
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/util/iter.py", line 731, in __next__
    return next(self.built_iterator)
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/util/iter.py", line 744, in apply_foreach
    for item in it:
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/util/iter.py", line 744, in apply_foreach
    for item in it:
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/util/iter.py", line 814, in apply_filter
    for item in it:
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/util/iter.py", line 814, in apply_filter
    for item in it:
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/util/iter.py", line 744, in apply_foreach
    for item in it:
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/util/iter.py", line 744, in apply_foreach
    for item in it:
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/util/iter.py", line 744, in apply_foreach
    for item in it:
  [Previous line repeated 1 more time]
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/util/iter.py", line 847, in apply_flatten
    for item in it:
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/util/iter.py", line 799, in add_wait_hooks
    item = next(it)
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/util/iter.py", line 744, in apply_foreach
    for item in it:
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/util/iter.py", line 744, in apply_foreach
    for item in it:
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/util/iter.py", line 744, in apply_foreach
    for item in it:
  [Previous line repeated 1 more time]
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/util/iter.py", line 445, in base_iterator
    yield ray.get(futures, timeout=timeout)
ray.exceptions.RayTaskError(ValueError): ray::RolloutWorker.par_iter_next() (pid=24977, ip=<IP_ADDRESS>)
  File "python/ray/_raylet.pyx", line 446, in ray._raylet.execute_task
  File "python/ray/_raylet.pyx", line 400, in ray._raylet.execute_task.function_executor
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/util/iter.py", line 1125, in par_iter_next
    return next(self.local_it)
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/rllib/evaluation/rollout_worker.py", line 263, in gen_rollouts
    yield self.sample()
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/rllib/evaluation/rollout_worker.py", line 528, in sample
    batches = [self.input_reader.next()]
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/rllib/evaluation/sampler.py", line 59, in next
    batches = [self.get_data()]
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/rllib/evaluation/sampler.py", line 164, in get_data
    item = next(self.rollout_provider)
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/rllib/evaluation/sampler.py", line 518, in _env_runner
    base_env.send_actions(actions_to_send)
  File "/home/nics/venv/python37_smarts_rllib/lib/python3.7/site-packages/ray/rllib/env/base_env.py", line 379, in send_actions
    obs, rewards, dones, infos = env.step(agent_dict)
  File "/home/nics/work/RL/SMARTS/benchmark/wrappers/rllib/simple.py", line 27, in step
    rewards = self._get_rewards(self._last_observations, observations, rewards)
  File "/home/nics/work/RL/SMARTS/benchmark/wrappers/rllib/simple.py", line 15, in _get_rewards
    res[k] = self.reward_adapter(last_observation[k], observation[k], reward[k])
  File "/home/nics/work/RL/SMARTS/benchmark/agents/common.py", line 989, in single_frame
    raise ValueError(f"Goal type: {type(goal)} has no attr named: position.")
ValueError: Goal type: <class 'smarts.core.scenario.EndlessGoal'> has no attr named: position.

Might I request anyone to help?
Thanks a lot

Such problem also exists for ray==0.8.7/1.0.0/1.0.1; for smarts==0.4.7 & 0.4.8 release version

Hello @JianmingTONG , the issue you are having here is that the mission assigned to the ego in the 4lane/scenario.py is an EndlessMission which does not have a goal position since it is endless. You will need to change it to a Mission with a route(or remove mission entirely) the and then rebuild the scenario with scl scenario build --clean scenarios/intersections/4lane.
Example 4lane/scenario.py:
from pathlib import Path

from smarts.sstudio.genscenario import gen_scenario
from smarts.sstudio.types import (
    Flow,
    Mission,
    RandomRoute,
    Route,
    Scenario,
    Traffic,
    TrafficActor,
)

ego_missions = [
    Mission(
        route=Route(begin=("edge-south-SN", 1, 10), end=("edge-west-EW"), ),
    ),
]

scenario = Scenario(
    traffic={
        "basic": Traffic(
            flows=[
                Flow(
                    route=RandomRoute(),
                    rate=3600,
                    actors={TrafficActor(name="car"): 1.0},
                )
            ]
        )
    },
    ego_missions=ego_missions,
)

gen_scenario(
    scenario=scenario, output_dir=Path(__file__).parent,
)

Thanks. This fixed my problem


Keep all LoadGen files under loadgen/

Now that we have a special loadgen/ directory, would it make sense to move there all the related files from the root directory?
.gn
BUILD.gn
CONTRIBUTING.md
DEPS
LICENSE.md
Makefile
README.md
loadgen_pymodule_setup_lib.py
loadgen_pymodule_setup_src.py

For example, it seems that while all *.md files belong to the root directory, loadgen_* and Makefile clearly don't. (Not sure about .gn, BUILD.gn and DEPS that may need to stay in the root directory.)

@briandersn

.gn, BUILD.gn, and DEPS have some restrictions on where they can go. I might be able to move them to the loadgen dir, but it would require some investigation and potentially wasted effort.
I should be able move the loadgen_* and Makefiles though.

.gn, BUILD.gn, and DEPS have some restrictions on where they can go.

Yeah, that's why I was cautious to say that we may need to keep them where they are.

I should be able move the loadgen_* and Makefiles though.

Great. The reason for creating this issue was that I spent a few moments panicking while trying to locate Makefile :)

very low priority for now

Can be sneaked with many LoadGen updates.


Added missing sample code for XML aliases

Added sample code + removed some unused code.

Related to #750.


Switch off pylint or configure pylint way better

Is your feature request related to a problem? Please describe.
pylint makes me feel bad. I spend a lot of time fighting pylint over code smells. We've also had issues in the past where pylint gives false positives because we either track a new version of python or other reasons.
Describe the solution you'd like
I was thinking of switching to pycodestyle or taking a deep dive off pylint's documentation to configure it better.
Describe alternatives you've considered
I've had lots of dark thoughts alone in the parlor late at night, deep into my third tumbler of whiskey. I discussed alternatives above.
Additional context
>>> from __future__ import braces
  File "<stdin>", line 1
SyntaxError: not a chance

My test with configuring pylint way back in the day left it insanely slow relative to no config, even when config was the same as no config (all defaults). Not sure why, but pycodestlye may be a better option. Would it make sense to just use tox as an executor? Might simplify all the tooling use to a single frontend and allow us to swap things out without devs needing to change anything in their workflow.


Switch the zuul jobs to voting

The tempest job has been stable for a while, and the kuttl job has been recently fixed. First step towards moving from prow to zuul.

recheck

recheck


Add additional types allowed for date properties

Summary
Date properties added by laravel-ide-helper currently do not allow additional types supported by Laravel. The $model->asDateTime($value) method (\Illuminate\Database\Eloquent\Concerns\HasAttributes::asDateTime) is used when setting a date attribute/property. This method checks for \Carbon\CarbonInterface, \DateTimeInterface, "numeric" value, or a date string.
This PR fixes this, and creates a PHPDoc type union containing the custom date class and the above mentioned types (\Carbon\CarbonInterface, \DateTimeInterface, integer, and string).
Note: based on what the asDateTime method expects, it no longer makes sense to type hint against a custom date class because any date value must be "numeric", a string, or implement either \Carbon\CarbonInterface or \DateTimeInterface (\Carbon\CarbonInterface implements this interface). \Illuminate\Support\Carbon extends \Carbon\Carbon which in turn implements \Carbon\CarbonInterface. Something to consider.
Type of change

[X] Bug fix (non-breaking change which fixes an issue)

Checklist

[X] Existing tests have been adapted and/or new tests have been added
[X] Add a CHANGELOG.md entry
[X] Update the README.md
[X] Code style has been fixed via composer fix-style

I have created this PR in response to @mfn's comments on #989.

@mfn, I think it would be better if this PR is merged before #989. What do you think?