[VPEX][5c] local-env: --check cache purity, greenfield name, and databricks-connect insertion#5854
Conversation
Integration test reportCommit: 0eb1236
8 interesting tests: 4 SKIP, 2 RECOVERED, 2 flaky
Top 10 slowest tests (at least 2 minutes):
|
af9d41b to
c2e8b69
Compare
8b12b87 to
4716210
Compare
anton-107
left a comment
There was a problem hiding this comment.
Approving. Tight, correct follow-up: writeCache threaded through FetchConstraints with the pipeline passing !p.Check, and an existing cache is still read for offline fallback (reading isn't a mutation) — exactly right. Test pair is the right shape: unit (TestFetchConstraintsSkipsCacheWriteWhenDisabled) plus the strengthened end-to-end TestPipelineCheckMutatesNothing asserting the cache dir stays empty. All call sites updated. No findings.
4716210 to
d6462fd
Compare
d6462fd to
3127207
Compare
4bd0477 to
b09b9ce
Compare
|
codex review [P2] — duplicate databricks-connect pins — fixed in b09b9ce. Confirmed the bug (reproduced: 2 pins for both Fix: the multi-line branch now scans the whole array span ( |
A --check dry run must not mutate disk, but FetchConstraints wrote the fetched artifact into the cache dir on every successful live fetch — so a dry run still populated the cache whenever it was writable, even though the pipeline skips every other write-side step under --check. Thread a writeCache flag through FetchConstraints; the pipeline passes !p.Check. An existing cache is still read for offline fallback, since reading is not a mutation. Assert both directly (FetchConstraints with writeCache=false leaves the cache dir empty) and end-to-end (the --check pipeline test now checks the cache dir stays empty too). Reported by codex review of the pipeline PR. Co-authored-by: Isaac
b09b9ce to
ad1b317
Compare
ad1b317 to
e257732
Compare
|
codex review [P3] — trailing-comment mutation — fixed in e257732. Confirmed (reproduced: a |
Address two correctness nits from review of the pipeline PR (#5851). Since that PR was already queued to merge, the fixes land here in the follow-up. - mergeDatabricksConnect only ever *replaced* an existing databricks-connect element, so a default-mode sync of an existing project that didn't already pin databricks-connect wrote the file back with no pin; uv installed nothing and validate failed with E_VALIDATE. It now *inserts* the pin — into the dev array (single- or multi-line), creating the dev key and the [dependency-groups] table when absent — mirroring RenderFreshPyproject. Constraints-only (empty value) stays a no-op; the insert path is idempotent. - Greenfield rendered name = filepath.Base(ProjectDir), which is "." when run from the project's own directory (and "/" at root) — not a valid PEP 621 name, so uv sync rejected the file. projectName() now resolves via filepath.Abs and sanitizes to a valid PEP 508 identifier, falling back to a default when nothing usable remains. Co-authored-by: Isaac
e257732 to
0eb1236
Compare
|
isaac review — 2 MAJOR bugs in the databricks-connect insert path — both fixed in 0eb1236. Both reproduced and confirmed real:
All gates green (build, test, lint 0, deadcode, gofmt). |
Why
Follow-up fixes to the
local-env python syncpipeline (#5851, now merged), from codex and reviewer feedback. Three independent correctness issues in the merge / dry-run paths, none of which the pipeline PR's own tests caught:--checkstill wrote to disk.FetchConstraintspopulated the on-disk constraint cache on every successful live fetch, so a dry run mutated the cache directory even though the pipeline skips every other write-side step under--check.filepath.Base(ProjectDir)is.when run from the project's own directory (and/at root) — not a valid PEP 621/508 name, souv syncrejected the generatedpyproject.toml.pyproject.tomlwith a dev group but no databricks-connect was written back unchanged,uvinstalled nothing, and validation failed withE_VALIDATE. Greenfield worked only becauseRenderFreshPyprojectinserts the pin — a path the existing-project merge lacked.What
--checkno cache write — thread awriteCache boolthroughFetchConstraints; the pipeline passes!p.Check. An existing cache is still read for offline fallback (reading is not a mutation); only the write is suppressed under a dry run.projectName()resolves./""/root viafilepath.Absbefore taking the base and sanitizes to a valid PEP 508 identifier (non-alphanumeric runs collapse to-, trimmed), falling back toappwhen nothing usable remains.mergeDatabricksConnectnow inserts the pin into[dependency-groups].dev(single- or multi-line array), creating thedevkey and the[dependency-groups]table when absent, mirroringRenderFreshPyproject. Constraints-only (empty value) stays a no-op. Detection is comment-aware and spans the whole array, so a pin on thedev = [line or one carrying a trailing comment is rewritten in place rather than duplicated (a duplicate-pin bug codex caught in the first cut of this change). The insert path is idempotent.Testing strategy
--checkpurity:TestFetchConstraintsSkipsCacheWriteWhenDisabled, andTestPipelineCheckMutatesNothingstrengthened to assert the cache dir stays empty;TestPipelineCheckReRunPlanMatchesRealRunfor accurate re-run plans.TestProjectName,TestPipelineGreenfieldFromDotDirRendersValidName.TestMergeInserts{DatabricksConnectMultiLine,SingleLine,EmptyDev,DevKeyWhenAbsent,DependencyGroupsWhenAbsent}, no-duplicate regressionsTestMergeReplacesDatabricksConnect{OnDevLine,WithTrailingComment}, andTestMergeConstraintsOnlyDoesNotInsertDatabricksConnect.go build,go test,golangci-lint(0 issues),deadcode,gofmt— all green.About this stack
Follow-up to the
databricks local-env python syncstack; targetsmainnow that the pipeline PR (#5851) has merged.This pull request and its description were written by Isaac.