Migration from v1 to v2

As the contract is not upgradeable, we must find a way to migrate the funds and users. Ideally, this migration would require no action on the part of the user.
Migration process
The idea is for each pool we:
(A) pause the original pool
(B) send the funds over to the new contract
(C) take a snapshot of the distribution of shares and create a pool on the new contact with the same settings and shares distribution as the old contract

Governance pauses deposits to the original pool by calling setPool with _depositPause = false.
(governance calls setRewardsLevelsDelay(pid, 2 days) to set the daly to  the minimum of 2 days , only if the current value is higher)
Governance calls setPendingRewardsLevels(pid, [10000-1]) to create single rewards level that will pay out 99.99% of the pool
Two days later, governance calls setRewardsLevels()
Governance calls setRewardsSplit(pid, rewardsplit) where rewardsplit sets all values to 0 except for hackerReward which should be set to 10000
Committee creates a claim by calling pendingApprovalClaim(pid, newVaultsAddress, 0) (where 0 denotes the 99.99% severity level).
At this point both deposits and withdrawals from the pool are pause. The migraiton script takes a snapshot of all shares (i.e. for each account it's balance and rewardDebt), to be used later
Governance calls approveClaim(pid) which will send 99.99% of the funds to the new contract 😅
Governance creates a new pool on the new contract by calling addPool(allocPoint, lpToken, rewardsLevels, rewardsSplit, descriptionHash, rewardVestingParams, rewardPerShare, balance, depositPause) with the same  settings as the original pool
Governance transfers the shares distribution of the previous pool to the new one by calling a new function called setShares(uint256 _pid, address[] accounts, uint256[] shares, uint256[] rewardDebts), reading the values from the original pool. If there are a lot of shares, this function perhaps needs to be called several times to stay within the gas limit  --> See specs of this new function below
Governance unpauses the vault by calling setVault(pid, ...)
The committee calls committeeCheckIn on the new contract

Changes in Hatvaults.sol needed for migration
New arguments in addPool
We add new parameters to the addPool function which will now look like this:
    function addPool(uint256 _allocPoint,
                    address _lpToken,
                    address _committee,
                    uint256[] memory _rewardsLevels,
                    RewardsSplit memory _rewardsSplit,
                    string memory _descriptionHash,
                    uint256[2] memory _rewardVestingParams,
           uint256 rewardPerShare,
           uint256 balance,
           bool isPaused
)

New function setShares
function setShares(pid, address[] accounts, uint256[] shares, uint256[] rewardDebts) onlyGovernance {
       require(poolInitialized[pid] == false)
      ... loop over the accounts and set balance and rewardDebt as per the arguments...
}

Sets the shares of the users.
maybe also add an "initializing" state to limit the application of setShares? (discuss)
setShares gives even more power to Governance, and also allows to really mess with the pool state (it can easily steal the shares of honest depositors) so it makes sense to limit that call only to the "initialisation" state (i.e. before any other deposits or withdraws are made)
initialized will be a new state of the pools. During initilizaiton (i..e when initialized is false) we can call setShares.
Once a pool is initialized, it cannot raeturn to an uninitialized state.
There will be a new function
function isInitialized(pid) onlyGovernance {
       require(poolInitialized[pid] = false)
       poolInitialized[pid] = true;
}

The addPool function will have a new argument, isInitialized, which by default is true.
setShares will contain a require(poolInitialized[pid] = false)
In this migration scenario, we set isInitialized to false so we can call setShares
All this is pretty clumsy, so if someone has a better idea?

To make sure that when adding a second pool which uses the same token as the first, the new pool does not "steal" money from the first pool, we should require that the total of the pool.balance for each pool does not exceed the actual token balance of the contract.

Not sure what's this setVault thing in step 11?

Closing as we decided not to go with this migration plan


Weird inconsistencies in connections

Hi,
I have a very weird problem (or maybe more than one, not sure).
In the chat the first question never resolve (wether using CodyChat and asking or using CodyAsk), but if I ask a new question from the prompt I get an answer for the question.
When I do a checkhelth sg the query for the info object hangs and timeout:
sg: require("sg.health").check()

sg.nvim report ~
- OK Valid nvim version
- ERROR Unable to find valid cargo executable. Trying to build sg.nvim will fail. Instead use `:SourcegraphDownloadBinaries`
- OK Found `sg-nvim-agent`: /home/theo/.local/share/nvim/lazy/sg.nvim/dist/sg-nvim-agent
- OK Found `node` (config.node_executable) is executable
- OK Found `cody-agent`: /home/theo/.local/share/nvim/lazy/sg.nvim/dist/cody-agent.js
- Auth strategy order: { "environment-variables", "nvim", "cody-app" }
- OK   Authentication setup correctly ("environment-variables")
- OK     endpoint set to: https://sourcegraph.com
- OK   Backup Authentication also available ("cody-app")
- OK     endpoint set to: http://localhost:3080
- ERROR   Sourcegraph Connection info failed: nil
- ERROR Mismatched cargo and expected version. Update using :SourcegraphDownloadBinaries or :SourcegraphBuild
- ERROR Exptected: 0.2.2 | Found: nil
- ERROR sg.nvim has issues that need to be resolved

I got the messages at "trace" log level, hope that can help.

`:messages`
[sg] [DEBUG 23:01:51] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:622: Starting RPC client {
[sg]   args = { "/home/theo/.local/share/nvim/lazy/sg.nvim/dist/cody-agent.js" },
[sg]   cmd = "node"
[sg] }
[sg] [TRACE 23:01:51] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/cody/rpc.lua:35: {
[sg]   method = "recipes/execute",
[sg]   params = {
[sg]     data = {
[sg]       id = "cb9c1a5b-6910-4fb2-b457-a9c72a392d90"
[sg]     },
[sg]     humanChatInput = "What is 2 + 2?\n",
[sg]     id = "chat-question"
[sg]   },
[sg]   type = "request"
[sg] }
[sg] [TRACE 23:01:51] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/cody/rpc.lua:35: {
[sg]   method = "initialize",
[sg]   params = {
[sg]     capabilities = {
[sg]       chat = "streaming"
[sg]     },
[sg]     extensionConfiguration = {
[sg]       accessToken = "********************************************",
[sg]       customHeaders = {
[sg]         ["User-Agent"] = "Sourcegraph Cody Neovim Plugin"
[sg]       },
[sg]       serverEndpoint = "https://sourcegraph.com"
[sg]     },
[sg]     name = "neovim",
[sg]     version = "0.1",
[sg]     workspaceRootPath = "/home/theo"
[sg]   },
[sg]   type = "request"
[sg] }
[sg] [TRACE 23:01:51] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:257: rpc.send {
[sg]   id = 1,
[sg]   jsonrpc = "2.0",
[sg]   method = "initialize",
[sg]   params = {
[sg]     capabilities = {
[sg]       chat = "streaming"
[sg]     },
[sg]     extensionConfiguration = {
[sg]       accessToken = "********************************************",
[sg]       customHeaders = {
[sg]         ["User-Agent"] = "Sourcegraph Cody Neovim Plugin"
[sg]       },
[sg]       serverEndpoint = "https://sourcegraph.com"
[sg]     },
[sg]     name = "neovim",
[sg]     version = "0.1",
[sg]     workspaceRootPath = "/home/theo"
[sg]   }
[sg] }
[sg] [DEBUG 23:01:53] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Starting Cody Agent...
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Cody Agent: handshake with client 'neovim' (version '0.1') at workspace root path 'undefined'
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Did not find bundled `rg`.
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: Integration installed: InboundFilters
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: Integration installed: FunctionToString
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: Integration installed: Console
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: Integration installed: Http
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: Integration installed: Undici
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: Integration installed: OnUncaughtException
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: Integration installed: OnUnhandledRejection
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: Integration installed: ContextLines
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: Integration installed: LocalVariables
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: Integration installed: Context
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: Integration installed: Modules
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: Integration installed: RequestData
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: Integration installed: LinkedErrors
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: [Tracing] Adding sentry-trace header 1e84f36fd05a484d81783b84e8d801c0-bacb6358d1d5b598 to outgoing request to "https://sourcegraph.com/.api/graphql":
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: [Tracing] Adding sentry-trace header 1e84f36fd05a484d81783b84e8d801c0-b7d6bb2d8b3a3a1a to outgoing request to "https://sourcegraph.com/.api/graphql":
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: [Tracing] Adding sentry-trace header 1e84f36fd05a484d81783b84e8d801c0-99f41c5e4de47c7b to outgoing request to "https://sourcegraph.com/.api/graphql":
[sg]
[sg] [TRACE 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "debug/message",
[sg]   params = {
[sg]     channel = "Cody by Sourcegraph",
[sg]     message = "█ CommandsController:fileWatcherInit: watchers created"
[sg]   }
[sg] }
[sg] [TRACE 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "debug/message",
[sg]   params = {
[sg]     channel = "Cody by Sourcegraph",
[sg]     message = "█ LocalAppDetector: initializing"
[sg]   }
[sg] }
[sg] [TRACE 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "debug/message",
[sg]   params = {
[sg]     channel = "Cody by Sourcegraph",
[sg]     message = "█ AuthProvider:init:lastEndpoint: https://sourcegraph.com"
[sg]   }
[sg] }
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: [Tracing] Adding sentry-trace header 1e84f36fd05a484d81783b84e8d801c0-b380ce5e1ce9d9dd to outgoing request to "https://sourcegraph.com/.api/graphql":
[sg]
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:663: [cody] stderr node stderr Sentry Logger [log]: [Tracing] Adding sentry-trace header 1e84f36fd05a484d81783b84e8d801c0-aec3518b02c2cee5 to outgoing request to "https://sourcegraph.com/.api/graphql":
[sg]
[sg] [TRACE 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   id = 1,
[sg]   jsonrpc = "2.0",
[sg]   result = {
[sg]     authenticated = true,
[sg]     codyEnabled = true,
[sg]     codyVersion = "242055_2023-09-13_5.1-bb4ba44342af",
[sg]     name = "cody-agent"
[sg]   }
[sg] }
[sg] [TRACE 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "debug/message",
[sg]   params = {
[sg]     channel = "Cody by Sourcegraph",
[sg]     message = "█ CodyCompletionProvider:initialized: anthropic/claude-instant-1"
[sg]   }
[sg] }
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/cody/rpc.lua:77: [cody-agent] debug: █ CommandsController:fileWatcherInit: watchers created
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/cody/rpc.lua:77: [cody-agent] debug: █ LocalAppDetector: initializing
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/cody/rpc.lua:77: [cody-agent] debug: █ AuthProvider:init:lastEndpoint: https://sourcegraph.com
[sg] [TRACE 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/cody/rpc.lua:35: {
[sg]   method = "initialize",
[sg]   result = {
[sg]     authenticated = true,
[sg]     codyEnabled = true,
[sg]     codyVersion = "242055_2023-09-13_5.1-bb4ba44342af",
[sg]     name = "cody-agent"
[sg]   },
[sg]   type = "response"
[sg] }
[sg] [TRACE 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/cody/rpc.lua:35: {
[sg]   method = "initialized",
[sg]   params = {},
[sg]   type = "notify"
[sg] }
[sg] [TRACE 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:257: rpc.send {
[sg]   jsonrpc = "2.0",
[sg]   method = "initialized",
[sg]   params = {}
[sg] }
[sg] [DEBUG 23:01:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/cody/rpc.lua:77: [cody-agent] debug: █ CodyCompletionProvider:initialized: anthropic/claude-instant-1

[sg] [TRACE 23:03:04] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   id = 2,
[sg]   jsonrpc = "2.0"
[sg] }
[sg] [TRACE 23:03:04] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "chat/updateMessageInProgress",
[sg]   params = {
[sg]     contextFiles = {},
[sg]     data = {
[sg]       id = "d0dad24e-515e-40ab-a120-7b8d24ecbad0"
[sg]     },
[sg]     displayText = " ```\n```",
[sg]     preciseContext = {},
[sg]     speaker = "assistant",
[sg]     text = " ```\n```"
[sg]   }
[sg] }
[sg] [TRACE 23:03:04] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "chat/updateMessageInProgress",
[sg]   params = {
[sg]     contextFiles = {},
[sg]     data = {
[sg]       id = "d0dad24e-515e-40ab-a120-7b8d24ecbad0"
[sg]     },
[sg]     displayText = " ```python\n```",
[sg]     preciseContext = {},
[sg]     speaker = "assistant",
[sg]     text = " ```python\n```"
[sg]   }
[sg] }
[sg] [TRACE 23:03:04] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "chat/updateMessageInProgress",
[sg]   params = {
[sg]     contextFiles = {},
[sg]     data = {
[sg]       id = "d0dad24e-515e-40ab-a120-7b8d24ecbad0"
[sg]     },
[sg]     displayText = " ```python\nprint\n```",
[sg]     preciseContext = {},
[sg]     speaker = "assistant",
[sg]     text = " ```python\nprint\n```"
[sg]   }
[sg] }
[sg] [TRACE 23:03:04] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "chat/updateMessageInProgress",
[sg]   params = {
[sg]     contextFiles = {},
[sg]     data = {
[sg]       id = "d0dad24e-515e-40ab-a120-7b8d24ecbad0"
[sg]     },
[sg]     displayText = " ```python\nprint(\n```",
[sg]     preciseContext = {},
[sg]     speaker = "assistant",
[sg]     text = " ```python\nprint(\n```"
[sg]   }
[sg] }
[sg] [TRACE 23:03:04] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "chat/updateMessageInProgress",
[sg]   params = {
[sg]     contextFiles = {},
[sg]     data = {
[sg]       id = "d0dad24e-515e-40ab-a120-7b8d24ecbad0"
[sg]     },
[sg]     displayText = " ```python\nprint(3\n```",
[sg]     preciseContext = {},
[sg]     speaker = "assistant",
[sg]     text = " ```python\nprint(3\n```"
[sg]   }
[sg] }
[sg] [TRACE 23:03:04] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "chat/updateMessageInProgress",
[sg]   params = {
[sg]     contextFiles = {},
[sg]     data = {
[sg]       id = "d0dad24e-515e-40ab-a120-7b8d24ecbad0"
[sg]     },
[sg]     displayText = " ```python\nprint(3 +\n```",
[sg]     preciseContext = {},
[sg]     speaker = "assistant",
[sg]     text = " ```python\nprint(3 +\n```"
[sg]   }
[sg] }
[sg] [TRACE 23:03:04] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "chat/updateMessageInProgress",
[sg]   params = {
[sg]     contextFiles = {},
[sg]     data = {
[sg]       id = "d0dad24e-515e-40ab-a120-7b8d24ecbad0"
[sg]     },
[sg]     displayText = " ```python\nprint(3 + 3\n```",
[sg]     preciseContext = {},
[sg]     speaker = "assistant",
[sg]     text = " ```python\nprint(3 + 3\n```"
[sg]   }
[sg] }
[sg] [TRACE 23:03:04] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "chat/updateMessageInProgress",
[sg]   params = {
[sg]     contextFiles = {},
[sg]     data = {
[sg]       id = "d0dad24e-515e-40ab-a120-7b8d24ecbad0"
[sg]     },
[sg]     displayText = " ```python\nprint(3 + 3)\n```",
[sg]     preciseContext = {},
[sg]     speaker = "assistant",
[sg]     text = " ```python\nprint(3 + 3)\n```"
[sg]   }
[sg] }
[sg] [TRACE 23:03:04] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "chat/updateMessageInProgress",
[sg]   params = {
[sg]     contextFiles = {},
[sg]     data = {
[sg]       id = "d0dad24e-515e-40ab-a120-7b8d24ecbad0"
[sg]     },
[sg]     displayText = " ```python\nprint(3 + 3) #\n```",
[sg]     preciseContext = {},
[sg]     speaker = "assistant",
[sg]     text = " ```python\nprint(3 + 3) #\n```"
[sg]   }
[sg] }
[sg] [TRACE 23:03:04] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "chat/updateMessageInProgress",
[sg]   params = {
[sg]     contextFiles = {},
[sg]     data = {
[sg]       id = "d0dad24e-515e-40ab-a120-7b8d24ecbad0"
[sg]     },
[sg]     displayText = " ```python\nprint(3 + 3) # prints\n```",
[sg]     preciseContext = {},
[sg]     speaker = "assistant",
[sg]     text = " ```python\nprint(3 + 3) # prints\n```"
[sg]   }
[sg] }
[sg] [TRACE 23:03:04] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "chat/updateMessageInProgress",
[sg]   params = {
[sg]     contextFiles = {},
[sg]     data = {
[sg]       id = "d0dad24e-515e-40ab-a120-7b8d24ecbad0"
[sg]     },
[sg]     displayText = " ```python\nprint(3 + 3) # prints 6\n```",
[sg]     preciseContext = {},
[sg]     speaker = "assistant",
[sg]     text = " ```python\nprint(3 + 3) # prints 6\n```"
[sg]   }
[sg] }
[sg] [TRACE 23:03:04] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "chat/updateMessageInProgress",
[sg]   params = {
[sg]     contextFiles = {},
[sg]     data = {
[sg]       id = "d0dad24e-515e-40ab-a120-7b8d24ecbad0"
[sg]     },
[sg]     displayText = " ```python\nprint(3 + 3) # prints 6\n```",
[sg]     preciseContext = {},
[sg]     speaker = "assistant",
[sg]     text = " ```python\nprint(3 + 3) # prints 6\n```"
[sg]   }
[sg] }
[sg] [TRACE 23:03:04] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "chat/updateMessageInProgress",
[sg]   params = {
[sg]     contextFiles = {},
[sg]     data = {
[sg]       id = "d0dad24e-515e-40ab-a120-7b8d24ecbad0"
[sg]     },
[sg]     displayText = " ```python\nprint(3 + 3) # prints 6\n```",
[sg]     preciseContext = {},
[sg]     speaker = "assistant",
[sg]     text = " ```python\nprint(3 + 3) # prints 6\n```"
[sg]   }
[sg] }
[sg] [TRACE 23:03:04] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:358: rpc.receive {
[sg]   jsonrpc = "2.0",
[sg]   method = "chat/updateMessageInProgress",
[sg]   params = {
[sg]     data = {
[sg]       id = "d0dad24e-515e-40ab-a120-7b8d24ecbad0"
[sg]     },
[sg]     speaker = "assistant"
[sg]   }
[sg] }
[sg] [TRACE 23:03:04] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/cody/rpc.lua:35: {
[sg]   method = "recipes/execute",
[sg]   result = "none",
[sg]   type = "response"
[sg] }

Hmm, it looks like maybe we're sending the initialize message too late.
How are you loading sg.nvim? I can try and add some stuff to make sure they get sent in the correct order regardless of loading strategy.

I use lazy.nvim and lazily load sg on some commands like CodyAsk and CodyChat.

Great thanks!

Does the latest commit fix the problem? At least on my setup I'm unable to reproduce the problem anymore. Let me know if you run into anything!

Hi, the checkhealth part is fixed, but chat is completly broken now.
Do you think it I should close this and open a different issue?
[sg] [DEBUG 15:26:13] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:622: Starting RPC client {
[sg]   args = { "/home/theo/.local/share/nvim/lazy/sg.nvim/dist/cody-agent.js" },
[sg]   cmd = "node"
[sg] }
[sg] [DEBUG 15:26:16] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:622: Starting RPC client {
[sg]   args = {},
[sg]   cmd = "/home/theo/.local/share/nvim/lazy/sg.nvim/dist/sg-nvim-agent",
[sg]   extra = {
[sg]     env = {
[sg]       PATH = "/home/theo/.local/share/nvim/mason/bin:/home/theo/.local/share/nvim/mason/bin:/home/theo/.local/share/go/bin:/home/theo/.luarocks:/home/theo/.opam/default/bin:/home/theo/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/emscripten:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl",
[sg]       SRC_ACCESS_TOKEN = "**** revoked ****",
[sg]       SRC_ENDPOINT = "https://sourcegraph.com"
[sg]     }
[sg]   }
[sg] }
[sg] [INFO  15:26:20] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:200: client_exit {
[sg]   code = 127,
[sg]   signal = 0
[sg] }

E5108: Error executing lua: vim/shared.lua:0: s: expected string, got nil
stack traceback:
	[C]: in function 'error'
	vim/shared.lua: in function 'validate'
	vim/shared.lua: in function 'gsplit'
	vim/shared.lua: in function 'split'
	...are/nvim/lazy/sg.nvim/lua/sg/components/layout/split.lua:134: in function 'callback'
	.../theo/.local/share/nvim/lazy/sg.nvim/lua/sg/cody/rpc.lua:218: in function 'start'
	.../theo/.local/share/nvim/lazy/sg.nvim/lua/sg/cody/rpc.lua:206: in function 'chat_question'
	...heo/.local/share/nvim/lazy/sg.nvim/lua/sg/cody/state.lua:84: in function 'request_completion'
	...hare/nvim/lazy/sg.nvim/lua/sg/components/layout/base.lua:168: in function 'on_submit'
	...hare/nvim/lazy/sg.nvim/lua/sg/components/layout/base.lua:104: in function 'on_submit'
	...hare/nvim/lazy/sg.nvim/lua/sg/components/cody_prompt.lua:46: in function 'on_submit'
	...are/nvim/lazy/sg.nvim/lua/sg/components/layout/split.lua:76: in function <...are/nvim/lazy/sg.nvim/lua/sg/components/layout/split.lua:75>

Ok, hoping I fixed this as well now -- could you try again?
Otherwise, if you have a new stack trace, that'd be great. I think I've tracked down the spots w/ nil messages, but the line numbers are too different now so I can't find the spot that might be broken now haha

(and you don't need to create a new issue, we can figure it out here. Thanks for being patient!)

Ok, great, I can't test right now because I am behind a proxy, but I'll check tonight or on the weekend and provide a new stack trace if necessary.
Thanks for the help!

Ok, still not working unfortunately (commit<PHONE_NUMBER>f8).
First request produces this message:
[sg] [DEBUG 18:46:50] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:622: Starting RPC client {
[sg]   args = { "/home/theo/.local/share/nvim/lazy/sg.nvim/dist/cody-agent.js" },
[sg]   cmd = "node"
[sg] }
[sg] [DEBUG 18:46:53] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:622: Starting RPC client {
[sg]   args = {},
[sg]   cmd = "/home/theo/.local/share/nvim/lazy/sg.nvim/dist/sg-nvim-agent",
[sg]   extra = {
[sg]     env = {
[sg]       PATH = "****************",
[sg]       SRC_ACCESS_TOKEN = "**** revoked ****",
[sg]       SRC_ENDPOINT = "https://sourcegraph.com"
[sg]     }
[sg]   }
[sg] }
[sg] [INFO  18:46:55] /home/theo/.local/share/nvim/lazy/sg.nvim/lua/sg/vendored/vim-lsp-rpc.lua:200: client_exit {
[sg]   code = 127,
[sg]   signal = 0
[sg] }

And doesn't resolve.
Second request produce this error:
E5108: Error executing lua: vim/shared.lua:0: s: expected string, got nil
stack traceback:
	[C]: in function 'error'
	vim/shared.lua: in function 'validate'
	vim/shared.lua: in function 'gsplit'
	vim/shared.lua: in function 'split'
	...are/nvim/lazy/sg.nvim/lua/sg/components/layout/split.lua:136: in function 'callback'
	.../theo/.local/share/nvim/lazy/sg.nvim/lua/sg/cody/rpc.lua:225: in function 'start'
	.../theo/.local/share/nvim/lazy/sg.nvim/lua/sg/cody/rpc.lua:213: in function 'chat_question'
	...heo/.local/share/nvim/lazy/sg.nvim/lua/sg/cody/state.lua:84: in function 'request_completion'
	...hare/nvim/lazy/sg.nvim/lua/sg/components/layout/base.lua:181: in function 'on_submit'
	...hare/nvim/lazy/sg.nvim/lua/sg/components/layout/base.lua:112: in function 'on_submit'
	...hare/nvim/lazy/sg.nvim/lua/sg/components/cody_prompt.lua:46: in function 'on_submit'
	...are/nvim/lazy/sg.nvim/lua/sg/components/layout/split.lua:78: in function <...are/nvim/lazy/sg.nvim/lua/sg/components/layout/split.lua:77>

What's your node version? node --version? (run from the directory, in case of any goofy path problems).
Also, no nix or anything else as part of the setup?

$ node --version
v20.6.1

I am on a fairly vanilla arch, no nix or something like that.

Ok, I think I finally fixed this. Arch didn't have libopenssl-dev by default and we weren't static linking the binary, but I think I solved. If you update to latest and download the new binaries, you should be all set (hopefully?) :)

I would say rustls should be  the default choice in the Rust ecosystem, as it helps to avoid this exact dynamic openSSL linking problem and makes cross platform build easier.

Good catch! I didn't think to look into that:
$ ldd sg-lsp
	linux-vdso.so.1 (0x00007ffd2c502000)
	libssl.so.1.1 => not found
	libcrypto.so.1.1 => not found
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f26727f0000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f26727eb000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007f2671f13000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f26727e6000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f2671d31000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f2672833000)
$ ldd sg-nvim-agent
	linux-vdso.so.1 (0x00007ffe7de68000)
	libssl.so.1.1 => not found
	libcrypto.so.1.1 => not found
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fa0acf82000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fa0acf7d000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007fa0ac713000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fa0acf78000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007fa0ac531000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fa0acfc5000)

There is still something wrong with the proxy on this current machine, but I'll check that at home tonight or tomorrow.
Thanks, hopefully that's it!

So is it currently running? I have updated binaries that should not be linking to libssl, at least that is what I expected. If so, we can close this issue and then open a new one to keep it focused if there is something else going on. Thanks so much for everyone's patience!

Yeah, don't worry, the shell output in my previous message was on the previous binaries, now they don't depend on libssl.
So it works now :tada:
I think the initial issue is fixed now, there may still be a race condition in CodyAsk, but I'll make a new issue for that.


29 Cleanup

After a long hiatus, let's close some outstanding issues and get the code to working condition again.
First fixes: our helper functions for parsing used a parserMap with the token words (e.g. [, .) as keys. When we attempt to retrieve the parser using the token, we therefore need to use the token word instead of the entire token: [255c26a9d20fda82c0d029d1cf1fd67bd68bf039]

Our TypeStmt stored a list of DeclareStmts instead of a list of Declares, that is now fixed: [bde94bb7999760c322905ec9308121465592629c]

buildExprWhileWord was not consuming the [ for IndexExprs, causing the parser to choke. So we add a keyword argument for index exprs to consume the [ before parsing the rest of the tokens: [a76675918b4c7450efa5c5088e98d17dd1251270]
https://github.com/nyjc-computing/pseudo-9608/blob/a76675918b4c7450efa5c5088e98d17dd1251270/pseudocode/parser.py#L135-L151

The typing for sequences of Exprs, Stmts, etc is a mess. Let's add some conveniences: [cfbc8cde82f2f1ee20bcb247e9e9bebc65a6332c]

Our parseUntilWord helper forgot that sometimes we need to consume the word, and sometimes we don't. So let's split that into two helpers:
https://github.com/nyjc-computing/pseudo-9608/blob/016af58aebb259f2868cd1c497bfe2aa64079862/pseudocode/parser.py#L121-L148
And then update all the helper calls to use the correct version: [016af58aebb259f2868cd1c497bfe2aa64079862]

Parser fixes
Now, the parser. First, let's use the convenience types we created earlier: [abf4bf2df3006e62ad629a4fefdc94584c35e3b3]

resolveNames is a mess because it took on too much, trying to handle Names in both Exprs and Stmts. That is easily fixed: from now on, it is only responsible for taking in an UnresolvedName, and returning a GetName.
Its other responsibilities are now moved into resolveNamesInExpr, which we rename to resolveNamesInTarget to better reflect its flexibility in handling both Expr and Stmt: [9d02adf9509e5ed6ffaedb748f690565cf303b0b]

Not forgetting to rename all the relevant function calls: [4fca207389425c0c5709c1600d1e44631bee5c2b]

Now, an actual fix: we currently resolve the parameters and statements in callables (Functions and Procedures) using the global frame ... but both are being executed in the local context, so they should be resolved using the local frame. Let's fix that: [09db8d6940e7d16d1e2e661e5dedd11a9eac4562]

Interpreter fixes
I came to hate multiline function definitions, so let's turn them back to single-line defs where possible: [2fbb14392e14d9fb4a28999d207ddbef2541050f]

Just as we resolve functions/procedures with their local frames rather than the global, we also interpret them likewise: [15d1b19b201707abc0ff520612c1ce8da859e0b0]

Now we have a problem: Builtin functions (system functions) do not have a frame ... yet. Let's give them one: [86b319f2bfa2f337e496d20925466977ac747885]

A very irritating problem: Python uses args to reference arguments passed to a function. So we have to rename all uses of that variable: [fea92ee922cb94240b55b3724bee6d3f93065ef9]

Now we're stuck: how do we resolve the system frame with the global frame?
https://github.com/nyjc-computing/pseudo-9608/blob/fea92ee922cb94240b55b3724bee6d3f93065ef9/pseudocode/system.py#L21-L28
Our system frame is only initialised once, and then imported in __init__:
https://github.com/nyjc-computing/pseudo-9608/blob/fea92ee922cb94240b55b3724bee6d3f93065ef9/pseudocode/system.py#L17
https://github.com/nyjc-computing/pseudo-9608/blob/fea92ee922cb94240b55b3724bee6d3f93065ef9/pseudocode/__init__.py#L22

We are gonna need to rearrange lots of stuff. Let's start by namespacing things properly: [44bf8908dfd87dfc9288b344e36552989667d9ae]

Now we need to somehow pass the global frame back to the sysFrame to be used in the system functions. We need to separate the function declarations from the function definitions. After this change, our __init__.py would looks like this:
https://github.com/nyjc-computing/pseudo-9608/blob/cc0a87a3f8d3f884434f37e9240da09382fe28a5/pseudocode/__init__.py#L94-L101
And our system.initFrame() is split up; initFrame only declares the functions now, and the functions are defined in resolveGlobal() to hint at where they should be defined:
https://github.com/nyjc-computing/pseudo-9608/blob/cc0a87a3f8d3f884434f37e9240da09382fe28a5/pseudocode/system.py#L40-L72
This points at a key distinction between declaration and definition: declaration reserves the names in the frame, definition is what maps the code to the name.

I foresee some pain here ... we'll definitely be adding more system functions, and each addition will involve:

a function definition in Python (using def)
a function declaration in the system frame
a function definition in Pseudo (using lang.Builtin)

That's three places to edit. Let's declare and define the system functions in a loop to reduce the likelihood of errors. We put the function return and parameter types in a data structure — just a simple list of tuples:
https://github.com/nyjc-computing/pseudo-9608/blob/0ed41510b0483fab10397c708eff2ed8b9ca1889/pseudocode/system.py#L40-L47
And now it's child's play to loop through that and declare/define the functions:
https://github.com/nyjc-computing/pseudo-9608/blob/0ed41510b0483fab10397c708eff2ed8b9ca1889/pseudocode/system.py#L49-L69


Update SDK

Adds new components, should all be checked in the preview:
Input

[x] CheckboxGroup

Structure

[x] Listbox
[x] ListboxItem
[x] ListboxSection
[x] CardSectionBody
[x] CardSectionHeader

Feedback

[x] Banner
[x] SectionMessage

Overlays

[x] PopoverFooter

Layout

[x]  CollapsibleLayoutItem

Screenshots

Looks great apart from the ListBox which sometimes throws an error (like we were seeing before) but this is also happening in one-core so probably a bug on their end


[EVENT] [May 29 - June 1] AWI-CIROH

The link towards the Freshdesk ticket this event was reported
https://2i2c.freshdesk.com/a/tickets/1466
The GitHub handle or name of the community representative
Arpita Patel
The date when the event will start
May 29 2024, 9AM Central Time (https://arewemeetingyet.com/Center/2024-05-29/09:00)
The date when the event will end
June 1 2024, 5PM Central Time (https://arewemeetingyet.com/Center/2024-06-01/17:00)
What hours of the day will participants be active? (e.g., 5am - 5pm US/Pacific)
9AM - 5PM
Are we three weeks before the start date of the event?

[X] Yes
[ ] No

Number of attendees
TBD
Make sure to add the event into the calendar

[ ] Done

Does the hub already exist?

[X] Yes
[ ] No

The URL of the hub that will be used for the event
https://ciroh.awi.2i2c.cloud/
Will this hub be decommissioned after the event is over?

[ ] Yes
[X] No

Was all the info filled in above?

[ ] Yes
[X] No

Quotas from the cloud provider are high-enough to handle expected usage?

[ ] Yes
[ ] No

Approximately 10 workshops (50 users per workshop) are set to utilize 2i2c, opting for either small or medium instances.

The majority of workshops plan to use either Small instances (with 5GB RAM and 2 CPUs) or Medium instances (with 11GB RAM and 4 CPUs) for their sessions.

This implies up to 500 users, so this requires some planning and verification that its reasonable. I'd say they should use for example n2-highmem-16 machines.
Looking at their current setup:
        - display_name: "Small"
          description: 5GB RAM, 2 CPUs
          default: true
          profile_options: &profile_options
            image: # ...
          kubespawner_override:
            mem_limit: 7G
            mem_guarantee: 5G
            cpu_limit: 2
            cpu_guarantee: 0.938
            node_selector:
              node.kubernetes.io/instance-type: n2-highmem-16
        - display_name: Medium
          description: 11GB RAM, 4 CPUs
          profile_options: *profile_options
          kubespawner_override:
            mem_limit: 15G
            mem_guarantee: 11G
            cpu_limit: 4
            cpu_guarantee: 1.875
            node_selector:
              node.kubernetes.io/instance-type: n2-highmem-16

We use n2-highmem-16, but will this handle a hundreds of users? The medium will fit 8 users per machine, and the small will fit 16 users per machine.

We have 300 in quota currently, and that means ~ 18 servers with 8-16 users/server, leading to 144 - 288 users.
I'll ask if the workshops are done at the same time or different times, because if they aren't overlapping in time, I think this is fine.

@consideRatio I've direct contact with them right now, and will bring this up with them.

@yuvipanda oh I wrote a note in https://2i2c.freshdesk.com/a/tickets/1466 instead of sending it, can you read that?

@consideRatio yep, just saw that! I'll work on communicating that appropriately, and modifying profile lists as needed.

Event completed!


i already make my profile to be public, but still can't be viewed

i want to use the calculator, and has already made my profile to be public.
but the calculator still says that my profile is private.

Try again later. Caching.


[FEATURE]

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

Describe alternatives you've considered

Additional context

Try


Update to 9.0.3 breaks Sonarqube Vulnerabilities report /  JSON-Analysis aborted

After upgrading the maven-dependency-check from 8.4.3 to version 9.0.3 my Sonarqube instance doesn't show vulnerabilities anymore. I've activated HTML and JSON Report. The HTML Report ist shown properly (with vulnerabilities found) in Sonarqube.
The logfile contains a generic warning concerning the JSON Report:
10:36:37 [INFO] ------------- Run sensors on project
10:36:37 [INFO] Sensor Dependency-Check [dependencycheck]
10:36:37 [INFO] Process Dependency-Check report
10:36:37 [INFO] Using JSON-Reportparser
10:36:38 [WARNING] JSON-Analysis aborted
10:36:38 [INFO] Upload Dependency-Check HTML-Report

I'm using the latest version of dependency-check-sonar-plugin 4.0.0 and I really cant tell any major difference within the JSONs created via the plugin.
If I disable the JSON report the message gets more specific and tells that there is no JSON report as expected. This shows that the report is found but cannot be processed in my initial setup:
10:41:35 [INFO] ------------- Run sensors on project
10:41:35 [INFO] Sensor Dependency-Check [dependencycheck]
10:41:35 [INFO] Process Dependency-Check report
10:41:35 [INFO] Using JSON-Reportparser
10:41:35 [INFO] Dependency-Check JSON report does not exists. Please check property sonar.dependencyCheck.jsonReportPath:###path-to-file###
10:41:35 [INFO] JSON-Analysis skipped/aborted due to missing report file

Any suggestions what might be wrong in my setup?

See https://github.com/jeremylong/DependencyCheck/pull/6245
9.0.4 will be released shortly.

Thank you very much @jeremylong !

The Problem is fixed with https://github.com/dependency-check/dependency-check-sonar-plugin/commit/2bfcbbcab316122d8f427d1d58d4a8ac9f20cac6. Field confidentialityImpact is currently unknown in dependenc-check-sonar-plugin Version 4.0.0.


TableViewCell reuse issue

If the network is not good, scroll the tableview fast up and down, then the image will not be set on the right cell after loading completed. Code as followed.
- (void)refreshWithModel:(Model *)model{
    [_userHeadImageView sd_setImageWithURL:[NSURL URLWithString:model.userPic] placeholderImage:[UIImage imageNamed:@"user_head_default"] options:SDWebImageRetryFailed];
}
...

- (void)prepareForReuse {
    [super prepareForReuse];
    [_userHeadImageView sd_cancelCurrentImageLoad];
    _userHeadImageView.image = nil;
}

@mlijin9011 can this be replicated in the demo project? if you remove the sd_cancelCurrentImageLoad from prepareforreuse does it still cause the reuse issue?

Thank you @mythodeia. Your suggestion works well for me so far.

@mlijin9011 did this fix your issue?


Directories and the all programs list are slow to update

Directories, and the 'All Programs' list are slow to update, especially if locations containing lots of files and folders have been added to the app.
I suspect this is a result of two things:

loading AIF data (icons and captions) for programs is slow and requires us to spin up Lua each time
we recursively search the whole directory every time a change is detected

Possible mitigations / improvements include:

caching application AIF data -- this will almost certainly never change so we can probably afford to just put it a thread-safe NSCache and be done with it
only reloading data for the sub-directories that have changed -- DirectoryMonitor tells us which directories have changed so we can perhaps use this to update just a part of the listing (though we'll need to be careful to ensure we update systems who's child contents have changed)

I think I'm going to push this out to future; everything works right now and it's only truly slow if you add big directories.


Add advisory for Laravel cookie serialization vulnerability

As mentioned in the official docs and Laravel News. The merged pull request containing the fix for 5.6.x branch is over here. And the commit for the 5.5.x branch is either this one, the parent of that one or the parent-of-the-parent.

I think this should also include the illuminate/cookie repo.

@BackEndTea You are right, added it to illuminate/cookie too! Thanks, almost missed that one.

I think this affects Laravel 4 too: https://github.com/laravel/framework/blob/4.2/src/Illuminate/Encryption/Encrypter.php#L98
Back then you weren't even able to tell the Encrypter not to use serialization. The switch wasn't introduced until 2 years ago: https://github.com/laravel/framework/commit/9725a8e7d0555474114f5cad9249fe8fe556836c

@ottowayne Ah, yeah, I was thinking "its a middleware in which the vulnerability exists, and that wasn't introduced before 5.x".
I think you are right here too, I will add the whole 4.x.x range to illuminate/cookie too. It's using illuminate/encryption in the insecure way. I don't think we have to add this library too right? Because the issue is only scoped to deserializing cookies, or am I missing something?

Only what actually causes a security issue should be added here
On Fri, 10 Aug 2018, 10:43 Cedric van Putten<EMAIL_ADDRESS>wrote:

@ottowayne https://github.com/ottowayne Ah, yeah, I was thinking "its a
middleware in which the vulnerability exists, and that wasn't introduced
before 5.x".
I think you are right here too, I will add the whole 4.x.x range to
illuminate/cookie too. It's using illuminate/encryption in the insecure
way. I don't think we have to add this library too right? Because the issue
is only scoped to deserializing cookies, or am I missing something?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/FriendsOfPHP/security-advisories/pull/315#issuecomment-412003500,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJakOnb9Fgki1TFeUHbcAwRLyEkPkBfks5uPTm1gaJpZM4V1iDx
.

Ok, thanks, I guess this is it then! 😀

Yes, I thought about illuminate/encryption, too. In my opinion it was unfortunately designed, but it doesn't have a security issue by itself.
I guess that developers might not have known that stuff that got thrown in there will be serialized and are using it to encrypt user input.


HOTT-4957 Document reporting

Jira link
HOTT-4957
What?
I have added/removed/altered:

[x] Added a document explaining the daily reports

Why?
I am doing this because:

During the XI sync discussion it transpired out that this was not understood and lacked docs

Deployment risks (optional)

Non - adds a markdown file

@shjohnson Cheers for the reason, I excluded them because that info tends to get outdated where as just telling the dev its scheduled should mean they know to look in sidekiq.yml :+1:


raftstore : use rocksdb compact on deletion

What problem does this PR solve?
Issue Number: close #xxx
Using rocksdb compact on deletion, namely, trigger compaction automatically when many tombstones in SST to compact tombstones more aggressively which would relieve slow seek issues caused by tombstone #8486
This may also help to solve https://github.com/tikv/tikv/issues/7870
What is changed and how it works?
What's Changed:

remove compact runner which runs compact checks and compacts lock cf periodically
set compact_on_deletion() with cf options

Related changes
Need to merge https://github.com/tikv/rust-rocksdb/pull/535 first
Check List
Tests

No code

Side effects

Performance regression

Consumes more CPU

Release note

use rocksdb compact on deletion

/bench +sysbench +tpcc +tpch

/bench +sysbench +tpcc +tpch

/bench +sysbench +tpcc +tpch

/bench +sysbench +tpcc

/bench +sysbench

Do we need some specific benchmark that insert a lot of duplicated key?

@yiwu-arbug No need, I think oltp_update with GC triggered is enough

@yiwu-arbug No need, I think oltp_update with GC triggered is enough

ok

Please update the PR @Connor1996


Make PEP517+python 3 the default

While it's all well and good to provide tooling for the usecases wanting python2 packages, most users are going to go for the default and not bother passing --pep517. Swapping these defaults would help here.

If you create a patch I'm happy to add it to the aur package :)

I don't know why I thought Python 2 was the default -- I think I misinterpreted the choice to make split packages by default. Opened a PR to fix this.

In case it takes a while for my PRs to be merged, I've created https://github.com/hseg/pip2pkgbuild/tree/wishlist containing all of my outstanding PRs (it will be deleted if they all get merged).


Caching of same / similar queries

Feature Description
Right now even same queries are being processed new again. There must be caching implemented to serve from cache queries that are same or similar (figured out using AI - for example, what is RAG and what do we mean by RAG are same queries)
Use Case
Same or similar queries by different users need not be generated again as it would be served from cache improving speeds and reducing costs.
Additional context
No response

I second this - simply just caching identical queries would be extremely helpful, along with caching Tavily api calls.


Require importlib-metadata

#149 was introduced by #127, and this fixes the issue.
This error snuck by my review because I assumed importlib_metadata was a builtin. My bad. I'm surprised this snuck by our tests...I will look closer tomorrow morning and update the tests to catch.
I tested a successful install by hand. Ready to merge from my perspective.

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@845f304). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #150   +/-   ##
=======================================
  Coverage        ?   10.39%
=======================================
  Files           ?       46
  Lines           ?     5952
  Branches        ?        0
=======================================
  Hits            ?      619
  Misses          ?     5333
  Partials        ?        0

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

I've added a simple smoke test to prevent this from happening again. Tests failed on the branch from main and now pass after merging into this branch.
Ready for review + merge.


Action dispatch results in multiple complete actions

Hi guys,
Hoping to get some help with a problem I simply can't get my head around. Here is a short description followed by the code.
I'm dispatching an edit event of a booking which is picked up by an effect. The effect returns a complete action with the result. I then have a dispatcher listening on the complete action to provide the user with feedback when finished. This all works quite well but the problem is the following: The first time I perform the action there is only one complete action result as expected. The second time there is two even though only one edit action is dispatched, third time 3, ect...... Antbody who can explain how I can get around this?
I'm dispatching an edit event to the store:
this.dispatcher.dispatch(new privateCalendarActions.EditPrivateBookingDetailAction( name, start, end ) );
This is then picked up by my effect:
@Effect()
  EditPrivateBookingDetail$: Observable<Action> = this.actions$
    .ofType(calendarAction.EDIT)
    .mergeMap((action:calendarAction.EditPrivateBookingDetailAction) => {
      return action.booking_details.save( { name: action.name, start: action.start, end: action.end }).map(( bookingDetail: PrivateBookingDetail) => {
        return new calendarAction.EditPrivateBookingDetailCompleteAction(bookingDetail);
      });
    });

I can see that the effect is only called once but the result is still a lot of Complete Actions (the number in which I have performed the task, so 1 = 1 response, 5 = 5 responses but still with only one dispatch).
I want to provide the user with feedback I'm using the dispatcher (Dispatcher from the @ngrx/store package) to listen on events (I have tried subscriping diretly to the effect but no difference):
this.dispatcher.filter(action => action.type === privateCalendarActions.EDIT_COMPLETE).subscribe(
      (action: privateCalendarActions.EditPrivateBookingDetailCompleteAction) => {
            .......
            ......
            this.editedAppointmentMessage();

      }
    );

Maybe I am misunderstanding the best practices here.
Thanks in advance.
Best regards,
Brian

In the effect why don't you use switchmap instead of mergemap?

@roopkt I started out with switchMap but i ended up trying mergeMap to see if it made a difference. It did not. And really, in this example I can't really see why mergeMap is not okay.
But I'be been reading issues and found this: https://github.com/ngrx/store/issues/147
It seems like my description is really how it is supposed to work. I've now added take(1) as described in the above issue.

Please take how-to questions to https://gitter.im/ngrx/platform - GitHub is for issue reports and bugs.


Fix script load module issue

Description:
Proper fix the colorlog install issue in check_config script
To test, have some config folder contains invalid config
> pip uninstall colorlog
> hass --script check_config -c ../ha-config
INFO:homeassistant.util.package:Attempting install of colorlog==4.0.2
Testing configuration at ...

> pip install colorlog==3.1.2
> hass --script check_config -c ../ha-config
INFO:homeassistant.util.package:Attempting install of colorlog==4.0.2
Testing configuration at

> hass --script check_config -c ../ha-config
Testing configuration at

Related issue (if applicable): reverts #21754
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>
Example entry for configuration.yaml (if applicable):

Checklist:

[ ] The code change is tested and works locally.
[ ] Local tests pass with tox. Your PR cannot be merged unless tests pass
[ ] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated in home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[ ] New dependencies have been added to the REQUIREMENTS variable (example).
[ ] New dependencies are only imported inside functions that use them (example).
[ ] New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Tests have been added to verify that the new code works.

In future, I hope that script can honor --log-no-color command line option

This looks better!  --log-no-color was partially there with your fix. Or you should just mock out color of the script you load ;-) if you get that cmdline option

Will not do that in this hot fix anyway


Correct the indices for inverse relations

Currently, the model is created with:
model = StarEQueryEmbeddingModel(
       num_entities=dataset.entity_mapper.number_of_entities_and_reified_relations_without_vars_and_targets() + 3,  # we add a target, a variable and a blank node embedding
        num_relations=dataset.relation_mapper.get_largest_forward_relation_id() + 1,

Then, in the StarEQueryEmbeddingModel, we get
self.x_r = get_parameter(2 * num_relations, embedding_dim)
This second half is intended for the inverse relations. However, the reified ones are not counted in dataset.relation_mapper.get_largest_forward_relation_id() , meaning that there are 6 embeddings short.

This does not affect if reification is not used.


Remove SSL cert file generators and var def in maestro config

Now that maestro.config lives within snap-pelion-edge, port wwrelay-utils/edge-utils PRs into the snap repo

Porting over: https://github.com/armPelionEdge/edge-utils/pull/31

@mray190 I can test this PR on hardware and then we can merge this.

Wait for https://github.com/armPelionEdge/snap-pelion-edge/pull/272

Tested on hardware. All services are up and running. Gateway connects to portal and I am able to use relay-term and see logs in the portal.


Skip test if we don't have bcolz, h5py or sqlalchemy

This was brought up in issue #137 now test suite should pass with solely the things in requirements.txt

Looks good to me.  Merging once tests pass.


Edit pass for create an authentication request rule DO NOT MERGE

Light copy edits for create-an-authentication-request-rule.md

Hi, Dan/@Dansimp,
We’ve completed the edit pass of this article. Please review it and let me know if we’ve changed the technical meaning anywhere. You have five business days for the review (If you need longer, let me know).
When your review is complete, and you’re satisfied with the changes, our team will do the final merge to confirm there are no remaining PR issues.
Thanks!


Link core-packages page

Following #1026. We are missing a link to it.
The page is already online http://babeljs.io/docs/core-packages/.
We could add it in the docs dropdown?

Or we could replace this page http://babeljs.io/docs/usage/api/ which has the same in it.
@hzoo @existentialism Any ideas?

Ok do you want to just replace API with "Core Packages"?

Not ideal, but until https://github.com/babel/babel.github.io/issues/1042 gets resolved, menu makes the most sense.
An interim solution, that we might want to consider, is grouping the items in the menu, with something like:
Setup
Editors
Caveats

-- Packages --
Core
Plugins
Polyfill

--- Usage --
.babelrc
CLI
babel-register

Bonus, we'll likely want to do similar groupings in the eventual side bar nav. Thoughts?

Grouping sounds good


Realtime Transcription using synchronous approach

Hi there,
I am currently using the Python SDK for realtime transcribing. I saw that the SDK implementation is done using the async approach. However, I need a way in which I can achieve real-time transcribing in a sync approach.
I want in sync approach because my complete wss logic is implemented in a sync way itself.
Is it possible with the deepgram?

Hey @shrimad-mishra-cognoai, does this example cover the use case you're looking for? If not, can you explain more?
https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/streaming/http/main.py

In which deepgram version it is present or can you let me know the python library for this I have installed deepgram-sdk

The best way is to install the v3 RC is:
pip install deepgram-sdk==3.0.0-rc.1

Thanks for the help.
Getting this error
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)
I have set the Deepgram API key in the environment

Thanks for the help.
Getting this error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007) I have set the Deepgram API key in the environment

If you're using macOS go to Macintosh HD > Applications > Python3.11 folder (or whatever version of python you're using) > double click on "Install Certificates.command" file.

Getting this error continuously
Exception in _listening: received 1011 (internal error) Deepgram did not receive audio data or a text message within the timeout window. See https://dpgr.am/net0001; then sent 1011 (internal error) Deepgram did not receive audio data or a text message within the timeout window. See https://dpgr.am/net0001

Are you trying to run an example? or your own code? If you are running your own code, if you can link to it that would be helpful. Otherwise, if the code isn't open, we can do over DM in Discord.

Can you provide the discord ID will share the code with you over ther

You can join discord here:
https://dpgr.am/discord

Hi can you please provide the same for the async

Hi can you please provide the same for the async

I'm not sure you messaged in Discord, but I am going to need more information in order to help you debug your problem. If you don't mind sharing some info/code here or over Discord DM, that would be helpful.

I haven't heard back. If you are still having issues, please reopen.


[Map] DM-BULL_PolarisSE

Hash:<PHONE_NUMBER>3410bec353a521d7701f23236720ab
Current name: DM-BULL_PolarisSE
This is a map where the Author name under Map Information is truncated.  It appears as 	-={SDA}=  but hold the cursor over that and one sees what should be the full entry.
This is another BullDozer map.

Fixed by adding full name to aliases.


[PL] Comprehensions - Minor typo

Missing space between list and (ang. list comprehensions)

Thank you @rafalbig 👍


GTA IV with DXVK, map icons become low res/blurry

When using DXVK certain icons in menu map become less crisp.

Without DXVK - icons are crisp.
With DXVK - majority (not all) icons become more blurred.
With DXVK (apitrace DLLs) - icons also remain crisp. (due to older DLLs?)
All in-game assets are 64x64 in size.
Software information
GTA IV, pretty much almost maxed out in-game settings.
System information

GPU: RTX 2070 Super
Driver: NVIDIA 546.33
DXVK version: 2.2 / 2.3 - behavior is same with 2.2 and 2.3 DXVK files.

Apitrace file(s)
(https://drive.google.com/file/d/1OR1g5jDzBdxzLlMdtFi5HybKLU6xSbKp/view?usp=sharing)
File attached, but as mentioned, when using trace files, low quality icons doesn't show up.
Additional.

@r3538987 Could you give this a shot again with latest master? I don't think i was ever able to reproduce this issue myself.
You can download it here https://github.com/doitsujin/dxvk/actions/runs/11241364928

@r3538987 Could you give this a shot again with latest master? I don't think i was ever able to reproduce this issue myself. You can download it here https://github.com/doitsujin/dxvk/actions/runs/11241364928

I have plenty of game builds and versions, and I can no longer reproduce this. Without even changing DXVK files.


Replaced Community FAQ details on main page with link to separate page

In an earlier commit, these details were migrated to a separate page. After this change, there'll be no more duplicate data; all the Community FAQ details will be in a separate page and a link will be present on the main page for ease of access.
Section: Community - FAQ
Item: Link to separate page contains the same details
Action: Edit

By submitting this pull request, I promise I've read the contribution guidelines.

LGTM


StartsWith method does not compare strings correctly

Check sample:
Steps To Reproduce
https://deck.net/3c0a66eae87385cde73a43f5cc5a433b
https://dotnetfiddle.net/Lg7R3U
public class Program
{
    public static void Main()
    {
        Console.WriteLine("V".StartsWith("v", StringComparison.InvariantCultureIgnoreCase));
    }
}

Expected Result
True

Actual Result
False

Hello! Thanks for reporting the issue! The fix has just been merged upstream and will make it to our next Bridge release (see milestone bound to the issue).


Refactor main() into smaller bits

The main function was getting a bit long. This cuts it down to size.
Tested: make test-smoke

/assign @rjbez17

/lgtm


[improvement](oracle jdbc)Support for automatically obtaining the precision of the oracle timestamp type

Proposed changes
Issue Number: close #21251

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall


🍒 Cherry pick PR #10231 to staging 🍒

🍒 Cherry pick https://github.com/Expensify/App/pull/10231 to staging 🍒

🚀 Cherry-picked to staging by @OSBotify in version: 1.1.87-9 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

🚀 Deployed to production by @yuwenmemon in version: 1.1.87-9 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


implement self-liked feed

Nice PR.
I left comments in the review, in addition the response interface is needed. It is easy to generate, just about 3-5 minutes with this script


Use static config.json instead of hardcoding the path; Fixes #2

Meta

Fixes #2

Summary
Instead of hardcoding the URL to the websocket, this PR changes that to a config.json that lives in public/. That way it can be adjusted without needing to recompile the JS.
TODO

[x] Update README instructions
[ ] Update README instructions on Project Lightspeed repo

Everything looks good! Could you update the Dockerfile to target the new config file as well?

Everything looks good! Could you update the Dockerfile to target the new config file as well?


Docker Machine create fails if /etc/os-release not found.

This issue still exists, and has been stated 'this will be fixed in v0.5.0 , will it?
If nothing else have it fall-through to
/etc/os-release
/etc/redhat-release
/etc/centos-release
etc..
Running pre-create checks...
Creating machine...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Error creating machine: Error detecting OS: Error getting SSH command: Something went wrong running an SSH command!
command : cat /etc/os-release
err     : exit status 1
output  : cat: /etc/os-release: No such file or directory

I don't think it will be fixed in the 0.5.0 release.  Where did you read that?  Is there a duplicate issue we can consolidate into?

google:  docker-machine /etc/os-release issue
not sure which had the 'will be fixed in v0.5.0 was in.. as there are so
many.
1031 waiting for vm to start
1684 ..
1643
1596
1019
1833
1591
...
On Mon, Nov 2, 2015 at 3:50 PM, Nathan LeClaire<EMAIL_ADDRESS>wrote:

I don't think it will be fixed in the 0.5.0 release. Where did you read
that? Is there a duplicate issue we can consolidate into?
—
Reply to this email directly or view it on GitHub
https://github.com/docker/machine/issues/2143#issuecomment-153195646.

At a quick glance I don't see any issues which clearly reference this bug in the name but I'll treat this one as the bug report until / if we find such a dupe.

But for reference, it is still an issue in 0.5.0.

I'm affected by this too
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6 (Santiago)

still no solution for it?

+1

If I understand this summary correctly, /etc/os-release is systemd-specific which does not apply to CentOS 6.

+1

+1

+1

The same with macOS which does not have any "*release" or "*version" files in "/etc".
Some unanswered question also here:
https://forums.docker.com/t/connecting-to-docker-running-on-mac-server/9174

Same problem.
Host: MacOS 10.15.7
docker-machine version 0.16.2, build bd45ab13
Running pre-create checks...
Creating machine...
(mini) Importing SSH key...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Error creating machine: Error detecting OS: Error getting SSH command: ssh command error:
command : cat /etc/os-release
err     : exit status 1
output  : cat: /etc/os-release: No such file or directory

Same Problem on MacOS 11.2.3
Any solutions?


Feature: Accept bucket addresses in config, e.g. "s3://..."

Single config argument to define buckets, very flexible since users can choose mem-based or file-based schemes, particularly useful in integration.

Duplicate of #510.


Support coinbase outputs

Typically needed for regtest chains.
See https://github.com/sparrowwallet/sparrow/issues/265

For what it is worth, I also ran into this when trying to get a local sparrow + regtest (bitcoind) up and running. I used an address from the regtest sparrow wallet as the bitcoin-cli generatetoaddress target and was unable to see any of the transactions in sparrow.


Can cached translations be visible when translation is off?

The sfence.vma text describes translations as being cacheable and the satp text describes 0 as translations being off.  From that I'd expect that turning off translation in satp prevents cached translations from being visible, as translation is off (as opposed to having an identity translation).  As a result, we don't need a sfence.vma after the CSR write that turns off translation in satp.
I don't really have any issue with that behavior, but it's a bit subtle and I thought it would go the other way before reading the text.  If that's the desired behavior, we should put another note in the sfence.vma describing the situation.

Since we write "SFENCE.VMA is used to synchronize updates to in-memory memory-management data structures with current execution", and satp is not an in-memory memory-management data structure, aren't we already on solid footing?

I was considering this to fall into the "reusing an ASID" category, which normally requires a fence.

It doesn't seem inconsistent with ASIDs to me: changing the ASID in satp doesn't require a fence to load the correct table; reusing it to point at a new page table does, because you need to flush any previously stored tables associated with that ASID.

Decision made in side discussions is to clarify current intended behavior.

Would it maybe make sense to also mention that changes to satp that update ASID take effect immediately, so that it's clearer that ASIDs can be freely moved in and out of satp if the page table is the same, as opposed to reusing an ASID for a new, different page table?

@alercah Yeah, I suppose we say something close to the inverse (SFENCE is necessary if an ASID is recycled), but we don't explicitly remark that SFENCE is unnecessary when merely switching ASIDs.  I'll update accordingly.


HTTPS Protocol error with Ghostery

If I use D.Tube, I get certain problem because the gateways are https ones... but my local one does not understand HTTPS... but the companion ext is still redirecting with https protocol in version 2.2.1 for chrome.

(I did setup my own gateway with an http in the companion config.)

Interesting: I am unable to replicate this with v2.2.1: both Firefox and Chrome redirect and load content fine using a LAN IP of my non-HTTPS gateway.
I think what may be happening is some other extension or userscript is interfering with your requests, replacing HTTP ones with HTTPS.
Are you able to replicate with no other extensions and userscripts running?
Try running test with chrome --user-data-dir=$(mktemp -d) for empty profile.

Ok, for all of us, that R using Ghostery addon, whitelist your Domains for IPFS... this did the Trick for me, because I found out that ghostery has an int. http to https.

Thank you @calvinc64.
I looked at it closer and Ghostery provides no documentation nor controls to disable this forced protocol upgrade. I think it is a bug – filled an upstream issue: https://github.com/ghostery/ghostery-extension/issues/44


Memory leak

It looks like there is a memory leak.
The issue is that after sending a big chunk of data kafka4net still keeps a reference to some data that keeps memory from being collected.
This is quite easy to reproduce

Bulk Send (1 mln probably)
Wait till everything is sent
Close connection
Run GC
You will notice that kafka4net still keeps a reference to big amount of memory.

You can also run a memory profiler to get more idea.

It looks like the issue is here :
https://github.com/ntent-ad/kafka4net/blob/692dd1c902d754537113ba372568296078ee2c8f/src/Producer.cs#L557

We have been running significant producer load on this library in production stably for weeks without any sustained memory growth.
Is your data stream very bursty? I.E. do you often batch 1 million or so entries, then just sit around and wait for a while?
If that is the case, I suspect what might be happening is the circular buffers used to buffer messages prior to them being sent is auto-growing but then not shrinking back down.
The memory used for this is not "leaked" though, because as you keep using the system it will grow only as much as is needed, and as you use that buffer, the items no longer needed in the buffer will be released.
To test for a true "leak" you need to run over longer time I think. Try sending 1mln, wait for them to send, then send another million, wait, then another million, etc.

Hah, yes overlapping comments. It is just as I suspected. The producer, and its circular buffer were designed largely around a consistent stream of messages. I am fairly certain if you repeat your test and measure across say half a dozen or so batches (of whatever size) you will get constrained memory growth limited by the max size needed to buffer a particular "batch".

Yes we process data in batches with some pause in between. The thing is that buffer keeps on growing small by small. For example after 10 batches of 100K (each message is 2KB) it keeps ~1.8GB of memory.

And the question is why it is still keeping it after closing the producer by calling CloseAsync ?
Isn't it suppose to release the memory.

It looks like _allPartitionQueues should be set to null in CloseAsync.
Otherwise it seems that it will accumulate memory consumption.
Here is the scenario for my batch processing :

Get 100K data
Create a producer and process data
Close producer
If more data repeat from step 1

So each producer will consumer a memory for that buffer, which will keep accumulating.

Do you know for certain that your througput is sufficient to send all messages in one batch before the next one starts?
If you cannot keep up, then obviously the buffer must grow because you are adding another batch while there are still some messages left in the existing batch.
In the circular buffer implementation, in the case of a reference type  the reference will not be released until a new reference is assigned to it. We are discussing the potential of clearing (setting to null) the reference to the object once the Get() method moves the head pointer. For a normal long running stream producer, this just adds overhead (though arguably small) that is not required if the same producer will be used for long periods of time.
I agree with you that we could clean up better the used buffers when the producer is not needed or used anymore. I do not really want this to be added to CloseAsync though and would rather use the disposable() pattern to release buffer(s). Then if you want to create a new producer for every batch (would advise against this) you can as long as you dispose the old one. That being said if you are already de-referencing the entire producer between each batch, it should release all of its references for GC at that time.
You mention "each producer" are you creating new producer for every batch?

After you close the producer, are you correctly releasing all handles to the producer? If so, the producer and all of its resources should be available for garbage collection once you have no handles left to the producer.

@avoxm It looks like _allPartitionQueues should be set to null in CloseAsync
I'm not sure how this is possible. If you create and dispose producers, then GC should free producer's memory and thus _allPartitionQueues too. How it's possible that it is not released?

BTW, I would highly suggest using a single producer for each topic and writing a shim to access a producer across batches. This will avoid a LOT of thrashing (new connections, new buffers, fetching metadata, etc)

Yes for the first question. Batches are being processed in synchronously. Next batch will be processed only after await CloseAsync.
The fact that buffer needs to grow is fine the problem is that it is not being cleaned up after producer is closed.

@vchekan not sure yet how that is possible, but you can simulate the scenario I have described and attach a memory profiler to get more detailed picture.

@thunderstumpges when you say "are you correctly releasing all handles to the producer?" what do you mean ? Is there anything more to be done except CloseAsync ?

Seems there is not nice behavior in CircularBuffer.Get, when element which has been taken from queue is not assigned null and thus reference to a message remains and prevents sent message from GC until circular buffer makes full circle and overrides it. While not really a leak, it can cause red herring when using memory profiler. I'll fix it within a couple of days. But if you can produce a unit test, it would speed up things.

Handles to the producer would be variables, fields, or other references preventing garbage collection. If you are not re-using the same producer instance then the buffer growth would only ever happen for one batch and the buffer for the next batch would be in an entirely new producer.
I think the best way to proceed would be if you could write a unit test that demonstrates your issue we can see how you're using the producer(s) and cluster(s) across batches.

In CloseAync there's this code :+1:
_sendMessagesSubject = null;
OnPermError = null;
OnShutdownDirty = null;
OnSuccess = null;
OnTempError = null;
I was thinking to add _allPartitionQueues = null as well. It still needs to be checked, but it is possible that there's some event or anonymous function keeping a reference to it that's why GC is not marking it for cleanup.

Sure, I will create unit tests.
Meanwhile could you please tell me when the buffer is being shrunk ? Let's say throughput was not keeping up with my send requests and buffer grows, how and when it will release the memory ?

Here is the sample code to simulate the problem :
var topic = "yourTopic"
for (int i = 0; i < 10; ++i)
{
    var producer = new Producer(seed2Addresses,
        new ProducerConfiguration(topic);
    await producer.ConnectAsync();

    for (int j = 0; j < 1000000; j++)
    {
        var msg = new Message()
        {
            Key = BitConverter.GetBytes(1),
            Value = Encoding.UTF8.GetBytes(String.Format(@"SomeLongText - {0}", j))
        };

        producer.Send(msg);
    }

    await producer.CloseAsync(TimeSpan.FromSeconds(60));
}

@avoxm Thanks for the code. It allowed me to verify your use case quickly.
I was able to verify that 10 Producers are somehow surviving GC. Together with a bug in Circular queue not releasing items after dequeuing it increase memory consumption. Fixing CircularBuffer bug decreased memory consumption from 43Mb to 5Mb. I've committed the fix (code only, did not regenerate nuget) and will investigate why 10 Producers survive.


common: fix installation condition

Problem: we could end up in situation where we would install a package
on a machine that does not have the right repo enabled. Because the
condition was set to OR we weren't pinning a particular host but just a
condition. Let's say someone sets 'ceph_origin == "distro"', this would
try to install OSD packages on Monitors.
Solution: use a AND condition to first pin to the group_name (which
identifies a set of hosts) AND then after this one of the installation
condition.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1453119
Signed-off-by: Sébastien Han<EMAIL_ADDRESS>

Actually, I'm not sure the condition - (ceph_origin == "distro" or ceph_custom) is needed at all. ceph_origin: distro is set when we want to avoid setting up the CDN or an ISO, but those tasks have different checks now: https://github.com/ceph/ceph-ansible/blob/master/roles/ceph-common/tasks/main.yml#L20-L35
We just need ceph_origin: distro set so that the mandatory checks pass here: https://github.com/ceph/ceph-ansible/blob/master/roles/ceph-common/tasks/checks/check_mandatory_vars.yml#L32
Maybe that line in check_mandatory_vars.yml should be - ceph_origin != "distro" as that's the other valid install option for rhcs.

jenkins test this please

ceph_origin: distro is used when we want to install the Ceph version that comes with the default repository of the distribution.
@andrewschoen that's right, I also noticed @zhsj had an attempt to fix this too in https://github.com/ceph/ceph-ansible/pull/1283. I guess I didn't quite understand the real purpose of the commit. @zhsj I'm adding you as a Co-Authored-By for this commit :).
I'm fixing this properly now.

@andrewschoen I'm just wondering what's the real usage of this check: https://github.com/ceph/ceph-ansible/blob/master/roles/ceph-common/tasks/checks/check_mandatory_vars.yml#L32
Is this line really needed?

@leseb I think https://github.com/ceph/ceph-ansible/blob/master/roles/ceph-common/tasks/checks/check_mandatory_vars.yml#L32 needs to stay here, but perhaps changed to - ceph_origin != "distro". It's important because that is a valid way of deploying RHCS, with preprepared repos present on the nodes.

@andrewschoen final review please


grt: save out empty congestion report file to erase old report

Signed-off-by: Øyvind Harboe<EMAIL_ADDRESS>

I had already opened https://github.com/The-OpenROAD-Project/OpenROAD/issues/2782


Update: Microsoft.AzureStorageExplorer version 1.14.0

Removing old versions to reduce clutter
Microsoft Reviewers: Open in CodeFlow

/azp run


obj-c code sample in handleNotificationResponse needs semi-colon at end of line 5

Issue in /src/pages/documentation/adobe-journey-optimizer/api-reference.md

This will be fixed as part of #89!


The knight

I want to hack DLS
And getting  unlimited coins and gems
And playing DLS after I hacked  the game 🎮
And getting  super agent players

Hack DLS


Modify CI

The PR changes CI settings for the repository by adding Docker build and push steps for the adapter and Hardhat.
In order to avoid duplication of the same steps, I:

removed npm commands from the workflow as they are present in the Dockerfile
added test commands to the Dockerfile

In addition to this PR, I modified access settings for this repository by granting "Maintain" role to "Ownera Dev" group.

Looks good, but let me test it locally. There is another docker running on a test step (within a test code in testcontainer), just want to make sure it works currently when running in a Docker

@akonokhov tests are not really well working within a Docker here, let's continue using an 'npm test' and avoid test step during a Docker build


Return TapTargets in all factory methods

There is no need that we return the implementations / extension. The base TapTarget will be enough.
On a side node: Even if we would return ToolbarTapTarget oder ViewTapTarget, we would loose this information on the first builder method call as they all return TapTarget

Great! Thanks!


Terrain point resolution, Offline DEM

Hi,
I've been working on a program called OpenAthena which finds the spot on the ground a drone is looking at, in any given photo, using terrain elevation data
It works pretty well:

I'd like to donate, free of license or restriction, this technique and functionality to integrate it with the ATAK-UAS app. Could drastically improve the process of forward artillery observation and search and rescue use cases of the ATAK platform
Required for this technique: a Digital Elevation Model (DEM) GeoTIFF  file covering at least the UAS's location and the location of the subject of its camera
With Open Athena, a DEM of a customized area (large or small alike) can be downloaded for offline use (as a GeoTIFF file) by the Python eio clip command from the easy to use Python elevation package
I'm away from my workstation at the moment, but I'd like to ask: does ATAK-UAS store a map, including a Digital Elevation Model, for offline use?
If so, it will be pretty easy to implement this technique in the app. All the functionality can be re-wrote with some basic Java, as long as there's a way to obtain the elevation at a certain lat/lon.
Otherwise, if ATAK-UAS currently does not implement a DEM, it should still be fairly simple to add the OpenAthena technique along with a system that can read in a GeoTIFF file into the ATAK-UAS app
No Python required in either case :)
-Matthew

Mentioned previously with @brothercorvo in this issue:
https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/issues/205#issuecomment-1133137638

@rdkgit 👀

Related documentation for the ATAK-UAS app:
https://github.com/FreeTAKTeam/FreeTAKServer-User-Docs/blob/main/docs/docs/tools/FreeTAKUAS.md

What do you think @niccellular this could improve the accuracy of the target,  currently we ignore terrain elevation

So I thought it'd be worth sharing:
I've been really surprised by the efficacy of this technique, that is: using drone sensor data combined with an existing public global Digital Elevation Model data to find the exact location a drone's camera is looking at
The quality of the sensor data from the drones is usually quite good, and in the best case terrain resolution matches can be within 1-2 meters of the exact location

The quality of the free Digital Elevation Model is quite good as well, providing a significant advantage in accuracy with this technique
The free and open source Digital Elevation Model dataset I use was generated by the Space Shuttle Radar Topography Mission (SRTM) using a technique known as synthetic aperture radar. More detail is available here, but basically the short of it is that the radar technique is really good because it will go through stuff like cloud cover and surface foliage (trees) before bouncing off of hard terrain. The model's reported altitude for every datapoint is pretty darn close to the real thing
Also, the elevation model is free to use (download clips of), and it covers the entire earth
The resolution is 30 meters between each datapoint, going North, East, South, West, etc, but the vertical accuracy is within ~7 meters or so

Mainly I bring this up because FreeTAK seems like the perfect platform for this kind of software
In conflicts today, consumer rotary-wing aircraft are already being commonly used for forward artillery observation (and to devastating effect)
My hope is that implementation on the FreeTAK-UAS app may simplify is targeting process for the operator of a UAV and make the process of forward artillery observation easier, more accurate, and less prone to error
In addition, the ability to quickly get location data instantly into the FreeTAK platform may improve situational awareness for commanders and armed forces

@mkrupczak3 just to be clear: this is a Open Source project driven by regular people in our free time. There is no commercial interest here. So if you want to contribute all you need to do is to look at the code (based on the DJI SDK and submit a pull request. @niccellular and myself will review it and approve it that's make sense.

Yes,
I have no commercial interest at this time, and regardless I wish to contribute this to FreeTAK without any license or restriction
I'm working on internationalization of OpenAthena right now, but after I can take a deeper look into the FreeTAK app
OSGEO can be imported into an Android project, details in the following link. I anticipate this will probably be the most difficult part of implementation:
https://github.com/paamand/GDAL4Android
The OpenAthena codebase is fairly readable, in case either of y'all would like to evaluate in anticipation of eventual integration into FreeTAK

Ok. OpenAthena is written in Python. FT UAS is an Android java
application.  You should convert your classes in java
On Sun., May 22, 2022, 2:52 p.m. mkrupczak3, @.***>
wrote:

Yes,
I have no commercial interest at this time, and regardless I wish to
contribute this to FreeTAK without any license or restriction
I'm working on internationalization of OpenAthena right now, but after I
can take a deeper look into the FreeTAK app
OSGEO can be imported into an Android project, details in the following
link. I anticipate this will probably be the most difficult part of
implementation:
https://github.com/paamand/GDAL4Android
The OpenAthena codebase https://github.com/mkrupczak3/OpenAthena is
fairly readable, in case either of y'all would like to evaluate in
anticipation of eventual integration into FreeTAK
—
Reply to this email directly, view it on GitHub
https://github.com/FreeTAKTeam/FreeTAKUAS/issues/5#issuecomment-1133943322,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOPIAPLUBDRJD4W3MUO46DLVLJX6ZANCNFSM5WQUX7ZA
.
You are receiving this because you were mentioned.Message ID:
@.***>

@mkrupczak3 @brothercorvo
This seems like a great enhancement for FTUAS. As mentioned we currently do not consider terrain when calculating drone's Sensor Point of Interest (SPI) because we do not have elevation data.
Trying to think through how we can use this capability. A naïve approach would be to require the user to load digital elevation data in some predetermined format, (DTED, GeoTIFF, etc) onto their device, like their SDcard. Then the app provides a toggle to enable the new calculations that leverage the elevation data.
This is a rough approach but does fit the ATAK model, as all users typically load their own DTED data.
If the maths involved in computing the more accurate target can be implemented in Java. We should be able to make it happen.

Sounds good
I think offline operation is very important for a Minimum Viable Product, so or now I'm going to focus on getting a GUI version of OpenAthena ready, then a simple Android version (if I can figure out how to get GDAL working as a library)
The code for OpenAthena is available in case you're interested in adapting it for FreeTAK in the mean time. Most of the math is very simple for the calculation itself, I think the hardest part honestly is importing the GDAL library and being able to read data from a GeoTIFF DEM file

@niccellular @brothercorvo I've updated OpenAthena to support SK-42 Gaus Krüger values (as used as labels on old Soviet maps) and more drone models
Stubbed out an Android version here with some Android binaries for the GDAL library necessary for parsing GeoTIFF DEM's. Not functional yet though
Is there any interest in this project from the DHS Science and Technology directorate? I'd like  to transfer ownership of the project if possible. Think y'all might be able to move on this faster than myself

@brothercorvo @niccellular I've managed to port the core of OpenAthena to Java get it working in an Android app, and integrate the tiff-java library maintained by the National Geospatial Intelligence Agency for reading a GeoTIFF DEM.
I would really like to provide an implementation for use with FreeTAK. The repo is currently licensed GPLv3.0 instead of LGPL 2.1, but I can provide the Java core and the GeoTIFF parsing implementation under whatever license would be compatible with the FreeTAK project


feat(jsx): improve input attribute types based on react

improve input attribute types based on react
ref. https://github.com/DefinitelyTyped/DefinitelyTyped/blob/865051c6befe8d67f7ac2fdcac6cdf4922c1dc83/types/react/index.d.ts#L3263-L3389

I think autocomplete is too complex 😅
But I respect react types.
The author should do the following, if applicable

[ ] Add tests
[x] Run tests
[x] bun run format:fix && bun run lint:fix to format the code
[ ] Add TSDoc/JSDoc to document the code

Hi @ssssota
A lot of autocomplete values! But following React is good. Let's go with this.


Use long options in publish docs

I occasionally come to this page and my brain starts hating itself as I see usage examples looking like -a -b -r foo -q -x bar -n.
IMHO: short options should be for humans who use commands many times per day, and never for docs (or anything that's committed to source control, as publish commands should be in most projects).

Agree 100%.  Thanks for fixing this!


Try to automaticly sync the level on a time period from your google account (/30mins or /2hrs)

Everything is in the title :3 <3

This wasn't fixed in any way


Ask for advice

I have used many models to train this data, but the effect is very poor and there is no detection effect. Can anyone guide me?

Thanks for your interests!
Actually it is not appropriate for the organizers to provide very detailed suggestions, but I could provide some information based on our own attemption on this data:

Our method based on segmentation methodology at least achieves a sensitivity of around 0.9, where ROI IoU>0.2 is regarded as a hit.
You should not use high IoU to regard detection "hit", since the target shape is generally elongated. Elongated shape is generally associated with low segmentation metrics compared to rounded shape. We indeed use IoU>0.2 to regard a detection hit for the challenge.
This task is a tricy task indeed, for both human and machine. Human experts could underperform this task than a well tuned deep model in terms of sensitivity, but outperform the model in terms of false positives (reduced FPs). We have conducted observer studies with 2 radiologists.

We are submiting our paper these days; You may find the detailed methods and results after the paper is accepted. However, it is supposed to be after the challenge ddl.
Good luck! I hope these information could help.

Sometimes I thought it was a data problem, because I did standardization and then 3D segmentation, which is okay. It is probably my model problem.thank you apply

Sometimes I thought it was a data problem, because I did standardization and then 3D segmentation, which is okay. It is probably my model problem.thank you apply

Hi, friend.  I tried to do with the 3D-Unet, but it didn't work. I think this is because the target is too small and the model only can detect the background information.  The train data has been standardized and cropped. Have you tried any other models? Thanks.

@yyareyoung
I also used unet-3D and it didn’t work. I thought it was a data problem. I also did some tailoring. I also suspected the data imbalance problem. So I’m solving it. We can discuss it together. My wechat:<PHONE_NUMBER>1


Slightly tweaked the README

No, I did not add myself in the credits. I learned the leeson now.

leave 👏 the 👏 readme 👏 alone 👏
we (the maintainers, i.e. kando and me) will handle this

chill 👏
On Tue, May 14, 2024, 22:24 jaezu @.***> wrote:

leave 👏 the 👏 readme 👏 alone 👏
we (the maintainers, i.e. kando and me) will handle this
—
Reply to this email directly, view it on GitHub
https://github.com/famidash/famidash/pull/182#issuecomment-2111079539,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A2MADEGFK7T57X2GOUSSRW3ZCJXJJAVCNFSM6AAAAABHWXMC4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJRGA3TSNJTHE
.
You are receiving this because you authored the thread.Message ID:
@.***>


Improve the examples of Halfs

This added the support for using XenDevice.Disk with the updated Halfs library, as well as a minimal interactive shell.
B.T.W. I checked the examples/XenDivice and found that there existed a Halfs example before. But I can't find the related commits in the repo history. Would someone like to point it out and maybe explain a little what happened at that time?
Thank you

I believe the old Halfs example used a much older revision of Halfs, and was deleted between the time that old Halfs became broken and new Halfs started working.


AVRO-2448: Make test for leaking FileDescriptors more resilient

Lets the test for leaking FileDescriptors pass if the number of open descriptors has gone down.
https://issues.apache.org/jira/browse/AVRO-2448

This time we have some flaky network at the CI:
[INFO] Scanning for projects...
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/apache/21/apache-21.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.apache.avro:avro-toplevel:1.10.0-SNAPSHOT: Could not transfer artifact org.apache:apache:pom:21 from/to central (https://repo.maven.apache.org/maven2): Access denied to: https://repo.maven.apache.org/maven2/org/apache/apache/21/apache-21.pom , ReasonPhrase:Forbidden. and 'parent.relativePath' points at wrong local POM @ org.apache.avro:avro-toplevel:1.10.0-SNAPSHOT, /testptch/unknown/pom.xml, line 22, column 11
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project org.apache.avro:avro-parent:[unknown-version] (/testptch/unknown/lang/java/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.apache.avro:avro-toplevel:1.10.0-SNAPSHOT: Could not transfer artifact org.apache:apache:pom:21 from/to central (https://repo.maven.apache.org/maven2): Access denied to: https://repo.maven.apache.org/maven2/org/apache/apache/21/apache-21.pom , ReasonPhrase:Forbidden. and 'parent.relativePath' points at wrong local POM @ org.apache.avro:avro-toplevel:1.10.0-SNAPSHOT, /testptch/unknown/pom.xml, line 22, column 11 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

I've restarted the Java8 jobs.


[nrf noup] mgmt/mcumgr: Bootutil hooks to handle image-1

The commit adds bootutil hook, for nrf5340, to allow it handling the non-accessible image-1/primary slot.
Signed-off-by: Dominik Ermel<EMAIL_ADDRESS>Signed-off-by: Andrzej Głąbek<EMAIL_ADDRESS>(cherry picked from commit 0bff3b69a89c68d0c07d012603554b3c6b0b2acc)

Closing because https://github.com/cvinayak/sdk-zephyr/pull/1 fixes the same problem.


Update font spec type

Resolves: https://github.com/chartjs/Chart.js/issues/11603
Not sure if we see this as breaking 🤔

Yeah thought the same, worst case we revert it and wait for next major


fix LeafletGeoJSONView for mouseover event

provide a fix that handle mouveover event (see #22)
add an example using world countries

Thanks! Quick question: the example geojson is 56k lines long. I assume that it is ok. Although, is there an online resource from which we could request such files in the example notebook?

I used this site https://geojson-maps.kyd.com.au/ to generate a world map at the lowest resolution. As stated:

These maps are sourced from Natural Earth and are in the public domain, so you are free to use them in any way without attribution.

A smaller one can be generated focusing on one continent if needed - or the example can simply be removed.

ok, I guess it would be better to have a smaller region - minimum resolution.
The PR looks good to me.

@SylvainCorlay PR updated with Europe only - minimum resolution

👍 it just works! Merging.
FYI, since you opened this from the master branch, after this is merged, rather than pulling from master in the upstream repo, I recommend you do
git fetch upstream
git reset upstream/master

and use a feature branch for future PRs (which helps a lot with the GitHub workflow.)


AttributeError: module 'talos.utils' has no attribute 'ExperimentLogCallback'

I got the following error
AttributeError: module 'talos.utils' has no attribute 'ExperimentLogCallback'
Please see the code below
    history = model.fit(x=train_imgs_scaled, y=train_labels_ohe,                     validation_data=(validation_imgs_scaled, validation_labels_ohe),                             batch_size=200,                             epochs=10,                             callbacks=[talos.utils.ExperimentLogCallback('kgt', params)],                             verbose=1)
The complete code is available at the link
https://github.com/Kopfgeldjaeger/Medium_blogs_code/tree/master/2_talos_grid_search
I am using Colab.
The Talos version is 1.3.

You have to use talos.callbacks.ExperimentLog() instead. This was changed in 1.3. Sorry for the inconvenience. Closing here, feel free to open new issue if anything.


BS/HP: Add hidden path registration

Add registration of hidden paths to the BS.
The registrar needs to be extended to read the segment registration policy (see #2893) and depending on it register segments publicly or hidden.
Segments to be registered as hidden need a hidden path extension and should be sent to all Registries in the hidden path group in a signed message.

The new hidden paths implementation is now published, this no longer applies.