-
Notifications
You must be signed in to change notification settings - Fork 906
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
fix(core): handle challengeDestructiveActions being undefined in API response #4766
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typescript noob. not sure if this is the best way to cast a value to bool. |
@@ -36,7 +36,7 @@ export class AccountTag extends React.Component<IAccountTagProps, IAccountTagSta | |||
const { cache } = AccountTag; | |||
if (!cache.hasOwnProperty(account)) { | |||
cache[account] = ReactInjector.accountService.challengeDestructiveActions(account) | |||
.then(result => cache[account] = result); | |||
.then(result => cache[account] = Boolean(result)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works; you can also do !!result
, which is maybe more idiomatic.
ghost
deleted the
sbws-handle-challenge-destructive-actions-undefined
branch
February 2, 2018 18:03
ghost
mentioned this pull request
Feb 2, 2018
FYI this error surfaced for me because the |
dkirillov
added a commit
to lookout/deck
that referenced
this pull request
Feb 7, 2018
* feat(amazon/serverGroup): warn that scaling policies will not work when capacity is pinned (spinnaker#4668) * feat(webhooks): preconfigured webhook params (spinnaker#4669) adds support for preconfigured webhook parameters. these parameters can be set in orca's config and are then exposed to users. instead of expecting users to fillout an entire payload, these parameters can be used to expose the important parts and abstract the other configuration away. * feat(provider/kubernetes): export k8s server group interface (spinnaker#4674) * chore(provider/kubernetes): bump kubernetes package version (spinnaker#4676) * chore(amazon): bump package to 0.0.59 (spinnaker#4677) - feat(amazon/serverGroup): warn that scaling policies will not work when capacity is pinned * Add/update Travis Slack notifications (spinnaker#4673) * fix(core): fix restore to this version behavior on pipeline config (spinnaker#4671) * fix(core/vis): Fix visualizer toggle to clean up old copies of the visualizer (spinnaker#4672) (cherry picked from commit 4604e0f) * fix(core/search): Fix instance searches (spinnaker#4670) * fix(webhooks): default parameters to empty list (spinnaker#4678) * fix(core/presentation): Add padding to filter sidebar as a scrolling affordance (spinnaker#4679) * fix(core): surface app data status in views without active states (spinnaker#4675) * style(amazon/application/projects/pipeline/google/kubernetes): Replacing fa-cog icons with new spinner (spinnaker#4630) * Replaced cogs with new spinner * removing space around 'finding' phrases + updating some of the spinners to be larger * removing unnecessary spaces * fix(core/search): Fix calling setState on unmounted RecentlyViewedItems (spinnaker#4680) * fix(amazon/loadBalancers): Fix editing load balancers that are associated with an app that no longer exists (spinnaker#4682) * fix(provider/kubernetes): Fix label wording (spinnaker#4683) Artifacts are "bound", not "deployed" * fix(amazon/loadBalancer): Show region and account when deleting a load balancer (spinnaker#4684) * refactor(core/search): Reactify SearchV2 * refactor(core/search): Use router state to drive search results. Remove IFilterType 'modifier' in favor of 'key'; rename 'text' to 'name' * refactor(core/search): Refactor Search V2. Simplify interfaces and post-search logic. Simplify Search v2 service logic. * perf(core/clusters): use ReactVirtualized to render clusters (spinnaker#4688) * refactor(amazon/loadBalancer): Make load balancer actions button a react component * refactor(core): Remove unused function in waypoint service * feat(core/forms): Create a react version of the checklist component * feat(core/account): Create react wrapper for account select field * feat(core/region): Create react version of region select field * feat(core/entityTag): Create react wrapper for add entity tag links * feat(core/validation): Add react component for form validation errors * fix(core): Add loadBalancerWriter to react injector * refactor(core): remove redundant div from cluster pod wrapper (spinnaker#4690) * style(pipeline): Fit contents in the debugging section (spinnaker#4622) * Fixed overflow of long messages in modal * Using existing break-word class * chore(amazon): bump package to 0.0.60 (spinnaker#4692) * chore(core): bump package to 0.0.130 (spinnaker#4693) * feat(core/search): Show search results as they arrive -- do not wait for all to complete * refactor(core/search): Switch to ul/li in search tabs. Convert AccountTag to react. * refactor(core/search): Use flex classes * chore(core): bump package to 0.0.131 * fix(core/search): Fix external search types for v1 search/global search * chore(core): bump package to 0.0.132 * fix(core): use small loader instead of nano on task monitor (spinnaker#4699) * fix(core): reset cluster measure cache when groups update (spinnaker#4698) * fix(amazon): show load balancer actions menu (spinnaker#4700) * chore(chore): bump package to 0.0.133 (spinnaker#4701) * chore(amazon): bump package to 0.0.61 (spinnaker#4702) * feat(core): Create a react modal wizard (spinnaker#4695) * fix(core/account): Fix account tag color rendering during scroll/filter operation (spinnaker#4706) * chore(kayenta): bump deck-kayenta version (spinnaker#4707) * chore(core): upgrade jQuery to 3.3.1 (spinnaker#4703) * Added disabled states for button + a button group for buttons to be arranged (spinnaker#4704) * fix(provider/kubernetes) - manfiests can be provided now through artifacts (spinnaker#4709) * fix(core): Fix module creation by not using internal type (spinnaker#4712) * fix(core): handle load failures in entityTags datasource (spinnaker#4708) * Add watch on the region to update subnets properly (spinnaker#4713) * fix(core/amazon): wrap spinner size in quotes (spinnaker#4710) * reverting to cogs for the pipeline saving button (spinnaker#4715) * chore(core): Ignore styleguide.html changes since it is generated (spinnaker#4714) * fix(core): Add styleguide.html back since it breaks the docker build (spinnaker#4716) * chore(amazon): bump package to 0.0.62 (spinnaker#4717) * chore(core): bump package to 0.0.134 (spinnaker#4718) * feat(amazon): Convert create load balancer modal to react (spinnaker#4705) * feat(provider/appengine): Surface container deploy with free text container url or expected artifact (spinnaker#4686) * chore(kayenta): bump deck-kayenta version (spinnaker#4719) * feat(provider/kubernetes): v1 subpath UI support (spinnaker#4720) * feat(core): map editor hidden keys (spinnaker#4721) * chore(core): bump package version (spinnaker#4722) * fix(provider/kubernetes): prevent npe in run job stage if no triggers configured (spinnaker#4724) * chore(amazon): Bump to 0.0.63 (spinnaker#4725) * fix(provider/gce): Fix search endpoint calls. (spinnaker#4726) We previously used /search to query the infrastructure caches and suggest several types of components in the UI. There was a recently added constraint that requires /search queries to provide a string >= length 3, which broke our cache queries. This change is a temporary fix/workaround to fix the contract breakage. * feat(core): Indicate templated pipelines (spinnaker#4728) Add an icon to the group header / execution title of pipelines based on templates. * docs(provider/kubernetes) - Adding additional tool tips around kubernetes v2 provider (spinnaker#4723) * fix(core): Improved pipeline template tooltip copy (spinnaker#4729) * feat(core/reactShims): Add angularJS template/controller adapter (spinnaker#4730) * feat(core/reactShims): Add angularJS template/controller adapter * feat(core): Add support for react versions of stage details (spinnaker#4731) * fix(core): append pipeline dropdown to body (spinnaker#4727) * style(all): Added grids to the main container of the app (spinnaker#4691) * Using grids for the main container of the page * Using grids for the main container of the page * Fixing infrastructure search section with overflow contents * refactor(core): convert instance list body to React (spinnaker#4733) * chore(core): bump package to 0.0.136 (spinnaker#4734) * fix(core/instance): Make navigating to instance details work again post-React-rewrite (spinnaker#4735) * chore(chore): bump package to 0.0.137 * feat(core/search): Require 3 chars for global search, move to React (spinnaker#4737) * fix(provider/kubernetes): Disable editing of managed ReplicaSets (spinnaker#4696) ReplicaSets owned by a Kubernetes controller should be scaled and edited by using the server group manager to change the controller. Otherwise the controller that owns the ReplicaSet will immediately undo the scaling/editing. Disable scaling and editing if the manifest is owned by a controller, and include links to the server group manager if there is one. Allow ReplicaSets to be deleted, but show a warning explaining that the controller that owns the ReplicaSet may recreate it. Fixes spinnaker/spinnaker#2211 * fix(provider/kubernetes): add error message when manifest yaml isn't valid (spinnaker#4739) * Feat(provider/openstack): Add Scheduler Hints and Availability Zone Select (spinnaker#4740) Update help text for availability zones * fix(pipelines): Fix polling for manual execution (spinnaker#4743) Refresh pipeline executions when a manual execution fails, so the failure is surfaced in the UI. Update polling for executions to look for the specific execution, rather than looking for all running executions and filtering in JavaScript. This fixes a bug leading to infinite polling if the execution ended up in a non-running status before the first poll. * fix(pipelines/help): explains when concurrent pipelines get canceled (spinnaker#4744) * fix(core/search): Export the new GlobalSearch react component (spinnaker#4750) * feat(core): allow hidden (but enable-able) data sources (spinnaker#4738) * fix(details): allow details dropdowns to wrap (at smaller widths). remove clearfix (spinnaker#4748) * style(pipelines): Remove explicit use of $q.defer (spinnaker#4746) Small fix to replace explicit use of $q.defer with directly returning a promise. * fix(core): allow multiselect toggling on instance checkbox click (spinnaker#4745) * feat(core/overrideRegistry): Add react component decorators to enable UI overrides (spinnaker#4741) feat(core/reactShims): Add templateUrl support to AngularJSAdapter react component * feat(details): Migrate the following to @overridable() decorator: (spinnaker#4749) - Application Config - Application Icon - Target Group Details - Load Balancer Details - Instance Details - Security Group Details - Server Group Manager Details * fix(amazon): copy EBS volumes when explicitly cloning an ASG (spinnaker#4754) * fix(core): eagerly fetch more than one cluster grouping pod (spinnaker#4753) * refactor(core): limit calls to /credentials (spinnaker#4752) * feat(dryrun): added a checkbox to let users dry run pipelines (spinnaker#4747) * chore(core): bump package to 0.0.138 (spinnaker#4755) * fix(provider/kubernetes): remove a trailing 'for' from title (spinnaker#4756) * fix(core): consistent button sizing in details panels (spinnaker#4757) * feat(dryrun): made dry run a flag on the trigger rather than a different type (spinnaker#4761) See spinnaker/orca#1931 * fix(core/search): Vertically center spinners and 'no results found' messages (spinnaker#4758) * feat(core/serverGroup): Prepare for Reactification of provider server group details * feat(amazon/serverGroups): Convert server group details to react * chore(core): Bump module to 0.0.139 * chore(amazon): Bump module to 0.0.64 * fix(core/cluster): Vertically align icons and make them the same size (spinnaker#4764) My OCD was hurting * fix(amazon): restore server group actions (spinnaker#4765) * chore(amazon): bump package to 0.0.65 (spinnaker#4767) * fix(core): handle challengeDestructiveActions being undefined in API response (spinnaker#4766) * fix(provider/appengine): dont throw error when git credentials are missing (spinnaker#4768) * fix(core/search): Remove angular2react bridging of native react component (spinnaker#4763) * fix(provider/appengine): Spelling mistake (spinnaker#4771) * fix(provider/kubernetes): stack/detail aren't required (spinnaker#4770) * feat(core/application): reactify applications search (spinnaker#4759) * fix(core): shrink tag marker to fit better in cluster header (spinnaker#4773) * fix(rxjs): switch RxJS deep imports to `import { Foo } from 'rxjs'` (spinnaker#4772) * fix(core): avoid flickering scrollbars in clusters view (spinnaker#4774) * fix(core/loadBalancer): Fix create load balancer button for multiple providers. Fixes spinnaker/spinnaker#2285 * refactor(amazon/loadBalancer): Pull out load balancer create type since it is generic * refactor(core/search): Clean up GlobalSearch, make state mgmt. way less flaky (spinnaker#4760) * fix(core): Fix missing wizard section labels (spinnaker#4778) * fix(core): restore auto-scroll on deep linked server group render (spinnaker#4776) * feat(core/search): Consolidate search registries and v1/v2 data fetching (spinnaker#4775) - Refactor ISearchResultType to SearchResultType class - Remove PostSearchResultSearcherRegistry (consolidate with SearchResultType) - Remove SearchResultHydratorRegistry (consolidate with SearchResultType) - Remove ExternalSearchRegistry (consolidate with SearchResultType) - Migrate ClusterPostSearchResultSearcher and ClusterSearchResultHydrator to a ClustersSearchResultType - Remove ServerGroupSearchResultHydrator - Remove ApplicationPostSearchResultSearcher in favor of fetching /search?type=applications - Migrate individual SearchResultType(s) to classes (i.e., ApplicationSearchResultType) * Updates based on PR comments, and Add missing SearchResultType files * chore(amazon): bump package to 0.0.66 (spinnaker#4779) * chore(core): Bump module to 0.0.140 (spinnaker#4780) * feat(dryrun): temporarily disable dry run until Orca goes out
amanya
pushed a commit
to amanya/deck
that referenced
this pull request
Jul 25, 2018
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If a provider returns a response without a challengeDestructiveActions field then that value is cached as
undefined
. Thetypeof
check on line 44 will then assume that the cache is holding a Promise (since the value isn't a bool) and attempt to call.then
on undefined.Before (appengine provider):
After: no error.