[CELEBORN-814] Merge upgrade doc to Deployment tab and add TOC

What changes were proposed in this pull request?
As title

Why are the changes needed?
Does this PR introduce any user-facing change?
How was this patch tested?

ping @pan3793


[go_router package] implement webstyle transition between pages.

Use case
I'm developing a platform that consists of a mobile app and a website and using the go_router package for the navigation. For both mobile platforms the go_router provides the native transition experience (a nice and clean animated transition), however, for web it does not (I think there should be no animation at all?). I know the auto_route package has all of the native transitions for every platform, I just think the go_router package is a bit easier to implement as I was running into some issues with autoroute.
Proposal
go_router already understands on what platform the app is active. Maybe we can use that information to make a more native look-a-like transition for web platform. I think there should be no animation at all?

Good point!


[bug] Cannot parse report from jest junit

The action worked as expected when the tests pass, but on a test failure the action fails on parsing...
Run scacap/action-surefire-report@v1
Going to parse results form /home/runner/work/workers/workers/services/buy-label-worker/junit.xml
Error: Cannot read property 'message' of undefined

This is the report it tried to parse above...
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="jest tests" tests="2" failures="1" errors="0" time="2.856">
  <testsuite name="Buy Label Worker" errors="0" failures="1" skipped="0" timestamp="2020-10-07T02:37:17" time="1.112" tests="2">
    <testcase classname="Buy Label Worker it buys a label" name="Buy Label Worker it buys a label" time="0.001">
    </testcase>
    <testcase classname="Buy Label Worker fails" name="Buy Label Worker fails" time="0.002">
      <failure>Error: expect(received).toEqual(expected) // deep equality

Expected: true
Received: false
    at Object.<anonymous> (/Users/matt/code/workers/services/buy-label-worker/__tests__/unit/index.test..js:25:19)
    at Object.asyncJestTest (/Users/matt/code/workers/.yarn/cache/jest-jasmine2-npm-26.5.2-5ec0f6a601-5aacb6b0c8.zip/node_modules/jest-jasmine2/build/jasmineAsyncInstall.js:106:37)
    at /Users/matt/code/workers/.yarn/cache/jest-jasmine2-npm-26.5.2-5ec0f6a601-5aacb6b0c8.zip/node_modules/jest-jasmine2/build/queueRunner.js:45:12
    at new Promise (<anonymous>)
    at mapper (/Users/matt/code/workers/.yarn/cache/jest-jasmine2-npm-26.5.2-5ec0f6a601-5aacb6b0c8.zip/node_modules/jest-jasmine2/build/queueRunner.js:28:19)
    at /Users/matt/code/workers/.yarn/cache/jest-jasmine2-npm-26.5.2-5ec0f6a601-5aacb6b0c8.zip/node_modules/jest-jasmine2/build/queueRunner.js:75:41
    at processTicksAndRejections (internal/process/task_queues.js:97:5)</failure>
    </testcase>
  </testsuite>
</testsuites>

Heres the output with ACTIONS_STEP_DEBUG set to true also in case it helps
Run scacap/action-surefire-report@v1
Going to parse results form /home/runner/work/workers/workers/services/buy-label-worker/junit.xml
##[debug]followSymbolicLinks 'false'
##[debug]followSymbolicLinks 'false'
##[debug]implicitDescendants 'true'
##[debug]omitBrokenSymbolicLinks 'true'
##[debug]Search path '/home/runner/work/workers/workers/services/buy-label-worker/junit.xml'
##[debug]Parsing file /home/runner/work/workers/workers/services/buy-label-worker/junit.xml
Error: Cannot read property 'message' of undefined
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Publish Test Report


SASS-2523 print preview styling

Description
SASS-2523 fix to print preview styling.
Add a link to the relevant story in Jira
SASS-2523
Checklist PR Reviewer
Before Reviewing

[x]  Have you pulled the branch down?
[x]  Have you assigned yourself to the PR?
[x]  Have you moved the task to “in review” on JIRA?
[x]  Have you checked to ensure all dependencies are up to date?
[x]  Have you checked to ensure its been rebased against the current version of main?

Whilst Reviewing

[x]  Have you run the tests?

[x]  Have you looked at the JIRA story to make sure all Acceptance Criteria has been met?

After Reviewing

[ ]  Have you checked for merge conflicts or any changes in the current main that may affect the current pull request? i.e. does it need another rebase?
[ ]  Have you checked to make sure there are no builds in the pipeline before you merge?
[ ]  Have you moved the task to “in pipeline” on Jira?

[x]  Have you rebased against the current version of main?
[ ]  Have you checked code coverage isn’t lower than previously?

After PRs been raised

[ ]  Have you checked the PR Builder passes?

Test this please


Added UK Flag and Added London Hackspace

Added London hackspace which is a great venue, and also added GB flag

Thank you! :)


Using multiple attributes when building constraints

I'm planning on deploying a multi-tenancy environment where our DC/OS cluster will be using multiple attributes for different teams to target nodes allocated to them.
One issue I have right now is how do I allow a specific team to target a set of nodes allocated for their use only.
Lets assume my cluster has 6 slaves being shared by 3 different teams.
Team 1 will have 3 nodes
Team 2 will have 2 nodes
Team 3 will have 1 node
My attributes on the agent nodes would look something like

clientid:1;nodetype:marathon
team:1;nodetype:spark

 team:1;nodetype:marathon

team:2;nodetype:sandbox

  team:2;nodetype:spark

  team:3;nodetype:marathon

With this setup will it be possible for me to create a constraint that allows team:1 to launch their marathon jobs only on nodes where nodetype:marathon and team:1 ?
Maybe attributes isn't the right fit here but sadly where unable to use roles as we're stuck with DC/OS and it does not have the ability to offer different roles to multiple frameworks.

@rbrown-rms sorry for the uhm late reply – I've commented on MARATHON-7693  so in case you didn't figure it out yet, there you go.


Implement exercise robot-simulator

Starting to implement robot-simulator exercise.

A couple of small things here. The only other needed changes are stuff you know how to do from the other problems, or that I volunteered to do myself :)

Hey @patricksjackson,
updating the tests did not seem to have triggered a new Travis build. I was wondering if this is intentional?

Travis builds the merge between the PR and the upstream branch (master). I think it's not working because there's a conflict with master. You need to do another merge with master.

Thanks for answering my question. The was indeed a conflict with the master branch.
NB: If you're ok with the current state, I think this exercise should be ready to be merged.

I would really prefer it if the test cases were easier to read, right now they are extremely verbose.
At a minimum, we could place the blank lines only above and below the actual test. So basically have the following format to clarify the difference between setup, test, and checking.
void test() {
  // Start block (no blank lines)

  // Test (moving forward, turning, whatever)

  // Check final state
}

It might also be clearer if we clean up some of the extra definitions. I think it's fine to just have the actual/expected values inline in the checks so longs as they don't need to be reused. We do that for many other tests, but in this case it's adding a lot of lines that end up being just boilerplate. If you want to be that verbose on the checks you could instead define a helper function that checks a robot against a bearing and position since we do that in every test. Running a BOOST_CHECK in a helper function works fine.
(Don't take the obvious optimization of creating a new robot from the expected bearing and position and comparing with the actual, as that would let the student cheat too easily).
BOOST_AUTO_TEST_CASE() {
  const std::pair<int, int> starting_position{0, 0};
  Robot r{starting_position, Bearing::NORTH};

  r.turn_right();

  BOOST_CHECK(starting_position == r.get_position();
  BOOST_CHECK(Bearing::EAST == r.get_bearing();
}

You're right, @patricksjackson, thanks for the hint. What do you think about the updated version?

Excellent! Thanks @chgraef! Merging this now.
Sorry for being a bit nitpicky on the tests, that's the only code the students see so I try to make those somewhat consistent in style/form.

You're welcome. Cheers for your comments!


bug: Dashboard* hl_group's not working anymore

Did you check docs and existing issues?

[X] I have read all the tokyonight.nvim docs
[X] I have searched the existing issues of tokyonight.nvim
[X] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)
v0.10.0
Operating system/version
Arch Linux
Describe the bug
hl_group = "DashboardHeader" etc. does not appear to work anymore after the recent updates. I made sure that the theme is loaded and enabled before I try to use the hl_group. All the colors just end up as white.
I can try to create a repro config in the next couple of days if the source of the problem turns out to be tricky.
Steps To Reproduce
vim.api.nvim_buf_set_extmark(buf, ns, start, 0, {
            end_row = start + #lines,
            hl_group = "DasboardHeader",
        })

Expected Behavior
Use the correct highlight group.
Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
    vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
    vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
    "folke/tokyonight.nvim",
    "folke/tokyonight.nvim",
    -- add any other plugins here
}
require("lazy").setup(plugins, {
    root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

local buf = vim.api.nvim_get_current_buf()
vim.bo[buf].filetype = "dashboard"

local lines = { "foo", "bar", "bada boop bam" }
local ns = vim.api.nvim_create_namespace("bug")
vim.api.nvim_buf_set_lines(buf, 0, 0, false, lines)
vim.api.nvim_buf_set_extmark(buf, ns, 0, 0, {
    end_row = #lines,
    hl_group = "DashboardHeader",
})

EDIT: Added repro case

That hl group will only be available when you enabled the dashboard plugin.
If you use lazy.nvim, then plugins are automatically enabled based on your actual plugins.
If you don't use lazy, then all plugins are enabled by default.
So you probbaly use these groups, but don't actually have dashbard.nvim installed?
If so, just enable opts.plugins.dashboard = true.
It's all in the docs...

Hi,
Thanks for clarifying, I actually was not aware that the hl_group was attached to a specific plugin and it has worked fine for the past two years, hence the confusion, sorry about that!
That said, I still can't get it to work. Here is an updated repro case that (I think) added your suggestion:
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
    vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
    vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
    {
        "folke/tokyonight.nvim",
        lazy = false,
        priority = 1000,
        config = function()
            require("tokyonight").setup({
                style   = "storm",
                plugins = {
                    all = package.loaded.lazy == nil,
                    auto = true,
                    dashboard = true
                }
            })
            vim.cmd("colorscheme tokyonight")
        end
    }
}
require("lazy").setup(plugins, {
    root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

local buf = vim.api.nvim_get_current_buf()
vim.bo[buf].filetype = "dashboard"

local lines = { "foo", "bar", "bada boop bam" }
local ns = vim.api.nvim_create_namespace("bug")
vim.api.nvim_buf_set_lines(buf, 0, 0, false, lines)
vim.api.nvim_buf_set_extmark(buf, ns, 0, 0, {
    end_row = #lines,
    hl_group = "DashboardHeader",
})

Is this what you were suggesting? Thanks for the help!

That was indeed a bug. Fixed!

I am using indentmini and the hl groups which that plugins uses (IndentLine and IndentLineCurrent)  are inside the indent-blankline's group.
Because of that I've included indent-blankline to be loaded in the options:
{
    'folke/tokyonight.nvim',
    priority = 1000, -- Make sure to load this before all the other start plugins.
    init = function()
      require('tokyonight').setup({
        style = 'moon',
        transparent = true,
        dim_inactive = true,
        plugins = {
          auto = true,
          all = false,
          ['indent-blankline.nvim'] = true, -- needed for indentmini plugin
        },

    ...

For some reason after this commit it stopped working.
Before #569:

After #569:

I also think that indentmini's hl groups should be in a separate file because this past commit clearly indicated that it should be supported now. Also I've checked indent-blankline repo and IndentLine and IndentLineCurrent are not used by that plugin.
Thanks, @folke, you're the best!

opts.plugins should use group names, so dashboard in this case.
That's what I had fixed, but then dashboard.nvim no longer worked.
Now both names will work


Uncaught TypeError: path.parse is not a function

Nodejs version: 10.16.3
npm version: 6.4.1
When I run the example from the readme, I get an error:
Uncaught TypeError: path.parse is not a function
at new JsonSchemaFile (jsonSchemaFile.js:233)
at new JsonSchemaFileDraft04 (jsonSchemaFileDraft04.js:23)
at new JsonSchemaFileDraft06 (jsonSchemaFileDraft06.js:23)
at new JsonSchemaFileDraft07 (jsonSchemaFileDraft07.js:21)
at NamespaceManager.newJsonSchema (namespaceManager.js:133)
at NamespaceManager.addNewJsonSchema (namespaceManager.js:141)
at Xsd2JsonSchema. (xsd2JsonSchema.js:275)
at Array.forEach ()
at Xsd2JsonSchema.processSchemas (xsd2JsonSchema.js:272)
at Xsd2JsonSchema.processAllSchemas (xsd2JsonSchema.js:303)
at onClick (App.tsx:418)
at HTMLUnknownElement.callCallback (react-dom.development.js:188)
at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
at invokeGuardedCallback (react-dom.development.js:292)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:306)
at executeDispatch (react-dom.development.js:389)
at executeDispatchesInOrder (react-dom.development.js:414)
at executeDispatchesAndRelease (react-dom.development.js:3278)
at executeDispatchesAndReleaseTopLevel (react-dom.development.js:3287)
at forEachAccumulated (react-dom.development.js:3259)
at runEventsInBatch (react-dom.development.js:3304)
at runExtractedPluginEventsInBatch (react-dom.development.js:3514)
at handleTopLevel (react-dom.development.js:3558)
at batchedEventUpdates$1 (react-dom.development.js:21871)
at batchedEventUpdates (react-dom.development.js:795)
at dispatchEventForLegacyPluginEventSystem (react-dom.development.js:3568)
at attemptToDispatchEvent (react-dom.development.js:4267)
at dispatchEvent (react-dom.development.js:4189)
at unstable_runWithPriority (scheduler.development.js:653)
at runWithPriority$1 (react-dom.development.js:11039)
at discreteUpdates$1 (react-dom.development.js:21887)
at discreteUpdates (react-dom.development.js:806)
at dispatchDiscreteEvent (react-dom.development.js:4168)

mzrt - It looks like you're running within a React application.  Please ensure you're bringing in a version of the Path class that is compatible with Path from NodeJS, which is documented here https://nodejs.org/docs/latest-v10.x/api/path.html.

Let me know if you need anything else on this.  Thanks for the question.


🐛(frontend) useUnionResources reset page scroll

Bug Report
Problematic Behavior
On the teacher dashboard course listing page.
When all the pages have been fetch, the list switch to the beginning of the page.
Expected behavior/code
We should stay at the end of the liste when finishing scrolling bottom.
Steps to Reproduce

go on the course listing page
scroll bottom
observe that you get teleporte to the beginig of the page.

Environment

Richie version: 2.25.0-beta.1
Platform: linux / firefox

Additional context/Screenshots
Capture vidéo du 16-01-2024 16:06:48.webm

I can't find a way to reproduce this bug on MacOS, maybe it is 100% related to your OS 🤔


feat: [STEP1] Use framer-motion in server components

What feature?
Leveraging Next.js 13 App Router for Enhanced SEO and Page Load Speed
Issue:
I've observed that a significant portion of our components are currently designed for client-side rendering. Given the recent integration of Next.js 13's App Router, I propose a beneficial shift towards utilizing its new capabilities. By transitioning more components into server components, we can potentially achieve improved SEO performance and faster page loading times.
Proposal:
To ensure a seamless transition, I'm suggesting a step-by-step approach. Currently, our components leveraging Framer Motion are categorized as client components. However, I believe it's worth exploring the possibility of incorporating Framer Motion within server components. This adjustment could further optimize our application's rendering process and contribute to our broader goal of enhancing user experience.
Let's collaborate on this initiative, starting with the migration of Framer Motion-dependent components into the realm of server components. This incremental approach will allow us to evaluate the impact on performance, SEO, and overall user satisfaction, while maintaining control over the scope of changes.
I'm excited about the potential of this enhancement and look forward to discussing the feasibility and implementation details with the team. Your thoughts and feedback on this proposal would be greatly appreciated.
Thank you,
[Your Name]
Add screenshots
.
Record

[X] I have checked the existing issues
[X] I have read the Contributing Guidelines
[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSoC'23 contributor
[X] I want to work on this issue

sure


Getting RuntimeError - Trigger found but cannot be identified

Describe the bug
Had a problem where I didn't get the url to link devices using Google Messages for 2FA authentication. So I switched to voyz/ibeam:0.4.4-rc4. This solved the 2FA problem, but now there is an authentication error and this exception is triggered.
2023-05-07 17:41:24,085|I| No active sessions, logging in...
2023-05-07 17:41:24,086|I| Loading auth webpage at https://localhost:5000/sso/Login?forwardTo=22&RL=1&ip2loc=on
2023-05-07 17:41:26,800|I| Gateway auth webpage loaded
2023-05-07 17:41:26,801|I| Login attempt number 1
2023-05-07 17:41:31,901|I| Submitting the form
2023-05-07 17:41:32,582|D| trigger: twofactbase
2023-05-07 17:41:32,582|I| Credentials correct, but Gateway requires two-factor authentication.
2023-05-07 17:41:32,583|I| Attempting to acquire 2FA code from: GoogleMessagesTwoFaHandler(driver_path=/usr/bin/chromedriver)
2023-05-07 17:41:40,075|I| First SMS found: "Your requested authentication code: 507348"
2023-05-07 17:41:40,092|I| Waiting for SMS message to be visible
2023-05-07 17:41:40,160|I| SMS message marked as read
2023-05-07 17:41:42,160|I| Cleaning up the resources. Google MSG Driver: <selenium.webdriver.chrome.webdriver.WebDriver (session="5f0d48a467be6ed65bac03707748efcc")>
2023-05-07 17:41:42,191|D| 2FA code returned: 507348
2023-05-07 17:41:42,251|I| Submitting the 2FA form
2023-05-07 17:41:45,662|E| Error encountered during authentication
Traceback (most recent call last):
  File "/srv/ibeam/src/authenticate.py", line 362, in authenticate_gateway
    trigger_identifier = identify_trigger(trigger, elements)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/ibeam/src/authenticate.py", line 160, in identify_trigger
    raise RuntimeError(f'Trigger found but cannot be identified: {trigger}')
RuntimeError: Trigger found but cannot be identified: <selenium.webdriver.remote.webelement.WebElement (session="b3d9d9d8e0f77b4f2b50a1a8f3ae7da4", element="e5e5a54b-fbf9-474c-bffa-71414b7717da")>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/srv/ibeam/src/authenticate.py", line 409, in authenticate_gateway
    raise RuntimeError('Error encountered during authentication') from e
RuntimeError: Error encountered during authentication
2023-05-07 17:41:45,663|I| Cleaning up the resources. Display: <pyvirtualdisplay.display.Display object at 0x7f2037992890> | Driver: <selenium.webdriver.chrome.webdriver.WebDriver (session="b3d9d9d8e0f77b4f2b50a1a8f3ae7da4")>
2023-05-07 17:41:45,697|I| Authentication process failed
2023-05-07 17:41:45,702|I| Starting maintenance with interval 60 seconds

Environment
IBeam version: voyz/ibeam:0.4.4-rc4`
Docker image or standalone: Docker
Python version (standalone users only):
OS: Ubuntu 20.04
Additional context
I notice when I log in manually, I'm taken to an intermediate page that tries to get me to download IBKR Mobile App.
You need to Click continue to get the "Client login succeeds" message. Or if you wait a couple of minutes it will also automatically redirect to the "Client login succeeds" message on url https://localhost:5000/sso/Dispatcher
Suggest a Fix
I did try to study the code, but there is no line 362 in authenticate.py, I'm looking at the master branch - I couldn't find any other branches that are not stale, so am a bit confused.

Her @Qarj thanks for reporting this issue 👍
I've just pushed out voyz/ibeam:0.4.4-rc5 which I hope should fix this problem - I think the IBKEY_PROMO_EL_CLASS was not being handled properly. Let me know if that helped

Thanks very much @Voyz for looking at this issue. I've installed rc5 and I'm still getting all the errors in the log, and also Authentication process failed, but the weird thing is that after 60 seconds it comes good just by itself and after that it maintains the authentication just fine... I removed the container and reinstalled and the exact same thing happened.
Here is the log
2023-05-09 20:12:44,969|I| Gateway not found, starting new one...
2023-05-09 20:12:44,969|I| Note that the Gateway log below may display "Open https://localhost:5000 to login" - ignore this command.
2023-05-09 20:12:44,969|I| Starting Gateway as Linux process with params: ['bash', 'bin/run.sh', 'root/conf.yaml']
running
 runtime path : root:dist/ibgroup.web.core.iblink.router.clientportal.gw.jar:build/lib/runtime/*
 config file  : root/conf.yaml
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/srv/clientportal.gw/build/lib/runtime/netty-common-4.1.15.Final.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
 -> mount demo on /demo
Java Version: 11.0.18
****************************************************
version: 485dc2d762781c4ff3954ac4fb66a9469a1405f7 Mon, 20 Mar 2023 14:39:35 -0400
****************************************************
This is the Client Portal Gateway
for any issues, please contact<EMAIL_ADDRESS>and include a copy of your logs
****************************************************
https://www.interactivebrokers.com/api/doc.html
****************************************************
Open https://localhost:5000 to login
App demo is available after you login under: https://localhost:5000/demo#/
2023-05-09 20:12:45,970|I| Gateway started with pid: 13
2023-05-09 20:12:45,970|D| HTTPS (unverified) request to: https://localhost:5000
2023-05-09 20:12:46,599|I| Gateway connection established
2023-05-09 20:12:46,599|D| HTTPS (unverified) request to: https://localhost:5000/v1/api/tickle
2023-05-09 20:12:46,747|I| No active sessions, logging in...
2023-05-09 20:12:46,747|I| Loading auth webpage at https://localhost:5000/sso/Login?forwardTo=22&RL=1&ip2loc=on
2023-05-09 20:12:50,106|I| Gateway auth webpage loaded
2023-05-09 20:12:50,106|I| Login attempt number 1
2023-05-09 20:12:55,214|I| Submitting the form
2023-05-09 20:12:56,444|D| trigger: twofactbase
2023-05-09 20:12:56,444|I| Credentials correct, but Gateway requires two-factor authentication.
2023-05-09 20:12:56,444|I| Attempting to acquire 2FA code from: GoogleMessagesTwoFaHandler(driver_path=/usr/bin/chromedriver)
2023-05-09 20:12:59,520|I| Web messages is not authenticated. Open this URL to pair web messages with your android phone:
2023-05-09 20:12:59,520|I| http://api.qrserver.com/v1/create-qr-code/?color=000000&bgcolor=FFFFFF&qzone=1&margin=0&size=400x400&ecc=L&data=https%3A//support.google.com/messages/%3Fp%3Dweb_computer%23%3Fc%3DCj0AqX3tUbP3Ojl6Iu0yQ5Wcp6yS2elVip0oTswQz0831ReoQa3qxaCjpjlCsEeGFoVe5sqpRyXmWa3kjH8YEiAmjRpRt5udUplN3T%2BJKWbCaA7J8cviNKQJJlqZWgtnrhogeoE3ZvJfso/ZI4D9QV7SDBJhc7RftyZXvSiE3t%2B%2BQ9A%3D
2023-05-09 20:13:24,067|I| First SMS found: "Your requested authentication code: 563219"
2023-05-09 20:13:24,081|I| Waiting for SMS message to be visible
2023-05-09 20:13:24,146|I| SMS message marked as read
2023-05-09 20:13:26,147|I| Cleaning up the resources. Google MSG Driver: <selenium.webdriver.chrome.webdriver.WebDriver (session="0338157e13f09045cc9f1fe6ac2299c8")>
2023-05-09 20:13:26,173|D| 2FA code returned: 563219
2023-05-09 20:13:26,237|I| Submitting the 2FA form
2023-05-09 20:13:29,975|I| Handling IB-Key promo display...
2023-05-09 20:13:30,447|E| Error encountered during authentication
Traceback (most recent call last):
  File "/srv/ibeam/src/authenticate.py", line 373, in authenticate_gateway
    trigger_identifier = identify_trigger(trigger, elements)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/ibeam/src/authenticate.py", line 145, in identify_trigger
    if trigger.get_attribute('id') == elements['TWO_FA_EL_ID']:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py", line 139, in get_attribute
    attributeValue = self.parent.execute_script(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 634, in execute_script
    return self.execute(command, {
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/opt/venv/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
  (Session info: headless chrome=90.0.4430.212)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/srv/ibeam/src/authenticate.py", line 412, in authenticate_gateway
    raise RuntimeError('Error encountered during authentication') from e
RuntimeError: Error encountered during authentication
2023-05-09 20:13:30,450|I| Cleaning up the resources. Display: <pyvirtualdisplay.display.Display object at 0x7fa9ea489190> | Driver: <selenium.webdriver.chrome.webdriver.WebDriver (session="8227ce798e3b97e355a9ca125076f5b1")>
2023-05-09 20:13:30,492|I| Authentication process failed
2023-05-09 20:13:30,498|I| Starting maintenance with interval 60 seconds
2023-05-09 20:14:30,498|I| Maintenance
2023-05-09 20:14:30,499|D| HTTPS (unverified) request to: https://localhost:5000/v1/api/tickle
2023-05-09 20:14:30,576|I| Gateway running and authenticated
2023-05-09 20:15:30,499|I| Maintenance
2023-05-09 20:15:30,499|D| HTTPS (unverified) request to: https://localhost:5000/v1/api/tickle
2023-05-09 20:15:30,590|I| Gateway running and authenticated
2023-05-09 20:16:30,498|I| Maintenance
2023-05-09 20:16:30,499|D| HTTPS (unverified) request to: https://localhost:5000/v1/api/tickle
2023-05-09 20:16:30,576|I| Gateway running and authenticated

It is a bit of a strange one, but at least I end up authenticated, thanks!
We might be able to avoid the stale element problem by waiting a few seconds between each step in the 2FA process to give the page time to settle.

Gotcha, you helped me identify another bug - trigger var wasn't reassigned after recognising IBKEY_PROMO_EL_CLASS. Just pushed voyz/ibeam:0.4.4-rc6 could you give it a shot?
The authentication failed and then seeming successful makes sense to me - the login works, but our handling of the success state wasn't right.

Thanks very much for putting that together! Sorry about the delay in getting back to you. The log is now looking a lot cleaner on startup:
Open https://localhost:5000 to login
App demo is available after you login under: https://localhost:5000/demo#/
2023-05-15 19:57:27,387|I| Gateway started with pid: 13
2023-05-15 19:57:27,387|D| HTTPS (unverified) request to: https://localhost:5000
2023-05-15 19:57:28,018|I| Gateway connection established
2023-05-15 19:57:28,018|D| HTTPS (unverified) request to: https://localhost:5000/v1/api/tickle
2023-05-15 19:57:28,112|I| No active sessions, logging in...
2023-05-15 19:57:28,112|I| Loading auth webpage at https://localhost:5000/sso/Login?forwardTo=22&RL=1&ip2loc=on
2023-05-15 19:57:31,684|I| Gateway auth webpage loaded
2023-05-15 19:57:31,684|I| Login attempt number 1
2023-05-15 19:57:36,792|I| Submitting the form
2023-05-15 19:57:37,471|D| trigger: twofactbase
2023-05-15 19:57:37,471|I| Credentials correct, but Gateway requires two-factor authentication.
2023-05-15 19:57:37,471|I| Attempting to acquire 2FA code from: GoogleMessagesTwoFaHandler(driver_path=/usr/bin/chromedriver)
2023-05-15 19:57:40,170|I| Web messages is not authenticated. Open this URL to pair web messages with your android phone:
2023-05-15 19:57:40,170|I| http://api.qrserver.com/v1/create-qr-code/ ...
2023-05-15 19:58:05,797|I| First SMS found: "Your requested authentication code: 434572"
2023-05-15 19:58:05,804|I| Waiting for SMS message to be visible
2023-05-15 19:58:05,884|I| SMS message marked as read
2023-05-15 19:58:07,884|I| Cleaning up the resources. Google MSG Driver: <selenium.webdriver.chrome.webdriver.WebDriver (session="114fe009378e06070106fa057e0afe94")>
2023-05-15 19:58:07,923|D| 2FA code returned: 434572
2023-05-15 19:58:07,984|I| Submitting the 2FA form
2023-05-15 19:58:11,440|I| Handling IB-Key promo display...
2023-05-15 19:58:11,899|I| Webpage displayed "Client login succeeds"
2023-05-15 19:58:13,900|I| Cleaning up the resources. Display: <pyvirtualdisplay.display.Display object at 0x7fa69d8d7c90> | Driver: <selenium.webdriver.chrome.webdriver.WebDriver (session="733d3beb48ab58820511ae3b7b461c32")>
2023-05-15 19:58:13,943|I| Authentication process succeeded
2023-05-15 19:58:16,943|D| HTTPS (unverified) request to: https://localhost:5000/v1/api/tickle
2023-05-15 19:58:17,206|I| Gateway running and authenticated.
2023-05-15 19:58:17,211|I| Starting maintenance with interval 60 seconds
2023-05-15 19:59:17,211|I| Maintenance
2023-05-15 19:59:17,212|D| HTTPS (unverified) request to: https://localhost:5000/v1/api/tickle
2023-05-15 19:59:17,263|I| Gateway running and authenticated

Superb @Qarj thanks for reporting back. Glad to hear the problem seems to be fixed 👍

Closing as this is addressed with https://github.com/Voyz/ibeam/releases/tag/v0.4.4. Thanks for the contribution 😊


Ability to allow prepend or append 'close all' button

This section of code in the render function:
.appendTo(self.element).animate(this.defaults.animateOpen, this.defaults.speed, this.defaults.easing)
only appends the 'close all' button to the bottom of the growl messages. We'd like a way to pass a option to allow prepending the close all button to the top of the jgrowl messages.

Closing due to inactivity on #66


Individual purchase is an option for EACH upgrade?

Can you make individual upgrades a global setting?
Nobody who wants this setting set to false will want it done to only some settings.
For example, me and my crew are disabling it but we have to go to every upgrade (annoying).

the problem with this option is having a seperate money pool.
if my teamate buys an upgrade, they will have different money than me, but if i buy walkies the money is taken from both of us. They could go down to 0 and i could still buy things, its confusing and the upgrades have different values.

Yes that is ready to go and will be in the next update.
Your second comment is a product of a bug / compatibility issue. When these desync issues occur 99% of the time it's more company / bigger lobby breaking the netcode or another incompatibility. Note that you can play this mod with bigger lobby or more company but in general with those two mods they're very accident prone and you have to be careful that your lobby got constructed correctly.
The idea with individual upgrades is you are investing in your team and you can each specialize and gain roles.


Auth doc changes to support multi-hub external OAuth

update OAuth doc to include support for hostRedirectUrl
add backwards compatibility H4 to using-teams-client-library.md for authenticate() API

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
73
26
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
86
27
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
73
26
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
87
25
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
73
26
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
88
24
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@mobajemu-msft use this relative path format for MS Docs links outside of the given docset (just take the absolute link and remove https://learn.microsoft.com/en-us from it, making sure the path starts with /):
/javascript/api/@microsoft/teams-js/authentication?view=msteams-client-js-latest#@microsoft-teams-js-authentication-authenticate
...that should take care of the build error.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
73
26
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
88
24
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
73
26
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
88
24
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Ah, now it doesn't like this part of the URL: ?view=msteams-client-js-latest
...go ahead and remove it (not needed).

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
73
26
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
88
24
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
79
21
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
88
24
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
80
19
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
88
24
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@surbhigupta12 could your team please help to review? Thank you!

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
80
19
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
88
24
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
80
19
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
89
22
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@Wajeed-msft @v-deabira @surbhigupta12 Could you please help us to publish this soon? We've had a number of recent customer issues we need to direct to these updates (example). Also internally filed issues and questions from ISV partners. Thank you!

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
90
7
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
89
22
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
90
7
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
90
18
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
90
7
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
90
18
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
90
7
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
90
18
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
90
7
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
90
17
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
90
6
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
90
17
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/tabs/how-to/authentication/auth-oauth-provider.md
90
6
link
:white_check_mark:

msteams-platform/tabs/how-to/using-teams-client-library.md
90
17
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.


feat(ui): Make logo link and header configurable

Closes #213

Codecov Report

Merging #232 (a0a4a6c) into master (0e586e4) will decrease coverage by 0.14%.
The diff coverage is 70.00%.

@@            Coverage Diff             @@
##           master     #232      +/-   ##
==========================================
- Coverage   83.34%   83.20%   -0.15%
==========================================
  Files          52       52
  Lines        3285     3293       +8
==========================================
+ Hits         2738     2740       +2
- Misses        426      430       +4
- Partials      121      123       +2

Impacted Files
Coverage Δ

config/ui/ui.go
66.66% <70.00%> (-1.76%)
:arrow_down:

config/maintenance/maintenance.go
92.40% <0.00%> (-3.80%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0e586e4...a0a4a6c. Read the comment docs.

Release in v3.5.0


Geometry panel inspector

Geometry panel inspector
Description

Geometry panel inspector
Visualize and edit basic geometry data
Maybe view all geometries in the asset manager?

Platform

Web Version [X]
Windows [X]
Linux [X]

Implemented!


Add keep_expanding_json_column option

Implemented #18 feature.

Coverage increased (+0.2%) to 94.845% when pulling 0808eb21a4eb3cbde4cd816cf3ff849bbb331ddf on muga:keep_expanding_json_column into 612f0bf059b44f69d3398c363f47c67f8cae653c on civitaspo:master.

np! thanks!

released https://rubygems.org/gems/embulk-filter-expand_json/versions/0.1.1

thank you for releasing new version :+1:


add null to json example and fix typos

I add Null to JsonValue enum which mention in #1075
I think Unicode string parsing in json is duplicate to the string.rs example, so I didn't add Unicode support for JsonValue

could you split the typo fixes in another commit?


Feature request -  Know where an entity or service is used -

Hello,
This is really great, but I think it would be even greater if the user can use it to know where an entity or service is used?
Thank you
R.S

If you add the Lovelace card to your UI you can hover over the file name where an orphaned entity is located and the pop-up will even show the line number in the file. Or is that not what you are looking for?

Here is an example:

Hovering your mouse over the word automations.yaml shows this entity was references on the lines 1774, 1781, 1791 and 1804 in automations.yaml

I didn't pause the mouse over before, this is really helpful.
Thank you very much.
R.S.

You can hover as long as you like, but nothing will happen I'm afraid... 😂

For sure. That's why building UI relying on features only available on a certain type of devices is... oldschool 😎

You may want to file a feature request to make these file names "clickable" and show the line number. Personally I prefer repairing these issues on my laptop anyway. It's too cumbersome on my mobile.

Line numbers are nice, but do not help a "GUI" only user.
Would it be possible to show the name of the automation that is containing the troublemaker?

I came across this in the readme section:
"4. To display line numbers in the report just remove .split(':')[0] from the card template"
If you do so you don't have to hover over the file name anymore.

I like the idea to extract automation name from the yaml, although I’m uncertain about its ease of implementation. Added #140


Removing object from a many array doesn't work

It makes sense in a way since when declaring many relationship you also declare an associated array of ids, but if you remove an element from the many attribute itself and save, then nothing happens. Obviously removing from the corresponding ids array work but it is just a bit un-natural that way.
require 'test/unit'
require 'mongo_mapper'

class User
    include MongoMapper::Document
    key :name
end

class Group
    include MongoMapper::Document
    key :name

    key :member_ids, Array
    many :members, :class_name => 'User', :in => :member_ids
end

class ManyToManyTest < Test::Unit::TestCase
    def setup
        MongoMapper.connection = Mongo::Connection.new('localhost', 27017)
        MongoMapper.database = 'many_to_many_test'
        MongoMapper.connection.drop_database('many_to_many_test')

        userA = User.create(:name => "UserA")
        userB = User.create(:name => "UserB")

        groupA = Group.new(:name => "GroupA")
        groupA.members << userA
        groupA.members << userB
        groupA.save
    end

    def test_delete
        userB = User.find_by_name("UserB")
        groupA = Group.find_by_name("GroupA")

        assert_equal 2, groupA.members.size

        groupA.members.delete(userB)
        groupA.save

        # In memory was obviously well handled
        assert_equal 1, groupA.members.size

        # Now going to mongo
        groupA.reload
        assert_equal 1, groupA.members.size

        groupA = Group.find_by_name("GroupA")
        assert_equal 1, groupA.members.size

    end

    def test_delete_by_id
        userB = User.find_by_name("UserB")
        groupA = Group.find_by_name("GroupA")

        assert_equal 2, groupA.members.size

        groupA.member_ids.delete(userB.id)
        groupA.save

        # In memory obviously that does not match anymore without a reload...
        assert_equal 1, groupA.members.size

        # Now going to mongo
        groupA.reload
        assert_equal 1, groupA.members.size

    end
end

Ive been noticing this too. Any updates on this?


Introduce a deletion policy, and deprecate the reclaim policy.

Description of your changes

Partial fix for https://github.com/crossplane/crossplane-runtime/issues/179.
Adds code that will need to be cleaned up as part of https://github.com/crossplane/crossplane/issues/1670.
This PR introduces a deletionPolicy that is intended to replace the contemporary reclaimPolicy once it is removed. Corresponding changes will be required to angryjet.
Checklist

I have:

[x] Run make reviewable to ensure this PR is ready for review.
[x] Ensured this PR contains a neat, self documenting set of commits.

@hasheddan @muvaf I pushed some new commits in response to @muvaf's feedback. What do you think?


Not able to spawn namenode or datanodes in spite of available resources

I keep seeing below message repeatedly:
18:05:09.533 [Thread-785] INFO  o.a.m.hdfs.scheduler.HdfsScheduler - Cannot colocate namenode and datanode on mesos-slave-4.example.com
18:05:15.535 [Thread-786] INFO  o.a.m.hdfs.scheduler.HdfsScheduler - Received 4 offers

while slave in question has ample amount of free resources. Mesos master UI shows no CPU or Memory usage on the slave in question.
Let me know what log/configuration files I need to provide to debug this issue further.
The mesos-site.xml file looks like below:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License. See accompanying LICENSE file.
-->

<!-- Put site-specific property overrides in this file. -->

<configuration>
  <property>
    <name>mesos.hdfs.data.dir</name>
    <description>The primary data directory in HDFS</description>
    <value>/var/lib/hdfs/data</value>
  </property>

  <property>
    <name>mesos.hdfs.secondary.data.dir</name>
    <description>The secondary data directory in HDFS</description>
    <value>/var/run/hadoop-hdfs</value>
  </property>

  <property>
    <name>mesos.hdfs.native-hadoop-binaries</name>
    <description>Mark true if you have hadoop pre-installed on your host machines (otherwise it will be distributed by the scheduler)</description>
    <value>false</value>
  </property>

  <property>
    <name>mesos.hdfs.framework.mnt.path</name>
    <description>Mount location (if mesos.hdfs.native-hadoop-binaries is marked false)</description>
    <value>/opt/mesosphere</value>
  </property>

  <property>
    <name>mesos.hdfs.state.zk</name>
    <description>Comma-separated hostname-port pairs of zookeeper node locations for HDFS framework state information</description>
    <value>localhost:2181</value>
  </property>

  <property>
    <name>mesos.master.uri</name>
    <description>Zookeeper entry for mesos master location</description>
    <value>zk://localhost:2181/mesos</value>
  </property>

  <property>
    <name>mesos.hdfs.zkfc.ha.zookeeper.quorum</name>
    <description>Comma-separated list of zookeeper hostname-port pairs for HDFS HA features</description>
    <value>localhost:2181</value>
  </property>

  <property>
    <name>mesos.hdfs.framework.name</name>
    <description>Your Mesos framework name and cluster name when accessing files (hdfs://YOUR_NAME)</description>
    <value>hdfs</value>
  </property>

  <property>
    <name>mesos.hdfs.mesosdns</name>
    <description>Whether to use Mesos DNS for service discovery within HDFS</description>
    <value>false</value>
  </property>

  <property>
    <name>mesos.hdfs.mesosdns.domain</name>
    <description>Root domain name of Mesos DNS (usually 'mesos')</description>
    <value>mesos</value>
  </property>

  <property>
    <name>mesos.native.library</name>
    <description>Location of libmesos.so</description>
    <value>/usr/local/lib/libmesos.so</value>
  </property>

  <property>
    <name>mesos.hdfs.journalnode.count</name>
    <description>Number of journal nodes (must be odd)</description>
    <value>3</value>
  </property>

  <!-- Additional settings for fine-tuning -->

  <property>
    <name>mesos.hdfs.jvm.overhead</name>
    <description>Multiplier on resources reserved in order to account for JVM allocation</description>
    <value>0.4</value>
  </property>
  <!--
  <property>
    <name>mesos.hdfs.hadoop.heap.size</name>
    <value>512</value>
  </property>
  -->
  <property>
    <name>mesos.hdfs.namenode.heap.size</name>
    <value>1024</value>
  </property>

  <property>
    <name>mesos.hdfs.datanode.heap.size</name>
    <value>1024</value>
  </property>

  <property>
    <name>mesos.hdfs.executor.heap.size</name>
    <value>256</value>
  </property>

  <property>
    <name>mesos.hdfs.executor.cpus</name>
    <value>0.5</value>
  </property>

  <property>
    <name>mesos.hdfs.namenode.cpus</name>
    <value>0.5</value>
  </property>

  <property>
    <name>mesos.hdfs.journalnode.cpus</name>
    <value>0.5</value>
  </property>

  <property>
    <name>mesos.hdfs.datanode.cpus</name>
    <value>1</value>
  </property>

  <property>
    <name>mesos.hdfs.user</name>
    <value>root</value>
  </property>

  <property>
    <name>mesos.hdfs.role</name>
    <value>*</value>
  </property>

</configuration>

Hello @dharmit, one thing is that you need a minimum of 4 slave nodes. Also, which tasks (nodes) are running so we can further debug?

Hello @elingg
I have 1 master node and six slaves. Below is the configuration:

4 slaves - 4 CPUs, 6.6 GB memory, 12.5 GB disk
2 slaves - 2 CPUs, 6.6 GB memory, 12.5 GB disk

I have modified mesos-site.xml to ensure that namenodes requires less resources.
Currently running nodes -

Node
Count

NameNode
1

JournalNode
3

ZKFC
5

In mesos-site.xml, I have provided configurations to use ZooKeeper which is already been used by mesos-master. There are three zookeeper nodes. But it still spins up ZKFC nodes. Is this expected behavior?
One namenode fails to start. It fails twice on two slaves. So, total of four times. Below are error messages before it is shutdown:
java.io.IOException: NameNode is not formatted.
        at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:212)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:1005)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:735)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:531)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:587)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:754)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:738)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1427)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1493)
15/08/13 11:56:53 INFO util.ExitUtil: Exiting with status 1
15/08/13 11:56:53 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at mesos-slave-2.example.com/<IP_ADDRESS>

Other time it shuts down with below message:
15/08/13 11:57:17 FATAL namenode.NameNode: Failed to start namenode.
java.net.BindException: Port in use: mesos-slave-2.example.com:50070
        at org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:890)
        at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:826)
        at org.apache.hadoop.hdfs.server.namenode.NameNodeHttpServer.start(NameNodeHttpServer.java:142)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpServer(NameNode.java:695)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:585)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:754)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:738)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1427)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1493)
Caused by: java.net.BindException: Address already in use
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
        at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
        at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
        at org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:885)
        ... 8 more
15/08/13 11:57:17 INFO util.ExitUtil: Exiting with status 1
15/08/13 11:57:17 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at mesos-slave-2.example.com/<IP_ADDRESS>

Furthermore, I don't see any process listening on the port 50070 on active namenode. So I am unable to browse to the UI

hi @dharmit, looking at your error it seems you have some old processes for HDFS running. Could you make sure that you don't have any stray node processes running? Then could you follow the steps to uninstall your framework before reinstalling?

Hi @elingg, thanks for the suggestion. However, I rebooted the systems before trying to deploy hdfs-mesos. And these messages appear while trying to deploy the framework right after reboot.
That said, I will make sure there are no processes spawning up at boot which cause this.
Are both java.net.BindException: Port in use: mesos-slave-2.example.com:50070 and java.io.IOException: NameNode is not formatted. a consequence of the same, i.e. stray node processes running?

Right, you need to not only reboot the system, but you need to make sure you properly uninstall (see our uninstall steps) and then reinstall to get rid of old lingering state. I would run ps faux to see which processes are running and to see if there are any stray journalnode or datanode processes. Proper uninstall should kill these processes, but you still want to double check.
Also,to check the process that's listening on a specific port do sudo netstat -plnat | grep 50070. You'll probably see another process is listening there.

All right. I will give that a shot and report back.

@elingg

but you need to make sure you properly uninstall (see our uninstall steps)

Besides rebooting to make sure that there are no leftover processes or data under /tmp, I am removing the directoy /opt/mesospher/hdfs as a part of uninstall process. I couldn't find any uninstall steps you mentioned about. I still see same message - NameNode not formatted. Could you point me to the uninstall steps if I am doing it the wrong way?
Also, I am seeing a weird behavior when it comes to slaves. There are four slaves in the environment with identical configuration. For some reason, one of the slaves is not being utilized by Mesos framework. I tried Marathon and Chronos and they can very well use that slave. But hdfs-mesos cannot! Nothing related roles either.
I have disabled every other framework to make sure that there's no issue related to resource consumption. I also checked the logs but nothing looks unusual in there. Any ideas why this could be happening?

You need to delete your data directory as specified in mesos-site.xml. Please see the uninstall instructions here, https://github.com/mesosphere/hdfs#shutdown-instructions-optional. About the tasks not getting offered to that node, typically the reason is insufficient resources. Is there a big enough offer being sent to the hdfs-mesos framework by the Mesos Master? You can check the Mesos Master log to see what offers are being sent out.

fyi i hacked in some logging into the framework and got some output like this:
20:50:15.054 [Thread-31] INFO  o.a.m.hdfs.scheduler.HdfsScheduler - Offer does not have enough resources
20:50:15.054 [Thread-31] INFO  o.a.m.hdfs.scheduler.HdfsScheduler - --> { cpus: 3.0, mem: 6200.0, host: mesos-data-slave2-aws.knuckolls.dev.banno-internal.com}
20:50:15.055 [Thread-31] INFO  o.a.m.hdfs.scheduler.HdfsScheduler - --> { requestedCpu: 0.2, requestedMem: 4608 }

This is during the namenode provisioning step. The journal nodes provisioned correctly. I'm actively hunting this bug down but I figured it'd be worthwhile to report it.

I added more precise debugging information. Found an example that fails on memory.
03:24:26.540 [Thread-42] INFO  o.a.m.hdfs.scheduler.HdfsScheduler - ------- offerNotEnoughResources() -----------
03:24:26.540 [Thread-42] INFO  o.a.m.hdfs.scheduler.HdfsScheduler - --> { cpus: 4.0, mem: 6456.0, host: mesos-data-slave0-aws.knuckolls.dev.banno-internal.com}
03:24:26.540 [Thread-42] INFO  o.a.m.hdfs.scheduler.HdfsScheduler - --> { requestedCpu: 0.2, requestedMem: 4608 }
03:24:26.540 [Thread-42] INFO  o.a.m.hdfs.scheduler.HdfsScheduler - ------ return true, fail on mem ----------

I'm going to leave these here, just in case it helps other people debug the situation, but it turns out that I wasn't factoring in the overhead that gets added. This is the debugging information that shows the problem and why I just need to have beefier nodes that'll give out better offers.
03:34:31.415 [Thread-66] INFO  o.a.m.hdfs.scheduler.HdfsScheduler - ------- offerNotEnoughResources() -----------
03:34:31.415 [Thread-66] INFO  o.a.m.hdfs.scheduler.HdfsScheduler - --> { cpus: 4.0, mem: 6456.0, host: mesos-data-slave0-aws.knuckolls.dev.foo.com}
03:34:31.415 [Thread-66] INFO  o.a.m.hdfs.scheduler.HdfsScheduler - --> { requestedCpu: 0.30000000000000004, requestedMem: 6566.400000000001 }
03:34:31.415 [Thread-66] INFO  o.a.m.hdfs.scheduler.HdfsScheduler - ------ return true, fail on mem ----------

Yes, you need to either lower the resources or use beefier machines. Note if you lower the resources you can store less data. Thanks for the insight @knuckolls !

@knuckolls @elingg I am also currently trying to debug why the scheduler is complaining about not having enough resources. I think it would be immensely useful if the offer and requested resources is available rather than just a message saying "Offer does not have enough resources".
What do you guys think?

@F21 I agree with that. :+1:
I, however, managed to spin up a POC setup with minimum set of resources as mentioned in the example section of the repo. But it wasn't really helpful.

Better logging with more debugging information is certainly an improvement we would like. I suggest we create a new issue for that and close this one. Let me know if there are any objections to that since it seems you got past your original issue @dharmit

Closing this issue, feel free to create a separate issue for improved logs for clarity.


Calico-node pod refuses to start on google coral dev board without the nf_conntrack_netlink kernel module

Let me preface this by saying that this is an unusual setup scenario and that I am not running Calico in its ideal environment. If you do not care about the context as to why we try to start Calico without nf_conntrack_netlink, please skip over to the Expected and Current behavior headings
Context Environment
We are working on enrolling the google coral dev board onto our existing balena-fleet that runs a collection of raspberry pis and nvidia Jetson nanos in the following configuration:

flashed with the corresponding balena OS kernels
Runs our code that installs k3s and for the Jetson nano and Xavier builds and loads the ipip and wireguard modules out-of-tree in this script

After the above steps, the devices are able to start k3s agent in a container and wireguard in another and join our k3s cluster that is running Calico as its CNI.
Our process for enrolling the Google Coral Dev Board

We first flash the google coral with the recommended Balena OS version 2.108.26 kernel.

$ uname -r
4.14.98-imx

We then proceed to use this code to load the following kernel modules out-of-tree:

IPIP kernel module including ip_tunnel and tunnel4
xt_mark, xt_statistic, xt_comment, xt_multiport, nf_conntrack_netlink, xt_bpf, and xt_u32 all required for running Calico CNI

Code to build the kernel modules
Kernel config patch file
Code to load the Kernel modules and start k3s agent

Here are the logs for what happens when starting the k3s agent with ALL the kernel modules loaded
Dmesg logs on the host kernel
[   40.838652] random: crng init done
[   40.851547] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[   40.874565] EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)
[   41.028904] systemd[1]: System time before build time, advancing clock.
[   41.097585] systemd[1]: File /lib/systemd/system/systemd-journald.service:12 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
[   41.097598] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[   41.209113] systemd[1]: /lib/systemd/system/chronyd.service:25: Unknown key name 'ProcSubset' in section 'Service', ignoring.
[   41.209146] systemd[1]: /lib/systemd/system/chronyd.service:28: Unknown key name 'ProtectHostname' in section 'Service', ignoring.
[   41.209163] systemd[1]: /lib/systemd/system/chronyd.service:29: Unknown key name 'ProtectKernelLogs' in section 'Service', ignoring.
[   41.209194] systemd[1]: /lib/systemd/system/chronyd.service:32: Unknown key name 'ProtectProc' in section 'Service', ignoring.
[   42.247023] imx-sdma 30bd0000.sdma: no iram assigned, using external mem
[   42.256266] imx-sdma 30bd0000.sdma: loaded firmware 4.2
[   42.259899] imx-sdma 302c0000.sdma: no iram assigned, using external mem
[   42.268096] imx-sdma 302c0000.sdma: loaded firmware 4.2
[   42.348589] ina2xx 1-0040: error configuring the device: -6
[   42.361241] ina2xx 1-0041: error configuring the device: -6
[   42.750411] zram: Can't change algorithm for initialized device
[   43.627353] Adding 503584k swap on /dev/zram0.  Priority:-2 extents:1 across:503584k SS
[   43.910583] wlan: loading out-of-tree module taints kernel.
[   43.975040] wlan: loading driver v<IP_ADDRESS>
[   43.975387] hif_pci_probe:, con_mode= 0x0
[   43.975397] PCI device id is 003e :003e
[   43.975417] hif_pci 0000:01:00.0: BAR 0: assigned [mem 0x18000000-0x181fffff 64bit]
[   43.975548] hif_pci 0000:01:00.0: enabling device (0000 -> 0002)
[   43.976718]
                hif_pci_configure : num_desired MSI set to 1
[   44.054114] hif_pci_probe: ramdump base 0xffff800024e00000 size 2095136
[   44.126366] NUM_DEV=1 FWMODE=0x2 FWSUBMODE=0x0 FWBR_BUF 0
[   44.779370] +HWT
[   44.796852] -HWT
[   44.820250] HTT: full reorder offload enabled
[   44.860930] Pkt log is disabled
[   44.865835] Host SW:<IP_ADDRESS>, FW:<IP_ADDRESS>8, HW:QCA6174_REV3_2
[   44.866430] ol_pktlog_init: pktlogmod_init successfull
[   44.866722] wlan: driver loaded in 892000
[   44.870061] target uses HTT version 3.50; host uses 3.28
[   47.488191] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   47.495084] Generic PHY 30be0000.ethernet-1:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=30be0000.ethernet-1:00, irq=POLL)
[   47.495751] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   47.534226] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   47.534572] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   47.668851] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   51.593483] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   51.593510] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   65.517525] Bridge firewalling registered
[   65.630300] Initializing XFRM netlink socket
[   65.641279] Netfilter messages via NETLINK v0.30.
[   65.900887] IPv6: ADDRCONF(NETDEV_UP): supervisor0: link is not ready
[   65.995140] IPv6: ADDRCONF(NETDEV_UP): balena0: link is not ready
[   68.796835] ipip: IPv4 and MPLS over IPv4 tunneling driver
[   73.869504] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   79.811546] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
[  235.903492] ctnetlink v0.93: registering with nfnetlink.
[  255.787535] ip_set: protocol 6
[  256.065155] IPVS: [rr] scheduler registered.
[  256.688073] Unable to handle kernel NULL pointer dereference at virtual address 00000040
[  256.704251] Mem abort info:
[  256.709945]   Exception class = DABT (current EL), IL = 32 bits
[  256.721880]   SET = 0, FnV = 0
[  256.728142]   EA = 0, S1PTW = 0
[  256.734520] Data abort info:
[  256.740377]   ISV = 0, ISS = 0x00000006
[  256.748146]   CM = 0, WnR = 0
[  256.754179] user pgtable: 4k pages, 48-bit VAs, pgd = ffff80001f9f3000
[  256.767329] [0000000000000040] *pgd=000000005f9f8003, *pud=000000005fa76003, *pmd=0000000000000000
[  256.785345] Internal error: Oops: 96000006 [#1] PREEMPT SMP

K3S agent logs (1.23.17 but also crashes on the latest stable)
INFO[0001] Starting k3s agent v1.23.17+k3s1 (abb8d7d4)
INFO[0001] Running load balancer k3s-agent-load-balancer <IP_ADDRESS>:6444 -> [<IP_ADDRESS>:6443 dev.edge.chameleoncloud.org:6443]
WARN[0001] Cluster CA certificate is not trusted by the host CA bundle, but the token does not include a CA hash. Use the full token from the server's node-token file to enable Cluster CA validation.
INFO[0003] Module overlay was already loaded
INFO[0003] Module nf_conntrack was already loaded
INFO[0003] Module br_netfilter was already loaded
INFO[0003] Set sysctl 'net/netfilter/nf_conntrack_tcp_timeout_close_wait' to 3600
INFO[0003] Set sysctl 'net/netfilter/nf_conntrack_max' to 131072
INFO[0003] Set sysctl 'net/netfilter/nf_conntrack_tcp_timeout_established' to 86400
INFO[0003] Logging containerd to /var/lib/rancher/k3s/agent/containerd/containerd.log
INFO[0003] Running containerd -c /var/lib/rancher/k3s/agent/etc/containerd/config.toml -a /run/k3s/containerd/containerd.sock --state /run/k3s/containerd --root /var/lib/rancher/k3s/agent/containerd
INFO[0004] Containerd is now running
INFO[0004] Getting list of apiserver endpoints from server
INFO[0005] Tunnel authorizer set Kubelet Port 10250
INFO[0005] Updating load balancer k3s-agent-load-balancer default server address -> <IP_ADDRESS>:6443
INFO[0005] Connecting to proxy                           url="wss://<IP_ADDRESS>:6443/v1-k3s/connect"
WARN[0005] Disabling CPU quotas due to missing cpu controller or cpu.cfs_period_us
INFO[0005] Running kubelet --address=<IP_ADDRESS> --allowed-unsafe-sysctls=net.ipv4.ip_forward,net.ipv6.conf.all.forwarding --anonymous-auth=false --authentication-token-webhook=true --authorization-mode=Webhook --cgroup-driver=cgroupfs --client-ca-file=/var/lib/rancher/k3s/agent/client-ca.crt --cloud-provider=external --cluster-dns=<IP_ADDRESS> --cluster-domain=cluster.local --container-runtime=remote --container-runtime-endpoint=unix:///run/k3s/containerd/containerd.sock --containerd=/run/k3s/containerd/containerd.sock --cpu-cfs-quota=false --eviction-hard=imagefs.available<5%,nodefs.available<5% --eviction-minimum-reclaim=imagefs.available=10%,nodefs.available=10% --fail-swap-on=false --healthz-bind-address=<IP_ADDRESS> --hostname-override=8fb60a5 --kubeconfig=/var/lib/rancher/k3s/agent/kubelet.kubeconfig --kubelet-cgroups=/k3s --node-labels= --pod-manifest-path=/var/lib/rancher/k3s/agent/pod-manifests --read-only-port=0 --resolv-conf=/etc/resolv.conf --serialize-image-pulls=false --tls-cert-file=/var/lib/rancher/k3s/agent/serving-kubelet.crt --tls-private-key-file=/var/lib/rancher/k3s/agent/serving-kubelet.key --volume-plugin-dir=/opt/libexec/kubernetes/kubelet-plugins/volume/exec
Flag --cloud-provider has been deprecated, will be removed in 1.24 or later, in favor of removing cloud provider code from Kubelet.
Flag --containerd has been deprecated, This is a cadvisor flag that was mistakenly registered with the Kubelet. Due to legacy concerns, it will follow the standard CLI deprecation timeline before being removed.
I0416 18:57:06.107611    1338 server.go:442] "Kubelet version" kubeletVersion="v1.23.17+k3s1"
I0416 18:57:06.111875    1338 dynamic_cafile_content.go:156] "Starting controller" name="client-ca-bundle::/var/lib/rancher/k3s/agent/client-ca.crt"
INFO[0005] Annotations and labels have already set on node: 8fb60a5
INFO[0006] Running kube-proxy --cluster-cidr=<IP_ADDRESS>/18 --conntrack-max-per-core=0 --conntrack-tcp-timeout-close-wait=0s --conntrack-tcp-timeout-established=0s --healthz-bind-address=<IP_ADDRESS> --hostname-override=8fb60a5 --kubeconfig=/var/lib/rancher/k3s/agent/kubeproxy.kubeconfig --proxy-mode=iptables
I0416 18:57:06.604015    1338 server.go:224] "Warning, all flags other than --config, --write-config-to, and --cleanup are deprecated, please begin using a config file ASAP"
INFO[0006] Starting the netpol controller version v1.5.2-0.20221026101626-e01045262706, built on 2023-03-10T21:33:49Z, go1.19.6
I0416 18:57:06.623003    1338 network_policy_controller.go:163] Starting network policy controller
I0416 18:57:06.626245    1338 proxier.go:652] "Failed to load kernel module with modprobe, you can ignore this message when kube-proxy is running inside container without mounting /lib/modules" moduleName="ip_vs_wrr"
I0416 18:57:06.631820    1338 proxier.go:652] "Failed to load kernel module with modprobe, you can ignore this message when kube-proxy is running inside container without mounting /lib/modules" moduleName="ip_vs_sh"
I0416 18:57:06.679697    1338 network_policy_controller.go:175] Starting network policy controller full sync goroutine
I0416 18:57:06.811294    1338 node.go:163] Successfully retrieved node IP: <IP_ADDRESS>
I0416 18:57:06.811465    1338 server_others.go:138] "Detected node IP" address="<IP_ADDRESS>"
I0416 18:57:06.895718    1338 server_others.go:206] "Using iptables Proxier"
I0416 18:57:06.896101    1338 server_others.go:213] "kube-proxy running in dual-stack mode" ipFamily=IPv4
I0416 18:57:06.896288    1338 server_others.go:214] "Creating dualStackProxier for iptables"
I0416 18:57:06.896494    1338 server_others.go:502] "Detect-local-mode set to ClusterCIDR, but no IPv6 cluster CIDR defined, , defaulting to no-op detect-local for IPv6"
I0416 18:57:06.898929    1338 server.go:656] "Version info" version="v1.23.17+k3s1"
I0416 18:57:06.911637    1338 config.go:444] "Starting node config controller"
I0416 18:57:06.912495    1338 shared_informer.go:240] Waiting for caches to sync for node config
I0416 18:57:06.911638    1338 config.go:226] "Starting endpoint slice config controller"
I0416 18:57:06.912773    1338 shared_informer.go:240] Waiting for caches to sync for endpoint slice config
I0416 18:57:06.911692    1338 config.go:317] "Starting service config controller"
I0416 18:57:06.912992    1338 shared_informer.go:240] Waiting for caches to sync for service config
I0416 18:57:07.013755    1338 shared_informer.go:247] Caches are synced for node config
I0416 18:57:07.113248    1338 shared_informer.go:247] Caches are synced for endpoint slice config
I0416 18:57:07.113317    1338 shared_informer.go:247] Caches are synced for service config

Debugging the crash
After manually loading the kernel modules one by one, We managed to identify the kernel module that causes the crash: nf_conntrack_netlink. The K3S agent starts fine with all the other kernel modules loaded but crashes the kernel as soon as it is started with the offending kmod loaded. This is of course not an issue with Calico, though I would highly appreciate some help with figuring out how the crash could
Expected Behavior
the calico-node pod should start and possibly throw other errors related to the missing kernel module.
Current Behavior
After I start k3s agent without nf_conntrack_netlink, it managed to join the cluster. However, as expected, Calico refuses to start but I am unsure of the reasons why, here is a bullet summary of what I managed to gather: the calico-node pod fails to start its first init-container flexvolidriver. While K8s fails to gather the logs from containerd, we observe a cryptic Destination directory /host/driver not present!? when starting the container using the k3s ctr utility to directly access containerd. This is the roadblock in calico's setup on the agent.
Kubectl describe calico-node output
Name:                 calico-node-k2gpr
Namespace:            calico-system
Priority:<PHONE_NUMBER>
Priority Class Name:  system-node-critical
Node:                 8fb60a5/<IP_ADDRESS>
Start Time:           Wed, 17 Apr 2024 14:36:31 -0500
Labels:               app.kubernetes.io/name=calico-node
                      controller-revision-hash=7f676f8bcd
                      k8s-app=calico-node
                      pod-template-generation=1
Annotations:          hash.operator.tigera.io/cni-config: d9bacb836c6a353943c41e4ffe971f36fbc78402
                      hash.operator.tigera.io/tigera-ca-private: 26433242d479d9686ab279672b73104ca069001c
Status:               Pending
IP:                   <IP_ADDRESS>
IPs:
  IP:           <IP_ADDRESS>
  IP:           2600:4041:5be7:6400:adbb:943f:c903:492c
Controlled By:  DaemonSet/calico-node
Init Containers:
  flexvol-driver:
    Container ID:
    Image:          docker.io/calico/pod2daemon-flexvol:v3.24.1
    Image ID:
    Port:           <none>
    Host Port:      <none>
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       StartError
      Message:      sandbox container "7efd1a9004167f93b06178010d01d3094544cdeb2f9e5495a804c1786563d82c" is not running
      Exit Code:    128
      Started:      Wed, 31 Dec 1969 18:00:00 -0600
      Finished:     Wed, 17 Apr 2024 16:47:32 -0500
    Ready:          False
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /host/driver from flexvol-driver-host (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-79ghs (ro)
  install-cni:
    Container ID:
    Image:         docker.io/calico/cni:v3.24.1
    Image ID:
    Port:          <none>
    Host Port:     <none>
    Command:
      /opt/cni/bin/install
    State:          Waiting
      Reason:       PodInitializing
    Ready:          False
    Restart Count:  0
    Environment:
      CNI_CONF_NAME:            10-calico.conflist
      SLEEP:                    false
      CNI_NET_DIR:              /etc/cni/net.d
      CNI_NETWORK_CONFIG:       <set to the key 'config' of config map 'cni-config'>  Optional: false
      KUBERNETES_SERVICE_HOST:  <IP_ADDRESS>
      KUBERNETES_SERVICE_PORT:  443
    Mounts:
      /host/etc/cni/net.d from cni-net-dir (rw)
      /host/opt/cni/bin from cni-bin-dir (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-79ghs (ro)
Containers:
  calico-node:
    Container ID:
    Image:          docker.io/calico/node:v3.24.1
    Image ID:
    Port:           <none>
    Host Port:      <none>
    State:          Waiting
      Reason:       PodInitializing
    Ready:          False
    Restart Count:  0
    Liveness:       http-get http://localhost:9099/liveness delay=0s timeout=10s period=10s #success=1 #failure=3
    Readiness:      exec [/bin/calico-node -bird-ready -felix-ready] delay=0s timeout=5s period=10s #success=1 #failure=3
    Environment:
      DATASTORE_TYPE:                      kubernetes
      WAIT_FOR_DATASTORE:                  true
      CLUSTER_TYPE:                        k8s,operator,bgp
      CALICO_DISABLE_FILE_LOGGING:         false
      FELIX_DEFAULTENDPOINTTOHOSTACTION:   ACCEPT
      FELIX_HEALTHENABLED:                 true
      FELIX_HEALTHPORT:                    9099
      NODENAME:                             (v1:spec.nodeName)
      NAMESPACE:                           calico-system (v1:metadata.namespace)
      FELIX_TYPHAK8SNAMESPACE:             calico-system
      FELIX_TYPHAK8SSERVICENAME:           calico-typha
      FELIX_TYPHACAFILE:                   /etc/pki/tls/certs/tigera-ca-bundle.crt
      FELIX_TYPHACERTFILE:                 /node-certs/tls.crt
      FELIX_TYPHAKEYFILE:                  /node-certs/tls.key
      FIPS_MODE_ENABLED:                   false
      FELIX_TYPHACN:                       typha-server
      CALICO_MANAGE_CNI:                   true
      CALICO_IPV4POOL_CIDR:                <IP_ADDRESS>/18
      CALICO_IPV4POOL_IPIP:                Always
      CALICO_IPV4POOL_BLOCK_SIZE:          28
      CALICO_IPV4POOL_NODE_SELECTOR:       all()
      CALICO_IPV4POOL_DISABLE_BGP_EXPORT:  false
      FELIX_VXLANMTU:                      1400
      FELIX_WIREGUARDMTU:                  1400
      CALICO_NETWORKING_BACKEND:           bird
      FELIX_IPINIPMTU:                     1400
      IP:                                  autodetect
      IP_AUTODETECTION_METHOD:             interface=wg-.*
      IP6:                                 none
      FELIX_IPV6SUPPORT:                   false
      KUBERNETES_SERVICE_HOST:             <IP_ADDRESS>
      KUBERNETES_SERVICE_PORT:             443
    Mounts:
      /etc/pki/tls/certs/ from tigera-ca-bundle (ro)
      /host/etc/cni/net.d from cni-net-dir (rw)
      /lib/modules from lib-modules (ro)
      /node-certs from node-certs (ro)
      /run/xtables.lock from xtables-lock (rw)
      /var/lib/calico from var-lib-calico (rw)
      /var/log/calico/cni from cni-log-dir (rw)
      /var/run/calico from var-run-calico (rw)
      /var/run/nodeagent from policysync (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-79ghs (ro)
Conditions:
  Type              Status
  Initialized       False
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  lib-modules:
    Type:          HostPath (bare host directory volume)
    Path:          /lib/modules
    HostPathType:
  xtables-lock:
    Type:          HostPath (bare host directory volume)
    Path:          /run/xtables.lock
    HostPathType:  FileOrCreate
  policysync:
    Type:          HostPath (bare host directory volume)
    Path:          /var/run/nodeagent
    HostPathType:  DirectoryOrCreate
  tigera-ca-bundle:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      tigera-ca-bundle
    Optional:  false
  node-certs:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  node-certs
    Optional:    false
  var-run-calico:
    Type:          HostPath (bare host directory volume)
    Path:          /var/run/calico
    HostPathType:
  var-lib-calico:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/calico
    HostPathType:
  cni-bin-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /opt/cni/bin
    HostPathType:
  cni-net-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /etc/cni/net.d
    HostPathType:
  cni-log-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /var/log/calico/cni
    HostPathType:
  flexvol-driver-host:
    Type:          HostPath (bare host directory volume)
    Path:          /usr/libexec/kubernetes/kubelet-plugins/volume/exec/nodeagent~uds
    HostPathType:  DirectoryOrCreate
  kube-api-access-79ghs:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              kubernetes.io/os=linux
Tolerations:                 :NoSchedule op=Exists
                             :NoExecute op=Exists
                             CriticalAddonsOnly op=Exists
                             node.kubernetes.io/disk-pressure:NoSchedule op=Exists
                             node.kubernetes.io/memory-pressure:NoSchedule op=Exists
                             node.kubernetes.io/network-unavailable:NoSchedule op=Exists
                             node.kubernetes.io/not-ready:NoExecute op=Exists
                             node.kubernetes.io/pid-pressure:NoSchedule op=Exists
                             node.kubernetes.io/unreachable:NoExecute op=Exists
                             node.kubernetes.io/unschedulable:NoSchedule op=Exists
Events:
  Type     Reason          Age                     From     Message
  ----     ------          ----                    ----     -------
  Normal   Created         41m (x2576 over 131m)   kubelet  Created container flexvol-driver
  Normal   Pulled          11m (x3434 over 131m)   kubelet  Container image "docker.io/calico/pod2daemon-flexvol:v3.24.1" already present on machine
  Warning  BackOff         6m2s (x3564 over 131m)  kubelet  Back-off restarting failed container
  Normal   SandboxChanged  62s (x7426 over 131m)   kubelet  Pod sandbox changed, it will be killed and re-created.

output of starting the flexvol container with containerd on the google coral dev board
$ k3s ctr --debug run docker.io/calico/pod2daemon-flexvol:v3.24.1 test-calico
Destination directory /host/driver not present!?

@JOUNAIDSoufiane do you have a kernel stack trace? Does it faul because of the missing module?

I am currently trying my best to get a call trace out of this. I'll post one as soon as I can. Is there, in the meanwhile, way to start calico without the nf_conntrack_netlink module. that specific module (which is cited as required for calico) happens to cause the crash when I start k3s agent.
When I start it without that module, k3s agent runs and joins the cluster but calico does not initialize, I have included logs above of how the calico-node init containers refuse to start

Destanation directory /host/driver not present

Comes from here https://github.com/projectcalico/calico/blob/master/pod2daemon/flexvol/docker-image/flexvol.sh#L55

the calico-node pod should start and possibly throw other errors related to the missing kernel module.

calicoctl checksystem check is you have all the prerequisities. Here is a list of the modules that calicoctl checks for currently.

Comes from here https://github.com/projectcalico/calico/blob/master/pod2daemon/flexvol/docker-image/flexvol.sh#L55
I think that is something created by k8s and it is just missing if you run it in the simplistic way as you do with k3s crt

I see, thank you for that clarification, here is my output of calicoctl check system
Checking kernel version...
		4.14.98-imx         					OK
Checking kernel modules...
		ip_tables           					OK
WARNING: Unable to detect the ipt_ipvs module as Loaded/Builtin module or lsmod
		ipt_ipvs            					FAIL
		xt_bpf              					OK
		ipt_rpfilter        					OK
WARNING: Unable to detect the ipt_set module as Loaded/Builtin module or lsmod
		ipt_set             					FAIL
		xt_set              					OK
		xt_u32              					OK
		ip6_tables          					OK
WARNING: Unable to detect the xt_rpfilter module as Loaded/Builtin module or lsmod
		xt_rpfilter         					FAIL
WARNING: Unable to detect the nf_conntrack_netlink module as Loaded/Builtin module or lsmod
		nf_conntrack_netlink					FAIL
		xt_icmp             					OK
		xt_multiport        					OK
WARNING: Unable to detect the vfio-pci module as Loaded/Builtin module or lsmod
		vfio-pci            					FAIL
		xt_addrtype         					OK
		xt_conntrack        					OK
		xt_mark             					OK
		ipt_REJECT          					OK
		xt_icmp6            					OK
		ip_set              					OK

I purposely unloaded nf_conntrack_netlink as it causes a crash when starting k3s agent with calico; as for the other missing modules, this [https://github.com/projectcalico/calico/issues/5263](GitHub issue) suggests that the command itself is outdated.
Furthermore, in relation to why calico-node is not starting. I doubt the issue is related to missing modules since the flexvol container in itself refuses to even start, at which point, calico itself has not really started yet to be able to complain?
This is all I could gather from k8s, I tried to lookup the message but hardly any concrete luck as to why this is not starting
Init Containers:
  flexvol-driver:
    Container ID:
    Image:          docker.io/calico/pod2daemon-flexvol:v3.24.1
    Image ID:
    Port:           <none>
    Host Port:      <none>
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       StartError
      Message:      sandbox container "7efd1a9004167f93b06178010d01d3094544cdeb2f9e5495a804c1786563d82c" is not running
      Exit Code:    128
      Started:      Wed, 31 Dec 1969 18:00:00 -0600
      Finished:     Wed, 17 Apr 2024 16:47:32 -0500
    Ready:          False
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /host/driver from flexvol-driver-host (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-79ghs (ro)

purposely unloaded nf_conntrack_netlink as it causes a crash when starting k3s agent with calico

Sure, but what is the cause? Buggy old kernel it seems. If you managed to start calico and k3s without conntrack, would you be ale to use policies meaningfully? I don't think so :shrug:
Any chance you can install a newer fixed kernel?

Right, it does seem like a buggy old kernel. I'm using Balena OS, I've put in a request for them to update the kernel version!
In the meanwhile I'll try outside of balena OS with a newer kernel provided by Google and let you know how that fares.

Did you make any progress? I am closing this issue now but feel free to reopen if you have new information.

Hi Tomas, Thank you for inquiring. I inevitably had to scrap the support plans for now and submitted an issue for Balena to update their coral-board-specific version of Balena-os to a more recent Linux that hopefully does not have issues with the kernel modules here.


Write a Swift program to find average of numbers

Description
Write a Swift program to find average of numbers
Average of numbers is the sum of all numbers divided by the number of numbers.
Input  : 1 2 3 4 5
Output : 3

How to contribute

Save the solution in FindAverageOfNumbers.swift file
Add FindAverageOfNumbers.swift file in find-average-of-numbers folder

!assign


⚠ API - Lens has degraded performance

In dbd30eb, API - Lens ($LENS_API_URL) experienced degraded performance:

HTTP code: 502
Response time: 339 ms

Resolved: API - Lens performance has improved in 3f2e258 after 5 minutes.


⚠ Spryr has degraded performance

In d539b2a, Spryr (https://spryr.com) experienced degraded performance:

HTTP code: 200
Response time: 3109 ms

Resolved: Spryr performance has improved in 8e8a44d after 15 minutes.


fix(hcl): count references not evaluating

This fixes issue where resources built with HCL were not able to fetch references for a non id or arn attribute if the resource had a count. For example a resource like:
resource "aws_ecs_service" "test" {
  count                              = 2
  name                               = "test"
  task_definition                = "${join("", aws_ecs_task_definition.default.*.family)}:${join("", aws_ecs_task_definition.default.*.revision)}"
  ...
}

would be unable to resolve the aws_ecs_task_definition. This was because the Plan JSON generated by the hcl_provider had some discrepancies. Especially in the configuration section of the plan JSON.

Resources were being added to the resources list in the configuration block and not being deduped for their index:

    [
        {
          "address": "aws_eip.test[0]",
          "mode": "managed",
          "type": "aws_eip",
          "name": "test[0]",
          "provider_config_key": "aws",
          "schema_version": 0,
          "count_expression": {
            "constant_value": 2
          }
        },
        {
          "address": "aws_eip.test[1]",
          "mode": "managed",
          "type": "aws_eip",
          "name": "test[1]",
          "provider_config_key": "aws",
          "schema_version": 0,
          "count_expression": {
            "constant_value": 2
          }
        }
   ]

should instead be:
[
      {
        "address": "aws_eip.test",
        "mode": "managed",
        "type": "aws_eip",
        "name": "test",
        "provider_config_key": "aws",
        "schema_version": 0,
        "count_expression": {
          "constant_value": 2
        }
      }
]

Expression which used a count would not contain the count in the references array:

  "expressions": {
    "launch_configuration": {
      "references": [
        "aws_launch_configuration.test[0]"
      ]
    }
  },

should be:
  "expressions": {
    "launch_configuration": {
      "references": [
        "aws_launch_configuration.test",
        "count.index"
      ]
    }
  },

recursive modules were not nesting in the planned resources or configuration sections. So they were all being assigned to the top-level module. This wasn't an issue per-say, however it was hard to compare Terraform JSON and HCL JSON to look for discrepancies

In order to fix the above I've:

added function expression evaluation, as this was not properly covered when evaluating references. Meaning expressions like coalesce(var.task_definition, "${join("", aws_ecs_task_definition.default.*.family)}:${join("", aws_ecs_task_definition.default.*.revision)}") would not evaluate to a reference.
Refactored the Evaluator to return a single Module with child Modules to more accurately represent the HCL config tree. This makes it easier to generate the plan JSON structure in the HCLProvider
Refactored the HCLProvider to generate the proper plan JSON structure.
Added tests to cover the HCLProvider to make sure that we are generating the correct output. This meant refactoring the Block generation process a little into a BlockBuilder struct that we can set a dynamic list of SetAttributesFunc on. This enables us to mock the uuid generation to keep it static for the test files. It also enables us in the future to build a list of SetAttributesFunc with each being specific to certain resources. E.g. aws_ecs_task_definition has an output attribute of revision which is generated on apply. We could generate this with a SetAttributesFunc which is scoped to just that resource.

Failing azure tests seem to be with an API change, not due to these changes.