Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.

create ami-sets tool #121

Merged
merged 4 commits into from Jul 29, 2016
Merged

create ami-sets tool #121

merged 4 commits into from Jul 29, 2016

Conversation

anarute
Copy link
Contributor

@anarute anarute commented Jul 21, 2016

Add ami-sets tool that manages AMI sets from the AWS provisioner.
It makes possible to add, edit and delete AMI sets.

@djmitche
Copy link
Contributor

djmitche commented Jul 21, 2016

Just to set context for the review: this is intended to be functional enough to edit AMI sets as @anarute said. There are UI improvements to be made (for example, a table of AMIs instead of a JSON blob), but given the schedule we're going to go back to focus on the provisioner backend before addressing those improvements.

@anarute
Copy link
Contributor Author

anarute commented Jul 21, 2016

Exactly. Just to point out for future improvements, we also need to add schema and data validations.

@jhford
Copy link
Contributor

jhford commented Jul 25, 2016

I can't get this to run locally.

mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create common.bundle.js:12366:5
"Download the React DevTools for a better development experience: https://fb.me/react-devtools" common.bundle.js:54179:9
TypeError: undefined has no properties
require<[818]<()
 common.bundle.js:69622
s()
 common.bundle.js:1
s/<()
 common.bundle.js:1
require<[821]</<()
 common.bundle.js:70929
require<[821]<()
 common.bundle.js:70922
s()
 common.bundle.js:1
s/<()
 common.bundle.js:1
require<["taskcluster-client"]<()
 common.bundle.js:100254
s()
 common.bundle.js:1
s()
 app.bundle.js:1
s/<()
 app.bundle.js:1
[9]<()
 app.bundle.js:1110
s()
 app.bundle.js:1
s/<()
 app.bundle.js:1
[1]</<()
 app.bundle.js:7
[1]<()
 app.bundle.js:2
s()
 app.bundle.js:1
s/<()
 app.bundle.js:1
[2]<()
 app.bundle.js:354
s()
 app.bundle.js:1
s/<()
 app.bundle.js:1
[3]<()
 app.bundle.js:554
s()
 app.bundle.js:1
e()
 app.bundle.js:1
<anonymous>
 app.bundle.js:1

};

var initialAmiSet ={
"amis": [{
Copy link
Contributor

@eliperelman eliperelman Jul 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove quotes from property keys.

@djmitche
Copy link
Contributor

djmitche commented Jul 25, 2016

@jhford did you re-run npm install? It looks like it's failing inside of require("taskcluster-client") based on that traceback..

},

onAmiSetChange(e) {
this.setState({amis: JSON.parse(e.target.value)});
Copy link
Contributor

@eliperelman eliperelman Jul 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use spaces to padding the interior of object literal braces:

this.setState({ amis: JSON.parse(e.target.value) });

@eliperelman
Copy link
Contributor

eliperelman commented Jul 26, 2016

@anarute yes, that is correct, those were the same request.

@jhford
Copy link
Contributor

jhford commented Jul 26, 2016

If I try to create a valid AMI Set without a name, I don't get an error, but rather "Are you sure that you would like tocreatethe AMI Set?". If I confirm, I get a spinner and when the spinner finishes, i'm asked the question again.

If I name it 'hi', I get a similar outcome. If I name it in the pattern of the existing ones, I get the same issue. It seems that I don't get any error messages and I'm unable to actually create amisets.

@jhford
Copy link
Contributor

jhford commented Jul 26, 2016

browser.js:50Warning: is deprecated. Use, , or , with and/or as needed instead.

browser.js:50Warning: "hasFeedback" property of "FormGroup" has been deprecated. Use a <FormControl.Feedback> element.

I'm not sure if this is coming from your code or one of our libraries.

@jhford
Copy link
Contributor

jhford commented Jul 26, 2016

It looks like we're getting a 404 for the case of not having a name.

XMLHttpRequest cannot load https://aws-provisioner.taskcluster.net/v1/ami-set/. Response for preflight has invalid HTTP status code 404

The issue when there is a name looks like it's related to me not being logged in with that browser. The issue here, though, is that it should show me an error message instead of just restarting that flow.

@jhford
Copy link
Contributor

jhford commented Jul 26, 2016

Once I sign in, I also get this error:

warning.js:46 Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the ConfirmAction component.

It looks like the tool can create it, but we should deal with this exception and also the issue about the error message for the 404 issue.

@eliperelman
Copy link
Contributor

eliperelman commented Jul 26, 2016

@jhford

browser.js:50Warning: `<Input>` is deprecated. Use `<FormControl>`, `<Checkbox>`, or `<Radio>`, with `<FormGroup>` and/or `<InputGroup>` as needed instead.
browser.js:50Warning: "hasFeedback" property of "FormGroup" has been deprecated. Use a `<FormControl.Feedback>` element.

This is from an update in a library we are using. These will eventually go away, but we are currently stuck with them.


var initialAmiSet ={
amis: [{
region: "...",
Copy link
Contributor

@eliperelman eliperelman Jul 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single quotes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants