text:
Enhanced Dependency Injection Use

Is there a way for dependency injection in Aurelia to do more than just (essentially) instantiate a class and make sure that that class is the one passed around? After talking with other developers who have used Unity in C# as DI, there seems to be so much more that DI can do than Aurelia is handling, but I could just not know as much about it in Aurelia.
So, if I had a single module that would export two different classes depending on who was asking for it, can Aurelia's DI handle that situation via some configuration?
For example, say I have an api class, and for some reason I had two different kinds of servers (server A & server B) I needed to ping depending on where it was asking, so that the only difference for this api class is the base url of the request. If I now have a class A that needs to make a request to server A, and also a class B that needs to go to server B, can I use DI here so that both of those classes (A & B) will receive the correctly configured api for servers A & B?

Sounds like you're looking for the equivalent of:
// configure the container
container.RegisterInstance<Something>("Server A", new Something("http://foo.com"));
container.RegisterInstance<Something>("Server B", new Something("http://bar.com"));

// resolve by name
var somethingA = container.Resolve<Something>("Server A");
var somethingB = container.Resolve<Something>("Server B");

// constructor injection
public MyClass([Dependency("Server A")] Something a, [Dependency("Server B")] Something b)
{
   .....
}

Here's the equivalent using javascript and Aurelia's container:
// configure the container
container.registerInstance("Server A", new Something("http://foo.com"));
container.registerInstance("Server B", new Something("http://bar.com"));

// resolve by name
var somethingA = container.get("Server A");
var somethingB = container.get("Server B");

// constructor injection
@inject("Server A", "Server B")
export MyClass(a, b)
{
   .....
}

Some notes:

In Aurelia, registration names are more commonly referred to as "keys" and don't need to be strings- they can be objects, numbers, constructor functions, anything really.
Unity containers can be configured via .config file. It would be possible to create an equivalent scheme for aurelia's container using json and the ES6 module loader
Additional info can be found in the docs at http://aurelia.io/docs.html and here.

Hope that helps!

Thanks! That was helpful, however, not quite exactly what I'm looking for.
So a use case that I currently just ran up against might be a better example.
I have an api client class that pings the server for data, however when testing, I have a flag to change that uses mock data instead. Now I have another view model that is in charge of getting items for an inbox (going to call it the inboxVM for this example). That inboxVM is in charge of getting the data from the api client, and formatting it for the view, it should not have to know about whether or not it's in a testing environment (that would truly be out of scope for a view model, and would be a pain to manage on every view model in the application). So when the inboxVM injects the api client, it shouldn't have to ask for apiClient and apiClientTest, rather it should just ask for apiClient. THEN, Aurelia's DI should be able to determine (based off some config) whether or not to serve up the apiClientTest instance or the apiClient instance.
In your example, the registering of instances sounds absolutely like the first step. However, the injection in the example still requires both to be passed in to the class. Does that all make sense?

definitely makes sense, this is a common scenario.  Here's how you would do something like that:
main.js
import {ApiClient} from './api-client';
import {isDebug} from './configuration';

export function configure(aurelia) {
  ...
  ...
  // configure the container
  let container = aurelia.container;
  container.registerInstance(ApiClient, new ApiClient(isDebug));
  ...
  aurelia.start().then(a => a.setRoot());
}

inbox.js
import {inject} from 'aurelia-framework';
import {ApiClient} from './api-client';

@inject(ApiClient)
export class Inbox {
  constructor(api) { // instance registered at app startup will be injected here
    ...
  }
  ...
}

If you weren't passing a "debug" flag to your api client class and instead wanted to use a mock api client class, a naive approach would be to change the main.js code to something like this:
main.js
import {ApiClient} from './api-client';
import {ApiClientMock} from './api-client-mock';
import {isDebug} from './configuration';

export function configure(aurelia) {
  ...
  ...
  // configure the container
  let container = aurelia.container;
  container.registerHandler(ApiClient, ApiClientMock);
  ...
  aurelia.start().then(a => a.setRoot());
}

This does the job, but you really don't want to mix your mock container configuration logic with your production container configuration logic.  There's no need to be importing mock modules like ./api-client-mock in production scenarios.  A better approach would be to create two container configuration modules- one for production and one for testing and conditionally load them using the ES6 module loader:
import {isDebug} from './configuration';

export function configure(aurelia) {
  ...
  ...
  // configure the container
  let module = isDebug ? './debug-container-config' : './release-container-config';
  System.import(module)
    .then(() => aurelia.start())
    .then(a => a.setRoot());
  ...
}

I think that solves our use case and issue. Thanks for the help!

Another question for this. Back to the Api example with multiple servers. I need to have the same base api client, but depending on which module is using the api, the baseUrl of the fetch needs to be different. How can I have the modules just inject the api class, and DI know that depending on which class asked for the api, give it the one setup with the appropriate baseUrl?

hmmm- sounds like you're looking for the equivalent of unity's InjectionConstructor?
var clientA = new ApiClient("http://foo.com");
var clientB = new ApiClient("http://bar.com");
container.RegisterType<ModuleA>(new InjectionConstructor(clientA));
container.RegisterType<ModuleB>(new InjectionConstructor(clientB));

if that's what you're looking for, here's how it's done with Aurelia's container:
let clientA = new ApiClient("http://foo.com");
let clientB = new ApiClient("http://bar.com");
container.registerHandler(ModuleA, c => new ModuleA(clientA));
container.registerHandler(ModuleB, c => new ModuleB(clientB));

Another way of doing this would be to create a child containers and register the appropriate ApiClient instance in each of the child containers.  In practice this would be pretty tricky because you'd need to make sure ModuleA was always resolved from the correct child container, same thing for ModuleB.

I think I'm going to go with the approach of the registering of two "types" of api's, thanks. For future knowledge, could you register the handler via a path? For example, any modules that exist inside of specific folder have clientA as the api?

However, registering those classes in the main.js configure function might be a problem. The api client makes use of the HttpClient from Aurelia, and is currently injecting it. I could new up an HttpClient in the main.js configure function, but then if I use DI anywhere else with the HttpClient, to my understanding, the two won't be the same.

get the HttpClient from the container:
let http = container.get(HttpClient);
... proceed to configure the container ...

Thanks for all the help. Still learning all the ins and outs here with containers and DI

Hi guys, I've been working for over a year on a really powerful IoC container for TypeScript apps. I just released a new version and supports a lot of use cases:

Kernel modules
Injection of constant values
Injection of class constructors
Injection of factories
Auto factory
Injection of providers (async factory)
Injection of proxies
Multi injections
Tagged bindings
Custom tag decorators
Named bindings
Contextual bindings
Friendly exceptions (e.g. Circular dependencies)

You can learn more about the features at http://inversify.io/.
You can learn why I believe that my approach is better here. If you are interested in how it works from an architecture point of view you can check out this page.
I already asked for a way to replace the default injector just to do an experiment and try to showcase it to you guys. Would you be interested in such experiment?

I have tried using the register methods as @jdanyow mentioned above but I'm guessing the interface has changed. Does registration require a key even if you don't intend to resolve by key? I'm trying to register one concretion for an interface under debug config but another concretion in all other configurations and just can't figure out how to do this.
  if (environment.debug) {     aurelia.use.developmentLogging();     aurelia.container.registerHandler(IWebApiClient, TestApiClient);   }   else {     aurelia.container.registerHandler(IWebApiClient, WebApiClient);   }

@millicandavid there was a bug in the code I had shared above- I've updated it.
Needs to be:
....registerHandler(IWebApiClient, c => c.get(TestApiClient))

Thanks Jeremy. You're a life saver. Now if I can just figure out why the typescript transpiler can't find my interface even though it is clearly imported.

@millicandavid unfortunately you cannot use a typescript interface as a registration key. At runtime there's no interface (because interfaces don't exist in JavaScript). Try using an abstract class instead (assuming you're using the TypeScript 2.x RC).

Thanks again Jeremy. That makes complete sense. I was just used to the pattern of using an interface there and didn't even think about it. This is all working for me now.

Great advice @jdanyow thanks a lot.
I guess mock container configuration could also be loaded through a feature, or would that be abusing features for what they weren't meant for?
if (environment.debug) {
  aurelia.use.feature('mock-api');
}

@CasiOo that sounds like a great use-case for .feature.  Good thinking! 💯

What is the proper way to do this with the CLI and typescript
System.import(moduleName)     .then(module => module.configureContainer(aurelia.container))     .then(() => aurelia.start())     .then(a => a.setRoot());

@jdanyow on Jan. 28, 2016 you said...

A better approach would be to create two container configuration modules

I was able to get other suggestions working but I'm definitely in agreement that I don't want to load a ton of mocks into my production code. However, I'm at a loss on how the container configuration modules would work. Any chance you can provide a sample?

Hi,
sorry for hijacking this, but it looks like almost what I'd like to achieve.
My code base works for 2 somewhat different contexts, which share code.
In one context I will have a specific CurrentUserStore and in the other context I'll have AnotherCurrentUserStore. They are 2 different classes serving the same purpose (maintain the current user state), so they vary in code and behaviour depending on the context.
Now some part of my code are referencing the CurrentUserStore and getting some information that would be common to both context.
Overloading the CurrentUserStore DI reference seems like an appropriate way for me to not worry about which CurrentUserStore we are using, so I went ahead and did this:
function configureCurrentUserStore (container) {
  container.registerInstance(CurrentUserStore, OtherContextCurrentUserStore);
}

This is in the bootstrap of my other context app.
However, instead of having a proper instance object of OtherContextCurrentUserStore injected, I receive a reference to its function: function OtherContextCurrentUserStore(). Which is not what I need to be able to manipulate data afterwards.
I understand that this approach could work in my case:
container.registerHandler(ModuleA, c => new ModuleA(clientA))

But I am a bit annoyed when using this approach since the OtherContextCurrentUserStore also takes some autoinject instances as part of the constructor signature.
I am afraid that if I manually instantiate each of these instances to follow the registerHandler pattern, I will a) enter a loop of hell to instantiate each class and their DI manually (not tenable really) b) and most importantly will not be dealing with the same references of each class injected for each dependencies as what is instantiated in the rest of the app.
So my question is, how could I do the registerHandler pattern, but with a reference to the OtherContextCurrentUserStore that has been instantiated and registered in the DI engine?

@lemoustachiste I think I can make this super easy for you :) In the case above, registerInstance is not the API you want. That registers an already instantiated instance. If you have a constructor you want to instance, you would use registerSingleton or registerTransient depending on the lifetime you want for the object. Then the DI container will handle instantiating it on demand and supplying its dependencies.
Bear in mind that if you register two things in the container using the same key, that won't override anything. Instead, resolving the key will return the first thing that was registered and doing a getAll will return both. To override, you must create a child container and register the override in the child container. This is one of the main uses for child containers. Often in a complex app I will have a root DI container with all globally shared services, then I might create one child container per area or per screen (in and MDI type app) and within that child container register things that have a lifetime or alternate implementation that are specific to that screen instance alone. So, when the screen is closed, the child container can be disposed and all the resources cleaned up as well.

Thanks @EisenbergEffect, it worked very smoothly and I like that :).
For all intent and purposes I have used registerSingleton as indeed I want this to be the same occurrence throughout the app lifetime.
Thanks again for the prompt answer

authors: AStoker CasiOo EisenbergEffect djensen47 elitemike jdanyow lemoustachiste millicandavid remojansen

repo: aurelia/dependency-injection


text:
Add custom validation rule support

https://validatejs.org/#custom-validator
Add decorator / fluent API to cover.

Has any progress been made on this?  Is there a structure that is being proposed?
Quick suggestion would be something in the plugin config that dynamically adds properties to the current validator object, to provide the same api approach with custom validators as built-in ones.  Alternatively, a validators.custom property, that we then extend, if it's preferred to have some kind of division?
I assume the custom validators would need to be configured in the DI somehow, as for example the api lookup type validator mentioned in #29 would need httpClient injected in.

No progress on this one yet PR welcome.  Under the covers the ValidationRule class should probably just have a static method for adding the custom rule that works just like the current rule methods work.

@PWKad - I ended up hacking this together for myself today but I'm not sure I took the right approach. validate.async returns a promise, whereas aurelia-validatejs seems to strongly assume the opposite. I ended up converting all validate return values into promises, then using Promise.all() to wait on them all at once before returning to the original caller. I also publish each error into the reporter when Promise.all() resolves.
I also had to patch validate.js's async so that it doesn't reject if an async function returns an error.  That was stopping me from handling it later on with Promise.all().

👍  I'd like to provide a custom validator with my plugin :)
@PWKad I'm fine with working on this. I need some pointers though, how can this be done?

implemented!

source: gharchive/issue

authors: PWKad RWOverdijk aivins apawsey jdanyow

repo: aurelia/validatejs

license: mit

license_type: permissive

license_source: bigquery


text:
Swap failed weth-aex

Swap failed: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"data":{"code":-32603,"message":"Internal Error - Error: nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.. Please report a bug at https://github.com/aurora-is-near/aurora-relayer/issues","data":{"host":"r003.westcoast.us.testnet.internal.aurora.dev","cf-ray":"6e7d04bf271c1654-DME"}}}}'

same as #226

authors: HeiMoli mfornet

repo: aurora-is-near/aurora-relayer

license_source: github-api


text:
🛑 repl.co is down

In ea43367, repl.co (https://hello-repl.auteen.repl.co) was down:

HTTP code: 404
Response time: 579 ms

Resolved: repl.co is back up in 4d9a38f.

repo: auteen/autoreplit

license: MIT


text:
🛑 repl.co is down

In 591871a, repl.co (https://hello-repl.auteen.repl.co) was down:

HTTP code: 404
Response time: 336 ms

Resolved: repl.co is back up in 51a85fa after 7 hours, 11 minutes.


text:
Migrate from blue to core CI Jenkins instance

Make required changes for this repo to be tested by core jenkins CI instance
We are migrating all jenkins jobs from our blue instance to our core jenkins CI
instance.  This requires that we..

Run on a specified jenkins agent for the owning team
Use the sshagent wrapper to get access to git credentials

After this change is reviewed and merged, we will create a new jenkins pipeline
job for it on the core jenkins CI instance, currently hosted at
https://tools-jenkins-us-west-2.forge.auth0.net .  When that happens, it will
automatically run a build against the master branch. This will cause the publish
step to execute and we will need to confirm that it does not break anything
downstream and that it runs correctly.

The current state of the tests are too insecure to be run in internal CI for a public repo.

source: gharchive/pull-request


text:
use latest react version

The react version used was very outdated, so I updated it.

This is a blocker for me.
@gnandretta do you think it's possible to get a release out with updated dependencies soon?

It would be great to get this released.

Though I know work's being done on moving passwordless to Lock itself, the React version difference is the source of some trickiness in the Ember addon. It would make life a ton easier to get this merged in.
If this needs additional testing before merge, I'll be happy to help.
[Hope I'm not abusing the privilege, but I'll ping @aaguiarz since he's been active and lending a hand as of late.]

Hi @XaserAcheron, we're actually merging Passwordless and Lock in a single project. You can follow the progress here. There'll be no active development on this project anymore. We'll fix security issues only for the near future.

if you use yarn, you can pin the dependencies you want using the resolutions property. Sadly, it's not a minor update, since there were a lot of react upgrades between 0.14.0 and 15.4.2. We just can't justify investing more time debugging and make sure this works everywhere, since we're already putting a lot of effort in merging both Lock and Passwordless. I'm sorry you're being put through this. I promise you the new Lock+Passwordless will be amazing. If you want to use the new version (knowing we don't have proper support for it yet), please try npm install auth0/lock#feature-add-pwdless. The draft of the migration guide is located here: https://github.com/auth0/docs/pull/5016
The feature itself is finished. We had to put it on hold for now because we're releasing major versions of both auth0-js and lock and we don't want to conflate both releases.
Again, I'm sorry you're stuck in this "limbo" phase while we are putting things in order. Let me know if I can help you in any other way.

It's all good -- apologies for being a bit grumpy earlier.
Knowing that the feature is in finished draft stage actually helps a ton -- that gives me enough confidence to start trying it out. It seems more prudent to work on supporting the new API in the Ember addon rather than try and resolve the dependency differences, which I think works out best for everyone.
Hooray for progress!

authors: XaserAcheron arnihermann gerbenmeyer jeffgorder luisrudge


text:
err == JWT, token == undefined in async sign?

var jwt = require('jsonwebtoken');
jwt.sign(req.user, config.jwt.secret , {
	expiresIn: '365 days',
}, function (err, token) {
	log.debug("err: \n%s\ntoken: \n %s",err,token);
	if (err !== null) {
		return res.error(err);
	}
	res.apiResponse({
		id: newUser.id,
		email: newUser.email,
		isAdmin: !!newUser.admin,
		token: token,
	});
});

the call to log.debug() outputs:

[Fri Jul 08 2016 18:56:58 GMT+0000 (UTC)] DEBUG err:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6IjU3N2ZmNzdhMDM2NGQ2MTExY2FlNTY3OCI    sImVtYWlsIjoiZ2FycmV0dEA2Yml0Y29uc3VsdGluZy5jb20iLCJpc0FkbWluIjpmYWxzZSwiZGF0ZSI    6IjIwMTYtMDctMDhUMTg6NTY6NTguNTg1WiIsIl9fc3B0IjoiZXlKMGVYQWlPaUpLVjFRaUxDSmhiR2N    pT2lKSVV6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjem92TDJGd2FTNXpkRzl5YlhCaGRHZ3VZMjl0TDN    ZeEwyRndjR3hwWTJGMGFXOXVjeTgyVGt0WFdUaFFOekU1Uld4SU1YbG9ZV2RaVTBFMElpd2ljM1ZpSWp    vaWFIUjBjSE02THk5aGNHa3VjM1J2Y20xd1lYUm9MbU52YlM5Mk1TOWhZMk52ZFc1MGN5ODFiMmRJUzI    1TU1VUTRTRXB2ZUZsU1lrSXpVV1Z6SWl3aWFuUnBJam9pTXpJNU1UazBZemt0WWpVNU15MDBOREpsTFR    rell6UXRNRFEyTlRCaU9XRTVNek5rSWl3aWFXRjBJam94TkRZNE1EQTBNakU0TENKbGVIQWlPakUwTmp    nd01EYzRNVGg5LkhLalVZTTBKa0hiR242MFdQNGc0dDVkdno1c2VQWXBVMktRalZaSmJ6cGsiLCJpYXQ    iOjE0NjgwMDQyMTgsImV4cCI6MTQ5OTU0MDIxOH0.7iw_iSZ-05O1Py-nl2z7FCFbhGu63urt4_iqaeE    7DFc
token:
 undefined

I'm having trouble understanding if your documentation is incorrect and the signature to the callback is actually function(token,error) or if some type of error occured during signing. the req.user object does contain a base64 encoded JWT already that comes from stormpath, so if the error is correct it could be a result of that.

You are using an older version. Rule of thumb with node modules, if you have this kind of doubts on an API always read the readme from your node_modules folder not from github.

thanks for the hasty reply.

No problem, glad to help. I really sorry to cause this trouble , is the second time in a week someone has this issue. I think it will be better to explain this change directly on this readme

@jfromaniello no worries man, it happens to us all on occasion. I think an explanation in the Readme would do the trick. Appreciate your humility and hasty response which helped me to fix it quickly. I would rather see wrong documentation. Than someone who takes weeks to reply to new issues. Have a good day man, and BTW thanks for the awesome libraries


text:
🛑 Andreas Iten is down

In c3a89a4, Andreas Iten (https://www.andreasiten.ch) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Andreas Iten is back up in e5d45c5.

repo: authentiqdigital/upptime


text:
Services loginpass should support

[x] Google
[x] GitHub
[x] Gitlab
[x] Twitter
[x] Facebook
[x] Dropbox
[x] Reddit
[x] Linkedin
[x] Azure
[x] Discord
[x] Slack
[ ] Jira
[x] StackOverflow
[x] Bitbucket
[x] Auth0
[ ] Trello
[x] Twitch

I'd request ORCID (https://orcid.org), a service sometimes used for login in academia. An example of a popular tool that uses ORCID for login in https://overleaf.com.
I'd be happy to submit a PR if that's best. They support OAuth 2.0 and OIDC; config at https://orcid.org/.well-known/openid-configuration, announcement (from last October) at https://orcid.org/blog/2018/08/30/orcid-openid-connect-and-implicit-authentication

@bnewbold I'd like to accept a PR.

Hi,
Would you see fit to also support Ory Hydra? This would involve allowing the user to set their own base url, but the rest of the API is fully up to spec for both OAuth2 and oidc.
Thanks
M

Are you open to adding services that are not available to the general public as long as someone contributes support for them via a PR?

authors: ThiefMaster bnewbold lepture matthdsm

repo: authlib/loginpass


text:
Apache Http Client With Configurable Retry count

Hello,
Can we configure the(a) retry court or override the retry count ?
My usecase is to retry the Http call for a configurable value only if the assertions fail.
Otherwise I don't need retry count.
e.g. if my data write has some delay, then my read should try for few retries.
That means I should be able to retry n times with x time gap between the retries.
Please provide us

Global retries

Meaning - Applies to all test steps(scenarios)

Local retries

Meaning - Applies to only this specific test step(s)

Hi @dinesh76in, I've tried to cover the second part: 'Local retries'. PR #263 would allow you to add
"retry": {"max": 12, "delay": 100}
at each step.
In the sample, the request would be retried 12 times at most, with 100ms waiting time in between. As soon as the assertions succeed, the step is succesfully ended. If based on the 12th request the assertions still fail, the step is marked as failing.
I don't see the use case for a global (scenario-level) retry; could you explain when you'd want to do that?

Available in release 1.3.12

authors: BartRobeyns authorjapps dinesh76in

repo: authorjapps/zerocode


text:
Authenticated User object has empty profile attribute

My application is currently using two different IdPs, both using authorization code flow: Auth0 and a home-grown auth provider. oidc-client-ts operations (eg. sign in, sign out, etc.) are all working fine with both IdPs. The only issue is that, in our home-grown auth provider, the authenticated User object (the result of signinCallback() and what is stored in the oidc.user session storage item) is not spec-compliant. Namely, instead of having a profile property with at least sub, iss, aud, exp, and iat properties, the profile property is simply an empty object ({}).
Interestingly, the access_token prop value for the User/session storage item includes those properties. Here is an example of a decoded JWT:
{
  "sub": "admin",
  "aud": "",
  "nbf": 1734542699,
  "scope": [
    "profile"
  ],
  "iss": "http://localhost:8095/auth",
  "exp": 1734549899,
  "iat": 1734542699,
  "userId": 11,
  "jti": "<some guid>"
}

It seems like the User is simply the response from the token endpoint call that is made during the signinCallback() execution. The data included in the token endpoint call for our home-grown auth provider is:
grant_type: authorization_code
redirect_uri: http://localhost:8095/ui/authorize
code: <some code>
code_verifier: <some verifier>
client_id: my-service

And the response is:
{
  access_token: "some access token",
  expires_in: 7200,
  scope:  "profile",
  token_type: "Bearer"
}

Any idea why the profile property is an empty object for our one IdP?

After doing some debugging through the oidc-client-ts code while running my app, it looks like the profile prop is being set when Auth0 is the IdP in _validateIdTokenAttributes(). When the validateSigninResponse() function is being executed, the following check occurs:
if (response.isOpenId) {
  this._validateIdTokenAttributes(response);
}

When Auth0 is the IdP, response.isOpenId is true because there is an id_token.  response.profile then gets set (using the id_token) in _validateIdTokenAttributes().
When the home-grown IdP is used, response.isOpenId is false and profile never gets updated and remains the original value (an empty object).
So what is the home-grown IdP failing to do? Given the logic described above, it seems like it should be including an id_token.

repo: authts/oidc-client-ts


text:
🛑 Automat eshop § obchod.auto-mat.cz is down

In cb9f868, Automat eshop § obchod.auto-mat.cz (https://obchod.auto-mat.cz/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Automat eshop § obchod.auto-mat.cz is back up in 2324207.

repo: auto-mat/automat-statuspage


text:
🛑 Geoserver § geoserver1.prahounakole.cz is down

In 1a76457, Geoserver § geoserver1.prahounakole.cz (https://geoserver1.prahounakole.cz) was down:

HTTP code: 502
Response time: 4662 ms

Resolved: Geoserver § geoserver1.prahounakole.cz is back up in 435ec5c.


text:
🛑 Cyklisté sobě § www.cyklistesobe.cz is down

In 71bf156, Cyklisté sobě § www.cyklistesobe.cz (https://www.cyklistesobe.cz/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Cyklisté sobě § www.cyklistesobe.cz is back up in 3c3980b after 31 minutes.


text:
07 - Spotlight - Set search results

Applications - 1
Bookmarks & History - 0
Calculator - 1
Contacts - 0
Conversion - 1
Definition - 1
Documents - 1
Events & Reminders - 0
Folders - 1
Fonts - 1
Images - 0
Mail & Messages - 0
Movies - 0
Music - 1
Other - 0
PDF Documents - 1
Presentations - 1
Spotlight Suggestions - 0
Spreadsheets - 1
System Preferences - 1

Search results were not set correctly. Maybe search index needs to be rebuilt in the right order?

Had to click in the system prefs to activate the plist first. This seemed to resolve the problem.

repo: autological/dotfiles


text:
Missing release

For this reason imgflo-server currently depends on master, which is bad

Should have a git tag and be on NPM

And maybe also be moved to noflo Github org?

repo: automata/noflo-geometry


text:
added callback example

Added example as discussed in #59

added a callback example with live monitoring of BOHB training (runs and run parameters) to open and free Neptune project
example monitored experiment that extends example1 can be seen here

Codecov Report

Merging #65 into master will increase coverage by 0.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #65      +/-   ##
==========================================
+ Coverage   65.11%   65.16%   +0.05%
==========================================
  Files          28       28
  Lines        1846     1846
==========================================
+ Hits         1202     1203       +1
+ Misses        644      643       -1

Any news on this one @sfalkner ?

authors: codecov-io jakubczakon

repo: automl/HpBandSter


text:
v.0.6.4 to Dev

You want to make a PR to Talos
Thanks so much :) First, please take a moment to carefully check through
the below items:

[x] Changes have gone through actual use testing
[x] Docs are updated where relevant
[x] Code is PEP8
[x] All local tests have passed (run ./test.sh in /talos)
[ ] Travis tests have passed

Pull Request Test Coverage Report for Build 590

2 of 2 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.01%) to 85.485%

Totals

Change from base Build 584:
0.01%

Covered Lines:
1278

Relevant Lines:
1495

💛  - Coveralls

authors: coveralls mikkokotila

repo: autonomio/talos


text:
Anaconda running error

Hi! I am a newcomer. When I run Anaconda with: conda env creat -f environment.yaml , there is an error as follows:
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies.  Conda may not use the correct pip to install your packages, and they may end up in the wrong place.  Please add an explicit pip dependency.  I'm adding one for you, but still nagging you.
Collecting package metadata (repodata.json): done
Solving environment: failed
ResolvePackageNotFound:

pyembree=0.1.4

I want to know how to solve it!
And I have another question: Where is the dmc_* dependencies in setup.py?
Thank you so much!

have you solve the environment problem?

have you solve “pyembree=0.1.4”


text:
chore(CODEOWNERS-manual): fix line ending from CRLF to LF

Description

https://github.com/autowarefoundation/autoware.core/pull/137

This autogenerated PR has 2 commits but no changes.

Cause and solution
mfc@whale:~/projects/autoware/src/core/autoware.core/.github$ file -k CODEOWNERS-manual
CODEOWNERS-manual: ASCII text, with CRLF line terminators

sudo apt update && sudo apt-get install -y dos2unix

mfc@whale:~/projects/autoware/src/core/autoware.core/.github$ dos2unix CODEOWNERS-manual
dos2unix: converting file CODEOWNERS-manual to Unix format...
mfc@whale:~/projects/autoware/src/core/autoware.core/.github$ file -k CODEOWNERS-manual
CODEOWNERS-manual: ASCII text

How was this PR tested?
Notes for reviewers
None.
Interface changes
None.

Effects on system behavior
None.

Investigating how we couldn't detect it in:

https://github.com/autowarefoundation/autoware.core/pull/133

I tested the pre-commit for the broken mixed file at the auto-generated mid-commit:
pre-commit run -a
mixed line ending........................................................Failed
- hook id: mixed-line-ending
- exit code: 1
- files were modified by this hook

.github/CODEOWNERS: fixed mixed line endings

It seems, we are only checking for mixed line endings with this hook:
https://github.com/autowarefoundation/autoware.core/blob/dc958377ca5e2f9852f39ff251a09568c4994dfe/.pre-commit-config.yaml#L24
I couldn't find a quick solution to enforce LF for all files only with pre-commit yet.


text:
feat(behavior_path_planner): add dynamic avoidance debug marker

Description
This can be used by using new behavior_path_planner architecture and enabling dynamic_avoidance module.
Added a marker of objects to avoid in dynamic_avoidance module (pink rectangular)

Tests performed

planning simulator
Effects on system behavior

Can visualize dynamic objects to avoid
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR follows the pull request guidelines.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@satoshi-ota Could you review the PR.


text:
refactor(autoware_predicted_path_checker): prefix package and namespace with autoware

Description
prefix package and namespace with autoware
Related links
Parent Issue:

https://github.com/autowarefoundation/autoware/issues/4569

How was this PR tested?
Notes for reviewers
None.
Interface changes
None.

Effects on system behavior
None.

Closing, it's been a while since this PR was updated.


text:
Avalanche proto

-I had to add back the .gitmodules file to specify the avalanche-network-runner submodule, the other rust projects weren't happy when it was missing

I think that I accidentally included a lot of build files here or something, going to get rid of those to reduce file space


text:
Ros2 humble - remaining flatland_server tests

Finished the migration to ros2 of the remaining flatland_server tests
Fixed a problem on YamlPreprocessor: get_parameter usage changed
Fixed some integer comparison problems in tests: comparing integers of different sizes
Added a translation of flatland_server's launch file to the new/recommended python syntax
Removed the remaining, unused test launch files

The pipeline test that failed appears to be related to the system's liblua version:

With liblua 5.1 the result is 223.0
With liblua 5.3 the result is 223

My friend's system has liblua 5.3, so they changed the test (everything seemed fine). The lua-dev dependency of flatland_server is liblua 5.1, so we'll change it back.

Thanks for this contribution. The changes look good and CI is happy :)

authors: JoaoCostaIFG josephduchesne

repo: avidbots/flatland


text:
Possible race conditions when accessing the ByteRingBuffer from multiple tasks

The BleSerial_Bridge.ino demo application uses two different tasks to access the BLE and the ByteRingBuffer can be affected by race conditions. Here I propose a solution that uses the same ByteRingBuffer API but it is thread-safe.
// Thread safe ring buffer
#pragma once
#include <Arduino.h>

template <size_t N>
class ByteRingBuffer
{
private:
    uint8_t buffer[N];
    int head = 0;
    int tail = 0;

public:
    void add(uint8_t value)
    {
        buffer[head] = value;
        head = (head + 1) % N;
        if (head == tail)
        {
            tail = (tail + 1) % N;
        }
    }

    uint8_t pop()
    {
        // pops the oldest value off the ring buffer
        if (head == tail)
        {
            return -1;
        }
        else
        {
            uint8_t value = buffer[tail];
            tail = (tail + 1) % N;
            return value;
        }
    }

    void clear()
    {
        head = 0;
        tail = 0;
    }

    uint8_t get(size_t index)
    {
        // this.get(0) is the oldest value, this.get(this.getLength() - 1) is the newest value
        if (index >= this->getLength())
        {
            return -1;
        }
        else
        {
            return buffer[(tail + index) % N];
        }
    }

    size_t getLength()
    {
        if (head >= tail)
        {
            return head - tail;
        }
        else
        {
            return N - tail + head;
        }
    }

};

Thanks a lot! This ByteRingBuffer has been included in version 1.0.4.

authors: avinabmalla jgpeiro


text:
Sales and Order System

Aim

Creating a sales order system using Shell script

Details

It has sales order track, transaction track,update the order , etc.

Go Ahead @Biswajit-Behera

Go Ahead @Biswajit-Behera
Thank You! will create PR ASAP!

@avinashkranjan I created PR, if any conflicts or changes are required let me know.

authors: Biswajit-Behera avinashkranjan

repo: avinashkranjan/Amazing-Python-Scripts


text:
UCF101_results

I have download your UCF101_results, there said " Interpolation results on UCF101 of DVF, SepConv, SuperSloMo trained on Adobe240fps, and SuperSloMo trained on YouTube240fps andAdobe240fps " In README.
Do you train your own DVF model on Adobe240fps? In original DVF code, the model is trainde on UCF101 images with 256x256 size. If you train your own DVF model, you use 256x256 images on Adobe240fps?
And in your paper, comparison with DVF, SepConv on UCF101 without Adobe240fps. Why did compare different methods on Adobe240fps?
And I confuse that different paper train they model on different dataset, for example, DVF train on UCF101, SepConv train on videos from YouTube. How compare these methods fairly？

Hi!
First, this repo is an implementation of a paper by Huaizu Jiang. The UCF101 results that you downloaded are provided by Huaizu on his project page. I am assuming that he uses the publicly available GitHub repos for those results.
The adobe240 dataset is comparison is used for ablation studies and to show that having more samples(youtube) is helpful in improving the performance. And for fairness, I think the paper has results on multiple different datasets.

thanks ！

repo: avinashpaliwal/Super-SloMo


text:
improve: add Mobile Device UA, and button for reset default UA list

(cherry picked from commit 249650deb06ce651960079395255438b7eeb7397)
Add mobile (Android) UAs to the default configuration, and add buttons to restore them to the default UA list

Could you please explain the feature of resetting default UA list in detail (?
If Liny did get it right, it may refer to deleting all other UAs and restore the stock ones (?

Thank you for that UA～
(Though that looked weird, for an Android 12 label with version 5.0.0.107 (=￣ω￣=

Thank you for that UA～ (Though that looked weird, for an Android 12 label with version 5.0.0.107 (=￣ω￣=

'Cause this is the UA of my own device, the Mate60 Pro, that I'm using directly. So the build version looks a bit odd. I'm sorry that I'm not super familiar with the UA format, but it seems to work fine on some common websites like Baidu and Bilibili.

Great! Adding this to the next version...
While as for the UA resetting, perhaps Liny would like to reconsider and look for a better solution based on the stuff you've kindly provided!! (So this PR may not be merged, or merged so quickly... Thank you!!!


text:
Unable to resolve module react-native-svg

When working w/ this package + expo, I get the following error:
iOS Bundling failed 13711ms
Unable to resolve module react-native-svg from <folder>/node_modules/react-native-qrcode-svg/src/index.js: react-native-svg could not be found within the project or in these directories:
  node_modules
   9 |   LinearGradient,
  10 |   Stop
> 11 | } from 'react-native-svg'
     |         ^
  12 | import genMatrix from './genMatrix'
  13 | import transformMatrixIntoPath from './transformMatrixIntoPath'

expo version 45.0.5
react-native-qrcode-svg version: 6.1.2
node verion v12.19.0

Have you installed "react-native-svg" ?
Try npm i react-native-svg

authors: ansh-dagha mongomoe

repo: awesomejerry/react-native-qrcode-svg


text:
Deployments fail due to disconnect from build and our s3 Could not read cloudformation template at path

How did you install the Amplify CLI?
yarn
If applicable, what version of Node.js are you using?
20.6.1
Amplify CLI Version
10.8.1
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made
Describe the bug
⚠ - If this issue doesn't belong to amplify-cli repo but instead a more appropriate repo, please let me know

We have amplify ci/cd running
Three backed environments: dev, staging, and prod
Two hosting environments: staging, prod
We also have a testing env and hosting env

After merging a safe PR to our staging environment we began seeing this set of errors:
2023-12-12T18:12:33.533Z [WARNING]: - Building resource storage/adamariebucket
2023-12-12T18:12:33.736Z [INFO]: Could not read cloudformation template at path: /codebuild/output/src76562180/src/adamarie/amplify/backend/api/adamarie/build/cloudformation-template.json

and
2023-12-12T18:13:10.755Z [INFO]: 🛑 The following resources failed to deploy:
2023-12-12T18:13:10.758Z [INFO]: Resource Name: apiadamarie (AWS::CloudFormation::Stack)
                                 Event Type: update
                                 Reason: Parameters: [CreateAPIKey] do not exist in the template
                                 URL: https://console.aws.amazon.com/cloudformation/home?region=us-east-2#/stacks/arn%3Aaws%3Acloudformation%3Aus-east-2%3A886020249653%3Astack%2Famplify-adamarie-staging-151754%2F6c4cb130-6df3-11ee-ab72-029c65e1ea0d/events
2023-12-12T18:13:10.759Z [INFO]:
2023-12-12T18:13:10.762Z [WARNING]: ✖ There was an error initializing your environment.
2023-12-12T18:13:10.764Z [INFO]: 🛑 Resource is not in the state stackUpdateComplete
2023-12-12T18:13:10.764Z [INFO]: Name: apiadamarie (AWS::CloudFormation::Stack), Event Type: update, Reason: Parameters: [CreateAPIKey] do not exist in the template, IsCustomResource: false
2023-12-12T18:13:10.765Z [INFO]:
2023-12-12T18:13:10.765Z [INFO]: Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
2023-12-12T18:13:10.844Z [INFO]:
2023-12-12T18:13:10.844Z [INFO]: Session Identifier: 65b7ff69-33a9-4ba8-9dba-d1637d638556
2023-12-12T18:13:10.875Z [ERROR]: !!! Build failed

We absolutely know that the resource exists on S3 - however, it's last update was from our previous deployment on 12/8
We confirmed a similar error on our testing environment which has no changes within the last 3 weeks
This looks like a disconnect from Amplify

Expected behavior
That our github merge successfully builds and deploys via amplify
Reproduction steps

Create a new dev branch
Make some change (in our case it was a test file update)
Create PR on GH pointing at our staging branch (which is connected to our staging hosting environment on Amplify)
Merge
Watch build on amplify
Build fails due to disconnect with cloudformation-template.json

Project Identifier
No response
Log output

# Put your logs below this line

Additional information
No response
Before submitting, please confirm:

[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
[X] I have removed any sensitive information from my code snippets and submission.

Hi @priyapower I'm looking at this issue for the Amplify Data team. Thanks very much for the diagnostic report. I've been trying to reproduce the issue you're experiencing by creating a GraphQL API in CLI version 12.8.2, and then updating it and pushing it in 12.9.0, but I haven't had any luck reproducing so far. According to the diagnostic, I see that you've got the API protected with both user pools and an API key, but that the API key has an expiration of 7 days. I'm assuming that's a relatively recent addition -- can you confirm whether this was something that you added in the same change that triggered the error, or was this added previous to the 12.9.0 upgrade?

Hi @priyapower,
We've successfully reproduced one error: the "missing datasource" error was due to a bug in our support for @auth directives on root types (that is, types with no @model directive). We're working on a fix for that now.
We've been unsuccessful reproducing the Parameters: [CreateAPIKey] do not exist in the template error though, so we would still appreciate if you could confirm that you were not attempting to add a new API key, but rather pushing a change unrelated to authorization modes.

@palpatim - some additional context

We did not upgrade our cli version
Our app has cli version 10.4.1
Our engineers have anything between 10.4.1 and 12.8.2
On Friday, we had a successful deployment
No changes were made over the weekend
On Tuesday, someone updated a cypress test

No amplify updates were made
No auth updates were made
No API key updates were made

They merged their test update to our branch with automatic deployments
This build failed. Continuously. With Could not read cloudformation template at path: /codebuild/output/src76562180/src/adamarie/amplify/backend/api/adamarie/build/cloudformation-template.json and Parameters: [CreateAPIKey] do not exist in the template
We confirmed that our S3 bucket did indeed exist
Luckily, our devOps eng was able to find a workaround for us that forces the amplify.yml file to use 12.8.2 and not 12.9
To reiterate - we never attempted any upgrades

Thanks for the additional context and confirmation, @priyapower. We're continuing to investigate the CreateAPIKey error

@priyapower Please do run amplify diagnose --send-report using the environment that was experiencing the failures. Let us know the
Some more questions regarding your setup:

We have amplify ci/cd running
Three backed environments: dev, staging, and prod
Two hosting environments: staging, prod
We also have a testing env and hosting env

Are your three backend environments (dev, staging, prod) are different branches of the same codebase, or totally separate repos?
Are your two hosting environments (staging, prod) connected to the same backend? If so, which one?
What does "We also have a testing env and hosting env" mean? That you have separate backend environments for testing & hosting? Separate branches?

Thanks!

@palpatim

We originally saw this on our staging hosting environment build within backend, so I ran diagnose within our staging backend env: Project Identifier: ef2f0ce6e1363b2bcb65ad9d5c45e760. However, I will call out that we checked this error/behavior on one of our "trash" environments/hosting-environments and saw the exact same set of errors
Same repo, different branches
Our staging hosting env points to staging backend; our main (production) hosting env points to prod backend
"What does "We also have a testing env and hosting env" mean? That you have separate backend environments for testing & hosting? Separate branches?" - sorry, we have a trash backend and hosting environment where we were testing some possible configs. It is called jz/aws_amplify_automation and this is where we tested the same deployment failure
Our package.json pulls from 10.4.1 for amplify-cli (at the time of error); while not particular to this context, just thought i would share
Our theory is that the hosting environment backend deployment was using 12.9 (whatever is the latest) for amplify cli and by forcing it to use the older 12.8 version, we no longer saw the errors 🤷🏾♀ - so we thought something might be up with 12.9 🤷🏾♀

Thanks for the updated diagnostic, we'll take a look.
There is definitely a bug in 12.9.0 related to @auth rules on types without @model annotations--that's what was causing the Cannot find datasource type for model <modelName1> error you mentioned. We've fixed that in https://github.com/aws-amplify/amplify-category-api/pull/2136 and are preparing a hotfix.
However we're unable to reproduce the missing CreateAPIKey parameter condition in our testing. We've looked through the code and aren't able to identify a condition that is causing that.

@priyapower Thanks for your patience as we've investigated this. We have released CLI version 12.10.0, which I've confirmed compiles your schema without the Cannot find datasource type for model errors that were generated previously. Can you see if this version works as expected for you?
We have been unable to reproduce the missing CreateAPIKey parameter condition, and our review of the code leads us to believe this is not a regression in the latest version. If that issue is still blocking your deployments after you test with 12.10.0, we'll need to keep investigating with you to find out what about your project is triggering the error.

@palpatim - thanks for following up. I have no idea what to tell you about the CreateAPIKey parameter chaos - hopefully no one else runs into that too
We were not planning on updated to anything later than 12.8 for now, but I will follow up with you after talking with the squad on whether we want to move to 12.10.0

@thanhnguyen195 you also reported this issue -- are you continuing to experience on 12.10.0?

Closing this issue. @priyapower if you do encounter a deployment error when you upgrade, please open a new GitHub issue. We don't have good visibility into comments on old issues.

authors: palpatim priyapower

repo: aws-amplify/amplify-category-api


text:
add --disable-rollback option for push command

Is this feature request related to a new or existing Amplify category?
No response
Is this related to another service?
cloudformation
Describe the feature you'd like to request
There should be a way to disableRollback when doing amplify push. When the project gets very big and more changes are deployed at once it becomes very disturbing to wait 30+ minutes for rollback if only 1 of 10 things failed for some reason. CloudFormation does support this optional parameter so it should be possible to add it as part of amplify push.
I see similar issue  was closed because 'enhancement hasn't gotten more traction' without the option to be opened again. Please don't do that, at least leave the option to re-open it especially for such features that makes deploying with amplify a mess when you have a big project behind.
Describe the solution you'd like
amplify push --disable-rollback (deploy and finish even if a stack failed to update)
Describe alternatives you've considered
None
Additional context
No response
Is this something that you'd be interested in working on?

[ ] 👋 I may be able to implement this feature request

Would this feature include a breaking change?

[ ] ⚠ This feature might incur a breaking change

Also suggested before here - https://github.com/aws-amplify/amplify-cli/issues/3529

repo: aws-amplify/amplify-cli


text:
What is the correct way to implement a AWS::Cognito::UserPoolIdentityProvider?

Amplify CLI Version
12.1.1
Question
Following the Amplify docs, I have a sample application that utilizes an Amplify Auth Override to create a Social Provider (with the resources.addCfnResource function).
https://docs.amplify.aws/cli/auth/override/#customize-amplify-generated-cognito-auth-resources-with-social-providers
Next, I am attempting to implement this Provider in a Pool - however the error received is that the Provider does not yet exist. If I create the provider first, then update the override.ts to use the already created Provider - it is successful. Is there a dependency relationship that needs to be created somehow or something else I'm missing before the IdP can be implemented?
resources.userPoolClientWeb.supportedIdentityProviders = ["my-custom-provider"];
Any help is appreciated, thanks :)

It looks like this can be accomplished as follows. Note, these properties were not in the Type Definition for resources as AmplifyAuthCognitoStackTemplate, however, the solution appears to be successful.
resources.userPoolClientWeb.addDependency(resources["node"]["_children"]["my-custom-provider"] as CfnResource);


text:
Add new ClientIds

Which Category is your question related to?
Auth
Amplify CLI Version
4.18.1
What AWS Services are you utilizing?
AWS Cognito
Provide additional details e.g. code snippets
Is it possible to add a new clientId to Auth through the CLI?
I have a NodeJS postConfirmation Lambda where in a switch-case i want to add users in specific groups based on the clientId they are coming from.
If it's not currently possible do that, do you have any other suggestion that can suit the case?

@bastiancleverfit Are you using clientIds for the sole purpose of identifying users?

@ammarkarachi yes. The reading access to user attributes could be shared in my case.

Would you be able to use the user attributes to figure out the group the user must belong to?

I saw here that i can pass a clientMetadata object, maybe i can pass a value that i can check in Post Confirmation lambda to add the user to the correct group. I'm going to try that.

@bastiancleverfit Do you require any more information regarding this? I will be closing this issue do not hesitate to re open this issue if you need more help.

authors: ammarkarachi bastiancleverfit


text:
GraphQL AWS AMplify @connection not bringing in connected data

Amplify -v: 4.29.7
I would like to have in the League tables all of the seasons and divisions as you can see with data > seasons. I have set it up as I believe would work using @connection.
So the question is, how would I have to change my division schema so that divisions are included in the League.
# League Schema

    type League @model
    {
      id: ID!
      name: String!
      faId: ID!
      logo: String
      seasons: [Season] @connection(keyName: "bySeason", fields: ["id"])
      division: [Division] @connection(keyName: "byDivision", fields: ["id"])
    }

# Seasons Schama

    type Season @model @key(name: "bySeason", fields: ["leagueID"])
       {
      id: ID!
      name: String!
      faId: ID!
      yearStart: AWSDate
      yearEnd: AWSDate
      leagueID: ID!
      league: League! @connection(fields: ["leagueID"])
      division: [Division] @connection(keyName: "byDivision", fields: ["id"])
    }

# Division Schema

    type Division @model @key(name: "byDivision", fields: ["seasonID", "leagueID", "name"])

    {
      id: ID!
      name: String!
      faId: ID!
      leagueID: ID!
      seasonID: ID!
      league: League! @connection(fields: ["leagueID"])
      season: Season! @connection(fields: ["seasonID"])
      ageInput: String!
      level: Int!
    }

# Queries

      query getLeagues {
        listLeagues {
          items {
            seasons {
              items {
                id
                name
              }
            }
            division {
              items {
                id
                name
              }
            }
          }
        }
      }

Data
    {
      "data": {
        "listLeagues": {
          "items": [
            {
              "seasons": {
                "items": []
              },
              "division": {
                "items": []
              }
            },
            {
              "seasons": {
                "items": [
                  {
                    "id": "44d2392e-59a2-4f51-9387-7ba86e09238a",
                    "name": "2018-19"
                  },
                  {
                    "id": "90bff337-f801-4203-8cac-a1150a4c8246",
                    "name": "2013-14"
                  },
                  {
                    "id": "eb62b250-9b8a-438a-b170-992fd7609420",
                    "name": "2016-17"
                  },
                  {
                    "id": "c4b1ae7f-e8ac-48bd-b6f1-84ecfb3e9bda",
                    "name": "2020-21"
                  },
                  {
                    "id": "a12794a8-7aa9-4706-8962-deea0e1fc18d",
                    "name": "2017-18"
                  },
                  {
                    "id": "aecfb321-6ba4-4f35-b305-62551ce1ec8c",
                    "name": "2019-20"
                  },
                  {
                    "id": "80e250d6-b2eb-4651-9438-1eb8d5ee6213",
                    "name": "2015-16"
                  },
                  {
                    "id": "309a26ec-b034-41a4-8d47-ce315ea34104",
                    "name": "2014-15"
                  }
                ]
              },
              "division": {
                "items": []
              }
            }
          ]
        }
      }
    }

@hutber You will have to add an additional @key directive to your Division model. I would also recommend changing the keynames to indicate what is used for indexing. In the case of Season type, you are creating an index on league so naming it byLeague might be better
 type Division @model
     @key(name: "bySeason" fields: ["seasonID"]) # new key
     @key(name: "byLeague fields: ["leagueID"]) # new key
       {
      id: ID!
      name: String!
      faId: ID!
      leagueID: ID!
      seasonID: ID!
      league: League! @connection(fields: ["leagueID"])
      season: Season! @connection(fields: ["seasonID"])
      ageInput: String!
      level: Int!
    }

  type League @model
    {
      id: ID!
      name: String!
      faId: ID!
      logo: String
      seasons: [Season] @connection(keyName: "byLeague", fields: ["id"])
      division: [Division] @connection(keyName: "byLeague", fields: ["id"]) # change the keyName
    }

    type Season @model @key(name: "byLeague", fields: ["leagueID"]) # renanmed the key
       {
      id: ID!
      name: String!
      faId: ID!
      yearStart: AWSDate
      yearEnd: AWSDate
      leagueID: ID!
      league: League! @connection(fields: ["leagueID"])
      division: [Division] @connection(keyName: "bySeason", fields: ["id"]) # change the keyName
    }

Thanks very much @yuth! This is very insightful.
You can indeed close the question :)
I would just have one question about the @connection(keyName: "byTeamsConnection", fields: ["id"]) but feel free to ignore as it could be its own question. But I have struggled to know what the fields part is for? I am always putting "id" but then not using id in byTeamsConnection.
Latestly, I have struggled to find this information clearly laid out in documentation, would you happen to know where a good source might be?

I would just have one question about the @connection(keyName: "byTeamsConnection", fields: ["id"]) but feel free to ignore as it could be its own question. But I have struggled to know what the fields part is for? I am always putting "id" but then not using id in byTeamsConnection.

When you define an @key you're defining an index with Hash and optional Sort key. In the case of Season in the above schema, the byLeague index takes the leagueId and returns all the records that match that legauge. In your connection you're asking the transformer to use the index byLeague and you're passing the leagueId is the id. The reason you have to pass an field is you could have an different field in League type that can be used for connection.

authors: hutber yuth


text:
Cannot pull an existing backend since the latest version

Describe the bug
On an existing project, I want to pull an existing Amplify backend
I run amplify pull --appId d26xxxxxx --envName dev
Expected:
A new amplify/ directory is created with the backend informations
Actual
The CLI opens a Chrome browser and redirects me to the Admin UI (https://eu-west-1.admin.amplifyapp.com/admin/d26xxxxxx/dev/verify/).
I don't use Admin UI, it is not enabled - so I am completely blocked.
Workaround
Downgrading amplify-cli to 4.29.8 fixed the issue.
Amplify CLI Version
4.39.0
Desktop (please complete the following information):
Mac OS

I am experiencing this exact same issue.

Hi @maximelebastard @abenzick, was AdminUI enabled previously for this project? If not, can you double check it's not currently enabled?
I haven't been able to reproduce this yet.

Yes, it was enabled previously.

On Dec 15, 2020, at 3:26 PM, John Hockett notifications@github.com wrote:

Hi @maximelebastard @abenzick, was AdminUI enabled previously for this project? If not, can you double check it's not currently enabled?
I haven't been able to reproduce this yet.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

I may have enabled it a few minutes for a quick test.
For what I remember, I did not pull the project during that interval.

On 15 Dec 2020, at 23:30, Aaron notifications@github.com wrote:
Yes, it was enabled previously.

On Dec 15, 2020, at 3:26 PM, John Hockett notifications@github.com wrote:

Hi @maximelebastard @abenzick, was AdminUI enabled previously for this project? If not, can you double check it's not currently enabled?
I haven't been able to reproduce this yet.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/aws-amplify/amplify-cli/issues/6168#issuecomment-745608525, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSCUBNFPYG7ZMJ3ZMS7ZCLSU7PQPANCNFSM4UYVRDRA.

Try running amplify logout --appId <AmplifyAppId>. What's the output you see?
If the credentials exist, you will be asked if you want to logout from all sessions. Answer y. Then try pulling your app.

A fix has been merged and will be available in the next release. Thanks for the bug reports @maximelebastard @abenzick!

authors: abenzick jhockett maximelebastard


text:
Cancelling a push or getting timeout seems to leave the app in an unknown state

Describe the bug
When amplify push is interrupted it seems to cause issues with the known state of the application both locally and up in the cloud.
Interruptions might be through a user killing the process or through a network timeout.
Does the process recover well to get both local and cloud instances in a known state so that the next push is valid.
Amplify CLI Version
You can use amplify -v to check the amplify cli version on your system
To Reproduce
Running an amplify push seems to take an age for me, average 7-10 minutes, which is a total dev flow killer. I've learnt through habit to always add on the --yes flag to pre-answer the prompts that pop up so I can at least get on with something else while its doing its thing.
Sometimes however through muscle memory I run this too soon and so have to cancel it with a Ctrl-C as soon as I realise.
Why would I cancel it? Well often its when I know I've got an issue in my schema such as me having commented out the @searchable directives so I could mock my api locally and then wanting to push it up but I forgot to uncomment the directives, this would be bad. See https://github.com/aws-amplify/amplify-cli/issues/5981 for details of that gotcha. Another reason might be I see that my team mate has pushed and I need to pull first or I'll over-write their changes.
Secondly I work from two different locations currently, one of those has a flakey internet connection, some times it will drop out or just have a go slow mid push. When it does this it either hangs (so I kill it) or timesout (where it kills itself). When this happens I don't know what state it is left in.
I know I'm sometimes in an unknown state due to the amount of "that shouldnt' be happening" issues I seem to be running into.
https://github.com/aws-amplify/amplify-js/issues/7438
https://github.com/aws-amplify/amplify-cli/issues/6028
https://github.com/aws-amplify/amplify-cli/issues/6047
Expected behavior
Killing the push shouldn't leave the app in an unknown state. On the next attempt it should try again a fresh if its not flagged as having completed a good push.
A timeout shouldn't leave the app in an unknown state.
Now it could be its doing all the above wonderfully and I'm just unlucky but the only thing I can think of that could keep getting my app in a messed up state is a failed push so wanted to make sure its doing as it could/should if possible.
Additionally:
Ideally a push shouldn't take 7-10+ minutes (https://github.com/aws-amplify/amplify-cli/issues/5552 and https://github.com/aws-amplify/amplify-cli/issues/5964) it leads to me learning muscle memory that gets me in trouble, I know its my responsibility at the end of the day but they way it currently is setup its just waiting to catch me out.
@searchable should be mockable or ignored when mocking to stop me doing that (https://github.com/aws-amplify/amplify-cli/issues/5981), that would reduce my "oh no, STOP!" moments :)
A push should warn if there is newer stuff up on the cloud than local, I'd rather it failed (sort of like a git push) and told me to pull first than let me happily blitz what is up there deleting my teammates work (sometimes manual stuff like Auth keys and such) - this would also stop those "oh damn, STOP!" moments.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. Mac/Windows/Ubuntu]
Node Version. You can use node -v to check the node version on your system

Additional context
Add any other context about the problem here.

@PeteDuncanson with the stack you should be able to re-push if the stack has completed it's update/rollback. I am not entirely sure about the GSI update issues but I will get back to you on that.
Thanks for bringing this to our attention we are looking into ways to improve the push feature in the CLI

@ammarkarachi what state is this issue now in? Its flagged as pending-response but is also closed?

@ammarkarachi what state is this issue now in? Its flagged as pending-response but is also closed?

authors: PeteDuncanson ammarkarachi


text:
AWS::CloudFormation:: Template format error: Resource name aaaaGrouprole-testPolicy is non alphanumeric.

Before opening, please confirm:

[X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
[X] I have searched for duplicate or closed issues.
[X] I have read the guide for submitting bug reports.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v16.10.0
Amplify CLI Version
6.3.1
What operating system are you using?
Mac
Amplify Categories
auth
Amplify Commands
push
Describe the bug
err log
UPDATE_FAILED      apilogin             AWS::CloudFormation::Stack Thu Oct 14 2021 18:51:34 GMT+0900 (대한민국 표준시) Template format error: Resource name kakaoGrouprole-testPolicy is non alphanumeric.

Expected behavior
Error always occurs when auth update
Reproduction steps
1. auth update
amplify auth update

2. select menu
Using service: Cognito, provided by: awscloudformation
 What do you want to do? Walkthrough all the auth configurations
 Select the authentication/authorization services that you want to use: User Sign-Up, Sign-In, connected with AWS IAM controls (Enables per-user Storage features for images or other content, Analytics, and more)
 Allow unauthenticated logins? (Provides scoped down permissions that you can control via AWS IAM) I want to learn more.

If you select 'yes', your identity pool will provide temporary AWS credentials for unauthenticated guest users.

 Allow unauthenticated logins? (Provides scoped down permissions that you can control via AWS IAM) Yes
 Do you want to enable 3rd party authentication providers in your identity pool? No
 Do you want to add User Pool Groups? Yes
? Select any user pool groups you want to delete: kakao
? Provide a name for your user pool group: kakao
? Do you want to add another User Pool Group No
✔ Sort the user pool groups in order of preference · kakao
 Do you want to add an admin queries API? Yes
? Do you want to restrict access to the admin queries API to a specific Group Yes
? Select the group to restrict access with: kakao
 Multifactor authentication (MFA) user login options: OFF
 Email based user registration/forgot password: Enabled (Requires per-user email entry at registration)
 Please specify an email verification subject: Your verification code
 Please specify an email verification message: Your verification code is {####}
 Do you want to override the default password policy for this User Pool? No
 Specify the app's refresh token expiration period (in days): 30
 Do you want to specify the user attributes this app can read and write? No
 Do you want to enable any of the following capabilities? Add User to Group
 Do you want to use an OAuth flow? No
? Do you want to configure Lambda Triggers for Cognito? Yes
? Which triggers do you want to enable for Cognito Post Confirmation, Pre Sign-up
? What functionality do you want to use for Post Confirmation Add User To Group
? What functionality do you want to use for Pre Sign-up Create your own module

3. UPDATE_FAILED
UPDATE_FAILED      apilogin             AWS::CloudFormation::Stack Thu Oct 14 2021 18:51:34 GMT+0900 (대한민국 표준시) Template format error: Resource name kakaoGrouprole-testPolicy is non alphanumeric.

GraphQL schema(s)
No response
Log output

# Put your logs below this line

Additional information
No response

@mz-ycg I'm unable to reproduce this issue. Can you provide more details on how you configured auth when first adding it? The issue is the resource name kakaoGrouprole-testPolicy should not have a hyphen in it, but I haven't been able to find a way to create a resource name with a hyphen through the CLI walkthrough

authors: edwardfoyle mz-ycg


text:
feat: add support for developing on windows

Issue #, if available:
Description of changes:
Update a single unit test which failed on windows due to hardcoded unix-style path, and added run-script-os which allows individual run targets to be differentiated by platform. Split out the integration test scripts for windows platforms, and confirmed that integration tests pass.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Codecov Report

Merging #276 (223618d) into develop (eba0c24) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #276   +/-   ##
========================================
  Coverage    89.25%   89.25%
========================================
  Files           32       32
  Lines         1191     1191
  Branches       271      271
========================================
  Hits          1063     1063
  Misses         125      125
  Partials         3        3

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eba0c24...223618d. Read the comment docs.

authors: aherschel codecov-commenter

repo: aws-amplify/amplify-codegen-ui


text:
feat: poc for useEffect to manage state dependencies

Issue #, if available:
N/A
Description of changes:

Add support for useEffect to update dependent state values once useData or useAuth values have settled.
Still needs unit tests.
Still needs improved E2E verification
Still likely needs to determine how we keep from mutations and state values waffling a bound state element back and forth. (I'd propose we initialize these to undefined and then only set the value if the depenedencies are all non-null, and the value itself isn't yet set).

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Codecov Report

Merging #428 (20b5fd0) into tagged-release/q1-release (42204cd) will decrease coverage by 1.64%.
The diff coverage is 30.76%.

@@                      Coverage Diff                      @@
##           tagged-release/q1-release     #428      +/-   ##
=============================================================
- Coverage                      93.09%   91.45%   -1.65%
=============================================================
  Files                             45       46       +1
  Lines                           1739     1791      +52
  Branches                         375      391      +16
=============================================================
+ Hits                            1619     1638      +19
- Misses                           116      149      +33
  Partials                           4        4

Impacted Files
Coverage Δ

...s/codegen-ui/lib/utils/state-reference-metadata.ts
5.26% <5.26%> (ø)

...ges/codegen-ui-react/lib/imports/import-mapping.ts
100.00% <100.00%> (ø)

...gen-ui-react/lib/react-studio-template-renderer.ts
91.52% <100.00%> (+0.10%)
:arrow_up:

packages/codegen-ui-react/lib/workflow/mutation.ts
96.77% <100.00%> (+0.26%)
:arrow_up:

packages/codegen-ui/lib/utils/index.ts
100.00% <100.00%> (ø)

...egen-ui-react/lib/react-component-render-helper.ts
90.25% <0.00%> (+0.97%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42204cd...20b5fd0. Read the comment docs.

authors: alharris-at codecov-commenter


text:
Codegen drops nullable setting for non-connection custom object type

Before opening, please confirm:
I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
I have searched for duplicate or closed issues.
I have read the guide for submitting bug reports.
I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v11.13.0
Amplify CLI Version
4.46.1
What operating system are you using?
Mac
Amplify Categories
api
Amplify Commands
codegen
Describe the bug
I have the following schema with a custom object type Assignment referenced by Todo via the assignment field, which is without @connection directive.
type Todo @model {
  id: ID!
  name: String!
  description: String
  assignment: Assignment
}

type Assignment {
  operator: String!
  assignedAt: AWSDateTime
}

Codegen generates API.ts as follows:
export type Todo = {
  __typename: "Todo",
  id?: string,
  name?: string,
  description?: string | null,
  assignment?: Assignment,
  createdAt?: string,
  updatedAt?: string,
};

export type Assignment = {
  __typename: "Assignment",
  operator?: string,
  assignedAt?: string | null,
};

Expected behavior
If I'm not wrong, the generated code should have the field assignment nullable.
export type Todo = {
  __typename: "Todo",
  id?: string,
  name?: string,
  description?: string | null,
  assignment?: Assignment | null,  // <-- here
  createdAt?: string,
  updatedAt?: string,
};

export type Assignment = {
  __typename: "Assignment",
  operator?: string,
  assignedAt?: string | null,
};

Reproduction steps

Write the scheme as above.
Run codegen

GraphQL schema(s)

# Put schemas below this line

Log output

Entire output of API.ts:
/* tslint:disable */
/* eslint-disable */
//  This file was automatically generated and should not be edited.

export type CreateTodoInput = {
  id?: string | null,
  name: string,
  description?: string | null,
  assignment?: AssignmentInput | null,
};

export type AssignmentInput = {
  operator: string,
  assignedAt?: string | null,
};

export type ModelTodoConditionInput = {
  name?: ModelStringInput | null,
  description?: ModelStringInput | null,
  and?: Array< ModelTodoConditionInput | null > | null,
  or?: Array< ModelTodoConditionInput | null > | null,
  not?: ModelTodoConditionInput | null,
};

export type ModelStringInput = {
  ne?: string | null,
  eq?: string | null,
  le?: string | null,
  lt?: string | null,
  ge?: string | null,
  gt?: string | null,
  contains?: string | null,
  notContains?: string | null,
  between?: Array< string | null > | null,
  beginsWith?: string | null,
  attributeExists?: boolean | null,
  attributeType?: ModelAttributeTypes | null,
  size?: ModelSizeInput | null,
};

export enum ModelAttributeTypes {
  binary = "binary",
  binarySet = "binarySet",
  bool = "bool",
  list = "list",
  map = "map",
  number = "number",
  numberSet = "numberSet",
  string = "string",
  stringSet = "stringSet",
  _null = "_null",
}

export type ModelSizeInput = {
  ne?: number | null,
  eq?: number | null,
  le?: number | null,
  lt?: number | null,
  ge?: number | null,
  gt?: number | null,
  between?: Array< number | null > | null,
};

export type Todo = {
  __typename: "Todo",
  id?: string,
  name?: string,
  description?: string | null,
  assignment?: Assignment,
  createdAt?: string,
  updatedAt?: string,
};

export type Assignment = {
  __typename: "Assignment",
  operator?: string,
  assignedAt?: string | null,
};

export type UpdateTodoInput = {
  id: string,
  name?: string | null,
  description?: string | null,
  assignment?: AssignmentInput | null,
};

export type DeleteTodoInput = {
  id?: string | null,
};

export type ModelTodoFilterInput = {
  id?: ModelIDInput | null,
  name?: ModelStringInput | null,
  description?: ModelStringInput | null,
  and?: Array< ModelTodoFilterInput | null > | null,
  or?: Array< ModelTodoFilterInput | null > | null,
  not?: ModelTodoFilterInput | null,
};

export type ModelIDInput = {
  ne?: string | null,
  eq?: string | null,
  le?: string | null,
  lt?: string | null,
  ge?: string | null,
  gt?: string | null,
  contains?: string | null,
  notContains?: string | null,
  between?: Array< string | null > | null,
  beginsWith?: string | null,
  attributeExists?: boolean | null,
  attributeType?: ModelAttributeTypes | null,
  size?: ModelSizeInput | null,
};

export type ModelTodoConnection = {
  __typename: "ModelTodoConnection",
  items?:  Array<Todo | null > | null,
  nextToken?: string | null,
};

export type CreateTodoMutationVariables = {
  input?: CreateTodoInput,
  condition?: ModelTodoConditionInput | null,
};

export type CreateTodoMutation = {
  createTodo?:  {
    __typename: "Todo",
    id: string,
    name: string,
    description?: string | null,
    assignment?:  {
      __typename: "Assignment",
      operator: string,
      assignedAt?: string | null,
    } | null,
    createdAt: string,
    updatedAt: string,
  } | null,
};

export type UpdateTodoMutationVariables = {
  input?: UpdateTodoInput,
  condition?: ModelTodoConditionInput | null,
};

export type UpdateTodoMutation = {
  updateTodo?:  {
    __typename: "Todo",
    id: string,
    name: string,
    description?: string | null,
    assignment?:  {
      __typename: "Assignment",
      operator: string,
      assignedAt?: string | null,
    } | null,
    createdAt: string,
    updatedAt: string,
  } | null,
};

export type DeleteTodoMutationVariables = {
  input?: DeleteTodoInput,
  condition?: ModelTodoConditionInput | null,
};

export type DeleteTodoMutation = {
  deleteTodo?:  {
    __typename: "Todo",
    id: string,
    name: string,
    description?: string | null,
    assignment?:  {
      __typename: "Assignment",
      operator: string,
      assignedAt?: string | null,
    } | null,
    createdAt: string,
    updatedAt: string,
  } | null,
};

export type GetTodoQueryVariables = {
  id?: string,
};

export type GetTodoQuery = {
  getTodo?:  {
    __typename: "Todo",
    id: string,
    name: string,
    description?: string | null,
    assignment?:  {
      __typename: "Assignment",
      operator: string,
      assignedAt?: string | null,
    } | null,
    createdAt: string,
    updatedAt: string,
  } | null,
};

export type ListTodosQueryVariables = {
  filter?: ModelTodoFilterInput | null,
  limit?: number | null,
  nextToken?: string | null,
};

export type ListTodosQuery = {
  listTodos?:  {
    __typename: "ModelTodoConnection",
    items?:  Array< {
      __typename: "Todo",
      id: string,
      name: string,
      description?: string | null,
      assignment?:  {
        __typename: "Assignment",
        operator: string,
        assignedAt?: string | null,
      } | null,
      createdAt: string,
      updatedAt: string,
    } | null > | null,
    nextToken?: string | null,
  } | null,
};

export type OnCreateTodoSubscription = {
  onCreateTodo?:  {
    __typename: "Todo",
    id: string,
    name: string,
    description?: string | null,
    assignment?:  {
      __typename: "Assignment",
      operator: string,
      assignedAt?: string | null,
    } | null,
    createdAt: string,
    updatedAt: string,
  } | null,
};

export type OnUpdateTodoSubscription = {
  onUpdateTodo?:  {
    __typename: "Todo",
    id: string,
    name: string,
    description?: string | null,
    assignment?:  {
      __typename: "Assignment",
      operator: string,
      assignedAt?: string | null,
    } | null,
    createdAt: string,
    updatedAt: string,
  } | null,
};

export type OnDeleteTodoSubscription = {
  onDeleteTodo?:  {
    __typename: "Todo",
    id: string,
    name: string,
    description?: string | null,
    assignment?:  {
      __typename: "Assignment",
      operator: string,
      assignedAt?: string | null,
    } | null,
    createdAt: string,
    updatedAt: string,
  } | null,
};

</details>

Hi @tsuga. Thanks for reporting this and also sharing the generated output. We will look into this soon.

authors: phani-srikar tsuga

repo: aws-amplify/amplify-codegen


text:
[release-spm]: Version and checksum update for 2.26.6

Update for package manifest and version for the next release

@brennanMKE the CI failed on the last PR which means the release wasn't tagged... I'm just checking it out with a specific commit now, but I believe it won't appear as a 'normal' release until the tag is in place.

@brennanMKE just double checked manually, and running shasum -a 256 against https://releases.amplify.aws/aws-sdk-ios/AWSEC2-2.26.6.zip gives me c2833fa3f8a73bcb92eecd2eaab8ec47eefe497515dd460cd34add833c059566 too - so it does seem to be mismatched

thanks @brennanMKE !

@jamescrowley We had a permission issue with our automation script which prevented the task from completing so I did it manually once I discovered it. It is now working for me as a Swift package dependency for this version.

repo: aws-amplify/aws-sdk-ios-spm


text:
Create a new rule for RDS

cfn-lint version: (cfn-lint --version) v0.4.0
Description of issue.
Exclusive properties check does not work for the following.
"AWS::RDS::DBInstance": {
  "DBSnapshotIdentifier": [
    "CharacterSetName",
    "MasterUsername",
    "MasterUserPassword",
    "StorageEncrypted"
  ]
}

This is because DBSnapshotIdentifier can be an empty string.  A new check should be created to make sure that these attributes are exclusive if DBSnapshotIdentifier is not an empty string.

Should determine how this looks with the new resource provider schemas.

Not fixed in the new provider schemas.

Resolved and this has changed.  This will be covered in v1.

repo: aws-cloudformation/cfn-lint


text:
Since 0.76.0 Update Template Takes 30+ Minutes or fails to finish linting

CloudFormation Lint Version
0.56.0, 0.76.0, 0.79.10
What operating system are you using?
amazon linux container, image: aws/codebuild/amazonlinux2-x86_64-standard:5.0
Describe the bug
After altering a template used for EC2 code modules we ran into an issue where our CodePipeline lint failed to complete linting the template. I had been able to successfully lint the template on my local PC but after extensive testing I was able to find that my local cfn-lint package had not been updated since 0.56.0 (this version was linting quickly and properly evaluating code it seems). The version used in the pipeline lint was originally somewhere in the 0.78 area but I updated the process to use the most recent 0.79.10 version. I also updated my local system to 0.79.10 and both exhibit the same behavior which is that the more conditions are in this particular template the longer the amount of time it takes to execute. It seems exponential as the first condition is instantaneous and subsequent ones are longer and longer.
After testing all of the releases listed on GitHub I determined the issue started in 0.76.0 which seems related to the changes in this PR:
Interestingly the old template was longer and had the same references to the same conditions. In the previous version the additional disks for the EC2 instance were all external EBS volumes with volume attachments, each using the same condition each of these if statements uses. The amount of conditions and the top of the template is unchanged from that original.
tl;dr: A template that used to lint in 1.5 seconds now doesn't complete or completes in around 30 minutes.
Expected behavior
To complete linting in a reasonable time frame for supported configurations and properly lint the values inside the conditions. In this case I would prefer under 1 minute of execution but in versions of cfn-lint before 0.76.0 it completes in about 1.5 seconds and properly lints the values inside of the conditions.
Reproduction template
#CORP::EC2::EC2::MODULE
AWSTemplateFormatVersion: 2010-09-09
Parameters:
name:
Description: The name tag for the EC2 instance.
Type: String
Default: ""
imageId:
Description: Base AMI for the EC2 instance.
Type: AWS::EC2::Image::Id
Default: ""
instanceType:
Description: EC2 instance type.
Type: String
Default: r5.large
subnetId:
Description: The ID of the subnet to launch the instance into.
Type: String
Default: ""
osVolumeSize:
Description: Size of the volume that has the OS.
Type: Number
Default: 120
securityGroupIds:
Description: The IDs of the security groups.
Type: ListAWS::EC2::SecurityGroup::Id
Default: ""
instanceKeyName:
Type: String
Description: Key pair name
Default: kpnamegoeshere
ebsOptimized:
Type: String
Description: Indicates whether the instance is optimized for Amazon EBS I/O.
Default: false
numberOfAdditionalVolumes:
Description: Additional volumes in addition to OS volume. Max is 25.
Type: Number
MaxValue: 25
Default: 0
volume2Size:
Description: Size of volume 2
Type: Number
Default: 40
volume3Size:
Description: Size of volume 3
Type: Number
Default: 40
volume4Size:
Description: Size of volume 4
Type: Number
Default: 40
volume5Size:
Description: Size of volume 5
Type: Number
Default: 40
volume6Size:
Description: Size of volume 6
Type: Number
Default: 40
volume7Size:
Description: Size of volume 7
Type: Number
Default: 40
volume8Size:
Description: Size of volume 8
Type: Number
Default: 40
volume9Size:
Description: Size of volume 9
Type: Number
Default: 40
volume10Size:
Description: Size of volume 10
Type: Number
Default: 40
volume11Size:
Description: Size of volume 11
Type: Number
Default: 40
volume12Size:
Description: Size of volume 12
Type: Number
Default: 40
volume13Size:
Description: Size of volume 13
Type: Number
Default: 40
volume14Size:
Description: Size of volume 14
Type: Number
Default: 40
volume15Size:
Description: Size of volume 15
Type: Number
Default: 40
volume16Size:
Description: Size of volume 16
Type: Number
Default: 40
volume17Size:
Description: Size of volume 17
Type: Number
Default: 40
volume18Size:
Description: Size of volume 18
Type: Number
Default: 40
volume19Size:
Description: Size of volume 19
Type: Number
Default: 40
volume20Size:
Description: Size of volume 20
Type: Number
Default: 40
volume21Size:
Description: Size of volume 21
Type: Number
Default: 40
volume22Size:
Description: Size of volume 22
Type: Number
Default: 40
volume23Size:
Description: Size of volume 23
Type: Number
Default: 40
volume24Size:
Description: Size of volume 24
Type: Number
Default: 40
volume25Size:
Description: Size of volume 25
Type: Number
Default: 40
volume26Size:
Description: Size of volume 26
Type: Number
Default: 40
Conditions:
hasVolume26: !Equals
- !Ref numberOfAdditionalVolumes
- 25
hasVolume25: !Or
- Condition: hasVolume26
- !Equals
- !Ref numberOfAdditionalVolumes
- 24
hasVolume24: !Or
- Condition: hasVolume25
- !Equals
- !Ref numberOfAdditionalVolumes
- 23
hasVolume23: !Or
- Condition: hasVolume24
- !Equals
- !Ref numberOfAdditionalVolumes
- 22
hasVolume22: !Or
- Condition: hasVolume23
- !Equals
- !Ref numberOfAdditionalVolumes
- 21
hasVolume21: !Or
- Condition: hasVolume22
- !Equals
- !Ref numberOfAdditionalVolumes
- 20
hasVolume20: !Or
- Condition: hasVolume21
- !Equals
- !Ref numberOfAdditionalVolumes
- 19
hasVolume19: !Or
- Condition: hasVolume20
- !Equals
- !Ref numberOfAdditionalVolumes
- 18
hasVolume18: !Or
- Condition: hasVolume19
- !Equals
- !Ref numberOfAdditionalVolumes
- 17
hasVolume17: !Or
- Condition: hasVolume18
- !Equals
- !Ref numberOfAdditionalVolumes
- 16
hasVolume16: !Or
- Condition: hasVolume17
- !Equals
- !Ref numberOfAdditionalVolumes
- 15
hasVolume15: !Or
- Condition: hasVolume16
- !Equals
- !Ref numberOfAdditionalVolumes
- 14
hasVolume14: !Or
- Condition: hasVolume15
- !Equals
- !Ref numberOfAdditionalVolumes
- 13
hasVolume13: !Or
- Condition: hasVolume14
- !Equals
- !Ref numberOfAdditionalVolumes
- 12
hasVolume12: !Or
- Condition: hasVolume13
- !Equals
- !Ref numberOfAdditionalVolumes
- 11
hasVolume11: !Or
- Condition: hasVolume12
- !Equals
- !Ref numberOfAdditionalVolumes
- 10
hasVolume10: !Or
- Condition: hasVolume11
- !Equals
- !Ref numberOfAdditionalVolumes
- 9
hasVolume9: !Or
- Condition: hasVolume10
- !Equals
- !Ref numberOfAdditionalVolumes
- 8
hasVolume8: !Or
- Condition: hasVolume9
- !Equals
- !Ref numberOfAdditionalVolumes
- 7
hasVolume7: !Or
- Condition: hasVolume8
- !Equals
- !Ref numberOfAdditionalVolumes
- 6
hasVolume6: !Or
- Condition: hasVolume7
- !Equals
- !Ref numberOfAdditionalVolumes
- 5
hasVolume5: !Or
- Condition: hasVolume6
- !Equals
- !Ref numberOfAdditionalVolumes
- 4
hasVolume4: !Or
- Condition: hasVolume5
- !Equals
- !Ref numberOfAdditionalVolumes
- 3
hasVolume3: !Or
- Condition: hasVolume4
- !Equals
- !Ref numberOfAdditionalVolumes
- 2
hasVolume2: !Or
- Condition: hasVolume3
- !Equals
- !Ref numberOfAdditionalVolumes
- 1
Resources:
Instance:
Type: AWS::EC2::Instance
Properties:
DisableApiTermination: true
ImageId: !Ref imageId
InstanceType: !Ref instanceType
KeyName: !Ref instanceKeyName
IamInstanceProfile: ssmEc2DelegatedRole
Tenancy: default
SubnetId: !Ref subnetId
EbsOptimized: !Ref ebsOptimized
Tags:
- Key: Name
Value: !Ref name
SecurityGroupIds: !Ref securityGroupIds
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
Encrypted: true
VolumeSize: !Ref osVolumeSize
VolumeType: gp3
- !If
- hasVolume2
- DeviceName: /dev/sdb
Ebs:
Encrypted: true
VolumeSize: !Ref volume2Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume3
- DeviceName: /dev/sdc
Ebs:
Encrypted: true
VolumeSize: !Ref volume3Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume4
- DeviceName: /dev/sdd
Ebs:
Encrypted: true
VolumeasdfSize: !Ref volume4Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume5
- DeviceName: /dev/sde
Ebs:
Encrypted: true
VolumeSize: !Ref volume5Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume6
- DeviceName: /dev/sdf
Ebs:
Encrypted: true
VolumeSize: !Ref volume6Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume7
- DeviceName: /dev/sdg
Ebs:
Encrypted: true
VolumeSize: !Ref volume7Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume8
- DeviceName: /dev/sdh
Ebs:
Encrypted: true
VolumeSize: !Ref volume8Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume9
- DeviceName: /dev/sdi
Ebs:
Encrypted: true
VolumeSize: !Ref volume9Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume10
- DeviceName: /dev/sdj
Ebs:
Encrypted: true
VolumeSize: !Ref volume10Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume11
- DeviceName: /dev/sdk
Ebs:
Encrypted: true
VolumeSize: !Ref volume11Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume12
- DeviceName: /dev/sdl
Ebs:
Encrypted: true
VolumeSize: !Ref volume12Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume13
- DeviceName: /dev/sdm
Ebs:
Encrypted: true
VolumeSize: !Ref volume13Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume14
- DeviceName: /dev/sdn
Ebs:
Encrypted: true
VolumeSize: !Ref volume14Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume15
- DeviceName: /dev/sdo
Ebs:
Encrypted: true
VolumeSize: !Ref volume15Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume16
- DeviceName: /dev/sdp
Ebs:
Encrypted: true
VolumeSize: !Ref volume16Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume17
- DeviceName: /dev/sdq
Ebs:
Encrypted: true
VolumeSize: !Ref volume17Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume18
- DeviceName: /dev/sdr
Ebs:
Encrypted: true
VolumeSize: !Ref volume18Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume19
- DeviceName: /dev/sds
Ebs:
Encrypted: true
VolumeSize: !Ref volume19Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume20
- DeviceName: /dev/sdt
Ebs:
Encrypted: true
VolumeSize: !Ref volume20Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume21
- DeviceName: /dev/sdu
Ebs:
Encrypted: true
VolumeasdfSize: !Ref volume21Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume22
- DeviceName: /dev/sdv
Ebs:
Encrypted: true
VolumeSize: !Ref volume22Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume23
- DeviceName: /dev/sdw
Ebs:
Encrypted: true
VolumeSize: !Ref volume23Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume24
- DeviceName: /dev/sdx
Ebs:
Encrypted: true
VolumeSize: !Ref volume24Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume25
- DeviceName: /dev/sdy
Ebs:
Encrypted: true
VolumeSize: !Ref volume25Size
VolumeType: gp3
- !Ref 'AWS::NoValue'
- !If
- hasVolume26
- DeviceName: /dev/sdz
Ebs:
Encrypted: true
VolumeSize: !Ref volume26Size
VolumeType: gp3
- !Ref 'AWS::NoValue'

Replicated this.  Looking into possible fixes.

Thank you for confirming and looking into the issue so quickly!

@kddejong FYI, this fixed it for me at least.

Hello, after updating to 1.3.0 this issue has reappeared with this same template.

authors: ashemedai kddejong randybasrs


text:
Wrong data in the dashboard

I have verified this lap appears in the logs.
It also happened with several other completed episodes.

This functionality come directly from DeepRacer for Cloud, DOTS simply presents it via the link to the NGINX.  Please raise issue in DeepRacer for Cloud repo, thanks.

authors: MarkRoss-Eviden akiva-skolnik


text:
Feature request: Better strip-prefixes for APIGatewayRestResolver

Use case
I have multiple API Gateway Rest apis backed by AWS Lambda.
I want to these APIs to the same Custom domain name with different paths.
For example I have APIs with these urls, each backed by a different lambda:

https://xxx.execute-api.us-east-1.amazonaws.com/v1
https://yyy.execute-api.us-east-1.amazonaws.com/v1
https://xxx_test.execute-api.us-east-1.amazonaws.com/v1
https://yyy_test.execute-api.us-east-1.amazonaws.com/v1

I want both of them to be available from:

https://mydomain.com/api/v1/xxx
https://mydomain.com/api/v1/yyy
https://mydomain.com/api/test/xxx
https://mydomain.com/api/test/yyy
respectively.

When Init-ing the APIGatewayRestResolver class I would have to pass in the strip_prefixes.
strip_prefixes=["/api/v1/xxx", "/api/test/xxx"]

We could potentials go to a high level of options due to combinatorics.
Solution/User Experience

Use regex:

strip_prefixes=["^.*?xxx"]

The path will be stripped of the prefixes one by one from left to right.

strip_prefixes=["api", "v1" ,"test","xxx"]

So if out initial path is /api/v1/xxx it will strip "api" first:
/api/v1/xxx ->  /v1/xxx
Then v1
/v1/xxx -> /xxx
Then it will try to strip "test" but nothing would change:
/xxx - > /xxx
Then it will strip "xxx"
/xxx - > /
Alternative solutions
No response
Acknowledgment

[X] This feature request meets Powertools for AWS Lambda (Python) Tenets
[X] Should this be considered in other Powertools for AWS Lambda languages? i.e. Java, TypeScript, and .NET

Hi @royassis! Thanks for opening this issue and bringing up your use case. Do you have bandwidth to send a PR to add regex support for this field?

@leandrodamascena https://github.com/aws-powertools/powertools-lambda-python/pull/2521

Looking at this now

authors: leandrodamascena royassis rubenfonseca

repo: aws-powertools/powertools-lambda-python