Skip to content

Bug 1967756 - add [non-prod] to summary string when filing an intermi… #8719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/ui/job-view/bugfiler_test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ describe('BugFiler', () => {
successCallback={successCallback}
selectedJob={selectedJob}
platform={selectedJob.platform}
currentRepo={{ name: 'autoland' }}
notify={() => {}}
/>
</Provider>
Expand All @@ -139,6 +140,7 @@ describe('BugFiler', () => {
successCallback={successCallback}
selectedJob={selectedJob}
platform={selectedJob.platform}
currentRepo={{ name: 'autoland' }}
notify={() => {}}
/>
</Provider>
Expand Down
9 changes: 7 additions & 2 deletions ui/shared/BugFiler.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export class BugFilerClass extends React.Component {
parsedLog,
reftestUrl,
selectedJob,
currentRepo,
} = props;

const allFailures = suggestions.map((sugg) =>
Expand Down Expand Up @@ -188,9 +189,13 @@ export class BugFilerClass extends React.Component {
}
}

if (currentRepo.name === 'try') {
summaryString = `[non-prod] ${summaryString}`;
}

this.state = {
tooltipOpen: {},
summary: `Intermittent ${summaryString}`,
summary: `Intermittent [non-prod] ${summaryString}`,
productSearch: null,
suggestedProducts: [],
isFilerSummaryVisible: false,
Expand Down Expand Up @@ -1005,7 +1010,7 @@ BugFilerClass.propTypes = {
platform: PropTypes.string.isRequired,
notify: PropTypes.func.isRequired,
selectedJob: PropTypes.shape({}).isRequired,
currentRepo: PropTypes.string.isRequired,
currentRepo: PropTypes.shape({}).isRequired,
};

const mapStateToProps = ({ pushes: { decisionTaskMap } }) => ({
Expand Down
6 changes: 5 additions & 1 deletion ui/shared/InternalIssueFiler.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class InternalIssueFilerClass extends React.Component {
constructor(props) {
super(props);

const { suggestion, jobGroupName, jobTypeName } = props;
const { suggestion, jobGroupName, jobTypeName, currentRepo } = props;

const parsedSummary = parseSummary(suggestion);
let summaryString = parsedSummary[0].join(' | ');
Expand Down Expand Up @@ -128,6 +128,9 @@ export class InternalIssueFilerClass extends React.Component {
}
}

if (currentRepo.name === 'try') {
summaryString = `[non-prod] ${summaryString}`;
}
this.state = {
summary: `Intermittent ${summaryString}`,
};
Expand Down Expand Up @@ -215,6 +218,7 @@ InternalIssueFilerClass.propTypes = {
jobTypeName: PropTypes.string.isRequired,
successCallback: PropTypes.func.isRequired,
notify: PropTypes.func.isRequired,
currentRepo: PropTypes.shape({}).isRequired,
};

export default connect(null, { notify })(InternalIssueFilerClass);
1 change: 1 addition & 0 deletions ui/shared/tabs/failureSummary/FailureSummaryTab.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ class FailureSummaryTab extends React.Component {
jobGroupName={selectedJob.job_group_name}
jobTypeName={selectedJob.job_type_name}
successCallback={this.internalIssueFilerCallback}
currentRepo={currentRepo}
/>
)}
</div>
Expand Down