From 6b9fa1f39195738948999718f9fbdae0557baedb Mon Sep 17 00:00:00 2001 From: Adrian RC Date: Wed, 16 Oct 2024 23:59:49 +0000 Subject: [PATCH 1/6] Adds a comment suggesting how to fix linter issues. --- .github/workflows/ci.yml | 2 +- .../views/card_renderer/scalar_card_line_chart_container.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3aaf37a5b56..b62e4e23d11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -317,7 +317,7 @@ jobs: node-version: 16 - run: yarn install --ignore-engines # You can run `yarn fix-lint` to fix all Prettier complaints. - - run: yarn lint + - run: yarn lint || echo 'Try running `$ prettier --write $(git diff-tree --no-commit-id --name-only -r)`.' # Make sure no tests are skipped with "focused" tests. - run: | ! git grep -E 'f(it|describe)\(' 'tensorboard/*_test.ts' diff --git a/tensorboard/webapp/metrics/views/card_renderer/scalar_card_line_chart_container.ts b/tensorboard/webapp/metrics/views/card_renderer/scalar_card_line_chart_container.ts index d59869df015..f769fd054c3 100644 --- a/tensorboard/webapp/metrics/views/card_renderer/scalar_card_line_chart_container.ts +++ b/tensorboard/webapp/metrics/views/card_renderer/scalar_card_line_chart_container.ts @@ -155,7 +155,7 @@ export class ScalarCardLineChartContainer ngOnInit() { this.userViewBox$ = this.store.select( getMetricsCardUserViewBox, - this.cardId + this.cardId, ); this.loadState$ = this.store.select(getCardLoadState, this.cardId); From d051c73dd63f0fe48b46b90625e8299867307527 Mon Sep 17 00:00:00 2001 From: Adrian RC Date: Thu, 17 Oct 2024 00:04:14 +0000 Subject: [PATCH 2/6] Testing command with multiple commits. --- .../tf_debugger_v2_plugin/views/alerts/alerts_container.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/alerts/alerts_container.ts b/tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/alerts/alerts_container.ts index 3dd57590890..5fd5e397177 100644 --- a/tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/alerts/alerts_container.ts +++ b/tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/alerts/alerts_container.ts @@ -73,8 +73,8 @@ export class AlertsContainer { count: alertsBreakdown[alertType], }; }); - }) - ) + }), + ), ); readonly focusType$ = this.store.pipe(select(getAlertsFocusType)); From 844279dd3e10c94475ed032ffe765593961c940a Mon Sep 17 00:00:00 2001 From: Adrian RC Date: Thu, 17 Oct 2024 00:06:03 +0000 Subject: [PATCH 3/6] Update command to work for multiple commits in the PR. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b62e4e23d11..8f59260c6f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -317,7 +317,7 @@ jobs: node-version: 16 - run: yarn install --ignore-engines # You can run `yarn fix-lint` to fix all Prettier complaints. - - run: yarn lint || echo 'Try running `$ prettier --write $(git diff-tree --no-commit-id --name-only -r)`.' + - run: yarn lint || echo 'Try running `$ prettier --write $(git diff-tree --no-commit-id --name-only -r)`.' # Make sure no tests are skipped with "focused" tests. - run: | ! git grep -E 'f(it|describe)\(' 'tensorboard/*_test.ts' From 8e8547de03fad41b2b34018898029b3343ab5828 Mon Sep 17 00:00:00 2001 From: Adrian RC Date: Thu, 17 Oct 2024 00:21:18 +0000 Subject: [PATCH 4/6] Change to test CI failure. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f59260c6f6..7f4aa340fc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -317,7 +317,7 @@ jobs: node-version: 16 - run: yarn install --ignore-engines # You can run `yarn fix-lint` to fix all Prettier complaints. - - run: yarn lint || echo 'Try running `$ prettier --write $(git diff-tree --no-commit-id --name-only -r)`.' + - run: yarn lint || echo 'Try running `$ prettier --write $(git diff-tree --no-commit-id --name-only -r)`.' && false # Make sure no tests are skipped with "focused" tests. - run: | ! git grep -E 'f(it|describe)\(' 'tensorboard/*_test.ts' From 74af7b94774b0f5ce613a5f9e52e43eb191cb83a Mon Sep 17 00:00:00 2001 From: Adrian RC Date: Thu, 17 Oct 2024 00:28:21 +0000 Subject: [PATCH 5/6] Update CI command to not fail when lint suceeds. --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f4aa340fc4..28ddc216c79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -316,8 +316,9 @@ jobs: with: node-version: 16 - run: yarn install --ignore-engines - # You can run `yarn fix-lint` to fix all Prettier complaints. - - run: yarn lint || echo 'Try running `$ prettier --write $(git diff-tree --no-commit-id --name-only -r)`.' && false + # You can run `yarn fix-lint` to fix all Prettier complaints, although at this point this will try to fix too many things. + # To fix only the files changed in this PR, see the command below. + - run: yarn lint || (( echo 'Try running `$ prettier --write $(git diff-tree --no-commit-id --name-only -r)`.' && false )) # Make sure no tests are skipped with "focused" tests. - run: | ! git grep -E 'f(it|describe)\(' 'tensorboard/*_test.ts' From 309d335a211601877ebc8561598f0401e5fabbd1 Mon Sep 17 00:00:00 2001 From: Adrian RC Date: Thu, 17 Oct 2024 00:33:36 +0000 Subject: [PATCH 6/6] Fixing linter issues. --- .../tf_debugger_v2_plugin/views/alerts/alerts_container.ts | 4 ++-- .../views/card_renderer/scalar_card_line_chart_container.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/alerts/alerts_container.ts b/tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/alerts/alerts_container.ts index 5fd5e397177..3dd57590890 100644 --- a/tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/alerts/alerts_container.ts +++ b/tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/alerts/alerts_container.ts @@ -73,8 +73,8 @@ export class AlertsContainer { count: alertsBreakdown[alertType], }; }); - }), - ), + }) + ) ); readonly focusType$ = this.store.pipe(select(getAlertsFocusType)); diff --git a/tensorboard/webapp/metrics/views/card_renderer/scalar_card_line_chart_container.ts b/tensorboard/webapp/metrics/views/card_renderer/scalar_card_line_chart_container.ts index f769fd054c3..d59869df015 100644 --- a/tensorboard/webapp/metrics/views/card_renderer/scalar_card_line_chart_container.ts +++ b/tensorboard/webapp/metrics/views/card_renderer/scalar_card_line_chart_container.ts @@ -155,7 +155,7 @@ export class ScalarCardLineChartContainer ngOnInit() { this.userViewBox$ = this.store.select( getMetricsCardUserViewBox, - this.cardId, + this.cardId ); this.loadState$ = this.store.select(getCardLoadState, this.cardId);