Skip to content

fix(cli-e2e): use profileSampleConfig in profiler test builders#27947

Merged
ulixius9 merged 1 commit into
mainfrom
fix/cli-e2e-profileSample-config
May 7, 2026
Merged

fix(cli-e2e): use profileSampleConfig in profiler test builders#27947
ulixius9 merged 1 commit into
mainfrom
fix/cli-e2e-profileSample-config

Conversation

@ulixius9
Copy link
Copy Markdown
Member

@ulixius9 ulixius9 commented May 6, 2026

Summary

Fixes the scheduled py-cli-e2e-tests workflow, which has been failing on every run since 2026-04-17 (postgres, mysql, mssql, oracle, redshift, snowflake, redash, metabase, quicksight, tableau, bigquery_multiple_project, dbt_redshift).

PR #27184 (commit 47c88d49ce, "Dynamic Sampling Config") moved profileSample / profileSampleType out of DatabaseServiceProfilerPipeline and TableProfilerConfig into a nested profileSampleConfig object. Both pydantic models use extra='forbid', so the old format raises:

Error loading profiler configuration: We encountered an error parsing the configuration of your DatabaseServiceProfilerPipeline.
- Extra parameter 'profileSample'
- Invalid parameter value for 'profileSample'

The CLI E2E test config builders weren't updated alongside that PR — this change brings them in line with the new schema.

Changes

  • ingestion/tests/cli_e2e/base/config_builders/builders.pyProfilerConfigBuilder.build() now emits profileSampleConfig: { sampleConfigType: STATIC, config: { profileSample: ... } } instead of a top-level profileSample.
  • ingestion/tests/cli_e2e/test_cli_bigquery.pyadd_table_profile_config constructs TableProfilerConfig with the nested profileSampleConfig instead of top-level profileSample/profileSampleType.

The redshift tests/cli_e2e/database/redshift/test.yaml is gitignored and regenerated at test runtime by the builder, so it's automatically picked up by the builder fix.

Test plan

  • py-cli-e2e-tests scheduled run goes green for postgres, mysql, mssql, oracle, redshift, snowflake, redash, metabase, quicksight, bigquery_multiple_project, dbt_redshift
  • BigQuery data quality test (add_table_profile_config) successfully creates the table profiler config

🤖 Generated with Claude Code

PR #27184 (commit 47c88d4, "Dynamic Sampling Config") moved
profileSample/profileSampleType out of DatabaseServiceProfilerPipeline
and TableProfilerConfig into a nested profileSampleConfig object, but
the CLI E2E test config builders weren't updated. Both pydantic models
now use extra='forbid', so the old format raises "Extra parameter
'profileSample'" and the scheduled py-cli-e2e-tests workflow has been
red on every run since 2026-04-17 (postgres, mysql, mssql, oracle,
redshift, snowflake, redash, metabase, quicksight, tableau,
bigquery_multiple_project, dbt_redshift).

Update the ProfilerConfigBuilder to emit the new schema and update the
BigQuery TableProfilerConfig usage to match.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 6, 2026 17:04
@ulixius9 ulixius9 requested a review from a team as a code owner May 6, 2026 17:04
@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels May 6, 2026
@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 6, 2026

Code Review 👍 Approved with suggestions 0 resolved / 1 findings

Updates CLI E2E test builders to use the nested profileSampleConfig schema, resolving the profiler configuration validation errors. Consider adding the missing profileSampleType field to the StaticSamplingConfig in builders.py.

💡 Bug: builders.py omits profileSampleType in StaticSamplingConfig

📄 ingestion/tests/cli_e2e/base/config_builders/builders.py:63-65 📄 ingestion/tests/cli_e2e/test_cli_bigquery.py:199-201

In builders.py, the nested config dict under profileSampleConfig only includes profileSample but not profileSampleType. In contrast, the BigQuery test correctly includes both profileSample=100 and profileSampleType=ProfileSampleType.ROWS in the StaticSamplingConfig.

If profileSampleType has a sensible default (e.g., PERCENTAGE), this may be intentional — but it creates an inconsistency between the two changes in this PR. If the profiler pipeline expects an explicit type when using STATIC sampling, this could cause unexpected behavior (e.g., interpreting profileSample=100 as 100% instead of 100 rows).

Suggested fix
"profileSampleConfig": {
    "sampleConfigType": "STATIC",
    "config": {
        "profileSample": self.profilerSample,
        "profileSampleType": "PERCENTAGE",
    },
}
🤖 Prompt for agents
Code Review: Updates CLI E2E test builders to use the nested profileSampleConfig schema, resolving the profiler configuration validation errors. Consider adding the missing profileSampleType field to the StaticSamplingConfig in builders.py.

1. 💡 Bug: builders.py omits profileSampleType in StaticSamplingConfig
   Files: ingestion/tests/cli_e2e/base/config_builders/builders.py:63-65, ingestion/tests/cli_e2e/test_cli_bigquery.py:199-201

   In `builders.py`, the nested `config` dict under `profileSampleConfig` only includes `profileSample` but not `profileSampleType`. In contrast, the BigQuery test correctly includes both `profileSample=100` and `profileSampleType=ProfileSampleType.ROWS` in the `StaticSamplingConfig`.
   
   If `profileSampleType` has a sensible default (e.g., PERCENTAGE), this may be intentional — but it creates an inconsistency between the two changes in this PR. If the profiler pipeline expects an explicit type when using STATIC sampling, this could cause unexpected behavior (e.g., interpreting `profileSample=100` as 100% instead of 100 rows).

   Suggested fix:
   "profileSampleConfig": {
       "sampleConfigType": "STATIC",
       "config": {
           "profileSample": self.profilerSample,
           "profileSampleType": "PERCENTAGE",
       },
   }

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

🟡 Playwright Results — all passed (16 flaky)

✅ 3988 passed · ❌ 0 failed · 🟡 16 flaky · ⏭️ 86 skipped

Shard Passed Failed Flaky Skipped
✅ Shard 1 299 0 0 4
🟡 Shard 2 743 0 7 8
🟡 Shard 3 751 0 4 7
🟡 Shard 4 774 0 1 18
✅ Shard 5 687 0 0 41
🟡 Shard 6 734 0 4 8
🟡 16 flaky test(s) (passed on retry)
  • Features/ActivityAPI.spec.ts › Activity event shows the actor who made the change (shard 2, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts › Admin: Complete export-import-validate flow (shard 2, 1 retry)
  • Features/DataQuality/TestCaseResultPermissions.spec.ts › User with only VIEW cannot PATCH results (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should display correct status badge color and icon (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should start term as Draft when glossary has reviewers (shard 2, 1 retry)
  • Features/IncidentManager.spec.ts › Verify filters in Incident Manager's page (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/UserProfileOnlineStatus.spec.ts › Should show "Active recently" for users active within last hour (shard 3, 1 retry)
  • Flow/PersonaDeletionUserProfile.spec.ts › User profile loads correctly before and after persona deletion (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 3, 1 retry)
  • Pages/CustomProperties.spec.ts › Set table-cp custom property on column and verify in UI (shard 4, 1 retry)
  • Pages/Glossary.spec.ts › Column selection and visibility for Glossary Terms table (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Table (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Metric (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@ulixius9 ulixius9 merged commit 4e24ba1 into main May 7, 2026
63 of 73 checks passed
@ulixius9 ulixius9 deleted the fix/cli-e2e-profileSample-config branch May 7, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants