Skip to content

[engsys] Fix rush-runner #32392

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

Merged
merged 3 commits into from
Dec 31, 2024
Merged
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
21 changes: 7 additions & 14 deletions eng/tools/rush-runner/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,50 +154,43 @@ const rushx_runner_path = path.join(baseDir, "common/scripts/install-run-rushx.j
let exitCode = 0;
if (serviceDirs.length === 0) {
exitCode = spawnNode(baseDir, "common/scripts/install-run-rush.js", action, ...rushParams);
if (exitCode) {
process.exit(exitCode);
}
} else {
switch (actionComponents[0]) {
case "build":
rushRunAllWithDirection(packagesWithDirection);
exitCode = rushRunAllWithDirection(packagesWithDirection);
break;

case "test":
case "unit-test":
case "integration-test":
var rushCommandFlag = "--impacted-by";
let rushCommandFlag = "--impacted-by";

if (isReducedTestScopeEnabled || serviceDirs.length > 1) {
// If a service is configured to have reduced test matrix then run rush test only for those projects
rushCommandFlag = "--only";
}

rushRunAll(rushCommandFlag, packageNames);
exitCode = rushRunAll(rushCommandFlag, packageNames);
break;

case "lint":
for (const packageDir of packageDirs) {
const code = spawnNode(packageDir, rushx_runner_path, action);
if (code) {
exitCode = code;
}
exitCode = spawnNode(packageDir, rushx_runner_path, action);
}
break;
case "check-format":
for (const packageDir of packageDirs) {
const code = spawnNode(packageDir, rushx_runner_path, action);
if (code !== 0) {
exitCode = spawnNode(packageDir, rushx_runner_path, action);
if (exitCode !== 0) {
console.log(
`\nInvoke "rushx format" inside ${tryGetPkgRelativePath(packageDir)} to fix formatting\n`,
);
exitCode = code;
}
}
break;

default:
rushRunAll("--to", packageNames);
exitCode = rushRunAll("--to", packageNames);
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

/**
* @summary Publish and Receive events to Event Grid.
*/

const { EventGridSenderClient, EventGridReceiverClient } = require("@azure/eventgrid-namespaces");
const { AzureKeyCredential } = require("@azure/core-auth");

const dotenv = require("dotenv");

// Load the .env file if it exists
dotenv.config();
require("dotenv/config");

const endpoint = process.env["EVENT_GRID_NAMESPACES_ENDPOINT"] ?? "https://endpoint";
const key = process.env["EVENT_GRID_NAMESPACES_KEY"] ?? "api_key";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"dependencies": {
"@azure/eventgrid-namespaces": "latest",
"dotenv": "latest",
"@azure/core-auth": "^1.7.0"
"@azure/core-auth": "^1.9.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
"dependencies": {
"@azure/eventgrid-namespaces": "latest",
"dotenv": "latest",
"@azure/core-auth": "^1.7.0"
"@azure/core-auth": "^1.9.0"
},
"devDependencies": {
"@types/node": "^18.0.0",
"typescript": "~5.7.2",
"typescript": "~5.6.2",
"rimraf": "latest"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,10 @@
* @summary Publish and Receive events to Event Grid.
*/

import {
EventGridSenderClient,
EventGridReceiverClient,
CloudEvent,
ReceiveResult,
} from "@azure/eventgrid-namespaces";
import type { CloudEvent, ReceiveResult } from "@azure/eventgrid-namespaces";
import { EventGridSenderClient, EventGridReceiverClient } from "@azure/eventgrid-namespaces";
import { AzureKeyCredential } from "@azure/core-auth";

import * as dotenv from "dotenv";

// Load the .env file if it exists
dotenv.config();
import "dotenv/config";

const endpoint = process.env["EVENT_GRID_NAMESPACES_ENDPOINT"] ?? "https://endpoint";
const key = process.env["EVENT_GRID_NAMESPACES_KEY"] ?? "api_key";
Expand Down
Loading