Request: wrap current form in list and enter insert mode at head or tail

Hey friends,
vim-sexp has a bunch of "wrap current list in new X and enter insert mode at head/tail" actions. I frequently find myself wanting to wrap a form that produces a seq (in Clojure) and filter it, so I type \ifilter some-pred, which handles adding the wrapping list and putting me directly into insert mode to add the necessary function call. This can be accomplished already by using a surround plugin to select the current form and then add the surrounding brackets and then enter insert mode myself, but comparatively (with nvim-surround) I have to press va)S) and then either press i for the head or %i to reach the tail and enter insert mode.
(vim-sexp also includes wrapping in [/] and {/}, but that can be done once the initial work to build lists is done, which I suspect is the majority of cases.)
I don't know if this would be hard to implement or not, but I would greatly appreciate its inclusion.
Thank you!

Hey, I think what you are wanting to achieve can already be fully accomplished with our wrap + cursor API's.
See https://github.com/julienvincent/nvim-paredit?tab=readme-ov-file#vim-sexp-wrap-form-headtail-replication
We don't offer any default keymaps for this and stherefore it's a little more manual to configure, but I think it should do what you want.
Let me know if this isn't what you were looking for.

That looks like what I'm hoping to add, yes. Thank you.
As I've got you here, I'm hoping to mimic the <localleader>h and <localleader>l functionality as well, that jumps to insert mode within the current list/vector/etc at the start or end. I wrote the below based on wrap_enclosing_form_under_cursor but I'm not sure if it's the right way to do it.
local function insert_in_list(placement)
  return function()
    local lang = langs.get_language_api()
    local current_element = wrap.find_element_under_cursor(lang)

    if not current_element then
      return
    end

    local use_direct_parent = common.is_whitespace_under_cursor(lang)
      or lang.node_is_comment(ts.get_node_at_cursor())

    local form = wrap.find_form(current_element, lang)
    if not use_direct_parent and form:type() ~= "source" then
      form = wrap.find_parend_form(current_element, lang)
    end

    return paredit.cursor.place_cursor(
      form,
      { placement = placement, mode = "insert" }
    )
  end
end

paredit.setup({
  keys = {
    -- existing stuff

    ["<localleader>h"] = {
      insert_in_list("inner_start"),
      "Enter insert mode at head of current form"
    },
    ["<localleader>l"] = {
      insert_in_list("inner_end"),
      "Enter insert mode at tail of current form"
    },

At the moment we don't necessarily have a right way to do it haha. I think what you have produced is good but keep in mind that you are consuming some internals we haven't explicitly made public (yet) and so I can't promise we won't change them down the line.
But I do want to make these internals public at some point to allow for this kind of scriptability, at least in a more officially supported way!
@armed might be able to weigh in here a bit. Do we want to add some more API's to better support this use case?

Yep, we definitely need to expand API. Just need to be careful with a shape of it to avoid future breaking changes.

hey, @NoahTheDuke
Sorry for replying so late. I believe wrapping list with stuff and inserting cursor actually can be already done with an existing API:
      ["<localleader>wt"] = {
        function()
          paredit.wrap.wrap_enclosing_form_under_cursor("(doto ", " tap>)")
        end,
        "Wrap with doto tap>",
      },

      ["<localleader>i"] = {
        function()
          paredit.cursor.place_cursor(
            paredit.wrap.wrap_enclosing_form_under_cursor("( ", ")"),
            { placement = "inner_start", mode = "insert" }
          )
        end,
        "Wrap form insert head",
      },

      ["<localleader>I"] = {
        function()
          paredit.cursor.place_cursor(
            paredit.wrap.wrap_enclosing_form_under_cursor("(", ")"),
            { placement = "inner_end", mode = "insert" }
          )
        end,
        "Wrap form insert tail",
      },

example:
(+ 1| 1)

press <localleader>wt:
(doto (+ 1| 1) tap>)

Also for wrapping with curly and square brackets:
      ["<localleader>e["] = {
        function()
          paredit.cursor.place_cursor(
            paredit.wrap.wrap_element_under_cursor("[", "]"),
            { placement = "inner_start", mode = "insert" }
          )
        end,
        "Wrap form square insert head",
      },
      ["<localleader>e]"] = {
        function()
          paredit.cursor.place_cursor(
            paredit.wrap.wrap_element_under_cursor("[", "]"),
            { placement = "inner_end", mode = "insert" }
          )
        end,
        "Wrap form square insert tail",
      },

      ["<localleader>e{"] = {
        function()
          paredit.cursor.place_cursor(
            paredit.wrap.wrap_element_under_cursor("{", "}"),
            { placement = "inner_start", mode = "insert" }
          )
        end,
        "Wrap form curly insert head",
      },
      ["<localleader>e}"] = {
        function()
          paredit.cursor.place_cursor(
            paredit.wrap.wrap_element_under_cursor("{", "}"),
            { placement = "inner_end", mode = "insert" }
          )
        end,
        "Wrap form curly insert tail",
      },

is this what you looking for?

what we are missing though is unwrap API, which is I'm going to implement soon

what we are missing though is unwrap API, which is I'm going to implement soon

Which we now have thanks @armed :) I think this can probably be closed out then, or is there still something left to action?

Yep, can be closed

Apologies for my own late reply lol. I tried out your suggested code and then forgot to comment! Two thoughts:

paredit.wrap.wrap_element_under_cursor is great except that it currently doesn't work when over whitespace: (1 2| 3) -> (| (1 2 3)) but (1 2 |3) -> (1 2 |3) Is there any way to fix this? I suspect it has to do with is_whitespace_under_cursor or something, but I've not dug in deep enough.

I've modified your recommended <leader>i and <leader>I mappings to work on the current form if directly on it. I don't know if this is something you want to replicate or support, but I find it very annoying to have to move inside of a form to be able to wrap it, instead of having that happen as I anticipate.

With your suggested binding: (1 2 (|3 4) 5) -> (| (1 2 (3 4) 5))
With my changes: (1 2 (|3 4) 5) -> (1 2 (| (3 4)) 5)

local function enclosing_wrapper_maker(brackets, placement)
  return function()
    -- If the node is a "form", then treat it like an element: (|1 2 3) -> (| (1 2 3))
    if clj.node_is_form(ts.get_node_at_cursor()) then
      paredit.cursor.place_cursor(
        paredit.wrap.wrap_element_under_cursor(unpack(brackets)),
        { placement = placement, mode = "insert" }
      )
    -- Otherwise, wrap the surrounding form: (1 2| 3) -> (| (1 2 3))
    else
      paredit.cursor.place_cursor(
        paredit.wrap.wrap_enclosing_form_under_cursor(unpack(brackets)),
        { placement = placement, mode = "insert" }
      )
    end
  end
end

paredit.setup({
  ...
  keys = {
    ["<localleader>i"] = {
      enclosing_wrapper_maker({"( ", ")"}, "inner_start"),
      "Wrap form round, insert head",
    },
    ["<localleader>I"] = {
      enclosing_wrapper_maker({"(", " )"}, "inner_end"),
      "Wrap form round, insert tail",
    },
  ...
  }
})

@NoahTheDuke that's a valid point. Personally I'm pretty comfortable with both solutions (not a heavy user of that keybindings though, so no muscle memory), if @julienvincent doesn't have anything against it then I'll advice you to make a PR :)

Oh wait, those keybindings not in the defaults list - not the part of a plugin, they are described in the recipes section. So we can just update recipes section.

To be honest, I think these keybindings should probably just be added as defaults to nvim-paredit. @armed any objection to that?

With the recent updates to nvim-paredit now relying on treesitter queries, what's the best way to update the code I have?

Hey - sorry for breaking your workflow!
Assuming the only internals you were using is the ones listed here: https://github.com/julienvincent/nvim-paredit/issues/35#issuecomment-1735739956 then you should be able to alter it as such:
local ts_context = require("nvim-paredit.treesitter.context")
local ts_forms = require("nvim-paredit.treesitter.forms")
local ts_utils = require("nvim-paredit.treesitter.utils")
local whitespace = require("nvim-paredit.api.whitespace")

local function insert_in_list(placement)
  return function()
    local context = ts_context.create_context()
    if not context then
      return
    end

    local current_element = ts_forms.get_node_root(context.node, context)
    if not current_element then
      return
    end

    local use_direct_parent = whitespace.is_whitespace_under_cursor() or ts_utils.node_is_comment(current_element, context)

    local form = ts_forms.find_nearest_form(current_element, {
      captures = context.captures,
      use_source = false,
    })
    if not form then
      return
    end

    if not use_direct_parent and form:type() ~= "source" then
      form = wrap.find_parent_form(current_element, context)
    end

    return paredit.cursor.place_cursor(form, { placement = placement, mode = "insert" })
  end
end

Let me know if that doesn't work for you.
I also realized I need to update the recipes in the docs which are still using the old API.

This is all the more reason to make this usage a public API I suppose.


SDK v1.6.1, npm package updates, firefox crash bug fix

Description of changes:

Player SDK updated to v1.6.1
NPM package updates
Added a null check to currentSpeaker in chimeWeb settings to fix Firefox crash when settings panel was opened

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

LGTM. Thank you for the PR! Will merge and close.


MM-33237 Update webpack-livereload-plugin

The latest version of webpack-livereload-plugin didn't support Webpack 5 as of last week, but this new one does.
Ticket Link
https://mattermost.atlassian.net/browse/MM-33237

@hmhealey Is this something that has to go in for today's cloud release? How will this affect customers?

@amyblais This won't affect customers. It's another fix just for the development build. It's not even as important for cherry-picking for people working off the cloud branch since it's for an optional feature that is easy to turn off.

Skipping QA review for that same reason.


RunAsync not returning when supplied CancellationToken cancelled

Hi, I have some more information around this issue:
https://github.com/aspnet/Hosting/issues/1474
I was using IWebHost.RunAsync(stop) and cancelling in a Console.CancelKeyPress handler.  Intermittently, this would fail: it would hang rather than return.
However I found another issue - I wasn't setting the Cancel flag in the CancelKeyPress handler, so the default behaviour is that the app would be exited.  Strangely I would have thought this would have meant less hangs, but running in VS at least, the program wouldn't exit, and it wouldn't return from RunAsync.  This was incorrect, I wanted to set Cancel, so the process doesn't automatically exit, but I can control it.
Now I'm setting Cancel in that handler, things close down naturally every time.  RunAsync returns just fine.

So everything is working as expected now?

I think so, but I wasn’t sure if its as expected - when using Ctrl-C to signal a cancel, but not cancelling in the event handler via setting the Cancel prop, the process hangs.

Something isn't getting unblocked and breaking into the debugger should show what that is. However, since we know how to do it correctly it's not worth chasing.
Also, why are you implementing CancelKeyPress yourself? RunAsync() already does that.

Closing this as we haven't heard from you. Please feel free to comment if you're able to get the information we're looking for and we can reopen the issue if we're able to identify the problem.


Golden Image: ROOT and SNIFFER.

This source code will be used as the golden image presents on plugtest of IETF 93th meeting.

Per out discussion on the call today, this PR is not meant to be merged into the main repo as-is, at it would break the operation of regular motes.


Using a related field in Snippet/ModelViewSet causes exception when index list requested

Issue Summary
When referencing a related model field in a SnippetViewSet or ModelViewSet, requesting the index view causes an exception because the column label cannot be determined.
Specifically, it fails within the Django label_for_field() function:
Traceback (most recent call last):
  File ".../.venv/lib/python3.10/site-packages/django/db/models/options.py", line 673, in get_field
    return self.fields_map[field_name]
KeyError: 'full_featured.text'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".../.venv/lib/python3.10/site-packages/django/contrib/admin/utils.py", line 333, in label_for_field
    field = _get_non_gfk_field(model._meta, name)
  File ".../.venv/lib/python3.10/site-packages/django/contrib/admin/utils.py", line 302, in _get_non_gfk_field
    field = opts.get_field(name)
  File ".../.venv/lib/python3.10/site-packages/django/db/models/options.py", line 675, in get_field
    raise FieldDoesNotExist(
django.core.exceptions.FieldDoesNotExist: SnippetChooserModel has no field named 'full_featured.text'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".../wagtail/snippets/tests/test_viewset.py", line 748, in test_snippetchoosermodel_related_fields
    response = self.client.get(self.get_url("list"))
  File ".../.venv/lib/python3.10/site-packages/django/test/client.py", line 836, in get
    response = super().get(path, data=data, secure=secure, **extra)
  File ".../.venv/lib/python3.10/site-packages/django/test/client.py", line 424, in get
    return self.generic(
  File ".../.venv/lib/python3.10/site-packages/django/test/client.py", line 541, in generic
    return self.request(**r)
  File ".../.venv/lib/python3.10/site-packages/django/test/client.py", line 810, in request
    self.check_exception(response)
  File ".../.venv/lib/python3.10/site-packages/django/test/client.py", line 663, in check_exception
    raise exc_value
  File ".../.venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  File ".../.venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File ".../.venv/lib/python3.10/site-packages/django/views/decorators/cache.py", line 62, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File ".../wagtail/admin/urls/__init__.py", line 180, in wrapper
    return view_func(request, *args, **kwargs)
  File ".../wagtail/admin/auth.py", line 167, in decorated_view
    response = view_func(request, *args, **kwargs)
  File ".../.venv/lib/python3.10/site-packages/django/views/generic/base.py", line 78, in view
    self.setup(request, *args, **kwargs)
  File ".../wagtail/admin/views/generic/models.py", line 111, in setup
    self.columns = self.get_columns()
  File ".../wagtail/snippets/views/snippets.py", line 180, in get_columns
    *super().get_columns(),
  File ".../wagtail/admin/views/generic/models.py", line 336, in get_columns
    column = self._get_custom_column(field)
  File ".../wagtail/admin/views/generic/models.py", line 309, in _get_custom_column
    label, attr = label_for_field(field_name, self.model, return_attr=True)
  File ".../.venv/lib/python3.10/site-packages/django/contrib/admin/utils.py", line 361, in label_for_field
    raise AttributeError(message)
AttributeError: Unable to lookup 'full_featured.text' on SnippetChooserModel

Steps to Reproduce

Clone the wagtail branch at https://github.com/dkirkham/wagtail/commit/e942cae55fe7e8324eca942b29638c2af9551f48 within a working Wagtail development environment
Run the test: python runtests.py wagtail.snippets.tests.test_viewset.TestRelatedFieldColumns
Note the crash backtrace in the test report.

Background
I've found myself wanting to refer to fields within related models within ModelViewSet index lists. This is because the __str__ methods in those referenced models often include other contextual information which is useful in other circumstances, but too much for the index list (which often has that context in adjacent columns). I'd also like to avoid creating extra methods in models to access related model fields.
I (perhaps naïvely) tried using list_display = ["field__related_field"] a format which works in search_fields and ordering, but this fails. Digging into the code, list_display ultimately uses multigetattr() as the data accessor which reproduces template semantics using dot-separated fields: list_display = ["field.related_field"]. Neither format however works to automatically obtain a column label.
It is possible to use the Column() class to directly provide a label: list_display = [Column("field.related_field", label="Related Field")]

I have confirmed that this issue can be reproduced as described on a fresh Wagtail project: (no)
I have confirmed that this issue can be demonstrated in a Wagtail test case: (yes)

Is it a bug? The fact that there is code to allow access to the related field data, but the code fails trying to work out the column name would suggest so. The generality of the multigetattr() data accessor might be difficult to reproduce when finding the label, so the workaround using Column() may be an acceptable and more dependable solution. If so, it might be useful to both detect the failure to find a label and raise this as a warning or configuration error, rather than failing when the index list is requested; and to document the preferred solution.
Technical details

Python version: 3.10, but likely not relevant.
Django version: 4.0.10 and 4.2.8, probably others.
Wagtail version: 5.2 and wagtail#main
Browser version: irrelevant

Working on this
I've started a branch with the test demonstrating the failure. I haven't yet started looking to see if an automatic method of determining the label for a related field is possible.

Anyone can contribute to this. View our contributing guidelines, add a comment to the issue once you’re ready to start.

I cloned the repo and can confirm that the test fails. I am going to try to take a deep dive into the issue.

I don't know if this is a correct conclusion, but I think what happens is when label_for_field get called, it is given two arguments, the field name and the model. What happens during your test case is label_for_field receives full_featured.text in field name, and SnippetChooserModel for the model parameter. What causes the error is that there is no field called full_featured.text in SnippetChooserModel, which is correct. It will only work in way when label_for_field is passed full_featured.__class__ is pased in the model parameter, since label_for_field can only access the models fields only. Feel free to correct me, I may be to totally wrong.

This fixes it for me, i'll figure proper namings and submit a pull request
    def _get_custom_column(self, field_name, column_class=Column, **kwargs):
        field_name_list = field_name.split(".")

        field_name = field_name_list[0]
        model = self.model

        if len(field_name_list ) > 1:
            field_name = field_name_list[0]
            foreign_field_name = field_name_list[1]

            foreign_relation = getattr(self.model, field_name)

            field_name = foreign_field_name
            model = foreign_relation.field.related_model

        label, attr = label_for_field(field_name, model, return_attr=True)

        sort_key = getattr(attr, "admin_order_field", None)

        # attr is None if the field is an actual database field,
        # so it's possible to sort by it
        if attr is None:
            sort_key = field_name

        return column_class(
            field_name,
            label=capfirst(label),
            sort_key=sort_key,
            **kwargs,
        )

While I agree that this would be great to have, we've never publicly documented that this is possible, so I'm inclined to mark this as an enhancement, not a bug.
As you mentioned, the other properties like search_fields and ordering uses the lookup format (__), so I think we should use the same format in list_display.
The multigetattr is an implementation detail of the Column class, not the list_display attribute, so I think we shouldn't be constrained with what that function supports. We could pre-process list_display to split by the lookup separator __ so it correctly retrieves the label for related fields, but maybe convert it to use . in the Column accessor.
For background, list_display is a higher-level abstraction on top of the Column class, to ease transition from Wagtail's legacy ModelAdmin. Wagtail's ModelAdmin is largely inspired from Django's ModelAdmin, and the latter just added support for related lookups two weeks ago (!): https://github.com/django/django/pull/17357
Django also uses the __ format, so we have another good reason to use it.

Happy to see this as an enhancement request, @laymonage. I think having __ as the lookup separator consistently across the API is a desirable outcome, and clearly the Django team think so too.
Thanks @abdlrhman08 for preparing the PR.


Implement write capabilities for arrays using linear types

WIP

Here's an attempt at implementing read-capability inference (I still need to add back in write, but I think it should be way simpler than read to add back in). Concerned it might be inefficient/too ad hoc and gross, but I couldn't think of a better way to do it. The gist of the implementation is this:

For any expressions in CApps, CIfs, CReassigns, CAssigns, and CFors, check for any subexpressions that require read capabilities (namely EAAs and EBankedAAs), and then transform these commands to CSeqs containing any necessary read capabilities and then finally the old commands.
Maintain a context that keeps track of expressions that already have capabilities generated for them, because we don't want to generate multiple.


common: add assert for zero base interval

Signed-off-by: Rama<EMAIL_ADDRESS>Description: Passing zero base_interval causes JitteredBackOffStrategy to crash with floating point error. This PR adds ASSERT to check that upfront.
Risk Level: Low
Testing: Existing tests
Docs Changes: N/A
Release Notes:N/A

@htuch a minor ASSERT addition, can you PTAL?


RFC: Hybrid implicit/explicit state

I'm creating this issue to propose an enhancement over how we pass state to components. Instead of having to pass it for all components, we would only need to pass it to the top-level ones.
For example, currently we have to pass the state to all instances of MenuItem inside Menu:
const state = useMenuState();

<MenuButton {...state}>Open menu</MenuButton>
<Menu {...state}>
  <MenuArrow {...state} />
  <MenuItem {...state}>Item 1</MenuItem>
  <MenuItem {...state}>Item 2</MenuItem>
  <MenuSeparator {...state} />
  <MenuItem {...state}>Item 3</MenuItem>
</Menu>

I'm proposing that we improve this so we don't need to explicitly pass state to MenuItem instances anymore. It would leverage React Context and subscribe to state changes internally.
const state = useMenuState();

<MenuButton {...state}>Open menu</MenuButton>
<Menu {...state}>
  <MenuArrow />
  <MenuItem>Item 1</MenuItem>
  <MenuItem>Item 2</MenuItem>
  <MenuSeparator />
  <MenuItem>Item 3</MenuItem>
</Menu>

Note: MenuItem should keep accepting state being passed directly as props for this reason. But it wouldn't be required anymore.
Motivation
Besides being easier to write code like that, it would also make it easier to colocate state.
In our Menu example, all MenuItem components will re-render when state gets updated. But if we abstract the state into a separate component that receives children, they won't re-render:
import {
  useMenuState,
  Menu as BaseMenu,
  MenuButton,
  MenuItem,
} from "reakit/Menu";

function Menu({ button, ...props }) {
  const state = useMenuState();
  return (
    <React.Fragment>
      <MenuButton {...state} ref={button.ref} {...button.props}>
        {(buttonProps) => React.cloneElement(button, buttonProps)}
      </MenuButton>
      <BaseMenu {...state} {...props} />
    </React.Fragment>
  );
}

function App() {
  return (
    <Menu button={<button>Open menu</button>}>
      <MenuItem>Item 1</MenuItem>
      <MenuItem>Item 2</MenuItem>
      <MenuItem>Item 3</MenuItem>
      ...
      <MenuItem>Item 500</MenuItem>
    </Menu>
  );
}

I like this for the simple fact that it's non obvious how to create this in userland in a maintainable way at the moment. More specifically I don't think it's intuitive which props would need to be put into context. I guess you could read _keys but that seems hacky?
I find it interesting how this proposal interacts with #744. On one hand #744 makes it easier to accomplish this RFC in userland, but on the other hand I think this RFC is easier to teach/learn/document in combination with #744. You would just have to know "the singular state prop is passed down via context automatically"

Forgetting #744 for now, would this proposal support passing some state values as props and grabbing some from context? Which one takes priority?
I have concerns about how this could be implemented in a performant way, although I'm not 100% sure how valid these concerns are. Right now the state props are memoized, so don't cause a rerender of the component when they are the same. How is this possible when supporting both props and context at the same time?

Forgetting #744 for now, would this proposal support passing some state values as props and grabbing some from context? Which one takes priority?

I don't think it should be supported. This would make the implementation a lot more complex and if we go for #744 this wouldn't work at all.

I have concerns about how this could be implemented in a performant way, although I'm not 100% sure how valid these concerns are. Right now the state props are memoized, so don't cause a rerender of the component when they are the same. How is this possible when supporting both props and context at the same time?

There are two situations where I think the state props would still be used on inner components:

When you can't access the context because components are in different subtrees (like in the WordPress SlotFill case).
When you want to benefit from types based on the state.

The implementation I imagine being something like this (simplified and considering #744):
function CompositeItem({ state: stateFromProps, ...props }) {
  const context = React.useContext(CompositeContext);
  const state = stateFromProps || context;
  ...
}

The problem with passing context this way is that you can't bail out from rendering based on context slices. That is, this component would re-render every time the composite state is updated, even when the change doesn't affect the component. With props, we can just use React.memo:
https://github.com/reakit/reakit/blob/6f6d1ad9177156cafa4adf9c987a43c79a1bbb90/packages/reakit/src/Composite/CompositeItem.ts#L88-L110
But I would like to try it with a subscription-based state (which is what's being done in the here).
Instead of returning a new context value every time the state gets updated, we would return only the initial state with a  subscribe method. This way, the consumer (say CompositeItem) would be able to listen to specific parts of the state:
function CompositeItem({ state: initialState, ...props }) {
  const initialContext = React.useContext(CompositeContext);
  const [state, setState] = React.useState(initialState || initialContext);

  React.useEffect(() => {
    return state.subscribe((prevState, nextState) => {
      if (props.id === prevState.currentId || props.id === nextState.currentId) {
        // It means that this element is the previous or the next focused item, so we
        // should re-render it with updated state.
        setState(nextState);
      }
    });
  }, [state.subscribe, props.id]);

  ...
}

Both state from props and from context would have this subscribe method, so we could just ignore other state changes.
Even in React.memo:
function propsAreEqual(prev, next) {
  const { state: prevState, ...prevProps } = prev;
  const { state: nextState, ...nextProps } = next;
  return shallowEqual(prevProps, nextProps);
}

There are two things I'm concerned though:

Concurrent mode. But this CodeSandbox example is using concurrent mode and everything seems to work fine. If this becomes a problem, I think we could leverage useMutableSource.

Although I think it would be a very rare case, what if the user wants to pass a different state object after the first render? In the implementation I shared above it wouldn't work.

Anyway, I think this context-based state is only worth it if we can use this subscription-based state.

Interesting. I've been wrapping Reakit components for my own internal projects, effectively #744 and #745 combined:
const MenuContext = React.createContext()

export const Menu = ({state, ...props}) => (
  <MenuContext.Provider value={state}>
    <RK.Menu {...state} {...props} />
  </MenuContext.Provider>
)

const MenuItem = ({state, ...props}) => {
  const context = React.useContext(MenuContext)
  return <RK.MenuItem {...(state || context)} {...props} />
}

const MenuSeparator = ({state, ...props}) => {
  const context = React.useContext(MenuContext)
  return <RK.MenuSeparator {...(state || context)} {...props} />
}

const MenuTrigger = ({state, ...props}) => {
  const context = React.useContext(MenuContext)
  return <RK.MenuButton {...(state || context)} {...props} />
}

// etc.

@agriffis out of interest, how are you currently seperating props and state?

@tom-sherman I'm not sure I understand the question. With my wrappers, only <Menu /> receives the state prop, i.e. the result of useMenuState. The sub-components generally don't receive a state prop, so they fall back to the menu state in context. But since these are just wrappers, I still have to spread that into the wrapped components for now.


Allow setting more IPMI options per target

Specifically, allow setting the IPMI driver and privilege level. Can be
set both in the "default" target as well as overridden per target. The
example config has examples, see man 5 freeipmi.conf for more details
about these settings.
THIS COMMIT CHANGES THE CONFIG FORMAT IN A NON-BACKWARDS-COMPATIBLE WAY!
Even though compatibility would have been technically possible, the
semantics of the "credentials" section would not match the name anymore,
certainly leading to more confusion in the long run. Best to break
things as early as possible. At least there is a friendly hook in the
config parser telling you pretty precisely what to do.
This fixes #10 by allowing to set the default privilege level.
@grobie @beorn7 @SuperQ :eyes: :question:

Hrm, I'm not sure I like where this is going.
I think I would prefer something that worked more like the blackbox/snmp style where you explicitly specify a module url param.
modules:
  default:
    user: "default_user"
    pass: "example_pw"
  dell:
    pass: "dell_pw"

You can still expand a per-host method this way, but it allows for Prometheus jobs like this:
- job_name: dell
  params:
    module: dell
  ...

I see. This would avoid replicating all the host information into the config. @bitfehler What do you think about @SuperQ 's idea?

Closing this in favor of #17


Data passed to template does not update per action in array

I'm prompting the user to write a comma-separated list of components to generate, parsing them into an array, then pushing to the actions array with the name of the component specified in the data parameter. All of these components use the same template, and I'm relying on the data I'm changing to differentiate them. Unfortunately, the data doesn't seem to be updated when it is passed to the next item in the actions array.
    ...
    console.log(subcomponents) // [ 'MyComponentFoo', 'MyComponentBar' ]

    if (subcomponents) {
      subcomponents.forEach((subcomponent) => {
        actions.push({
          type: 'add',
          path: `../../components/{{ properCase name }}/${subcomponent}.vue`,
          templateFile: './component/subcomponent.vue.hbs',
          abortOnFail: true,
          data: {
            subcomponent,
          },
        })
      })
    }

When logging my actions array, I see the expected data is placed in these items:
  {
    "type": "add",
    "path": "../../components/{{ properCase name }}/MyComponentFoo.vue",
    "templateFile": "./component/subcomponent.vue.hbs",
    "abortOnFail": true,
    "data": {
      "subcomponent": "MyComponentFoo"
    }
  },
  {
    "type": "add",
    "path": "../../components/{{ properCase name }}/MyComponentBar.vue",
    "templateFile": "./component/subcomponent.vue.hbs",
    "abortOnFail": true,
    "data": {
      "subcomponent": "MyComponentBar"
    }
  }

In my subcomponent.vue.hbs template, I'm referencing the subcomponent data I'm passing:
{{ subcomponent }}

Since I used a template literal* to create the path, both files are generated, but both files end up with MyComponentFoo as their contents. It seems that subsequent data specifications don't override earlier ones.
*(Attempting to use {{ subcomponent }} as a handlebars template in the path instead of using a template literal failed because it attempted to create MyComponentFoo.vue twice.)

I've been looking at this due to @apurvaojas posting this issue on node-plop as well and I have 2 possible solutions that I'd like to get feedback on.

Attach data to the answer data under a .data property instead of mixing the data in.
Mix data into the main answer data and always override anything that overlaps.

both of these options break the existing contract, so we would probably need to increment the major version number (which is fine, but something to note).

the more I'm thinking about this, the more I'm leaning toward a data property that can be accessed by the template.

Both of them seem like decent solutions.
Some brainstorming:

I wonder if #1 would cause the need to read or write to data.data in the data method of an actions object. The current documentation does name the answer-data data when you pass it into the actions method, and if someone were to do something like you showed me above, you might end up in that somewhat awkward position.
I'm assuming based on the way you describe it that #1 would require the template to have things like {{#if data.subcomponents}} instead of {{#if subcomponents}}. If that's the case, #1 has another drawback: it forces the template to care about whether its data was constructed directly by inquirer prompts or derived afterward. Needing to care for that kind of discrepancy could potentially limit reuse (or impose certain coding patterns that enable reuse, like always explicitly assigning answer data to the data object and always using data.thing in the templates).

#2 sounds like how I assumed it'd work. My assumption is that it'd override per object that declares the override and reset back to its original value for any object in the actions array that doesn't explicitly override it. Personally, I think I prefer this method as it seems cleanest for the templates.

While reading your brainstorming points above, I came up with an option 3 that checks all the boxes. We can add some logic to "clean up" any attributes that were added by the data object after the action completes. I actually don't think this even breaks the existing contract because don't believe that there was any expectation that the values provided in the data prop should persist to future actions. If anything, the fact that they persisted was the defect.

There is a test case in node-plop which expect data prop to persist in future actions.
If this is a bug then this solution can work.

The solution I came up with does not break this test, I'll explain through an example.
plop.setGenerator('test', {
  prompts: [{
    type: 'input',
    name: 'fromInquirer'
  }],
  actions: [
    {
      type: 'add',
      data: {
        fromInquirer: 'not applied',
        fromData: 'A'
      }
    },
    data => data.mutated = 'true',
    {
      type: 'add',
      data: {
        mutated: 'not applied',
        fromData: 'B'
      }
    }
  ]
});

In the example above:

data.fromInquirer in the action 1 does not get applied because the action data properties are not allowed to overwrite prompt data.
data.fromData is applied and then cleaned up after the action completes.
action 2 is a custom action function that mutates the main data object, these changes are persisted to action 3.
data.mutated in action 3 is not applied because mutated from action 2 is treated the same as prompt data.
data.fromData in action 3 is applied and then cleaned up after the action completes.

clear as mud?

Interesting. I'd never considered mixing functions that manipulate data with the action objects.
Would this overwrite the inquirer prompt-provided data?
plop.setGenerator('test', {
  prompts: [{
    type: 'input',
    name: 'fromInquirer'
  }],
  actions: [
    data => data.fromInquirer = 'true',
    {
      type: 'add',
      data: {
        fromInquirer: 'false',
      }
    }
  ]
});

The function would, the data array would not. fromInquirer would be "true" during the second action (add).

fixed in node-plop v0.18.0, this change will make its way into the next version of plop soon

fixed in v2.3.0, now available on npm


Develop

Purpose

How does the solution address the problem

Changes made

just formatting changes...

prnet cleaned-up successfully


Enable Snippets in F#

Could you enable Snippet service for F#
http://apollo13cn.blogspot.com/2012/06/f-code-snippet-visual-studio-2012-addon.html
Like it was done by this guy.
And provide a latest set of snippets from
http://fsharpcodesnippet.codeplex.com/
With Power Tools
I already asked Tao Liu to open source its extension.
I don't know if it is a good or bad idea to include them into power tools. So what do you think?

In general, we welcome any PR adding unmaintained F# extensions to VFPT. However, the PR has to go through scrutiny so that the new part is in harmony with the rest of the code base. I'm not sure anyone wants to take that challenge for F# snippets.

I agree. I've never used snippets and never met a person who uses them.

We are managing feature requests on User Voice.


feat: added bridgr and citera

:tada: This PR is included in version 2.5.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


We should cache resources enumeration

Description
Sometimes we enumerate multiple time the same kind of resource, for example S3 buckets enumeration is done in  S3BucketMetricSupplier, etc ...
We want to cache resources enumeration in the repository layer.
It will also ensure atomicity during a scan for AWS endpoints that have inconsistency.
Technical details
We want to have a global cache mechanism that is used in multiple repositories.
We want to use the caching layer only for resources that are enumerated multiple time.

looks very trustable to me :)


timezone: Correct common_timezones dictionary

The changes are as follows:

Fix one day offset in all western zones.
Correct CST from -64800 to -21600 and CDT from -68400 to -18000.
Disambiguate PST in favor of -28000 over +28000.
Add GMT, UTC, WET, previously excluded for being at offset 0.
Add ACDT, AEDT, AKST, MET, MSK, NST, NZDT, PKT, which the previous code did not find.
Remove numbered abbreviations -12, …, +14, which are unnecessary.
Remove MSD and PKST, which are no longer used.

Hardcode the dict and verify it with a test, so that future discrepancies won’t go silently unnoticed.

lgtm

lgtm


docs: fix typo in the get_crimes route

Description
This PR fixes #835
Ensure query parameter is treated as a string to fix default value handling issue

Hey @Amaljyothi44 👋
Thanks for the PR . Could you please change the title to follow conventional commits syntax ? https://www.conventionalcommits.org/en/v1.0.0/

@sansyrox title changed

Hey @Amaljyothi44 👋
Fixed it :D


Cannot install wakatime with pip

Getting this errror:
Could not fetch URL https://pypi.python.org/simple/wakatime/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:661) - skipping
  Could not find a version that satisfies the requirement wakatime (from versions: )
No matching distribution found for wakatime

That's a networking issue. Try installing again and it should work.


Remove python warnings

Use logging of the component
No R1 is expected, so its just debug level
No DL0 is not expected, so keep it as warning
Fixes #2407

Ah sorry, apparently I did not have my pre-commit set up

Maybe it's not for this PR, but the overall behavior here should be updated to be more in line with how we do the DL1 and DL2 steps. In ctapipe-process, we have methods like should_compute_dl1() that determine if the DL0→DL1 transition should happen or not depending on the existence of pre-existing DL1 or the user specifying it to be recomputed, and same with should_compute_dl2().    It would make more sense to have the same thing for DL0:  if DL0 already exists, there should be no need for a warning, but the user should have the option to force re-computing it if and only if R1 also exists.
That way all transitions are handled in the same way, and you only need to deal with the case if the user asks explicitly for a transformation to be re-computed, but the previous data level doesn't exist in the input.  And in that case it's not even a warning, but an error that should stop processing.


WIP: Affine gap

This enables affine gap scoring.

The pull request is getting close to merging. Once the tests are passing, we will merge it in.

Overall, it looks like this PR is working. But the summary stats need to be resolved before merging
https://github.com/mortonjt/garfunkel/issues/55

Finally!  Merging this in.


fetch the globalDatasources

This PR is proposing a way to get the GlobalDatasources from the Perses backend.
Globally it just changes a bit how to select a datasource and refactor the datamodel of the Datasource (and the PrometheusDatasource)
It is still in progress as I would like to implement the way the frontend should use the Perses backend as a proxy to contact the Datasource (of course depending of the datasource configuration)
I'm still opening the PR to have your thought on the actual work.
Note that after this PR, using the Perses backend will be mandatory. Otherwise, the frontend won't be able to have access to the datasource definition.
Signed-off-by: Augustin Husson<EMAIL_ADDRESS>

Looks good! I'm still trying to wrap my head around a lot of it though.
What does this mean for local development / does anything need to be updated in CONTRIBUTING.md?

no issue @sjcobb don't worry :).
Before this PR, if you didn't run the backend, you could still see the chart filled.
After this PR, if you don't run the backend, well you will have an error for each charts displayed saying it cannot get the data.
So it becomes a bit mandatory to run the backend for the development.

I'm squashing this PR as I'm feeling the questions raised here shouldn't be solved in this PR but probably in a deep refactoring.
Happy to continue the discussion even if it's merged of course !

Yeah, totally cool to merge. ❤  Sorry I didn't respond sooner. We can always refactor if necessary!


Add e2e test pipeline for triggering the e2e tests of the project

Description
This PR adds e2e test pipeline for triggering the e2e tests of the project
Type of change

[ ] Refactor
[ ] New feature
[ ] Bug fix
[ ] CVE fix
[ ] Optimization
[ ] Documentation Update
[ ] Configuration Update
[ ] Bump-up dependent library
[ ] Bump-up library or tool used for development (does not change the final image)
[x] CI configuration change
[ ] Konflux configuration change

Related Tickets & Documents
Jira issue: AAP-37403
Checklist before requesting a review

[x] I have performed a self-review of my code.
[ ] PR has passed all pre-merge test jobs.
[ ] If it is a core feature, I have added thorough tests.

Testing

Please provide detailed steps to perform tests related to this code change.
How were the fix/results from this change verified? Please provide relevant screenshots or results.

Converting this to a draft upon our discussion with @jameswnl


Fix visual tests

Codecov Report

Merging #107 (fbc6a0f) into master (e83c412) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #107      +/-   ##
==========================================
- Coverage   94.15%   94.14%   -0.01%
==========================================
  Files          26       26
  Lines         718      735      +17
==========================================
+ Hits          676      692      +16
- Misses         42       43       +1

Impacted Files
Coverage Δ

src/transforms/eigenanalysis.jl
82.60% <0.00%> (-0.98%)
:arrow_down:

src/transforms/stdnames.jl
100.00% <0.00%> (ø)

src/transforms/filter.jl
98.07% <0.00%> (+0.03%)
:arrow_up:

src/transforms/onehot.jl
97.36% <0.00%> (+0.07%)
:arrow_up:

src/transforms.jl
98.43% <0.00%> (+0.07%)
:arrow_up:

src/transforms/select.jl
93.24% <0.00%> (+0.09%)
:arrow_up:

src/transforms/parallel.jl
94.20% <0.00%> (+0.26%)
:arrow_up:

src/distributions.jl
91.66% <0.00%> (+0.36%)
:arrow_up:

src/transforms/sequential.jl
94.44% <0.00%> (+0.50%)
:arrow_up:

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


Augment pinning of pyOpenSSL

Patch pyOpenSSL pinning as suggested by Kofalt
Review Checklist

Tests were added to cover all code changes
Documentation was added / updated
Code and tests follow standards in CONTRIBUTING.md

I'm fine with either PR, but it probably would have been easier to just add a commit to #859.
We'll have to close that one now if this lands.
LGTM!


build/generate-sri.js doesn't work if single-quotes are used in config.yml

We use a fork of bootstrap for our design system, and we just noticed (and fixed) a bug regarding the build/generate-sri.js script.
The script is supposed to replace all SRI hashes in config.yml, where the hashes are wrapped in " (double-quotes). In our project we use ' (single-quotes), and the script doesn't work correctly with single-quotes; it replaces ALL values wrapped in single-quotes, with each generated hash.
Our solution requires some regular expression tweaking:
https://github.com/twbs/bootstrap/blob/master/build/generate-sri.js#L58
sh.sed(
  '-i',
  new RegExp(`(\\s*${file.configPropertyName}:\\s*("|\'))(\\S*)(("|\'))`),
  // NOTE: Using capture groups 1 and 4, because there are multiple,
  // smaller capture groups used, for the "|' or-ing to work properly.
  `$1${integrity}$4`,
  configFile
)

Here we wrap the "|' "or"-ing in capture groups, which fixes the issue.
We then also need to adjust the used capture group number in the replacement part of the function call ($3 -> $4).
(I also made the whitespace matching a bit more generous, using * instead of +, not sure if this is a good idea.)
I have not tested this extensively, but this fixes the issue for us.
Somebody may want to look at this regular expression again, or use (a reviewed version of) our RegExp.
Tested on node.js versions:

v12.13.0
v10.15.3

You can submit a PR. Generally these scripts are meant to be used only by us, but if a good PR is provided which doesn't cause any issues, I'm happy to review and merge.


Clarification on the inbound endpoint IP and actual subnet/IPs to query against would have helped a lot

When I set up the private resolver for the first time, I saw under the resolver's Settings -> Inbound endpoints, the IP address of the endpoint itself, and assumed that was the one to use for query. In my case I had subnet <IP_ADDRESS>/24 assigned as inbound endpoint subnet, and Azure assigned <IP_ADDRESS> as the endpoint IP, so I kept trying to use <IP_ADDRESS> without luck.
Then I figured out that I'm not actually supposed to use the endpoint IP <IP_ADDRESS> itself. Instead I found <IP_ADDRESS>-<IP_ADDRESS> to work (but not above).
I assume the endpoint IP itself represents the underlying VM or load balancer that powers the resolver.
This part of the doc "DNS queries received by the inbound endpoint will ingress to Azure" probably should be changed to describe exactly which parts of the subnet are meant to be used for queries, an maybe add an extra reminder not to use the actual endpoint IP itself (and the first 4 reserved IPs of course).
Ideally such clarifications should exist in the portal UI itself.
Hopefully this would help others who had similar confusions.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: b312425f-a486-6c4b-9608-cca8ccd30937
Version Independent ID: 1d306c78-99e8-8f2c-d0f3-1aa5bf60d794
Content: What is Azure DNS Private Resolver?
Content Source: articles/dns/dns-private-resolver-overview.md
Service: dns
GitHub Login: @greg-lindsay
Microsoft Alias: greglin

@mikequ-taggysoft , thank you for the feedback. We have assigned this to the content owner/author for review.
@greg-lindsay , for your review.

@mikequ-taggysoft I'm not sure why your inbound endpoint didn't respond, but this is indeed the correct IP address to query.  See https://learn.microsoft.com/en-us/azure/dns/private-resolver-endpoints-rulesets for more details.

#please-close


SQL component, parameter passing problem when the custom parameter is LIST

Search before asking

[X] I had searched in the issues and found no similar feature requirement.

Description

下一个节点的配置如下

实际日志如下

请问如何可以获取到dataList的数据呢
Documentation Links
No response
Are you willing to submit a PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Right now, we only support transport the value by column.
If you have two column in your table t_screen, you need to add two param.
It is a usefully feature if we can directly transport the whole output result of the task.

It is a usefully feature if we can directly transport the whole output result of the task.

I think this may be a large feature?
For online SQL query, such as MySQL, PostgreSQL, which can return results within seconds level, we can directly use network for transport.
For offline SQL query, which is calculated by distributed ETL engine, like HIVE, SPARK, FLINK, the results should be read from other source? like DFS, MQ, etc.

I think this may be a large feature?
For online SQL query, such as MySQL, PostgreSQL, which can return results within seconds level, we can directly use network for transport.
For offline SQL query, which is calculated by distributed ETL engine, like HIVE, SPARK, FLINK, the results can be read from other source? like DFS, MQ, etc.

关于产品，目前HTTP组件不支持从上游系统传输数据过来；刚好目前我们有这个方面的需求。不知道后续的产品规划中有没得这个功能，如果没有的话，我这边能否完善这个功能点，提交到官方?

I've just recently started learning about this software. Can someone please help me understand how to add multiple records to a database after querying them using the SQL module?
我最近才刚开始了解这个软件，那位大佬可以帮忙告诉我  使用SQL 模块 查询除了多条数据之后 应该怎么添加到数据库

sql是否适合大数据量的传输，看代码数据是放到varpool这个字段中的
，最终还会保存到库里。


Preparation of the simple script which keeps files up-to-date

Aim of this issue is to create a simple script that will allow keeping files up-to-date.

Done.


[Warhammer 4e Character Sheet] fixes

Changes / Comments
Fix for Characteristics modifier which was adding twice on the skill target display in rolls.
Roll20 Requests
Comments are very helpful for reviewing the code changes. Please answer the relevant questions below in your comment.

[ ] Does the pull request title have the sheet name(s)? Include each sheet name.
[ ] Is this a bug fix?
[ ] Does this add functional enhancements (new features or extending existing features) ?
[ ] Does this add or change functional aesthetics (such as layout or color scheme) ?
[ ] If changing or removing attributes, what steps have you taken, if any, to preserve player data ?
[ ] If this is a new sheet, did you follow Building Character Sheets standards ?

If you do not know English. Please leave a comment in your native language.

Character Sheet Info Roll20 Internal Use only.


Download Link

I noticed that the documentation says the following:

Important Note
The zip file contains:

but I don't see a zip file. I've downloaded the version I have from... I don't even know where anymore. Shouldn't the link to the download just be right at the start of the documentation?
Thanks.

Hi @Ksib, I initially published the code on MSDN Code Gallery at https://code.msdn.microsoft.com/windowsapps/Service-Bus-Explorer-f2abca5a. Here the code is available by downloading a zip file. However, I'm no more updating the code at that link, and sooner or later I'll clearly drop the project on MSDN Code Gallery.

For anyone who's looking at this issue - all versions for download are under GitHub here. The old version, (2.1.0) is available as a zip or as support branch.


flake in test/extensions/common/redis:cluster_refresh_manager_test

bazel test --config=clang-tsan --define=tcmalloc=disabled --config=libc++ \
   test/extensions/common/redis:cluster_refresh_manager_test --runs_per_test=100
...
//test/extensions/common/redis:cluster_refresh_manager_test              FAILED in 1 out of 100 in 8.0s

exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //test/extensions/common/redis:cluster_refresh_manager_test
-----------------------------------------------------------------------------
[==========] Running 5 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 5 tests from ClusterRefreshManagerTest
[ RUN      ] ClusterRefreshManagerTest.Basic
test/extensions/common/redis/cluster_refresh_manager_test.cc:145: Failure
Expected equality of these values:
  cluster_info->redirects_count_
    Which is: 1
  0
Stack trace:
  0x16e6bbe: Envoy::Extensions::Common::Redis::ClusterRefreshManagerTest_Basic_Test::TestBody()
  0x48dfd5d: testing::internal::HandleSehExceptionsInMethodIfSupported<>()
  0x48c47cf: testing::internal::HandleExceptionsInMethodIfSupported<>()
  0x48a97d2: testing::Test::Run()
  0x48aa674: testing::TestInfo::Run()
... Google Test internal frames ...

[  FAILED  ] ClusterRefreshManagerTest.Basic (412 ms)

@HenryYYang @FAYiEKcbD0XFqF2QK2E4viAHg8rMm2VbjYKdjTg PTAL

Josh, I cannot run that command successfully on my OSX laptop. Is there anything special I should be doing?
Also, when I looked up the error I got, it was indicated in some places it could be a bazel version issue. What version of bazel are you using? I say that, because on my latest pull from master for Envoy I found I needed to upgrade to bazel v2 from v1.2 IIRC.
Here's the output of running that command on my machine:
$ bazel test --config=clang-tsan --define=tcmalloc=disabled --config=libc++    test/extensions/common/redis:cluster_refresh_manager_test --runs_per_test=100
WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
/Users/nflacco/src/henry-envoy/tools/bazel.rc
ERROR: /Users/nflacco/src/henry-envoy/test/extensions/common/redis/BUILD:25:1: Illegal ambiguous match on configurable attribute "linkopts" in //test/extensions/common/redis:cluster_refresh_manager_test:
//bazel:force_libcpp
//bazel:apple
Multiple matches are not allowed unless one is unambiguously more specialized.
ERROR: Analysis of target '//test/extensions/common/redis:cluster_refresh_manager_test' failed; build aborted:

/Users/nflacco/src/henry-envoy/test/extensions/common/redis/BUILD:25:1: Illegal ambiguous match on configurable attribute "linkopts" in //test/extensions/common/redis:cluster_refresh_manager_test:
//bazel:force_libcpp
//bazel:apple
Multiple matches are not allowed unless one is unambiguously more specialized.

@HenryYYang @FAYiEKcbD0XFqF2QK2E4viAHg8rMm2VbjYKdjTg friendly ping, can one of you please fix this? Thank you.


Updated monitoring-http-access-logs file

Purpose
This PR fixes the issue: https://github.com/wso2/product-apim/issues/12853
Documentation
This PR updates following documents:

https://apim.docs.wso2.com/en/latest/observe/api-manager/monitoring-http-access-logs/

https://apim.docs.wso2.com/en/latest/reference/config-catalog/

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


exists query (and notExists)

afaict, to use exists as a query (not a subquery), you need to not only wrap the query with exists but also call .exists on it to force the execution. Am I missing something? It seems very awkward. For example, in my code I have this working but awkward expression (combining not w exists)
 exists(
                database.from(UniversalFeatureFlags).select()
                    .where(UniversalFeatureFlags.featureFlagId eq ALLOW_LEVEL_BIDDING)
            ).notExists

This is not even working for me anymore. I have to do a read operation and check if I get 0 results to get the state of existence.


Ingress paths - Can't run Grafana and Blockscout in parallel

Hi @joshuafernandes,
I have a problem running Grafana and Blockscout in parallel.
It seems that both are configured to run on the "/" path. No matter how much I change the ingress, I can't get both to run at the same time.
Can you please help me fix this?
Thanks!
Cheers
Younes

Hi @YounesBM
You'll have to set a base url/path or equivalent for one of the two and some nginx rules - similar to what I've done for kibana here https://github.com/ConsenSys/quorum-kubernetes/blob/master/ingress/ingress-rules-besu.yml#L12 and set the base prefix  https://github.com/ConsenSys/quorum-kubernetes/blob/master/ingress/ingress-rules-besu.yml#L35
Its essentially a reverse proxy with the nginx you need to configure https://grafana.com/tutorials/run-grafana-behind-a-proxy/. If you get this working before I have a chance to look at, feel free to submit a PR across and we can merge
Cheers
Josh

Hi @joshuafernandes,
I was able to get Grafana and Blockscout working, but I had to modify the Grafana docker image first.
In the conf/defaults.ini file, I had to modify the following lines:
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana/
serve_from_sub_path = true

Then, for the ingress on Besu side, I modified the following lines:
nginx.ingress.kubernetes.io/configuration-snippet: |
      rewrite ^/grafana/(.*)  /$1 break;

          - path: /grafana
            pathType: Prefix
            backend:
              service:
                name: quorum-monitoring-monitoring-grafana
                port:
                  number: 3000
          - path: /
            pathType: Prefix
            backend:
              service:
                name: blockscout
                port:
                  number: 4000

Cheers,
Younes

Hi @YounesBM
Thank you for this :) I'll update the docs with this info
Have a great day
Cheers
Josh


fix: use stencil arguments for looking up keys

What this PR does / why we need it
Switches bootstrap.sh to use arguments prefix when looking up keys in services.yaml.

Jira ID
[XX-XX]

Notes for your reviewers

:shipit:


Race condition in Minify_Cache_File with locking

it's possible that Minify_Cache_File gets racy when two concurrent thread try to put something to cache. and it reports code error
so, one thread that gets error. first it can't open file (which it assumes exists), gets false from fopen, and passes that false to flock:
PHP Warning:  fopen(/tmp/concurrency_test_500): failed to open stream: No such file or directory in vendor/mrclay/minify/min/lib/Minify/Cache/File.php on line 101
PHP Stack trace:
PHP   1. {main}() htdocs/tests/session.php:0
PHP   2. Minify_Cache_File->store() htdocs/tests/session.php:15
PHP   3. Minify_Cache_File->fetch() vendor/mrclay/minify/min/lib/Minify/Cache/File.php:37
PHP   4. fopen() vendor/mrclay/minify/min/lib/Minify/Cache/File.php:101
FP OPEN FAILED!
PHP Warning:  flock() expects parameter 1 to be resource, boolean given in vendor/mrclay/minify/min/lib/Minify/Cache/File.php on line 106
PHP Stack trace:
PHP   1. {main}() htdocs/tests/session.php:0
PHP   2. Minify_Cache_File->store() htdocs/tests/session.php:15
PHP   3. Minify_Cache_File->fetch() vendor/mrclay/minify/min/lib/Minify/Cache/File.php:37
PHP   4. flock() vendor/mrclay/minify/min/lib/Minify/Cache/File.php:106

the problem appears when one thread updates cachefile, second thread updates cachefile, refetches cachefile to see if there's what it wrote, sees it's not, and unlinks the cachefile. so when third thread does the same, it opens file which is no longer there, gets the false and produces the second warning on flock() call
https://github.com/mrclay/minify/blob/c196dd39dfd4c316742b747444148e94fb5fc8c3/min/lib/Minify/Cache/File.php#L99
  /**
    * Fetch the cached content
    *
    * @param string $id cache id (e.g. a filename)
    *
    * @return string
    */
   public function fetch($id)
   {
       if ($this->_locking) {
           $fp = fopen($this->_path . '/' . $id, 'rb');
           flock($fp, LOCK_SH);
           $ret = stream_get_contents($fp);
           flock($fp, LOCK_UN);
           fclose($fp);
           return $ret;
       } else {
           return file_get_contents($this->_path . '/' . $id);
       }
   }

so perhaps just return false, when $fp = fopen() fails, this would match the behavior file_get_contents() does when it can't read a file.
and in more general fix, the locking should be used on a path that always exists (not unlink()'ed middle of action), i.e the dir containing the cachefile, or separate file for locking.
putting lock on cachedir, may affect two separate threads with different cachefile, which may create too many unwanted locks, so perhaps separate lockfile is better? or make it configurable?
my testcase involved shell script putting code run in background. and for sake of creating race at better rate, i made script to write different contents for each thread. ideally (in production where it happened) the cache value did not vary that much indeed.
<?php
require_once dirname(__FILE__) . '/../../vendor/autoload.php';

define('CACHE_ID', 'concurrency_test_' . posix_getuid());
define('CACHE_DIR', sys_get_temp_dir());
$cache = new Minify_Cache_File(CACHE_DIR, true);
if ($cache->isValid(CACHE_ID, 0)) {
	$session_id = trim($cache->fetch(CACHE_ID));
}
$value = 'value' . rand(1, 10000);
$cache->store(CACHE_ID, $value);

and the shell script to reproduce:
$ rm -f /tmp/concurrency_test_500 && for a in $(seq 1 50); do php session.php $a &  done

Does #94 closes this issue?

@kminh yes, but this issue is open because had some idea to solve it "properly"

Ideal would be to create a "rebuilding" file as soon as we recognize the cache is stale and unlink it after saving the new content. If another process sees that file, it serves the stale cached version or waits for it (maybe). But Minify doesn't need to be perfect here. If your site's big enough to have these problems it's time to use a custom approach anyway.
Permissions problems should get logged.


experimental: optimize function listener context stack

This PR changes the context stack used by function listeners to use a vector instead of a linked list in order to reduce the memory footprint; creating the context stack items forced the compiler to put values on the heap, and the extra pointer increased by 50% the memory space needed to track the contexts (3 pointers per item vs 2 now).
goos: darwin
goarch: arm64
pkg: github.com/tetratelabs/wazero/internal/engine/compiler
                                           │  /tmp/old   │              /tmp/new               │
                                           │   sec/op    │   sec/op     vs base                │
CallEngine_builtinFunctionFunctionListener   37.45n ± 5%   11.10n ± 1%  -70.37% (p=0.000 n=10)

                                           │  /tmp/old  │              /tmp/new              │
                                           │    B/op    │   B/op     vs base                 │
CallEngine_builtinFunctionFunctionListener   24.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)

                                           │  /tmp/old  │              /tmp/new               │
                                           │ allocs/op  │ allocs/op   vs base                 │
CallEngine_builtinFunctionFunctionListener   1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)

The power of cdr coding… I'll show myself.

Thanks for the reviews!


Redundant cut should not mark channel bad

Original report by Charles James Titus (Bitbucket: cjtitus, GitHub: cjtitus).

Very often, I run an analysis script , then go back and tweak things, and run it again. When this happens, sometimes redundant operations happen. For example, if I made an energy cut in data, and went back and set a few channels good, I may try to re-run the data cut.
I would expect this to have no effect on channels that already have the cut (possibly unless a forceNew keyword is passed!) Instead, the following error occurs:
data.cutAdd("fepfy", lambda energy: np.logical_and(energy>690, energy<730))

MARK BAD 20220127_run0028 chan4: reason=recipeName=fepfy already in self.craftedIngredients with keys=['relTimeSec', 'filtPhase', 'cutNone', 'filtValueDC', 'energyRough', 'arbsInRefChannelUnits', 'energy', 'fepfy'] during cutAdd
extraInfo: recipeName=fepfy already in self.craftedIngredients with keys=['relTimeSec', 'filtPhase', 'cutNone', 'filtValueDC', 'energyRough', 'arbsInRefChannelUnits', 'energy', 'fepfy']

A channel has been marked bad simply because I tried to add the same cut twice. I would understand a warning here, but setting the channel bad seems like a very odd behavior. In this instance, nearly all channels in data ended up marked bad, just because I was trying to add the cut to a few more datasets!

Original comment by Joseph Fowler (Bitbucket: joe_fowler, ).

Removing milestone: v0.7 (automated comment)


Upcomming Breaking Change with Homeassistant 2022.2

Version of the custom_component

11c9b0f
Describe the bug
None yet but warning about breaking change
log

Detected integration that called async_timeout.timeout with loop keyword argument.
The loop keyword argument is deprecated and calls will fail after Home Assistant 2022.2.
Please report issue to the custom component author for wienerlinien using this method at
custom_components/wienerlinien/sensor.py, line 140: async with async_timeout.timeout(10, loop=self.loop):

version 1.2.0, downloadable via hacs fixes this issue

Replaced by https://github.com/tofuSCHNITZEL/home-assistant-wienerlinien


Lifetime issue with EventLoop

Having a hard time figuring out a solution to this lifetime problem. Essentially I have a worker thread for registering mdns entries, each of which requires an MdnsService and an EventLoop. Somehow creating the EventLoop is holding a mutable borrow to the MdnsService and I can't quite figure out how to handle the lifetimes. My code is:
pub struct ServiceData<'a> {
    pub service: AvahiMdnsService,
    pub event_loop: AvahiEventLoop<'a>,
}

    fn service_registration_thread(rx_channel: Receiver<ChannelCommand>) {
        let mut services: Vec<ServiceData> = Vec::new();

        loop {
            for message in rx_channel.try_iter() {
                match message {
                    ChannelCommand::NewService(service_ref) => {
                        let mut txt_data = TxtRecord::new();
                        for item in service_ref.txt_records.iter() {
                            txt_data.insert(item.0, item.1).unwrap();
                        }
                        let service_type = ServiceType::new(
                            &service_ref.service_name.to_owned(),
                            &service_ref.protocol.to_owned(),
                        )
                        .unwrap();
136:                        let mut new_service = MdnsService::new(service_type, service_ref.port);
                        new_service.set_name(&service_ref.instance_name.to_owned());
                        new_service.set_txt_record(txt_data);
                        new_service
                            .set_registered_callback(Box::new(MDnsService::on_service_registered));
141:                        let event_loop = [new_service.register](https://github.com/windy1/zeroconf-rs/blob/850c028aa8e85fb3ee441b344e2dbecb8d7f9a0c/zeroconf/src/linux/service.rs#L109C1-L129)().unwrap();

                        let data = ServiceData {
                            service: new_service,
145:                            event_loop: event_loop,
                        };

                        services.push(data)
                    }
                }
            }

            for service in services.iter() {
                service.event_loop.poll(Duration::from_millis(0));
            }
        }
    }

I get the error:
cannot move out of `new_service` because it is borrowed
move out of `new_service` occurs here:
async_service.rs(141, 42): borrow of `new_service` occurs here
async_service.rs(136, 29): binding `new_service` declared here
async_service.rs(145, 41): borrow later used here

It seems to have something to do with how PhantomData in AvahiEventLoop is capturing the mutable borrow, but can't quite tell if there's a way to handle this in my code or if the library really needs to change. I've tried various permutations of Rc & RefCell around new_service but that doesn't seem to help with checking the ownership of that borrow on 141.

Yes, I believe that the PhantomData is not working as intended. The original intent here was to prevent the service from being dropped before the EventLoop, but I think this was a mistake. Admittedly, I was new to the language at the time and hadn't quite wrapped my head around lifetimes yet.
I have a branch (refactor/arc-rc) that I started a few weeks ago that should resolve this issue by removing the lifetime parameter entirely; instead managing the early-drop problem using Rcs. I will try to wrap that work up soon™.

I'll have to peak at that branch. The Rcs almost seemed to cause more problems than they solve. May make sense for the EventLoop to just take a reference to poll. When the service drops it just drops a whole bunch of stuff, like the client and context so just keeping poll alive isn't all that helpful.

This should be fixed in 0.14.0, let me know if you have any issues. Also, just FYI, you should probably be using MdnsService instead of AvahiMdnsService and EventLoop instead of AvahiEventLoop.


policy implementation

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Coverage decreased (-74.6%) to 16.963% when pulling c33fe8ab83addc3b0c5d4b21fcd4def73ae34306 on coderall:master into 86c17b95fcd5db33628a61e492fb4a1a937d5906 on aliyun:master.

done


Fight scene reads modifier and attacks chosen by player/bracket and applies them to the fighters

This works, but the way the bracket makes its selections needs to be fixed.


#752 Unified button for sharing and linking

Thank you for your contribution to the KodaDot NFT gallery.
Let's do a quick check before the merge.
Your contribution will be an eternal part of the community codebase.
PR type

[ ] Bugfix
[ ] Feature
[x] Refactoring

Before submitting this PR, please make sure:

[x] Code builds clean without any errors or warnings
[x] I've merged recent default branch -- main and I've no conflicts
[x] I've didn't break any original functionality
[x] I've posted screenshot of demonstrated change in this PR

Optional

[ ] I've tested it on mobile and everything works
[ ] I found edge cases

What's new? (may be part of changelog)

This PR closes #752

If issue had bounty label ($,$$,$$$)

Fill up your KSM address:
https://kodadot.xyz/transfer/?target=EzGc4s9PgCPx1YnF3fqzhLzVHpHMTL4LWPScwpDrR8JKgSU

Community participation

[x] Are you at KodaDot Discord? If not yet, let's join us - https://discord.gg/35hzy2dXXh

Screenshot

[x] Whenever my fix has changed something on UI, a screenshot for others, is more than welcome

I would suggest changing to the same height as its icons in this same row?  Probably could be the same height as the Gift button?

LGTM, the only thing that bothers me is that the Sharing component is not clickable on the inside

Yes, from a mobile perspective and mobile lighthouse report, I guess button should be clickable all surface

@yangwao @roiLeo  Have done the 2 changes mentioned.


String like in Select

Hello
I have a problem.
I have two String in database:
ű and Ű
When I do a search with .like("%ű%") program can't find Ű
If i have p and P in the database
like("%p%") found p and P correctly.
Can you recommend a solution?
Joe

@mesterj As stated in SQLite's documentation:
The LIKE operator does a pattern matching comparison. The operand to the right of the LIKE operator contains the pattern and the left hand operand contains the string to match against the pattern. A percent symbol ("%") in the LIKE pattern matches any sequence of zero or more characters in the string. An underscore ("_") in the LIKE pattern matches any single character in the string. Any other character matches itself or its lower/upper case equivalent (i.e. case-insensitive matching). (A bug: SQLite only understands upper/lower case for ASCII characters by default. The LIKE operator is case sensitive by default for unicode characters that are beyond the ASCII range. For example, the expression 'a' LIKE 'A' is TRUE but 'æ' LIKE 'Æ' is FALSE.)

You need to use ICU collation to write your SQL queries or add them to your tables. Sqlite in Android is built with the ICU extension, however from reading the documentation around it and this bug report for AOSP it seems unlikely to be working correctly on most devices.

thanks for your help @kaeawc, closing this.


Fix ycsb and tpc-c compilation

Just 2 lines.
#402

Coverage increased (+0.02%) to 55.34% when pulling b6727ae703044857cbba0c8bac998d50b00491b4 on jessesleeping:master into bd24d9ece4e3b856668d07beb3640453c794e8e7 on cmu-db:master.

Coverage remained the same at 55.316% when pulling b6727ae703044857cbba0c8bac998d50b00491b4 on jessesleeping:master into bd24d9ece4e3b856668d07beb3640453c794e8e7 on cmu-db:master.

Coverage increased (+0.006%) to 55.322% when pulling b6727ae703044857cbba0c8bac998d50b00491b4 on jessesleeping:master into bd24d9ece4e3b856668d07beb3640453c794e8e7 on cmu-db:master.

Coverage decreased (-0.09%) to 55.223% when pulling 348e9d01839bca40a77a0dccd7e68ef2208add5e on jessesleeping:master into bd24d9ece4e3b856668d07beb3640453c794e8e7 on cmu-db:master.

Coverage increased (+0.02%) to 55.334% when pulling<PHONE_NUMBER>eebba7a069798982a0e8a934787e64 on jessesleeping:master into bd24d9ece4e3b856668d07beb3640453c794e8e7 on cmu-db:master.


[AutoPR billing/resource-manager] Corrected specs and examples for BillingRP

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/5682

(message created by the CI based on PR content)

This PR has been merged into https://github.com/Azure/azure-sdk-for-python/pull/3853


functional-tester: fault injection recovery does not ensure etcd is fully running

I observe that leaseStresser checker encounters etcdserver: request timed out when making a linearized RPC call.
leaseStresser checker starts the moment after tester indicates that the fault injection has recovered. However, in some case, the fault injection is not truly recovered after tester prints out recovered failure because etcd node takes time restart. During the restarting period, the leaseStresser stresser on a follower node wants a linearized call such as Range(). Since the etcd node that's restarting/offline could be the leader, thenetcdserver: request timed out error occurs for the linearized call.
The workaround for this issue is to start the leaseStresser checking after hash checking. This works because the hashChecker has a waiting logic resulting etcd server to be in a quiescent state before leaseStresser starts to do its job .
func (hc *hashChecker) Check() (err error) {
	plog.Printf("%s fetching current revisions...", hc.tt.logPrefix())
	var (
		revs   map[string]int64
		hashes map[string]int64
		ok     bool
	)
	for i := 0; i < 7; i++ {
		time.Sleep(time.Second)

		revs, hashes, err = hc.tt.cluster.getRevisionHash()
		if err != nil {
			plog.Printf("%s #%d failed to get current revisions (%v)", hc.tt.logPrefix(), i, err)
			continue
		}
		if _, ok = getSameValue(revs); ok {
			break
		}

		plog.Printf("%s #%d inconsistent current revisions %+v", hc.tt.logPrefix(), i, revs)
	}
	if !ok || err != nil {
		return fmt.Errorf("checking current revisions failed [err: %v, revisions: %v]", err, revs)
	}
	plog.Printf("%s all members are consistent with current revisions [revisions: %v]", hc.tt.logPrefix(), revs)

	plog.Printf("%s checking current storage hashes...", hc.tt.logPrefix())
	if _, ok = getSameValue(hashes); !ok {
		return fmt.Errorf("inconsistent hashes [%v]", hashes)
	}

	plog.Printf("%s all members are consistent with storage hashes", hc.tt.logPrefix())
	return nil
}

We need a better way to ensure etcd server is fully recovered.

@fanminshi Can you get this fixed? Thanks!

@xiang90 sure, do you want to do it after i merge the https://github.com/coreos/etcd/pull/6588 or before?


Do not display variables before they are initialized

I found its useless to display variables before they are initialized. For example:
if (true) {
  | // a is displayed but shouldn't as it cant be used yet
}
const a = 5

However:
const b = () => {
    // here, a is okay to display, so check should not go outside of current function
}

const a = 5

Enabling it by default could surprise some users (it will be noticable completions change), also I'm not sure of any edge cases so lets make it optionable with setting (but with recommended flag)

https://github.com/microsoft/TypeScript/blob/main/src/compiler/checker.ts#L3875


MaterialModule.forRoot is deprecated.

MaterialModule.forRoot is deprecated.
What do we need to use now?

Please read the release notes 😊👍

@NgModule({
imports: [
...
MaterialModule,
...
]
...
});

@mackelito is correct, you don't need to call forRoot anymore.


Pass-in at stack level - SALESFORCE_AUTH_ENDPOINT & SALESFORCE_REST_API_ENDPOINT_BASE

I have a suggestion:
https://github.com/service-cloud-voice/ServiceCloudVoiceLambdas/blob/main/ServerlessApplication/ServiceCloudVoiceLambdas.yaml#LL200C11-L201C94
It would be good if some of these very likely to be modified variables could be passed in at the top level of the SAM template.  We would like to be able to deploy this application via Terraform more easily using resource directives like https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/serverlessapplicationrepository_cloudformation_stack

I have made a PR to this effect. https://github.com/service-cloud-voice/ServiceCloudVoiceLambdas/pull/39

Closing this issue. We have merged your PR.


Problem about reading the code

Hi, bevfusion is a wonderful work. However, I am a new user of mmdet3d and I am confused about how your project read the config.  I found config file in mmdet3d official code is a single .py file, but in your example you just load the convfuse.yaml but there are many default.yaml seem also necessary, so how the default.yaml be read?
By the way, it will be nice for you to produce an OpenPCDet version of BEVfusion!
@kentang-mit

I also wonder have you tried using CNN 2d backbone and dense head without transformer? I found you are using swin transformer to extract 2d features and Transfuion head, which is also a transformer-based dense head for 3d detection, is used. Is it because only transformer based structure can be combined successfully?

Hi @mc171819,
For your first question, the YAML configuration systems use default.yaml at higher level of directory hierarchy as the base configuration file. Configurations in the deeper folders will inherit and modify the base default.yaml configs. So yes, your understanding is correct, all the config files are necessary. The advantage of this YAML configuration system is that it can avoid duplicate code snippets when you are doing a lot of experiments with minor differences in hyper-parameters (especially when these hyperparameters are nested in the dataloader configurations, like here).
For OpenPCDet reproduction, we will probably give it a try once we have more bandwidth.
Related to transformers, we don't have to use them in BEVFusion. We have ablation studies on ResNet50 for the image backbone, which achieves slightly worse performance than SwinTransformer. For the head, we actually use center-based heads for all BEV segmentation experiments, and it will also work for the detection experiments.
Best,
Haotian

Hi @mc171819,
For your first question, the YAML configuration systems use default.yaml at higher level of directory hierarchy as the base configuration file. Configurations in the deeper folders will inherit and modify the base default.yaml configs. So yes, your understanding is correct, all the config files are necessary. The advantage of this YAML configuration system is that it can avoid duplicate code snippets when you are doing a lot of experiments with minor differences in hyper-parameters (especially when these hyperparameters are nested in the dataloader configurations, like here).
For OpenPCDet reproduction, we will probably give it a try once we have more bandwidth.
Related to transformers, we don't have to use them in BEVFusion. We have ablation studies on ResNet50 for the image backbone, which achieves slightly worse performance than SwinTransformer. For the head, we actually use center-based heads for all BEV segmentation experiments, and it will also work for the detection experiments.
Best, Haotian

Thank you for your reply! In my understanding, camera is transform into bev style in self.encoders["camera"]["vtransform"], which is the new designed bevpooling module, is that correct?

That's partially correct. We also have pre-computation but not released in this repo. Besides, if you look at the best model we provided, actually we added a 2.5D depth stream to the view transformer, this is not part of LSS. It has some improvement but also brings about latency overhead.

Thank you for your patient answer, I'll close this issue.

Hi, after learning something about LSS, in my understanding, in the released version of bevfusion, the main difference between LSS and bevfusion of bev pooling is that you provide a new function named QuickCumsumCuda in mmdet3d/ops/bev_pool/bev_pool.py rather than using QuickCumsum, which is used by LSS?

Yes.

I also wonder have you tried using CNN 2d backbone and dense head without transformer? I found you are using swin transformer to extract 2d features and Transfuion head, which is also a transformer-based dense head for 3d detection, is used. Is it because only transformer based structure can be combined successfully?

Hello, May I know where the swing transformer  to extract 2d features code is, I can't find it.


Cannot write to device specific files on linux

Description of the problem or steps to reproduce

Run micro <device specific file> (in my case /sys/class/backlight/nvidia_0/brightness) from non-root environment.
Replace value with smth else
Try to save file via ctrl-s (accept sudo mode)
Expected: file saved and modifications applied, actual: micro crashed, but changes were saved

Specifications
Stack trace:
Micro encountered an error: runtime.errorString runtime error: invalid memory address or nil pointer dereference
runtime/panic.go:261 (0x452e98)
runtime/panic.go:260 (0x452e66)
github.com/zyedidia/micro/v2/cmd/micro/micro.go:403 (0x8f41ec)
github.com/zyedidia/micro/v2/cmd/micro/micro.go:394 (0x8f3fec)
runtime/internal/atomic/types.go:194 (0x43e85b)
runtime/asm_amd64.s:1650 (0x46fbc1)

Commit hash: v2.0.12
OS: Linux nixos 6.7.4 #1-NixOS SMP PREEMPT_DYNAMIC Mon Feb  5 20:17:12 UTC 2024 x86_64 GNU/Linux
Terminal: WezTerm 20230712-072601-f4abf8fd

Please try the same with v2.0.13, because this looks like an issue already solved with #2967.

Tried out micro v2.0.13.
On step 3, micros says: exit status 1 in status bar.
So, no crash happened, i'm satisfied.


SELF_HOSTED_SETUP Document Correction

APIServer Configuration
In SELF_HOSTED_SETUP.md it says you need to add --service-account-key-file with the path to the $PKCS_KEY file. I have tested with minikube 1.17 and a kops 1.15 cluster, here is the error message:
{"log":"Error: invalid authentication config: error reading public key file /var/lib/minikube/certs/sa-signing-pkcs.pub: data does not contain any valid RSA or ECDSA public keys\n","stream":"stderr","time":"2020-02-10T14:34:36.834045998Z"}

According to the apiserver doc, it should be the path to $PUB_KEY
Also the original public key may not be explictly specified by --service-account-key-file (using the default value same as --tls-private-key-file) so user needs to make sure it is included, otherwise existing tokens will fail: https://github.com/aws/amazon-eks-pod-identity-webhook/issues/29
ControllerManager Configuration
It is missing from the doc that you should also configure controller managers:

You must pass a service account private key file to the token controller in the controller-manager by using the --service-account-private-key-file option. The private key will be used to sign generated service account tokens.  Managing Service Accounts

@geckofu I think this change (in #37) caused a regression.  The $PUB_KEY file is not an PEM-encoded key as required by the apiserver; it is an OpenSSH-format public key.  The $PKCS_KEY file is the PEM-encoded key.
As the apiserver documentation states:

File containing PEM-encoded x509 RSA or ECDSA private or public keys, used to verify ServiceAccount tokens.

This issue was raised before in #11 - I fear that we are going back and forth here.


Can't run in macOS

Hello,  I have compiled juci in macOS ( which is Sierra 10.12.5). But when I run it, it just aborted.

I think maybe it's a error from llvm. When I install llvm (4.0.0), it notes that no --with-clang option.

I hope this issue is fixed in the above commit. The reason should be that the latest llvm was not found on MacOS. The --with-clang flag seems to be included in llvm by default now, so it is not needed anymore.

Thanks really! I have run it successfully!


Update README.md

just a small note on customizing the commit message with yarn

I tested both npm (v6.7.0) and yarn (v1.12.3) and it seems to work ok. Check it our here: https://github.com/stovmascript/AwesomeProjectForTestingRNV/releases. The first 2 versions were made with npm and the last 4 with Yarn. Versioning was done with the basic RNV setup Everything seems the same, so I wonder if there's something specific with your machine.
Here are my configs:
$ npm config list -l
; cli configs
long = true
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/6.7.0 node/v11.10.0 darwin x64"

; userconfig /Users/martin/.npmrc
scripts-prepend-node-path = true

; default values
access = null
allow-same-version = false
also = null
always-auth = false
audit = true
audit-level = "low"
auth-type = "legacy"
bin-links = true
browser = null
ca = null
cache = "/Users/martin/.npm"
cache-lock-retries = 10
cache-lock-stale = 60000
cache-lock-wait = 10000
cache-max = null
cache-min = 10
cafile = undefined
cert = null
cidr = null
color = true
commit-hooks = true
depth = null
description = true
dev = false
dry-run = false
editor = "vi"
engine-strict = false
fetch-retries = 2
fetch-retry-factor = 10
fetch-retry-maxtimeout = 60000
fetch-retry-mintimeout = 10000
force = false
git = "git"
git-tag-version = true
global = false
global-style = false
globalconfig = "/Users/martin/.nvm/versions/node/v11.10.0/etc/npmrc"
globalignorefile = "/Users/martin/.nvm/versions/node/v11.10.0/etc/npmignore"
group = 20
ham-it-up = false
heading = "npm"
https-proxy = null
if-present = false
ignore-prepublish = false
ignore-scripts = false
init-author-email = ""
init-author-name = ""
init-author-url = ""
init-license = "ISC"
init-module = "/Users/martin/.npm-init.js"
init-version = "1.0.0"
json = false
key = null
legacy-bundling = false
link = false
local-address = undefined
loglevel = "notice"
logs-max = 10
; long = false (overridden)
maxsockets = 50
message = "%s"
; metrics-registry = null (overridden)
node-options = null
node-version = "11.10.0"
noproxy = null
offline = false
onload-script = null
only = null
optional = true
otp = null
package-lock = true
package-lock-only = false
parseable = false
prefer-offline = false
prefer-online = false
prefix = "/Users/martin/.nvm/versions/node/v11.10.0"
preid = ""
production = false
progress = true
proxy = null
read-only = false
rebuild-bundle = true
registry = "https://registry.npmjs.org/"
rollback = true
save = true
save-bundle = false
save-dev = false
save-exact = false
save-optional = false
save-prefix = "^"
save-prod = false
scope = ""
script-shell = null
; scripts-prepend-node-path = "warn-only" (overridden)
searchexclude = null
searchlimit = 20
searchopts = ""
searchstaleness = 900
send-metrics = false
shell = "/bin/bash"
shrinkwrap = true
sign-git-commit = false
sign-git-tag = false
sso-poll-frequency = 500
sso-type = "oauth"
strict-ssl = true
tag = "latest"
tag-version-prefix = "v"
timing = false
tmp = "/var/folders/cr/q0qccvm9601_8kgkvckm9rjh0000gn/T"
umask = 18
unicode = false
unsafe-perm = true
update-notifier = true
usage = false
user = 501
; user-agent = "npm/{npm-version} node/{node-version} {platform} {arch}" (overridden)
userconfig = "/Users/martin/.npmrc"
version = false
versions = false
viewer = "man"

$ yarn config list
yarn config v1.12.3
info yarn config
{ 'version-tag-prefix':
   'v',
  'version-git-tag':
   true,
  'version-commit-hooks':
   true,
  'version-git-sign':
   false,
  'version-git-message':
   'v%s',
  'init-version':
   '1.0.0',
  'init-license':
   'MIT',
  'save-prefix':
   '^',
  'bin-links':
   true,
  'ignore-scripts':
   false,
  'ignore-optional':
   false,
  registry:
   'https://registry.yarnpkg.com',
  'strict-ssl':
   true,
  'user-agent':
   'yarn/1.12.3 npm/? node/v11.10.0 darwin x64',
  lastUpdateCheck:
<PHONE_NUMBER>617 }
info npm config
{ '//registry.npmjs.org/:_authToken':
   '2026ccf5-44d3-438a-8d23-dfe385cb1b99',
  'scripts-prepend-node-path':
   true,
  python:
   '/usr/bin/python' }
Done in 0.07s.

$ yarn config current
yarn config v1.12.3
{
  "rootModuleFolders": [
    "/Users/martin/AwesomeProjectForTestingRNV/node_modules"
  ],
  "registryFolders": [
    "node_modules"
  ],
  "linkedModules": [],
  "cache": {},
  "cwd": "/Users/martin/AwesomeProjectForTestingRNV",
  "looseSemver": true,
  "commandName": "config",
  "preferOffline": false,
  "globalFolder": "/Users/martin/.config/yarn/global",
  "linkFolder": "/Users/martin/.config/yarn/link",
  "offline": false,
  "binLinks": true,
  "ignorePlatform": false,
  "ignoreScripts": false,
  "disablePrepublish": false,
  "nonInteractive": true,
  "workspaceRootFolder": null,
  "lockfileFolder": "/Users/martin/AwesomeProjectForTestingRNV",
  "networkConcurrency": 8,
  "childConcurrency": 5,
  "networkTimeout": 30000,
  "workspacesEnabled": true,
  "workspacesNohoistEnabled": true,
  "pruneOfflineMirror": false,
  "enableMetaFolder": false,
  "enableLockfileVersions": false,
  "linkFileDependencies": false,
  "cacheFolder": "/Users/martin/Library/Caches/Yarn/v4",
  "tempFolder": "/Users/martin/Library/Caches/Yarn/v4/.tmp",
  "production": false
}
Done in 0.07s.

@stovmascript I used an old version that had this issue because I was using a custom commit message, so feel free to ignore that part of the comment (I removed it). This PR should be good to go as-is, thanks

Do you think it's necessary though? That section was only meant to illustrate how to work with custom commit messages. We aren't educating people how to config npm, so why should we do it for Yarn users?
It just seems like we're repeating something that's already in the docs of npm/Yarn (and could potentially change, making our copy outdated).

I think most people don't know npm / yarn version very well. Customizing the commit message will probably be a fairly common use case and I would find it nice to have it documented right here without having to google for it (frankly, it took me while to discover the npmrc option).
I don't think the config option will change, given how many people will depend on it.
Do as you like :)


Added 3079913.patch for performance.

A tester.

No change in performance, but the code compiles and run.
So we can merge or no, I let you decide.


Timezone and fraction seconds fixes and tests

Fix for fraction seconds accuracy.
Initializing timezone between rows while running multi-row query.
Added checks for negative timezone.
Added nested queries tests for single and multi row queries.

@galsalomon66 Please review the updated patch

the PR should take care also of build-option for nano/micro
https://www.boost.org/doc/libs/1_53_0/doc/html/date_time/details.html#date_time.buildinfo
(use of BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG macro)

@galsalomon66 Added nano seconds build option and updated tested also. Please review

please check the following queries results
select to_string(to_timestamp("2007-09-17T17:56:05.003456+00:00"),"n") from
select to_string(to_timestamp("2007-09-17T17:56:05.3456+00:00"),"n") from

I tried queries like you mentioned above. Both the queries were giving same results, which should not happen.
I have made changes for it in to_string function for formats 'n' and 'S...S' and added tests to cover this case. The PR is updated with the same.


Adding QLD back to Pawsey and switching object stores back to origina…

…l user-data

There's 17TB of space on user-data and only 2.6 left on user-data-4


Missing global header avatar icon on demo site

This page: https://react.lightningdesignsystem.com/components/global-header is missing the avatar icon.

Fixed.


u-boot-imx_2020.04_2.3.2-phy7.bb from dunfell is not buildable against poky/oe-core

ERROR: Nothing PROVIDES 'python' (but /yocto-build/meta-phytec/recipes-bsp/u-boot/u-boot-imx_2020.04_2.3.2-phy7.bb DEPENDS on or otherwise requires it). Close matches:
  python3
  python3-py
  python3-sh

The used poky version tag is  "yocto-3.1.11". Am I missing a dependency?

My attempts look promising so far. Changes I had to do for a polis device:
PREFERRED_PROVIDER:virtual/kernel ?= "linux-imx"
DEPENDS:remove:pn-u-boot-imx = " python"
DEPENDS:append:pn-u-boot-imx = " bc-native python3"
ATF_MACHINE_NAME:pn-imx-boot = "bl31-imx8mm.bin"
ATF_MACHINE_NAME:pn-imx-boot-phytec = "bl31-imx8mm.bin"
PLATFORM:pn-imx-atf = "imx8mm"
SOC_TARGET:pn-imx-boot = "iMX8MM"
SOC_TARGET:pn-imx-boot-phytec = "iMX8MM"
IMXBOOT_TARGETS = "flash_evk"

I copied the imx-atf and imx-mkimage  from dynamic-layers/fsl-bsp-release. I had to remove the dependency to imx-seco in the imx-mkimage recipe.
Currently I'm adapting u-boot-imx for my own boot scripts. As far as I can see, at least I don't really need the fsl-bsp-release layer.
One more thing: I have a a phytec polis device which doesnt match the MACHINE configuration exactly. I use phyboard-polis-imx8mm-4.conf for a "PB-02820-001.A1" device. Can you confirm that I use the correct one? The description of phyboard-polis-imx8mm-4.conf states that it is for PB-02820.A2 with 16GB emmc. I seem to have a 8GB emmc.

We have a initial Yocto master branch setup for i.MX8MP where we also don't use the fsl-bsp-release layer by moving the imx-atf and imx-mkimage to dynamic-layers/freescale-layer. So this has been done for newer branches of meta-phytec.
Using phyboard-polis-imx8mm-4.conf is save with PB-02820-001.A1. eMMC size is don't care for the machine. The first prototypes had 16GB. We are aware that the description is outdated and working on an update. At least for the upcoming hardknott based release.
Regards,
Teresa

no updates for some time, if you still have issues, please reopen or open a new ticket


Adding tesmpest test case for management cleaning steps.

Test cases includes cleaning steps :
- reset_idrac
- clear_job_queue
- known_good_state

RC :Should not the configuration of the enabled management and power interfaces be checked? Note that with the idrac driver the same protocol must be used by those two (2) interfaces. They should both be idrac-redfish or idrac-wsman
reply : Since these would be in separate classes, may not need to check in test case but will be checked in outside the test case.

RC: Cannot the value of mandatory_attr be overridden by this derived class?
reply:overrided mandatory_attr = ['driver']. Driver is checked in base class. Was able to by pass wholedisk and image_ref as mandatory_attr.

RC: I see that the already existing, upstream Ironic BIOS tempest test method, test_bios_apply_and_reset_configuration, does not have a tempest.common.utils.services decorator. I believe that test method was added more recently than most of the others in the ironic-tempest-plugin package. Since you found removing it does not adversely affect the test execution, I recommend it be deleted before submitting this upstream for review in Gerrit. You could ask a question about it in the review, citing this information.
reply: As discussed we will keep this and post a comment in upstream after raising the patch.

RC: after further reflecting on our discussion this past Friday, I believe separate tests/classes should be created for testing the idrac driver WS-Man (idrac-wsman) and Redfish (idrac-redfish) management interface implementations of the iDRAC cleaning step
reply: Created 2 seperate classes

RC: have we considered cleaning multiple baremetal nodes in parallel? Please see the test methods in class InspectorBasicTest.
reply : As discussed, will take this as enhancement.

6 RC.: Also, we could add Dell's copyright notice to the changed file
reply: Added in test_cleaning.py

RC : this is a friendly reminder to draft the commit message before submitting this change upstream for the community to review
reply : Will be doing in actual PR or first commit of this PR

LGTM, Thanks!

Since test case is merged in upstream, closing this pull request