Skip to content

Conversation

@Team-Hammerhead
Copy link
Contributor

@Team-Hammerhead Team-Hammerhead commented Jan 30, 2026

Changes since last integration of Language Server

commit ca9f7bd19f9d1c91ca915e05d633aed031fb01d2
Author: nick-y-snyk <nikita.yasnohorodskyi@snyk.io>
Date:   Wed Feb 4 10:43:33 2026 +0100

    fix: add SNYK_TOKEN_CONSISTENT_IGNORES to release workflow (#1136)

M	.github/workflows/release.yaml

commit 976a2155f1f686a5dd1e8b3d98bd4e3c6b6e5787
Author: nick-y-snyk <nikita.yasnohorodskyi@snyk.io>
Date:   Tue Feb 3 22:40:13 2026 +0100

    refactor: replace OrgResolver with LdxSyncService and cache-based approach (#1129)
    
    * refactor: replace OrgResolver with LdxSyncService and cache-based approach
    
    - Introduced LdxSyncService interface for LDX-Sync configuration management
    - Added in-memory caching of LDX-Sync results at Config level
    - Implemented parallel fetching of LDX-Sync config for workspace folders
    - Cache refreshes on login and workspace folder changes
    - Replaced OrgResolver interface with direct cache-based lookups
    - Removed deprecated GetBestOrgFromLdxSync function
    - Updated all tests to use GetOrgFromCachedLdxSync directly
    - Changed successful fetch logging from Info to Debug level
    - Added ABOUTME comments to new ldx_sync_service.go file
    - Documented 4 skipped integration tests in SKIPPED_TESTS_IDE-1636.md
    
    This refactor improves performance by avoiding repeated API calls and
    provides a cleaner architecture with better separation of concerns.
    
    * refactor: clean up folder_handler tests and remove network mocking
    
    - Remove unnecessary network mocking in tests (mock at service level instead)
    - Use generated MockLdxSyncService instead of manual mocks
    - Add ResolveOrg method to LdxSyncService interface
    - Fix fallback tests by properly initializing engine mock
    - Delete SKIPPED_TESTS file as all tests now pass
    
    * refactor: make LdxSyncService a complete facade by moving ResolveOrg into service
    
    - Changed ResolveOrg signature to accept folderPath instead of result
    - Service now handles cache lookup internally, providing single entry point for LDX-Sync operations
    - Removed GetOrgFromCachedLdxSync from folder_handler (moved into service)
    - Added warning log when falling back to global org
    - Replaced mock with real service implementation in tests
    - Removed redundant tests that were testing GAF's resolver logic (already tested in GAF)
    - All remaining tests cover our facade responsibilities: cache lookup and fallback
    
    * chore: gaf update
    
    * test: add comprehensive tests for LdxSyncService with API mocking
    
    Refactored LdxSyncService to use dependency injection, enabling full mocking of external LDX-Sync API calls in tests. Added 16 test cases covering RefreshConfigFromLdxSync and ResolveOrg including success paths, error handling, caching, parallel execution, and boundary conditions.
    
    * fix: return error from ResolveOrg when LDX-Sync cache is empty
    
    LdxSyncService.ResolveOrg previously fell back to the global organization
    when no cache entry existed for a folder. This could lead to unexpected
    behavior where folders would use a different org than intended by LDX-Sync.
    
    Changes ResolveOrg to return an error instead of falling back, ensuring
    that callers explicitly handle the case where organization cannot be
    determined from the LDX-Sync cache. This makes the behavior more
    predictable and easier to reason about.
    
    Also fixes Test_loginCommand_StartsAuthentication timeout by adding
    missing mock expectation for ResolveOrg method call during initialized
    handler execution.
    
    * test: use explicit mocks for LdxSyncService in unit tests
    
    Replace cache pre-population with mock LdxSyncService for better test
    isolation and control. Tests that specifically verify cache logic still
    use real service with cache, but general behavior tests now use mocks
    to avoid implicit dependencies on cache state.
    
    * fix: put error in cache too and log them properly
    
    * test: add smoke tests for LDX-Sync cache population and refresh
    
    Add comprehensive smoke tests validating LDX-Sync cache behavior across
    multiple scenarios: initialization with multiple folders, adding folders
    dynamically, and organization preference changes.
    
    Consolidate cache validation helpers into requireValidLdxSyncCache
    following the pattern of requireFolderConfigNotification from existing
    smoke tests. This unified helper waits for cache population and validates
    all standard requirements while allowing optional custom validators.
    
    Add SNYK_TOKEN_CONSISTENT_IGNORES to CI workflows to support new tests.
    Fix sendModifiedFolderConfiguration to preserve token/endpoint by using
    buildSmokeTestSettings helper.
    
    * fix: ensure SNYK_API environment variable is applied in tests
    
    Add SNYK_API endpoint propagation to setupCustomServer so all tests
    automatically pick up the environment variable and update the config
    before server initialization. This ensures API calls use the correct
    endpoint when running tests in dev environments.
    
    Also update smoke tests to use default SNYK_TOKEN instead of
    SNYK_TOKEN_CONSISTENT_IGNORES for better dev environment compatibility.
    
    * refactor: extract setup helper for LDX-Sync cache smoke tests
    
    Add setupLdxSyncCacheTest helper function to consolidate test setup
    and cleanup logic across all LDX-Sync cache tests. This prevents test
    interference by cleaning up stored folder configs after each test run.
    
    * test: add config cleanup to LDX-Sync cache smoke tests
    
    Add cleanup logic to setupLdxSyncCacheTest helper that removes any
    existing config file before each test runs. This prevents test
    interference from previous test runs by ensuring a clean state.
    
    * refactor: improve LDX-Sync cache smoke tests
    
    - Use SNYK_TOKEN_CONSISTENT_IGNORES for all tests (hidden in helper)
    - Add detailed logging to requireValidLdxSyncCache for debugging
    - Increase cache population timeout from 10s to 30s
    - Remove tokenSecretName parameter from setupLdxSyncCacheTest
    
    * fix: LDX-Sync org selection test compatibility with error caching
    
    The test was failing because addFakeDirAsWorkspaceFolder created a plain
    directory without git initialization. LDX-Sync requires a git repository
    with a remote URL to resolve organizations. Additionally, the test used
    "any" as an organization slug which fails resolution and is now cached
    as an error (per commit 86e5d4fe), preventing AutoDeterminedOrg from
    being set.
    
    Changes:
    - Initialize git repository with remote in addFakeDirAsWorkspaceFolder
    - Replace invalid "any" org slug with valid "devex_ide" in test assertions
    
    * feat: add LDX-Sync fallback when PreferredOrg is invalid
    
    When PreferredOrg fails resolution (e.g., invalid org slug, user removed
    from org), LDX-Sync now automatically retries without the preferred org
    to allow auto-determination to succeed. This prevents users from being
    stuck in an error state when their preferred org becomes invalid.
    
    Before this change:
    - Invalid PreferredOrg would fail and cache the error
    - User stuck until cache refresh (login/logout/folder re-add)
    - AutoDeterminedOrg could not be populated
    
    After this change:
    - Invalid PreferredOrg triggers fallback to full auto-determination
    - Error cached only if both attempts fail
    - AutoDeterminedOrg populated even when PreferredOrg invalid
    
    Changes:
    - Add fallback logic in RefreshConfigFromLdxSync
    - Add smoke test verifying fallback behavior with invalid org slug
    - Track OrgSetByUser in logs for debugging
    
    * test: add missing LdxSyncService.ResolveOrg mock expectations
    
    The Test_workspaceDidChangeWorkspaceFolders_CallsRefreshConfigFromLdxSync
    test was hanging because sendFolderConfigs calls ResolveOrg for each folder,
    but only RefreshConfigFromLdxSync was mocked. This caused gomock to fail
    with "Unexpected call" and the handler to block indefinitely.
    
    Also restored LdxSyncService mocking to all tests that previously used
    setupMockOrgResolver, replacing it with setupMockLdxSyncResolveOrg helper.
    
    * fix: use platform-independent path matching in ResolveOrg mocks
    
    The LDX-Sync refactor introduced exact path matching in mock expectations
    which failed on Windows due to path separator differences (Unix: /, Windows: \).
    
    Before the refactor, setupMockOrgResolver used gomock.Any() for all parameters.
    After the refactor, tests started using exact path matching like:
      ResolveOrg(c, folderPaths[0])  // "/fake/test-folder-0"
    
    On Windows, paths get normalized through storage to use backslashes, causing
    mock mismatches.
    
    Changes:
    - folder_handler_test.go: Use gomock.Any() for single-folder test, and
      DoAndReturn with suffix-based matching for multi-folder test
    - execute_command_test.go: Use gomock.Any() instead of folder.Path()
    
    This matches the original pre-refactor behavior and works on all platforms.

M	.github/workflows/build.yaml
M	.github/workflows/instance-tests.yaml
M	application/config/config.go
M	application/di/init.go
M	application/di/test_init.go
M	application/server/configuration.go
M	application/server/configuration_test.go
M	application/server/execute_command_test.go
A	application/server/ldx_sync_cache_smoke_test.go
M	application/server/notification_test.go
M	application/server/server.go
M	application/server/server_smoke_test.go
M	application/server/server_test.go
M	application/server/trust_test.go
M	domain/ide/command/command_factory.go
M	domain/ide/command/command_service.go
M	domain/ide/command/command_service_test.go
M	domain/ide/command/folder_handler.go
M	domain/ide/command/folder_handler_test.go
A	domain/ide/command/ldx_sync_service.go
A	domain/ide/command/ldx_sync_service_test.go
M	domain/ide/command/login.go
A	domain/ide/command/mock/ldx_sync_service_mock.go
D	domain/ide/command/org_resolver.go
M	go.mod
M	go.sum
M	internal/types/command.go

commit fab5f5dedb72f4faa92c9da4aa980a5d5118c9bd
Author: Ben Durrans <Benjamin.Durrans@snyk.io>
Date:   Mon Feb 2 13:14:51 2026 +0000

    chore: align HTML settings page wording (#1116)
    
    Made sure the main page had some of the tooltips, etc. found in the fallback page.
    Also ensured the debug page had all its styles scoped correctly.

M	infrastructure/configuration/template/config.html
M	scripts/config-dialog/main.go

commit d88af6fbd2cc3621a74005d17e789b9e4228a868
Author: Bastian Doetsch <bastian.doetsch@snyk.io>
Date:   Fri Jan 30 10:57:49 2026 +0100

    fix: aggregate ostest issues across test results [IDE-1696] (#1134)
    
    - aggregate issues from multiple ostest test results
    - add unit test covering multi-manifest aggregation

M	infrastructure/oss/oss_test.go
M	infrastructure/oss/ostest_scan.go

@Team-Hammerhead Team-Hammerhead requested review from a team as code owners January 30, 2026 10:13
@github-actions
Copy link
Contributor

github-actions bot commented Jan 30, 2026

Warnings
⚠️

"chore: automatic integration of language server ca9f7bd19f9d1c91ca915e05d633aed031fb01d2" is too long. Keep the first line of your commit message under 72 characters.

Generated by 🚫 dangerJS against 71b6b0d

@team-ide-user team-ide-user force-pushed the chore/automatic-upgrade-of-ls branch from 0599eb3 to 2ed3b18 Compare February 2, 2026 13:33
@team-ide-user team-ide-user force-pushed the chore/automatic-upgrade-of-ls branch from 2ed3b18 to 71b6b0d Compare February 4, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants