create ami-sets tool #121

Merged
merged 4 commits into from Jul 29, 2016

Conversation

Projects
None yet
4 participants
@anarute
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@djmitche

djmitche Jul 21, 2016

Contributor

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.

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

This comment has been minimized.

Show comment
Hide comment
@anarute

anarute Jul 21, 2016

Contributor

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

Contributor

anarute commented Jul 21, 2016

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

@jhford

This comment has been minimized.

Show comment
Hide comment
@jhford

jhford Jul 25, 2016

Contributor

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
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
ami-sets/amiseteditor.jsx
+};
+
+var initialAmiSet ={
+ "amis": [{

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove quotes from property keys.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove quotes from property keys.

ami-sets/amiseteditor.jsx
+ },
+
+ getInitialState() {
+

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove extra line.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove extra line.

ami-sets/amiseteditor.jsx
+ return {
+ // Loading amiSet or loaded amiSet
+ amiSetLoaded: false,
+ amiSetError: undefined,

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Prefer null over undefined.

@eliperelman

eliperelman Jul 25, 2016

Member

Prefer null over undefined.

ami-sets/amiseteditor.jsx
+ /** Load initial state */
+ load() {
+ // If there is no currentAmiSet, we're creating a new AMI Set
+ if (this.props.currentAmiSet === '') {

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member
if (!this.props.currentAmiSet) {
@eliperelman

eliperelman Jul 25, 2016

Member
if (!this.props.currentAmiSet) {
ami-sets/amiseteditor.jsx
+ } else {
+ // Load currentAmiSet
+
+ //var amisObject = this.awsProvisioner.amiSet(this.props.currentAmiSet);

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove this comment.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove this comment.

ami-sets/amiseteditor.jsx
+ };
+ } else {
+ // Load currentAmiSet
+

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove extra line.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove extra line.

ami-sets/amiseteditor.jsx
+ },
+
+ render() {
+

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove extra line.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove extra line.

ami-sets/amiseteditor.jsx
+ {
+ isEditing ?(
+ <div>
+ {this.renderCodeEditor()}

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Indent this section using 2 spaces.

@eliperelman

eliperelman Jul 25, 2016

Member

Indent this section using 2 spaces.

ami-sets/amiseteditor.jsx
+ </div>
+ ) : (
+ <span>
+ <pre>{ JSON.stringify(_.pick(this.state.amis, ['amis']), null, 2) }</pre>

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove spaces surrounding JSON.stringify().

@eliperelman

eliperelman Jul 25, 2016

Member

Remove spaces surrounding JSON.stringify().

ami-sets/amiseteditor.jsx
+ <bs.ButtonToolbar>
+ <bs.Button bsStyle="success"
+ onClick={this.startEditing}>
+ <bs.Glyphicon glyph="pencil"/>&nbsp;Edit AMI Set

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove &nbsp; and just insert a space.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove &nbsp; and just insert a space.

ami-sets/amiseteditor.jsx
+ label='AmiSet'
+ hasFeedback
+ ref='amiSet'
+ onChange={this.amiSetChange}/>

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Insert space before tag closing />.

@eliperelman

eliperelman Jul 25, 2016

Member

Insert space before tag closing />.

ami-sets/amiseteditor.jsx
+ ref="amis"
+ lineNumbers={true}
+ mode="application/json"
+ textAreaClassName={'form-control'}

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member
textAreaClassName="form-control"
@eliperelman

eliperelman Jul 25, 2016

Member
textAreaClassName="form-control"
ami-sets/amiseteditor.jsx
+ lineNumbers={true}
+ mode="application/json"
+ textAreaClassName={'form-control'}
+ textAreaStyle={{minHeight: '20em'}}

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member
textAreaStyle={{ minHeight: '20em' }}
@eliperelman

eliperelman Jul 25, 2016

Member
textAreaStyle={{ minHeight: '20em' }}
ami-sets/amiseteditor.jsx
+ indentWithTabs={true}
+ tabSize={2}
+ lint={true}
+ gutters={["CodeMirror-lint-markers"]}

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member
gutters={['CodeMirror-lint-markers']}
@eliperelman

eliperelman Jul 25, 2016

Member
gutters={['CodeMirror-lint-markers']}
ami-sets/amiseteditor.jsx
+ tabSize={2}
+ lint={true}
+ gutters={["CodeMirror-lint-markers"]}
+ theme="ambiance"/>

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Insert space before closing tag />.

@eliperelman

eliperelman Jul 25, 2016

Member

Insert space before closing tag />.

ami-sets/amiseteditor.jsx
+ return (
+ <bs.ButtonToolbar>
+ <bs.Button bsStyle="success"
+ onClick={this.saveAmiSet}

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Indent using 2 spaces.

@eliperelman

eliperelman Jul 25, 2016

Member

Indent using 2 spaces.

ami-sets/amiseteditor.jsx
+ <bs.Button bsStyle="success"
+ onClick={this.saveAmiSet}
+ disabled={this.state.working}>
+ <bs.Glyphicon glyph="ok"/>&nbsp;Save Changes

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Replace &nbsp with space.

@eliperelman

eliperelman Jul 25, 2016

Member

Replace &nbsp with space.

ami-sets/amiseteditor.jsx
+ },
+
+ startEditing() {
+ this.setState({editing: true});

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member
this.setState({ editing: true });
@eliperelman

eliperelman Jul 25, 2016

Member
this.setState({ editing: true });
@djmitche

This comment has been minimized.

Show comment
Hide comment
@djmitche

djmitche Jul 25, 2016

Contributor

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

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..

ami-sets/amiseteditor.jsx
+ },
+
+ onAmiSetChange(e) {
+ this.setState({amis: JSON.parse(e.target.value)});

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Use spaces to padding the interior of object literal braces:

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

eliperelman Jul 25, 2016

Member

Use spaces to padding the interior of object literal braces:

this.setState({ amis: JSON.parse(e.target.value) });
ami-sets/amiseteditor.jsx
+ error: null
+ });
+ } catch(err) {
+ this.setState({error: err});

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member
this.setState({ error: err });
@eliperelman

eliperelman Jul 25, 2016

Member
this.setState({ error: err });
ami-sets/amiseteditor.jsx
+ this.props.selectAmiSet(this.state.amiSet);
+ this.props.refreshAmiSetsList();
+ } catch(err) {
+ this.setState({error: err});

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Indent 2 spaces.

@eliperelman

eliperelman Jul 25, 2016

Member

Indent 2 spaces.

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member
this.setState({ error: err });
@eliperelman

eliperelman Jul 25, 2016

Member
this.setState({ error: err });
ami-sets/amiseteditor.jsx
+
+ async deleteAmiSet() {
+ await this.awsProvisioner.removeAmiSet(this.state.amiSet);
+ this.props.selectAmiSet(undefined);

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member
this.props.selectAmiSet();
@eliperelman

eliperelman Jul 25, 2016

Member
this.props.selectAmiSet();
ami-sets/amiseteditor.jsx
+ this.props.selectAmiSet(undefined);
+ this.props.refreshAmiSetsList();
+ }
+

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove extra line.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove extra line.

ami-sets/amisetmanager.jsx
+ getInitialState() {
+ return {
+ amiSetsLoaded: false,
+ amiSetsError: undefined,

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Use null over undefined.

@eliperelman

eliperelman Jul 25, 2016

Member

Use null over undefined.

ami-sets/amisetmanager.jsx
+ {this.renderAmiSetsTable()}
+ <bs.ButtonToolbar>
+ <bs.Button bsStyle="primary"
+ onClick={this.selectAmiSet.bind(this, '')}

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Indent using 2 spaces.

<bs.Button
  bsStyle="primary"
  onClick={this.selectAmiSet.bind(this, '')}
  disabled={this.state.selectedAmiSet === ''}>
@eliperelman

eliperelman Jul 25, 2016

Member

Indent using 2 spaces.

<bs.Button
  bsStyle="primary"
  onClick={this.selectAmiSet.bind(this, '')}
  disabled={this.state.selectedAmiSet === ''}>
ami-sets/amisetmanager.jsx
+ Add AMI Set
+ </bs.Button>
+ <bs.Button bsStyle="success"
+ onClick={this.reload}

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Indent using 2 spaces.

@eliperelman

eliperelman Jul 25, 2016

Member

Indent using 2 spaces.

ami-sets/amisetmanager.jsx
+ <bs.Button bsStyle="success"
+ onClick={this.reload}
+ disabled={!this.state.amiSetsLoaded}>
+ <bs.Glyphicon glyph="refresh"/>

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member
<bs.Glyphicon glyph="refresh"/> Refresh
@eliperelman

eliperelman Jul 25, 2016

Member
<bs.Glyphicon glyph="refresh"/> Refresh
ami-sets/amisetmanager.jsx
+ </bs.ButtonToolbar>
+ </bs.Col>
+ <bs.Col md={7}>
+ <AmiSetEditor currentAmiSet={this.state.selectedAmiSet}

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Indent using 2 spaces.

@eliperelman

eliperelman Jul 25, 2016

Member

Indent using 2 spaces.

ami-sets/amisetmanager.jsx
+ /** Render row with amiSet */
+ renderAmiSetRow(amiSet, index) {
+ var isSelected = (this.state.selectedAmiSet === amiSet);
+ return (

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Insert line between last declaration and expressions.

@eliperelman

eliperelman Jul 25, 2016

Member

Insert line between last declaration and expressions.

ami-sets/amisetmanager.jsx
+
+ /** Render row with amiSet */
+ renderAmiSetRow(amiSet, index) {
+ var isSelected = (this.state.selectedAmiSet === amiSet);

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member
var isSelected = this.state.selectedAmiSet === amiSet;
@eliperelman

eliperelman Jul 25, 2016

Member
var isSelected = this.state.selectedAmiSet === amiSet;
ami-sets/amisetmanager.jsx
+ var isSelected = (this.state.selectedAmiSet === amiSet);
+ return (
+ <tr key={index}
+ className={isSelected ? 'info' : undefined}

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member
className={isSelected ? 'info' : ''}
@eliperelman

eliperelman Jul 25, 2016

Member
className={isSelected ? 'info' : ''}

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Indent using 2 spaces.

@eliperelman

eliperelman Jul 25, 2016

Member

Indent using 2 spaces.

ami-sets/amisetmanager.jsx
+ let selectedAmiSet = amiSetId;
+ let amiSets = _.cloneDeep(this.state.amiSets);
+ var index = _.findIndex(amiSets, a => a.amiSet === amiSetId);
+ if (index === -1 && amiSet !== null) {

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Insert line between last declaration and conditional.

@eliperelman

eliperelman Jul 25, 2016

Member

Insert line between last declaration and conditional.

ami-sets/amisetmanager.jsx
+ } else {
+ amiSets = amiSets.filter(aSet => aSet.amiSet !== amiSetId);
+ }
+ if (_.findIndex(amiSets, aSet => aSet.amiSet === selectedAmiSet) === -1) {

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Insert line between conditionals.

@eliperelman

eliperelman Jul 25, 2016

Member

Insert line between conditionals.

ami-sets/amisetmanager.jsx
+ if (_.findIndex(amiSets, aSet => aSet.amiSet === selectedAmiSet) === -1) {
+ selectedAmiSet = '';
+ }
+ amiSets.sort((a, b) => a.amiSet > b.amiSet);

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Insert line between last conditional and next expression.

@eliperelman

eliperelman Jul 25, 2016

Member

Insert line between last conditional and next expression.

ami-sets/amisetmanager.jsx
+ selectedAmiSet = '';
+ }
+ amiSets.sort((a, b) => a.amiSet > b.amiSet);
+ this.setState({amiSets, selectedAmiSet});

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member
this.setState({ amiSets, selectedAmiSet });
@eliperelman

eliperelman Jul 25, 2016

Member
this.setState({ amiSets, selectedAmiSet });
ami-sets/amisetmanager.jsx
+ },
+
+ selectAmiSet(amiSet) {
+ this.setState({

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member
this.setState({ selectedAmiSet: amiSet });
@eliperelman

eliperelman Jul 25, 2016

Member
this.setState({ selectedAmiSet: amiSet });
ami-sets/app.jsx
+// Render component
+$(function() {
+ ReactDOM.render(
+ <AmiSetManager hashEntry={hashManager.root()}/>,

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Insert space before tag closing.

@eliperelman

eliperelman Jul 25, 2016

Member

Insert space before tag closing.

ami-sets/app.less
@@ -0,0 +1,9 @@
+@import "amiseteditor.less";
+

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove extra line.

@eliperelman

eliperelman Jul 25, 2016

Member

Remove extra line.

ami-sets/app.less
+@import "./lib/format.less";
+
+.ami-set-manager-table {
+ tr{

This comment has been minimized.

@eliperelman

eliperelman Jul 25, 2016

Member

Insert space before curly brace.

@eliperelman

eliperelman Jul 25, 2016

Member

Insert space before curly brace.

@eliperelman

This comment has been minimized.

Show comment
Hide comment
@eliperelman

eliperelman Jul 25, 2016

Member

Gonna make 2 major-ish requests. In your changed lines, please remove all the extra spacing that lines up statements, e.g.:

var React             = require('react');
var bs                = require('react-bootstrap');
var utils             = require('../lib/utils');
var taskcluster       = require('taskcluster-client');
var _                 = require('lodash');
var CodeMirror        = require('react-code-mirror');
var ConfirmAction     = require('../lib/ui/confirmaction');

or:

  mixins: [
    utils.createTaskClusterMixin({
      clients: {
        awsProvisioner:       taskcluster.createClient(reference)
      },
      clientOpts: {
        awsProvisioner: {
          baseUrl:      'https://aws-provisioner.taskcluster.net/v1'
        }
      },
      reloadOnProps: ['currentAmiSet']
    })
  ]

Please change your modifications to just use normal spacing without lining up expressions.

Also, there are several places where comments are just words that are the same as the statement being mentioned, i.e. the comment is redundant and is not saying anything the code already tells you. Please remove these comments, or change them to be descriptive.

Thanks!

Member

eliperelman commented Jul 25, 2016

Gonna make 2 major-ish requests. In your changed lines, please remove all the extra spacing that lines up statements, e.g.:

var React             = require('react');
var bs                = require('react-bootstrap');
var utils             = require('../lib/utils');
var taskcluster       = require('taskcluster-client');
var _                 = require('lodash');
var CodeMirror        = require('react-code-mirror');
var ConfirmAction     = require('../lib/ui/confirmaction');

or:

  mixins: [
    utils.createTaskClusterMixin({
      clients: {
        awsProvisioner:       taskcluster.createClient(reference)
      },
      clientOpts: {
        awsProvisioner: {
          baseUrl:      'https://aws-provisioner.taskcluster.net/v1'
        }
      },
      reloadOnProps: ['currentAmiSet']
    })
  ]

Please change your modifications to just use normal spacing without lining up expressions.

Also, there are several places where comments are just words that are the same as the statement being mentioned, i.e. the comment is redundant and is not saying anything the code already tells you. Please remove these comments, or change them to be descriptive.

Thanks!

@anarute

This comment has been minimized.

Show comment
Hide comment
@anarute

anarute Jul 26, 2016

Contributor

@eliperelman thanks for the review. I just have a question, I'm not sure if I got it right about "removing all the extra spacing that lines up statements". Should I change to this:

var React = require('react');
var bs = require('react-bootstrap');

instead of this?

var React       = require('react');
var bs          = require('react-bootstrap');

Also, when you say to change my modification to use normal spacing, what does it mean? is it the same thing I'm asking above?

Contributor

anarute commented Jul 26, 2016

@eliperelman thanks for the review. I just have a question, I'm not sure if I got it right about "removing all the extra spacing that lines up statements". Should I change to this:

var React = require('react');
var bs = require('react-bootstrap');

instead of this?

var React       = require('react');
var bs          = require('react-bootstrap');

Also, when you say to change my modification to use normal spacing, what does it mean? is it the same thing I'm asking above?

@eliperelman

This comment has been minimized.

Show comment
Hide comment
@eliperelman

eliperelman Jul 26, 2016

Member

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

Member

eliperelman commented Jul 26, 2016

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

@jhford

This comment has been minimized.

Show comment
Hide comment
@jhford

jhford Jul 26, 2016

Contributor

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.

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

This comment has been minimized.

Show comment
Hide comment
@jhford

jhford Jul 26, 2016

Contributor

browser.js:50Warning:is deprecated. Use,, or, withand/oras 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.

Contributor

jhford commented Jul 26, 2016

browser.js:50Warning:is deprecated. Use,, or, withand/oras 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

This comment has been minimized.

Show comment
Hide comment
@jhford

jhford Jul 26, 2016

Contributor

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.

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

This comment has been minimized.

Show comment
Hide comment
@jhford

jhford Jul 26, 2016

Contributor

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.

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

This comment has been minimized.

Show comment
Hide comment
@eliperelman

eliperelman Jul 26, 2016

Member

@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.

Member

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.

ami-sets/amiseteditor.jsx
+
+var initialAmiSet ={
+ amis: [{
+ region: "...",

This comment has been minimized.

@eliperelman

eliperelman Jul 27, 2016

Member

Single quotes.

@eliperelman

eliperelman Jul 27, 2016

Member

Single quotes.

ami-sets/amiseteditor.jsx
+ }
+};
+
+var initialAmiSet ={

This comment has been minimized.

@eliperelman

eliperelman Jul 27, 2016

Member

Space after equals sign.

@eliperelman

eliperelman Jul 27, 2016

Member

Space after equals sign.

ami-sets/amiseteditor.jsx
+ <div>
+ <h3>Update <code>{this.props.currentAmiSet}</code></h3>
+ {
+ isEditing ?(

This comment has been minimized.

@eliperelman

eliperelman Jul 27, 2016

Member

Space after question mark.

@eliperelman

eliperelman Jul 27, 2016

Member

Space after question mark.

ami-sets/amiseteditor.jsx
+ ) : (
+ <div>
+ <bs.Input
+ type='text'

This comment has been minimized.

@eliperelman

eliperelman Jul 27, 2016

Member

Use double quotes for markup.

@eliperelman

eliperelman Jul 27, 2016

Member

Use double quotes for markup.

ami-sets/amiseteditor.jsx
+ <br/>
+ <bs.ButtonToolbar>
+ <ConfirmAction
+ buttonStyle='primary'

This comment has been minimized.

@eliperelman

eliperelman Jul 27, 2016

Member

Double quotes for markup.

@eliperelman

eliperelman Jul 27, 2016

Member

Double quotes for markup.

ami-sets/amiseteditor.jsx
+ <ConfirmAction
+ buttonStyle='primary'
+ glyph='ok'
+ label={this.props.amiSet ? 'Update AmiSet' : 'Create AmiSet'}

This comment has been minimized.

@eliperelman

eliperelman Jul 27, 2016

Member

This is fine. Use double quotes for markup attributes, but single quotes in the interpolated values.

@eliperelman

eliperelman Jul 27, 2016

Member

This is fine. Use double quotes for markup attributes, but single quotes in the interpolated values.

ami-sets/amiseteditor.jsx
+ glyph='ok'
+ label={this.props.amiSet ? 'Update AmiSet' : 'Create AmiSet'}
+ action={this.props.amiSet ? this.save : this.create}
+ success='Saved AMI Set'>

This comment has been minimized.

@eliperelman

eliperelman Jul 27, 2016

Member

Double quotes for markup attributes.

@eliperelman

eliperelman Jul 27, 2016

Member

Double quotes for markup attributes.

ami-sets/amiseteditor.jsx
+ label={this.props.amiSet ? 'Update AmiSet' : 'Create AmiSet'}
+ action={this.props.amiSet ? this.save : this.create}
+ success='Saved AMI Set'>
+ Are you sure that you would like to

This comment has been minimized.

@eliperelman

eliperelman Jul 27, 2016

Member

Indent this section 2 more spaces.

@eliperelman

eliperelman Jul 27, 2016

Member

Indent this section 2 more spaces.

ami-sets/amiseteditor.jsx
+ ref="amis"
+ lineNumbers={true}
+ mode="application/json"
+ textAreaClassName='form-control'

This comment has been minimized.

@eliperelman

eliperelman Jul 27, 2016

Member

Double quotes.

@eliperelman

eliperelman Jul 27, 2016

Member

Double quotes.

ami-sets/amiseteditor.jsx
+ <bs.Glyphicon glyph="ok"/> Save Changes
+ </bs.Button>
+ <ConfirmAction
+ buttonStyle='danger'

This comment has been minimized.

@eliperelman

eliperelman Jul 27, 2016

Member

Double quote markup attributes.

@eliperelman

eliperelman Jul 27, 2016

Member

Double quote markup attributes.

@eliperelman eliperelman merged commit a2339f2 into taskcluster:master Jul 29, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment