Sync upstream tensorflow/tensorboard master (3 commits) + extend refactors to TensorBored code#71
Merged
Conversation
The `Component` interface provides no typesafety to description
component classes. Its only purpose is to define the properties of the
Component decorator. Currently it only has optional properties, so it
matches the type `{}` which is as safe as `any`.
## Motivation for features / changes
Fix linter errors in test files to keep the codebase compliant with
current TypeScript and tslint rules in internal build.
## Technical description of changes
Cast `spyOn(store, 'dispatch') to jasmine.Spy` across 18 test files to
satisfy `NgRx` dispatch overload signatures. Updated `throwError to
factory form throwError(() => new Error(...))` per RxJS 7 requirements.
Added `tslint:disable-next-line:enforce-name-casing` suppressions for
snake_case keys that mirror backend API contracts.
Syncs 3 upstream commits: - e6df954: add explicit changeDetection on all components - 8e7bbc6: remove usages of the Component interface - 81e6137: fix typescript linter errors Resolved conflict in scalar_card_test.ts: merged upstream's alphabetized imports with our TensorBored-specific metricsTagYAxisScaleChanged and metricsTagXAxisScaleChanged imports. Co-authored-by: Samuel <samuel@knutsen.co>
Continues the intent of upstream e6df954 (add explicit changeDetection on all components) to TensorBored-specific code. BuildBadgeComponent uses ChangeDetectionStrategy.Default since it mutates component state in an HTTP subscribe callback. Co-authored-by: Samuel <samuel@knutsen.co>
…ctory Continues the intent of upstream 81e6137 (fix typescript linter errors) to files that upstream didn't touch: - Cast spyOn(store, 'dispatch') to jasmine.Spy in 17 test files to satisfy NgRx dispatch overload signatures. - Update throwError(new Error(...)) to throwError(() => new Error(...)) factory form in runs_effects.ts per RxJS 7 deprecation. Co-authored-by: Samuel <samuel@knutsen.co>
Preview Deployment
Details
|
This file contains hidden or 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
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.
Motivation for features / changes
Sync with upstream
tensorflow/tensorboardmaster which had 3 new commits since our last sync. These are all housekeeping/refactoring changes with no behavioral impact. We also extend the intent of each upstream change to TensorBored-specific code that upstream didn't touch.Technical description of changes
Upstream merge (3 commits)
e6df954— Add explicitchangeDetectionproperty on all Angular components. Every@Componentdecorator now explicitly declaresChangeDetectionStrategy.Defaultor.OnPushinstead of relying on the implicit default. ~50 upstream component files affected.8e7bbc6— Remove usages of theComponentinterface. ReplacesType<Component>withType<unknown>in routing, plugin registry, and customization code. TheComponentinterface had only optional properties and provided no real type safety.81e6137— Fix TypeScript linter errors. CastsspyOn(store, 'dispatch')tojasmine.Spyacross 18 test files for NgRx dispatch overload compatibility. UpdatesthrowErrorto factory form per RxJS 7. Adds tslint suppressions for snake_case API keys.Merge conflict resolution
One conflict in
scalar_card_test.ts— upstream reorganized imports alphabetically; our code had TensorBored-specific imports (metricsTagYAxisScaleChanged,metricsTagXAxisScaleChanged). Resolved by merging both sets in alphabetical order.Extending upstream intent to TensorBored code
Explicit changeDetection (from commit 1):
changeDetection: ChangeDetectionStrategy.DefaulttoBuildBadgeComponent— the only TensorBored-specific component missing it. All other TensorBored components (profile menu, superimposed cards, etc.) already had explicitOnPush.Remove Component interface (from commit 2):
Type<unknown>everywhere. NoType<Component>usages existed.Linter fixes (from commit 3):
spyOn(store, 'dispatch')tojasmine.Spyin 17 additional test files that upstream didn't touch (webapp: 10 files, debugger plugin: 7 files).throwError(new Error(...))to factory formthrowError(() => new Error(...))inruns_effects.ts.Screenshots of UI changes (or N/A)
N/A — No UI changes. All modifications are refactoring/linting.
Detailed steps to verify changes work correctly (as executed by you)
spyOn(store, 'dispatch')withoutjasmine.Spycast — none foundthrowError(new Error(non-factory form — none foundchangeDetection— onlybuild_badge_component.tsfound and fixedType<Component>usages — none foundAlternate designs / implementations considered (or N/A)
N/A — Straightforward upstream sync with mechanical extension of the same patterns to our code.