Skip to content
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
6 changes: 5 additions & 1 deletion .github/workflows/validation-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Validation E2E

on:
pull_request:
types: [opened]
types: [opened, synchronize, reopened]
workflow_dispatch:

permissions:
contents: read
Expand All @@ -25,6 +26,9 @@ jobs:

- run: npm ci

- name: Build OwnerLens
run: npm run build

- name: Install Playwright Chromium
run: npx playwright install --with-deps chromium

Expand Down
3 changes: 2 additions & 1 deletion jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ module.exports = {
testPathIgnorePatterns: [
"/node_modules/",
"<rootDir>/src/db/migrate.test.ts",
"<rootDir>/src/providers/azure/runtime/LocalReportRuntime.duckdb.test.ts"
"<rootDir>/src/providers/azure/runtime/LocalReportRuntime.duckdb.test.ts",
"<rootDir>/src/providers/azure/runtime/resources/tables.duckdb.test.ts"
],
transform: {
"^.+\\.tsx?$": [
Expand Down
3 changes: 2 additions & 1 deletion jest.duckdb.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ module.exports = {
...baseConfig,
testMatch: [
"<rootDir>/src/db/migrate.test.ts",
"<rootDir>/src/providers/azure/runtime/LocalReportRuntime.duckdb.test.ts"
"<rootDir>/src/providers/azure/runtime/LocalReportRuntime.duckdb.test.ts",
"<rootDir>/src/providers/azure/runtime/resources/tables.duckdb.test.ts"
],
testPathIgnorePatterns: ["/node_modules/"]
};
7 changes: 7 additions & 0 deletions migrations/002_disabled_resource_group_owner_candidates.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
create table if not exists azure_disabled_resource_group_owner_candidates (
subscription_id varchar not null,
resource_group varchar not null,
owner_candidate varchar not null,
disabled_at varchar not null,
primary key (subscription_id, resource_group, owner_candidate)
);
1 change: 1 addition & 0 deletions migrations/003_drop_disabled_owner_evidence_keys.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
drop table if exists azure_disabled_owner_evidence_keys;
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
create table azure_disabled_resource_group_owner_candidates_v2 (
subscription_id varchar not null,
resource_group varchar not null,
owner_candidate varchar not null,
principal_id varchar not null default '',
disabled_at varchar not null,
primary key (subscription_id, resource_group, owner_candidate, principal_id)
);

insert into azure_disabled_resource_group_owner_candidates_v2 (
subscription_id,
resource_group,
owner_candidate,
principal_id,
disabled_at
)
select
subscription_id,
resource_group,
owner_candidate,
'',
disabled_at
from azure_disabled_resource_group_owner_candidates;

drop table azure_disabled_resource_group_owner_candidates;

alter table azure_disabled_resource_group_owner_candidates_v2
rename to azure_disabled_resource_group_owner_candidates;
11 changes: 11 additions & 0 deletions migrations/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Migrations

Migration files are append-only history for the DuckDB runtime schema.

Do not edit, rename, reorder, or delete existing migration files after they have been committed or shared. If the schema needs to change, add a new migration with the next numeric prefix, for example:

```text
005_short_description.sql
```

Each migration should contain only the SQL needed for that step and should preserve compatibility with databases that already ran earlier migrations.
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"@types/react-dom": "^19.0.0",
"dependency-cruiser": "^17.4.0",
"eslint": "^10.4.1",
"eslint-plugin-unused-imports": "^4.4.1",
"globals": "^17.6.0",
"istanbul-lib-coverage": "^3.2.2",
"istanbul-lib-report": "^3.0.1",
Expand Down
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AzureComponent } from "./components/azure/AzureComponent";
import { AzureInventoryStats } from "./components/azure/AzureInventoryStats";

export default function App() {
return (
Expand All @@ -9,6 +10,7 @@ export default function App() {
<h1 className="text-3xl font-semibold tracking-tight">OwnerLens</h1>
<p className="mt-1 text-sm text-muted-foreground">Azure inventory</p>
</div>
<AzureInventoryStats />
</header>

<AzureComponent />
Expand Down
Loading
Loading