"dm checkout BRANCH" only affects the default branch for containers if they're already running

dm checkout BRANCH sets a client-local state to point to the currently selected branch for client operations and, if there are running containers without explicitly pinned branches, switches them to that branch.
However, it does not set the default for newly-created containers without explicitly pinned branches, because the "current branch" is stored client-side or per-container.
This can confuse users:
dm checkout BRANCH
docker run ..... # doesn't see branch state
dm checkout BRANCH
docker run ..... # does see branch state as container was created before

Storing a "default branch" in etcd and using that when a pinned branch isn't specified might reduce user confusion.

This would affect Kubernetes as well. We should think a bit about whether we want to do that.


Mevboost relay implementation

Describe the feature
Submitting mev-boost relays requires a signed BidTrace, a struct already defined in
https://github.com/paradigmxyz/reth/blob/c58cdf945966942e6ee7367b3848870f26cc54f3/crates/rpc/rpc-types/src/relay.rs#L48
as
https://github.com/paradigmxyz/reth/blob/c58cdf945966942e6ee7367b3848870f26cc54f3/crates/rpc/rpc-types/src/relay.rs#L69
What is actually sent:
https://github.com/paradigmxyz/reth/blob/c58cdf945966942e6ee7367b3848870f26cc54f3/crates/rpc/rpc-types/src/relay.rs#L76
AFAIK there is no signing functionality etc which means block builders have to implement their own. Would be convenient to have a signing implementation on the BidTrace struct that take a BLS signing key and produce a SignedMessage.
Might as well include request-response pattern for the 5 relay endpoints (types are already defined in relay.rs so should be ez)
Happy to put together a PR for this if you'd like, as long as you are happy with the shape/approach.
sauce: I am running a reth builder and have currently rolled my own.
Would be a continuation on @mattsse #5568 as well
Additional context
Thinking something like this:
pub trait MevBoostRelayClient {
    type Error;

    /// Get a list of validator registrations for validators scheduled to propose in the current and next epoch.
    /// Used by builders to know when to submit bids for an upcoming proposal.
    /// Returns an array of validator registrations for the current and next epoch.
    /// Each entry includes a slot and the validator with assigned duty.
    /// Slots without a registered validator are omitted.
    fn get_validators(&self) -> Result<Vec<Validator>, Self::Error> {
        Err("Not implemented".into())
    }

    /// Submit a new block to the relay.
    /// Blocks can be submitted as JSON or SSZ, and optionally GZIP encoded.
    /// The relay will simulate the block to verify properties and proposer payment.
    /// For accountability, builder signature is over the SSZ encoded message.
    /// Any new submission by a builder will overwrite a previous one by the same builder_pubkey.
    fn submit_block(&self, block: SignedBidSubmission) -> Result<(), Self::Error> {
        Err("Not implemented".into())
    }

    /// Get payloads that were delivered to proposers.
    /// Payloads become available after the relay responds to a getPayload request from the proposer.
    fn get_payloads_delivered(&self) -> Result<Vec<ProposerPayloadsDeliveredQuery>, Self::Error> {
        Err("Not implemented".into())
    }

    /// Get builder bid submissions.
    /// Returns a list of builder bids without execution payloads.
    /// Only submissions that were successfully verified.
    fn get_builder_bids(&self) -> Result<Vec<BuilderBlocksReceivedQuery>, Self::Error> {
        Err("Not implemented".into())
    }

    /// Check that a validator is registered with the relay.
    /// Returns the latest validator registration for a given pubkey.
    fn check_validator_registration(&self, pubkey: PublicKey) -> Result<todo!("add missing struct"), Self::Error> {
        Err("Not implemented".into())
    }
}

Which I guess could be made more generic for consumers along the lines of:
pub trait MevBoostRelayClient {
    type Error;

    // Get a list of validator registrations for validators scheduled to propose in the current and next epoch.
    fn get_validators(&self) -> Result<Vec<Validator>, Self::Error>;

    // Submit a new block to the relay.
    fn submit_block(&self, block: SignedBidSubmission) -> Result<(), Self::Error>;

    // Get payloads that were delivered to proposers.
    fn get_payloads_delivered(&self) -> Result<Vec<ProposerPayloadsDeliveredQuery>, Self::Error>;

    // Get builder bid submissions.
    fn get_builder_bids(&self) -> Result<Vec<BuilderBlocksReceivedQuery>, Self::Error>;

    // Check that a validator is registered with the relay.
    fn check_validator_registration(&self, pubkey: PublicKey) -> Result<ValidatorRegistration, Self::Error>;
}

and then
pub struct ExampleMevBoostRelayClient {
    base_url: String,
}

impl ExampleMevBoostRelayClient {
    pub fn new(base_url: String) -> Self {
        ExampleMevBoostRelayClient { base_url }
    }
}

impl MevBoostRelayClient for ExampleMevBoostRelayClient {
    type Error = MyErrorType;

    fn get_validators(&self) -> Result<Vec<Validator>, Self::Error> {
        todo!("Implement get_validators")
    }

    fn submit_block(&self, block: SignedBidSubmission) -> Result<(), Self::Error> {
        todo!("Implement submit_block")
    }

    fn get_payloads_delivered(&self) -> Result<Vec<ProposerPayloadsDeliveredQuery>, Self::Error> {
        todo!("Implement get_payloads_delivered")
    }

    fn get_builder_bids(&self) -> Result<Vec<BuilderBlocksReceivedQuery>, Self::Error> {
        todo!("Implement get_builder_bids")
    }

    fn check_validator_registration(&self, pubkey: PublicKey) -> Result<ValidatorRegistration, Self::Error> {
        todo!("Implement check_validator_registration")
    }
}

or
impl<T: FullMevBoostRelayClient> MevBoostRelayClient for T {
    type Error = T::Error;

    fn get_validators(&self) -> Result<Vec<Validator>, Self::Error> {
        <Self as FullMevBoostRelayClient>::get_validators(self)
    }

    fn submit_block(&self, block: SignedBidSubmission) -> Result<(), Self::Error> {
        <Self as FullMevBoostRelayClient>::submit_block(self, block)
    }

    fn get_payloads_delivered(&self) -> Result<Vec<ProposerPayloadsDeliveredQuery>, Self::Error> {
        <Self as FullMevBoostRelayClient>::get_payloads_delivered(self)
    }

    fn get_builder_bids(&self) -> Result<Vec<BuilderBlocksReceivedQuery>, Self::Error> {
        <Self as FullMevBoostRelayClient>::get_builder_bids(self)
    }

    fn check_validator_registration(&self, pubkey: PublicKey) -> Result<ValidatorRegistration, Self::Error> {
        <Self as FullMevBoostRelayClient>::check_validator_registration(self, pubkey)
    }
}

@mattsse If this is to be implemented, I can take this.

@mattsse If this is to be implemented, I can take this.

I have already implemented this x) but happy to share/help you out


mongoengine DecimalField will no work on the DocumentSerializers.

/usr/local/lib/python2.7/dist-packages/rest_framework_mongoengine/serializers.py(304) in get_fields
            ret[field_name] = field_cls(**kwargs)

this is the error msg, the error was because rest-framework DecimalField need two required Field: max_digits, decimal_places,. which cannot set or get from the mongoengine DecimalField.

This issue will be addressed on weekend, sorry for late response

Fixed in trunk
See test


Ruby 2.7 minimal target version requirement

@CAMOBAP should this PR be merged? Thanks.

@ronaldtse I think so, But because I just updated it , I would like to get @maxirmx  feedback first because he is original author

@ronaldtse @CAMOBAP It looks like it fails on Ruby 3.2 due to issues with several gems
I can look at it if necessary

@maxirmx thanks for feedback I propose to fix it in separate PR, Goint to merge this one


Don't sign if request has Authorization header.

Two things that could be improved:

'static lifetime for assert_contains* is too strict, but I couldn't figure out what the right lifetime should be. The error was:
error[E0310]: the parameter type `T` may not live long enough
   --> sxg_rs/src/headers.rs:230:7
    |
229 |     fn assert_contains_err<T, U>(result: Result<T, U>, err: U) where T: Debug + Send, U: Debug + PartialEq {
    |                            - help: consider adding an explicit lifetime bound...: `T: 'static`
230 |       assert!(result.is_err(), result.unwrap());
    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

Perhaps we could introduce spectral as a dev-dependency for its result assertions. What do you think?

BTreeMap is an unnecessary constraint on prod code. I guess the alternative is a test function to convert HeaderFields back into HashMap, so the assert_contains will naturally work. What do you think?

Fixes #11.

OK, I fixed the BTreeMap thing by making header_fields polymorphic. But let me know what you think about spectral.


Netlib WebSockets take 1

Hello mitmproxy!
This PR introduces the beginnings of a RFC-06455 WebSockets library in netlib.
I've tried to style it like the rest of netlib in a very modular and readable fashion. As more concrete needs for the library arise we will have a better picture for what needs to be added, but I think this gives us a nice starting point.
I've implemented just enough to get a basic echo server integration test passing, which means we've got enough to start manipulating and serializing frames in mitmdump.
I'm not a python dev and I'm fairly new to networking and bit twiddling so I'm not married to any of this and look forward to getting your feedback.
There are obviously many many things that need to be added, beginning with more unit and integration tests and working on pathod. All things I can get started on if this looks like it's going in the right direction.
Eventually, it might be nice for the reference client/server to be correct enough to pass the Autobahn WebSockets tests. http://autobahn.ws/testsuite/
PS if you like this, maybe make a websockets branch in the main netlib repo for me to start sending PRs against?

Coverage decreased (-1.85%) to 98.15% when pulling e41e5cbfdd7b778e6f68e86658e95f9e413133cb on Chandler:websockets into e58f76aec1db9cc784a3b73c3050d010bb084968 on mitmproxy:master.

Coverage decreased (-1.85%) to 98.15% when pulling e41e5cbfdd7b778e6f68e86658e95f9e413133cb on Chandler:websockets into e58f76aec1db9cc784a3b73c3050d010bb084968 on mitmproxy:master.

This is an excellent beginning. Below are some rough, off-the-top-of-my-head comments. If you don't have time to hack further over the weekend, I'll make some of these adaptations and merge to master, and we can continue from there.

Please build on the reader and writer implementations in tcp.py directly. Have a look at the implementations in http.py and socks.py to see this style in action. You've already stepped in this direction by parameterising read_bytes in your work, so we're on the same page. It's just that we can have a flatter abstraction. It looks like socks.py has the closest structure to this module, so try to carry over the API and conventions there.

The stuff in implementations.py belong in pathod or possibly test suite. Teaching pathod and pathoc about websockets will be quite a bit of work, but will pay huge dividends. We rely on it completely to stress these implementations. I'll start thinking about how to extend the mini-language there to let us craft websocket frames. Exciting.

We definitely want to maintain 100% line coverage for the netlib unit test suite. So, lots more tests, please. :-)

Make validate_frame return a bool, and remove the use_validation option from the constructor. We can call validation if we want to know if the frame is valid and take it out of places like to_bytes.

It looks to me like the constructor should do a lot of the work that the default_frame_from_message currently does.

from_bytes and from_byte_stream can collapse if we're using the tcp.py abstractions directly.

:+1:
Excited for this. :smile:

hey thanks for the fast reply.
I have some time this weekend, but how about I focus on addressing the test coverage and I'll take your offer to let you to make some of those changes (I gave you push access on my fork so you can update this PR)

Coverage decreased (-1.15%) to 98.85% when pulling 0edc04814e3affa71025938ac354707b9b4c481c on Chandler:websockets into e58f76aec1db9cc784a3b73c3050d010bb084968 on mitmproxy:master.

Coverage decreased (-1.15%) to 98.85% when pulling 0edc04814e3affa71025938ac354707b9b4c481c on Chandler:websockets into e58f76aec1db9cc784a3b73c3050d010bb084968 on mitmproxy:master.

made some small changes, still working on lots more tests.

Make validate_frame return a bool
Done, with safe_to_bytes() option

The stuff in implementations.py belong in pathod or possibly test suite.
pathod will be great so we can use them to test mitmproxy, but I guess I'll put it in the tests directory in the meantime.

Might be kind of cool to also make the netlib unit tests importable by other projects so we could run all of the netlib websocket tests through a mitmproxy just to prove that it doesn't interfere with anything

It looks to me like the constructor should do a lot of the work that the default_frame_from_message currently does.
The constructor just allows setting of the values without any logic so that the default builder and the byte_reader can build frames as they choose. Not seeing a great way to make the constructor act like default() and still be able to construct the object from raw values.

Coverage decreased (-1.57%) to 98.43% when pulling f131f9b855e77554072415c925ed112ec74ee48a on Chandler:websockets into e58f76aec1db9cc784a3b73c3050d010bb084968 on mitmproxy:master.

Coverage decreased (-1.57%) to 98.43% when pulling f131f9b855e77554072415c925ed112ec74ee48a on Chandler:websockets into e58f76aec1db9cc784a3b73c3050d010bb084968 on mitmproxy:master.

Coverage decreased (-1.57%) to 98.43% when pulling 0ed2a290639833d772b89cf333577820e84f8204 on Chandler:websockets into e58f76aec1db9cc784a3b73c3050d010bb084968 on mitmproxy:master.

Coverage decreased (-0.73%) to 99.27% when pulling 2d72a1b6b56f1643cd1d8be59eee55aa7ca2f17f on Chandler:websockets into e58f76aec1db9cc784a3b73c3050d010bb084968 on mitmproxy:master.

Great work :+1: :smile:

Great work - thanks! Lets continue this on master. :)


Programmatic usage of nuxt with express serverMiddleware as API doesn't share or update req.session

Version
2.1
Reproduction link
https://google.com
Steps to reproduce
Hi, I am using nuxt programmatically and using serverMiddleware with it's own express instance which modifies req.user on some api endpoints.
However, when I navigate to different routes after mutating req.user, nuxt is overriding req.user with one from an earlier state. I believe it is because the serverMiddleware version and nuxt are using different instances of connect under the hood.
Has anyone else experienced this, and how have you dealt with it?
I can confirm the connect.sid is the same for both the nuxt routes and api routes.
Thank you.
What is expected ?
req.user being mutated in api and nuxt routes.
What is actually happening?
req.user is not mutated in nuxt routes.

This bug report is available on Nuxt community (#c8046)

Here are steps to repro, adding a few route handlers to the auth example:
app.get('*', function (req, res,next) {
  req.session.user = "jimmy"
   next()
})
app.get('/mutate', function (req, res) {
  req.session.user = "bob"
  res.send(200)
})
app.get('/user', function (req, res) {
  res.send(req.session.user)
})

Navigate to a nuxt route, like /page/123.
Navigate to /user // outputs "jimmy"
Navigate to /mutate // OK
Navigate to /user // outputs "bob" — good!
Navigate to /page/123
Navigate to /user // outputs "jimmy" — ???

So it seems as though nuxt is not picking up the changes to req.session that are happening.

@nikkwong Can you add a Codesandbox please (just fork the referred example and add your changes)?


Second paste

Description of the new feature / enhancement
I'm suggesting a shortcut for the second-last clipboard item, if that is possible.
Example:
The clipboard contains 3 elements that are "a", "b", and "c" from the most recent to the less recent. Ctrl+V pastes "a". I think it would be useful if a shortcut like Ctrl+Alt+V could paste "b". And, if now I add to the clipboard an element "z", Ctrl+V is going to paste "z" and  Ctrl+Alt+V is going to paste "a".
Note:
There is a combination of keys to do the same thing actually, that is Win+V (open clipboard) then ↓ (select the second item) then Enter (paste selected item). But that is relatively long, and it's not useful because after that operation Ctrl+V is going to paste the last pasted item and not the last added to the clipboard.
Scenario when this would be used?
It's going to be a very good feature every time we need to deal with two clipboard items in a fast way.
Supporting information
No response

Seems like this issue would be a duplicate of #671. Thoughts? /needinfo


Added 'in some circumstances' and more wording

Made it clearer it's less likely they will have to pay as per DLUHC. More clarification on help residents can get.
⚠ This repo is Continuously Deployed: make sure you follow the guidance ⚠

TRELLO: https://trello.com/c/mKm4pizX/3386-18-july-leaseholder-guidance-smart-answer-required
CHANGE NOTES: https://docs.google.com/document/d/1jO8mgJNFIDQd3VSEX2OKo5qyUC2_ohDp021QSoo0GfM/edit#
Changes to smart answer outcomes (created by Ed Kerry) as requested by DLUHC, who want to make it clearer that most people will get help. One change I'll need to request through Content Storytime as it involves revoking a calculation (I think). Apologies if I haven't done this correctly. Thanks


MGMT-1577 Host role auto selection

Automatically set host role after it send hw info.
First trying to fill the masters role, after 3 masters all roles will be set to workers
Using channel as a queue to prevent races between different hosts.
If user already set the role it will not be changed.

test-infra passed http://<IP_ADDRESS>:8080/job/test-infra/1956/


Updated CONTRIBUTING.md

Description

CONTRIBUTING.md contains instructions for both contributions through through PCs run locally and the GitHub desktop.

Resolves: [198]
Checklist

Before submitting this pull request, kindly verify that the ensuing checkpoints have been reached.

[✓ ] Have you adhered to the repository's defined coding convention rules?
[ ✓] Have you updated the 'documentation.md' file with the method/function documentation?
[✓ ] Have you sent a message along with the result or response?
[✓ ] Have you used the try-catch technique?
[ ✓] Has the method/class been added to the documentation (md file)?

Screenshots

I certify that I have carried out the relevant checks and provided the requisite screenshot for validation by submitting this pull request.
I appreciate your contribution.

#198


Important dudes

When the bot makes purchases, does it make them in cash and when it makes sales, does the future make them? or only trade futures?
Also with what leverage

Arbitrader does not do anything with futures. It only does spot trades on cryptocurrency markets. Please read the README where there is a step-by-step example of how Arbitrader trades.


Draft comms for v4.2.0

What
Draft comms for the next release (v4.2.0).
Why
So that users know what is included in v4.2.0 and want to update.
How

[x] Draft a PR to update the 'What's new' section on the Design System homepage and update the roadmap
[x] Made sure to thank any contributors for this release - we should thank the people who raised the ESM issues and help us test pre-releases:

[x] https://github.com/alphagov/govuk-frontend/issues/2645
[x] https://github.com/alphagov/govuk-frontend/issues/2643
[x] https://github.com/alphagov/govuk-frontend/issues/2633

[ ] Draft Slack messages for #govuk-design-system on GDS, #govuk-design-system on x-gov and #design on x-gov
[x] Draft an email to send to the mailing list

Who needs to work on this
Developers; Content Design; Tech Writer
Done when

[x]  Comms approach and key messages planned with team members involved
[x] Made sure to thank any contributors for this release
[x] Comms drafted
[x] Feedback gathered from team members involved
[x] 2i'ed and approved with any subject matter experts

What's new and roadmap update PR: https://github.com/alphagov/govuk-design-system/pull/2227


Jude - Chapter 1 Homework 5

Completed the homework for Ch. 1 HW 5. All tests pass

Still waiting to fix the reusing.

Looks good 😄


Stub files contain duplicate argument names

The stub for Chem.rdMolDescriptors.PythonPropertyFunctor.__init__ contains two arguments named self. This naturally makes type checkers complain.
Configuration

RDKit version: 2024.3.1
OS: Ubuntu 22.04
Python version: 3.12.4
How did you install the RDKit? From PyPI using pip

+1, this is blocking RDKit version update for scikit-fingerprints

My two cents: the stubs are a nice-to-have that can make life easier. They are not guaranteed to be correct and are not necessary for correct use of the RDKit. I am not willing to commit to fix every possible stub problem going forward into the future.
If a problem with the stubs is going to cause your CI builds to fail, then you probably ought to look into updating the way your CI builds work.

More than making type checkers complain, this actually causes them to error and exit! Preventing all further type checking of a project!
My error:
/home/cbh/.cache/pypoetry/virtualenvs/qcio-RA1cVAvH-py3.8/lib/python3.8/site-packages/rdkit-stubs/Chem/rdMolDescriptors.pyi:247: error: Duplicate argument "self" in function definition

This refers to this line of code:
    def __init__(self, self: typing.Any, name: str, version: str) -> None: # NOTE DOUBLE self HERE!
        """
            C++ signature :
                void __init__(_object*,_object*,std::string,std::string)
        """

I believe this is there the function is registered on the C++ side: https://github.com/rdkit/rdkit/blob/cba05a9b3a4fe38f50100b5cc5d17890517be526/Code/GraphMol/Descriptors/Wrap/rdMolDescriptors.cpp#L1627

@coltonbh yeah, this will make mypy, pyright and any other type checker error, since they require type annotations recursively. There are ways to disable this, e.g. you can configure mypy to not check site-packages at all, but this will work globally for all packages.
@greglandrum if the stubs are core part of RDKit, and not rdkit-stubs (which I never had problems with before), I quite heavily disagree with this policy. The intended purpose of type checkers for any dynamically typed language, including Python, is not only to reduce the number of bugs, but also to enhance code security. This is why strict type checking for Python is enforced in many companies for many projects, e.g. Microsoft (pyright), Meta (pyre), also many Google projects (mostly mypy), and also where I work. Type checking is a first smoke test, along with code style checks and security scans, even before running the actual unit and integration test. This is the best we can do with dynamic languages, and can't switch from Python due to DS and ML applications.
In scikit-fingerprints (and any other projects where I use RDKit), we use pre-commit hooks and require all checks to pass even to make any single Git commit, even locally, and this is considered a good practice for Python. Relatively modern, but still, definitely best practice. mypy, along with bandit (code vulnerability scans) and safety (dependency vulnerability scans) are the first line of defense. For those reasons, I want (and implement this) not only CI to fail when there are problems with typing, I want my local Git to block and complain. So typing is absolutely much more than "just documentation".
My current solution was to remove type checking for all site-packages. However, I kindly request you to reconsider this policy.

This should be fixable by changing https://github.com/rdkit/rdkit/blob/cba05a9b3a4fe38f50100b5cc5d17890517be526/Code/GraphMol/Descriptors/Wrap/rdMolDescriptors.cpp#L1628
to
          python::args("callback", "name", "version")))

Boost docs seem to suggest omitting the self arg when using python::init but it looks like the standard in rdkit it to name self explicitly. So maybe this version would be better received:
          python::args("self", "callback", "name", "version")))

Boost docs seem to suggest omitting the self arg when using python::init but it looks like the standard in rdkit it to name self explicitly. So maybe this version would be better received:
          python::args("self", "callback", "name", "version")))

Yeah, I think this would do it.
@ptosco added the "self" arguments when he wrote the code to create the stubs and I believe that was specifically because of the stubs.

Sorry for the delay in replying to this thread (I am on a cycling holiday and have little time). I’ll look into applying the suggested fix over the next 2-3 days.

Sorry for the delay in replying to this thread (I am on a cycling holiday and have little time). I’ll look into applying the suggested fix over the next 2-3 days.

@ptosco no worries! Enjoy your holidays!

upvoting this issue this is breaking out ability to upgrade
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/rdkit-stubs/Chem/rdMolDescriptors.pyi:247: error: Duplicate argument "self" in function definition


Update README

This update correlates to the extension of R2D2's capabilities to include the decryption of Google Pay tokens in #13 .

@rwdaigle I have updated according to your comments, with the exception of the verification_keys (see my response there).
I have also consulted the semantic versioning guidelines, which are generally used by the Ruby community when it comes to updating gems. Please see the changes to the Changelog section and share your thoughts.

Closed w/ https://github.com/spreedly/r2d2/commit/298940b927db8b1e61a7c24e1b1cb0a97e6a16b5


Different line plots for different hosts

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

I am running Locust tests for 2 hosts in the same session. My code looks like this

from locust import HttpUser, task, between

class api1(HttpUser):

    host = 'http://localhost:6001'
    wait_time = between(2, 4)

    @task()
    def api1_ep1(self):
        self.client.post('/ep1')

    @task()
    def api1_ep2(self):
        self.client.post('/ep2')

class api2(HttpUser):

    host = 'http://localhost:6002'
    wait_time = between(2, 4)

    @task()
    def api2_ep1(self):
        self.client.post('/ep1')

    @task()
    def api2_ep2(self):
        self.client.post('/ep2')

Let's say, one host is the dev system and one is the test system. I want to plot the users for different hosts at once. Currently, the plot for the Number of Users looks like this

Describe the solution you'd like

Once I run multiple hosts, I need a line plot that is exclusive for each user type or for each host. Something like this

Could you also please let me know if there is already a workaround here?

You can use the name parameter.
Instead of
def api1_ep1(self):
    self.client.post('/ep1')

use
def api1_ep1(self):
    self.client.post('/ep1', name='api1_ep1')


Make all RPC's interruptable

What type of PR is this?
/kind feature
What this PR does / why we need it:
Add other RPCs are now interruptable as well.
Which issue(s) this PR fixes:
Follow-up on https://github.com/kubernetes-sigs/cri-tools/pull/1462
Special notes for your reviewer:
Does this PR introduce a user-facing change?

Make container and sandbox related commands interruptable using Ctrl-C.

/lgtm


fix: Refactor with escape sequences

Fixes #8584
Stringifying entire dsl and action configuration objects was making the escape sequence characters be treated as separate characters. This was failing replacement logic while refactor. This fix swaps out stringification with recursive looping through dsl and action config to perform accurate replacement,

/ok-to-test sha=c0c1dcf


feat: add SwapResult

Added a node that can conditionally swap a terminal result (Success / Failure), rather than unconditionally invert the result, like Inverter

Ended up not needing this node. Closing without merge


Bug/navbar format

Problem
What problem or issue does this pull request solve Jira C2D-111
Jira C2D-106
Solution
What I/we did to solve this problem
Change Summary:
Dev-Ops
If you added an ENV variable, please check off that you've updated the following

[ ] Key & Sample value to .env & sample.env
[ ] GCP Secret Manager (Both development and production)
[ ] Github Secrets (Added a development and production variable)
[ ] Github Workflows .github/workflows/dev.yml & .github/workflows/prod.yml
[ ] webpack-config.js

Images/Important Notes (optional):

Insert any notes/issues, dependencies added or removed, or images

So, I'm not sure if it's too late for a change like this, but I was thinking that instead of making the navbar become a hamburger when the viewport becomes too small, we should make it so that it becomes like that when the width < height, cuz I feel that at that point the navbar buttons become to small to comfortably use, especially if they're a tablet user.

I think this makes sense to me. I think for this PR we'll let it pass but I'll definitely check in with design about this functionality for maybe a future small bug

So, I'm not sure if it's too late for a change like this, but I was thinking that instead of making the navbar become a hamburger when the viewport becomes too small, we should make it so that it becomes like that when the width < height, cuz I feel that at that point the navbar buttons become to small to comfortably use, especially if they're a tablet user.

That's a good point sid. I don't have a tablet so I haven't personally tested it out, but I could see how including tablets in the mobile design would make sense

This latest commit is a change that follow's sid's suggestion. Check it out let me know what you think.
There's two smallish issues I have with this.  On a tablet I wonder if centering the menu options is not the call. It may be cumbersome to reach towards the middle of the screen to navigate to a different page. This is an ipad pro:
.
Second, the design seems to look good for all devices except for the nest hub:

.

In the nest hub's case, the width is still larger than the height, however it is small enough for the breakpoint to take over.


Interop with wsl.exe export/import and/or docker export/load

I'm curious about whether LxRunOffline is capable of inter-operating with either:

Distros exported directly from WSL: wsl.exe --export Distro distro.tar
Containers exported from docker: docker export --output=test-distro.tar test-container

Can LXRunOffline be able to import these? And vice versa, can images exported by LXRunOffline be imported using docker or wsl.exe directly?

In case anyone lands here, the answer is, apparently, yes, at least from docker -> WSL through LXRunOffline. I have been able to successfully use LXRunOffline to import a docker image exported through docker export directly into WSL. The only gotchas are that the WSL distro loses any environment variables that were set in the docker image.

I'm really sorry that I totally forget this issue until you posted the comment (because I accidentally deleted it from my to-do list)
Happy to see that you have figured it out yourself. As for the environment variables, the docker export command doesn't save them to the exported tar archive so unfortunately there's nothing I can do on my side.

Thanks for the response @DDoSolitary. For our use case, the environment variables are not a big problem. The current behaviour is perfectly acceptable.


Fix Update-Help broken by HTTPS

Per Twitter report from @juneb: https://twitter.com/Steve_MSFT/status/811637064684814336
Reminder that HTTPS is not supported in the HelpInfoURI:
update-help : Failed to update Help for the module(s) :
'PowerShellGet'
The HelpInfoURI https://go.microsoft.com/fwlink/?LinkId=393271 does not start with HTTP.
At line:1 char:1
+ update-help powershellget
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (HelpInfoUri:Uri) [Update-Help], Exception
    + FullyQualifiedErrorId : InvalidHelpInfoUriFormat,Microsoft.PowerShell.Commands.UpdateHelpCommand

This was broken again by #195


chore: update development environment script

What this PR does / why we need it:
Tilt environment was failing to run rancher-turtles-controller because some of the pre-install operations performed when using helm install were not applied. To compensate for this, the script that creates the development environment is now updated to install cluster-api-operator (together with cert-manager) and default to rancher:v2.8.1.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
As a follow-up, we should also add a test case that covers the development environment #339.
Checklist:

[x] squashed commits into logical changes
[ ] includes documentation
[ ] adds unit tests
[ ] adds or updates e2e tests

@furkatgofurov7 right now only Rancher Turtles is shown in Tilt's UI. My Tilt knowledge is quite limited but I understand this is expected as we're not watching/building any controller other than Turtles and they're simply installed when configuring the environment. Should we be building this as is done in core CAPI's Tilt setup?
Don't know about CAPI Operator, but Rancher Turtles was failing as it was looking for the resource.

My Tilt knowledge is quite limited but I understand this is expected as we're not watching/building any controller other than Turtles and they're simply installed when configuring the environment. Should we be building this as is done in core CAPI's Tilt setup?

No, at least with not this PR maybe, but overall it is possible to add other controllers to the ALL.controllers list in the Tiltfile and get their logs shown in the Tilt UI which would be easier to debug.

Thanks @furkatgofurov7. Having logs from other controllers would definitely be more useful, I'll take a look at how to add this to the Tilt configuration and update this PR.

Thanks @furkatgofurov7. Having logs from other controllers would definitely be more useful, I'll take a look at how to add this to the Tilt configuration and update this PR.

@salasberryfin @furkatgofurov7 - i think this only originally showed the turtles controller. So i'd propose lets get it working with that only and then think about adding other controllers in the future. wdyt?

Resolved reviews and moved from WIP.

Just remembered, since this is updated we need to adapt notes accordingly in docs repo: https://docs.rancher-turtles.com/docs/contributing/development#what-happens-when-you-run-make-dev-env

Thanks for this @salasberryfin .


UK YouView usage stats

the url reporting-tv1-live.youview.tv seems to report the watching habits of YouView users. Not sure where it should go. The URL seems to suggest there's other ones, but I have not observed any other ones so far.

closing.


CQL dialect name not using "DMTF:CQL" format

I tried to execute the following CQL query:
wsman -h localhost -u user -p pass  enumerate 'http://schemas.dmtf.org/wbem/wscim/1/*'  --dialect="http://schemas.dmtf.org/wbem/cql/1/dsp0202.pdf" --filter="SELECT Name, VendorName FROM CIM_PCIDevice WHERE ClassCode = 12"

If the local CIMOM is sblim-sfcb, then it works perfectly.
However, if the CIMOM is OpenPegasus, then CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED is returned.
(I tried on a Fedora 21 Server Minimal x86, tog-pegasus.i686 2:2.13.0-17.fc21, openwsman-server.i686 2.4.6-3.fc21).
The problem is, that for the ExecQuery CIM-XML call openwsman sets the query language to "CQL", while OpenPegasus expects "DMTF:CQL".
If I change it in sfcc-interface.c:1191, then the query is executed successfully.
As far as I see in version 1.0.0 of DSP202 'CIM Query Language Specification', Section 6.1  Identifying the CIM Query Language:

Following this convention, the string "DMTF:CQL" identifies the CIM Query Language.

Moreover, sblim-sfcb also accepts the DMTF:CQL format. In version 1.4.9, querystatement.c, line 277:
else if (strcasecmp(lang, "cql") == 0 || strcasecmp(lang, "cim:cql") == 0 || strcasecmp(lang, "dmtf:cql") == 0) {
  ctl.statement->lang = QL_CQL;

Of course changing this could break compatibility with other apps. Maybe it could be a configuration setting?

Thanks for the report !
Yes, this needs to be configurable since e.g. sblim-sfcb 1.3.11 (used on SUSE Linux Enterprise Serevr 11) requires CQL
Added new config option cim_client_cql, defaults to CQL

Fixed


Support for test execution on windows.

github actions windows deserves it's own job definition - reenable most checks for windows
node-fetch on windows, needs proper file:// URL
increase LicenseHeaderCheck as glob is slower on windows
PerformanceTimer#now test fixed

Test comment from bot
The 'foo test failed', here is diff:


Interview Command

Implemented:

Interview Add
Interview Delete
Interview Edit
Interview List (partially, will be fully implemented together with UI)
Test cases
Modify Json to include Interview
Update UG

Todo:

Update DG

Possible Future Change:

Change list of interviews into an observable list (not sure if necessary as we wont really be using find or sort commands on it)

Looks good, thanks!


I just wrote code. It has happened many times already, and it's getting on my nerves. I now have a fear of completion in the back of my mind, because I know: if completion takes only slightly longer, and I didn't maniacally spam save file, then my work would be gone.
It surprises me at times when I least expect it.
What did you see happen?
I saw a crash. Enabled tracing. I suspect it's because of this suspiciously long jsonrpc message. It crashed multiple times, and each time I saw some very long message as the last message in the log.
tail -n 4 emacs.log

[Trace - 10:52:49.574 AM] Received response 'textDocument/completion - (335)' in 12ms.
Result: {"isIncomplete":true,"items":[{"label":"Any","kind":3,"detail":"func(key string, value any) slog.Attr","documentation":{"kind":"markdown","value":"Any returns an Attr for the supplied value. See \\[AnyValue] for how values are treated.\n"},"preselect":true,"sortText":"00000","filterText":"Any","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Any(${1:})"}},{"label":"AnyValue","kind":3,"detail":"func(v any) slog.Value","documentation":{"kind":"markdown","value":"AnyValue returns a \\[Value] for the supplied value.\n\nIf the supplied value is of type Value, it is returned unmodified.\n\nGiven a value of one of Go's predeclared string, bool, or (non-complex) numeric types, AnyValue returns a Value of kind \\[KindString], \\[KindBool], \\[KindUint64], \\[KindInt64], or \\[KindFloat64]. The width of the original numeric type is not preserved.\n\nGiven a [time.Time](https://pkg.go.dev/time#Time) or [time.Duration](https://pkg.go.dev/time#Duration) value, AnyValue returns a Value of kind \\[KindTime] or \\[KindDuration]. The monotonic time is not preserved.\n\nFor nil, or values of all other types, including named types whose underlying type is numeric, AnyValue returns a value of kind \\[KindAny].\n"},"sortText":"00001","filterText":"AnyValue","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"AnyValue(${1:})"}},{"label":"Attr","kind":22,"detail":"struct{...}","documentation":{"kind":"markdown","value":"An Attr is a key-value pair.\n"},"sortText":"00002","filterText":"Attr","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Attr"}},{"label":"Bool","kind":3,"detail":"func(key string, v bool) slog.Attr","documentation":{"kind":"markdown","value":"Bool returns an Attr for a bool.\n"},"sortText":"00003","filterText":"Bool","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Bool(${1:})"}},{"label":"BoolValue","kind":3,"detail":"func(v bool) slog.Value","documentation":{"kind":"markdown","value":"BoolValue returns a \\[Value] for a bool.\n"},"sortText":"00004","filterText":"BoolValue","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"BoolValue(${1:})"}},{"label":"Debug","kind":3,"detail":"func(msg string, args ...any)","documentation":{"kind":"markdown","value":"Debug calls \\[Logger.Debug] on the default logger.\n"},"sortText":"00005","filterText":"Debug","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Debug(${1:})"}},{"label":"DebugContext","kind":3,"detail":"func(ctx context.Context, msg string, args ...any)","documentation":{"kind":"markdown","value":"DebugContext calls \\[Logger.DebugContext] on the default logger.\n"},"sortText":"00006","filterText":"DebugContext","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"DebugContext(${1:})"}},{"label":"Default","kind":3,"detail":"func() *slog.Logger","documentation":{"kind":"markdown","value":"Default returns the default \\[Logger].\n"},"sortText":"00007","filterText":"Default","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Default()"}},{"label":"Duration","kind":3,"detail":"func(key string, v time.Duration) slog.Attr","documentation":{"kind":"markdown","value":"Duration returns an Attr for a [time.Duration](https://pkg.go.dev/time#Duration).\n"},"sortText":"00008","filterText":"Duration","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Duration(${1:})"}},{"label":"DurationValue","kind":3,"detail":"func(v time.Duration) slog.Value","documentation":{"kind":"markdown","value":"DurationValue returns a \\[Value] for a [time.Duration](https://pkg.go.dev/time#Duration).\n"},"sortText":"00009","filterText":"DurationValue","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"DurationValue(${1:})"}},{"label":"Error","kind":3,"detail":"func(msg string, args ...any)","documentation":{"kind":"markdown","value":"Error calls \\[Logger.Error] on the default logger.\n"},"sortText":"00010","filterText":"Error","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Error(${1:})"}},{"label":"ErrorContext","kind":3,"detail":"func(ctx context.Context, msg string, args ...any)","documentation":{"kind":"markdown","value":"ErrorContext calls \\[Logger.ErrorContext] on the default logger.\n"},"sortText":"00011","filterText":"ErrorContext","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"ErrorContext(${1:})"}},{"label":"Float64","kind":3,"detail":"func(key string, v float64) slog.Attr","documentation":{"kind":"markdown","value":"Float64 returns an Attr for a floating-point number.\n"},"sortText":"00012","filterText":"Float64","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Float64(${1:})"}},{"label":"Float64Value","kind":3,"detail":"func(v float64) slog.Value","documentation":{"kind":"markdown","value":"Float64Value returns a \\[Value] for a floating-point number.\n"},"sortText":"00013","filterText":"Float64Value","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Float64Value(${1:})"}},{"label":"Group","kind":3,"detail":"func(key string, args ...any) slog.Attr","documentation":{"kind":"markdown","value":"Group returns an Attr for a Group \\[Value]. The first argument is the key; the remaining arguments are converted to Attrs as in \\[Logger.Log].\n\nUse Group to collect several key-value pairs under a single key on a log line, or as the result of LogValue in order to log a single value as multiple Attrs.\n"},"sortText":"00014","filterText":"Group","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Group(${1:})"}},{"label":"GroupValue","kind":3,"detail":"func(as ...slog.Attr) slog.Value","documentation":{"kind":"markdown","value":"GroupValue returns a new \\[Value] for a list of Attrs. The caller must not subsequently mutate the argument slice.\n"},"sortText":"00015","filterText":"GroupValue","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"GroupValue(${1:})"}},{"label":"Handler","kind":8,"detail":"interface{...}","documentation":{"kind":"markdown","value":"A Handler handles log records produced by a Logger.\n\nA typical handler may print log records to standard error, or write them to a file or database, or perhaps augment them with additional attributes and pass them on to another handler.\n\nAny of the Handler's methods may be called concurrently with itself or with other methods. It is the responsibility of the Handler to manage this concurrency.\n\nUsers of the slog package should not invoke Handler methods directly. They should use the methods of \\[Logger] instead.\n"},"sortText":"00016","filterText":"Handler","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Handler"}},{"label":"HandlerOptions","kind":22,"detail":"struct{...}","documentation":{"kind":"markdown","value":"HandlerOptions are options for a \\[TextHandler] or \\[JSONHandler]. A zero HandlerOptions consists entirely of default values.\n"},"sortText":"00017","filterText":"HandlerOptions","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"HandlerOptions"}},{"label":"Info","kind":3,"detail":"func(msg string, args ...any)","documentation":{"kind":"markdown","value":"Info calls \\[Logger.Info] on the default logger.\n"},"sortText":"00018","filterText":"Info","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Info(${1:})"}},{"label":"InfoContext","kind":3,"detail":"func(ctx context.Context, msg string, args ...any)","documentation":{"kind":"markdown","value":"InfoContext calls \\[Logger.InfoContext] on the default logger.\n"},"sortText":"00019","filterText":"InfoContext","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"InfoContext(${1:})"}},{"label":"Int","kind":3,"detail":"func(key string, value int) slog.Attr","documentation":{"kind":"markdown","value":"Int converts an int to an int64 and returns an Attr with that value.\n"},"sortText":"00020","filterText":"Int","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Int(${1:})"}},{"label":"Int64","kind":3,"detail":"func(key string, value int64) slog.Attr","documentation":{"kind":"markdown","value":"Int64 returns an Attr for an int64.\n"},"sortText":"00021","filterText":"Int64","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Int64(${1:})"}},{"label":"Int64Value","kind":3,"detail":"func(v int64) slog.Value","documentation":{"kind":"markdown","value":"Int64Value returns a \\[Value] for an int64.\n"},"sortText":"00022","filterText":"Int64Value","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Int64Value(${1:})"}},{"label":"IntValue","kind":3,"detail":"func(v int) slog.Value","documentation":{"kind":"markdown","value":"IntValue returns a \\[Value] for an int.\n"},"sortText":"00023","filterText":"IntValue","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"IntValue(${1:})"}},{"label":"JSONHandler","kind":22,"detail":"struct{...}","documentation":{"kind":"markdown","value":"JSONHandler is a \\[Handler] that writes Records to an [io.Writer](https://pkg.go.dev/io#Writer) as line-delimited JSON objects.\n"},"sortText":"00024","filterText":"JSONHandler","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"JSONHandler"}},{"label":"Kind","kind":7,"detail":"int","documentation":{"kind":"markdown","value":"Kind is the kind of a \\[Value].\n"},"sortText":"00025","filterText":"Kind","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Kind"}},{"label":"KindAny","kind":21,"detail":"slog.Kind","documentation":{"kind":"markdown","value":""},"sortText":"00026","filterText":"KindAny","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"KindAny"}},{"label":"KindBool","kind":21,"detail":"slog.Kind","documentation":{"kind":"markdown","value":""},"sortText":"00027","filterText":"KindBool","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"KindBool"}},{"label":"KindDuration","kind":21,"detail":"slog.Kind","documentation":{"kind":"markdown","value":""},"sortText":"00028","filterText":"KindDuration","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"KindDuration"}},{"label":"KindFloat64","kind":21,"detail":"slog.Kind","documentation":{"kind":"markdown","value":""},"sortText":"00029","filterText":"KindFloat64","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"KindFloat64"}},{"label":"KindGroup","kind":21,"detail":"slog.Kind","documentation":{"kind":"markdown","value":""},"sortText":"00030","filterText":"KindGroup","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"KindGroup"}},{"label":"KindInt64","kind":21,"detail":"slog.Kind","documentation":{"kind":"markdown","value":""},"sortText":"00031","filterText":"KindInt64","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"KindInt64"}},{"label":"KindLogValuer","kind":21,"detail":"slog.Kind","documentation":{"kind":"markdown","value":""},"sortText":"00032","filterText":"KindLogValuer","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"KindLogValuer"}},{"label":"KindString","kind":21,"detail":"slog.Kind","documentation":{"kind":"markdown","value":""},"sortText":"00033","filterText":"KindString","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"KindString"}},{"label":"KindTime","kind":21,"detail":"slog.Kind","documentation":{"kind":"markdown","value":""},"sortText":"00034","filterText":"KindTime","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"KindTime"}},{"label":"KindUint64","kind":21,"detail":"slog.Kind","documentation":{"kind":"markdown","value":""},"sortText":"00035","filterText":"KindUint64","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"KindUint64"}},{"label":"Level","kind":7,"detail":"int","documentation":{"kind":"markdown","value":"A Level is the importance or severity of a log event. The higher the level, the more important or severe the event.\n"},"sortText":"00036","filterText":"Level","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Level"}},{"label":"LevelDebug","kind":21,"detail":"slog.Level","documentation":{"kind":"markdown","value":"Names for common levels.\n\nLevel numbers are inherently arbitrary, but we picked them to satisfy three constraints. Any system can map them to another numbering scheme if it wishes.\n\nFirst, we wanted the default level to be Info, Since Levels are ints, Info is the default value for int, zero.\n\nSecond, we wanted to make it easy to use levels to specify logger verbosity. Since a larger level means a more severe event, a logger that accepts events with smaller (or more negative) level means a more verbose logger. Logger verbosity is thus the negation of event severity, and the default verbosity of 0 accepts all events at least as severe as INFO.\n\nThird, we wanted some room between levels to accommodate schemes with named levels between ours. For example, Google Cloud Logging defines a Notice level between Info and Warn. Since there are only a few of these intermediate levels, the gap between the numbers need not be large. Our gap of 4 matches OpenTelemetry's mapping. Subtracting 9 from an OpenTelemetry level in the DEBUG, INFO, WARN and ERROR ranges converts it to the corresponding slog Level range. OpenTelemetry also has the names TRACE and FATAL, which slog does not. But those OpenTelemetry levels can still be represented as slog Levels by using the appropriate integers.\n"},"sortText":"00037","filterText":"LevelDebug","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"LevelDebug"}},{"label":"LevelError","kind":21,"detail":"slog.Level","documentation":{"kind":"markdown","value":"Names for common levels.\n\nLevel numbers are inherently arbitrary, but we picked them to satisfy three constraints. Any system can map them to another numbering scheme if it wishes.\n\nFirst, we wanted the default level to be Info, Since Levels are ints, Info is the default value for int, zero.\n\nSecond, we wanted to make it easy to use levels to specify logger verbosity. Since a larger level means a more severe event, a logger that accepts events with smaller (or more negative) level means a more verbose logger. Logger verbosity is thus the negation of event severity, and the default verbosity of 0 accepts all events at least as severe as INFO.\n\nThird, we wanted some room between levels to accommodate schemes with named levels between ours. For example, Google Cloud Logging defines a Notice level between Info and Warn. Since there are only a few of these intermediate levels, the gap between the numbers need not be large. Our gap of 4 matches OpenTelemetry's mapping. Subtracting 9 from an OpenTelemetry level in the DEBUG, INFO, WARN and ERROR ranges converts it to the corresponding slog Level range. OpenTelemetry also has the names TRACE and FATAL, which slog does not. But those OpenTelemetry levels can still be represented as slog Levels by using the appropriate integers.\n"},"sortText":"00038","filterText":"LevelError","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"LevelError"}},{"label":"LevelInfo","kind":21,"detail":"slog.Level","documentation":{"kind":"markdown","value":"Names for common levels.\n\nLevel numbers are inherently arbitrary, but we picked them to satisfy three constraints. Any system can map them to another numbering scheme if it wishes.\n\nFirst, we wanted the default level to be Info, Since Levels are ints, Info is the default value for int, zero.\n\nSecond, we wanted to make it easy to use levels to specify logger verbosity. Since a larger level means a more severe event, a logger that accepts events with smaller (or more negative) level means a more verbose logger. Logger verbosity is thus the negation of event severity, and the default verbosity of 0 accepts all events at least as severe as INFO.\n\nThird, we wanted some room between levels to accommodate schemes with named levels between ours. For example, Google Cloud Logging defines a Notice level between Info and Warn. Since there are only a few of these intermediate levels, the gap between the numbers need not be large. Our gap of 4 matches OpenTelemetry's mapping. Subtracting 9 from an OpenTelemetry level in the DEBUG, INFO, WARN and ERROR ranges converts it to the corresponding slog Level range. OpenTelemetry also has the names TRACE and FATAL, which slog does not. But those OpenTelemetry levels can still be represented as slog Levels by using the appropriate integers.\n"},"sortText":"00039","filterText":"LevelInfo","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"LevelInfo"}},{"label":"LevelKey","kind":21,"detail":"string","documentation":{"kind":"markdown","value":"LevelKey is the key used by the built-in handlers for the level of the log call. The associated value is a \\[Level].\n"},"sortText":"00040","filterText":"LevelKey","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"LevelKey"}},{"label":"LevelVar","kind":22,"detail":"struct{...}","documentation":{"kind":"markdown","value":"A LevelVar is a \\[Level] variable, to allow a \\[Handler] level to change dynamically. It implements \\[Leveler] as well as a Set method, and it is safe for use by multiple goroutines. The zero LevelVar corresponds to \\[LevelInfo].\n"},"sortText":"00041","filterText":"LevelVar","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"LevelVar"}},{"label":"LevelWarn","kind":21,"detail":"slog.Level","documentation":{"kind":"markdown","value":"Names for common levels.\n\nLevel numbers are inherently arbitrary, but we picked them to satisfy three constraints. Any system can map them to another numbering scheme if it wishes.\n\nFirst, we wanted the default level to be Info, Since Levels are ints, Info is the default value for int, zero.\n\nSecond, we wanted to make it easy to use levels to specify logger verbosity. Since a larger level means a more severe event, a logger that accepts events with smaller (or more negative) level means a more verbose logger. Logger verbosity is thus the negation of event severity, and the default verbosity of 0 accepts all events at least as severe as INFO.\n\nThird, we wanted some room between levels to accommodate schemes with named levels between ours. For example, Google Cloud Logging defines a Notice level between Info and Warn. Since there are only a few of these intermediate levels, the gap between the numbers need not be large. Our gap of 4 matches OpenTelemetry's mapping. Subtracting 9 from an OpenTelemetry level in the DEBUG, INFO, WARN and ERROR ranges converts it to the corresponding slog Level range. OpenTelemetry also has the names TRACE and FATAL, which slog does not. But those OpenTelemetry levels can still be represented as slog Levels by using the appropriate integers.\n"},"sortText":"00042","filterText":"LevelWarn","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"LevelWarn"}},{"label":"Leveler","kind":8,"detail":"interface{...}","documentation":{"kind":"markdown","value":"A Leveler provides a \\[Level] value.\n\nAs Level itself implements Leveler, clients typically supply a Level value wherever a Leveler is needed, such as in \\[HandlerOptions]. Clients who need to vary the level dynamically can provide a more complex Leveler implementation such as \\*\\[LevelVar].\n"},"sortText":"00043","filterText":"Leveler","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Leveler"}},{"label":"Log","kind":3,"detail":"func(ctx context.Context, level slog.Level, msg string, args ...any)","documentation":{"kind":"markdown","value":"Log calls \\[Logger.Log] on the default logger.\n"},"sortText":"00044","filterText":"Log","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Log(${1:})"}},{"label":"LogAttrs","kind":3,"detail":"func(ctx context.Context, level slog.Level, msg string, attrs ...slog.Attr)","documentation":{"kind":"markdown","value":"LogAttrs calls \\[Logger.LogAttrs] on the default logger.\n"},"sortText":"00045","filterText":"LogAttrs","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"LogAttrs(${1:})"}},{"label":"LogValuer","kind":8,"detail":"interface{...}","documentation":{"kind":"markdown","value":"A LogValuer is any Go value that can convert itself into a Value for logging.\n\nThis mechanism may be used to defer expensive operations until they are needed, or to expand a single value into a sequence of components.\n"},"sortText":"00046","filterText":"LogValuer","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"LogValuer"}},{"label":"Logger","kind":22,"detail":"struct{...}","documentation":{"kind":"markdown","value":"A Logger records structured information about each call to its Log, Debug, Info, Warn, and Error methods. For each call, it creates a \\[Record] and passes it to a \\[Handler].\n\nTo create a new Logger, call \\[New] or a Logger method that begins \"With\".\n"},"sortText":"00047","filterText":"Logger","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Logger"}},{"label":"MessageKey","kind":21,"detail":"string","documentation":{"kind":"markdown","value":"MessageKey is the key used by the built-in handlers for the message of the log call. The associated value is a string.\n"},"sortText":"00048","filterText":"MessageKey","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"MessageKey"}},{"label":"New","kind":3,"detail":"func(h slog.Handler) *slog.Logger","documentation":{"kind":"markdown","value":"New creates a new Logger with the given non-nil Handler.\n"},"sortText":"00049","filterText":"New","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"New(${1:})"}},{"label":"NewJSONHandler","kind":3,"detail":"func(w io.Writer, opts *slog.HandlerOptions) *slog.JSONHandler","documentation":{"kind":"markdown","value":"NewJSONHandler creates a \\[JSONHandler] that writes to w, using the given options. If opts is nil, the default options are used.\n"},"sortText":"00050","filterText":"NewJSONHandler","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"NewJSONHandler(${1:})"}},{"label":"NewLogLogger","kind":3,"detail":"func(h slog.Handler, level slog.Level) *log.Logger","documentation":{"kind":"markdown","value":"NewLogLogger returns a new [log.Logger](https://pkg.go.dev/log#Logger) such that each call to its Output method dispatches a Record to the specified handler. The logger acts as a bridge from the older log API to newer structured logging handlers.\n"},"sortText":"00051","filterText":"NewLogLogger","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"NewLogLogger(${1:})"}},{"label":"NewRecord","kind":3,"detail":"func(t time.Time, level slog.Level, msg string, pc uintptr) slog.Record","documentation":{"kind":"markdown","value":"NewRecord creates a \\[Record] from the given arguments. Use \\[Record.AddAttrs] to add attributes to the Record.\n\nNewRecord is intended for logging APIs that want to support a \\[Handler] as a backend.\n"},"sortText":"00052","filterText":"NewRecord","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"NewRecord(${1:})"}},{"label":"NewTextHandler","kind":3,"detail":"func(w io.Writer, opts *slog.HandlerOptions) *slog.TextHandler","documentation":{"kind":"markdown","value":"NewTextHandler creates a \\[TextHandler] that writes to w, using the given options. If opts is nil, the default options are used.\n"},"sortText":"00053","filterText":"NewTextHandler","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"NewTextHandler(${1:})"}},{"label":"Record","kind":22,"detail":"struct{...}","documentation":{"kind":"markdown","value":"A Record holds information about a log event. Copies of a Record share state. Do not modify a Record after handing out a copy to it. Call \\[NewRecord] to create a new Record. Use \\[Record.Clone] to create a copy with no shared state.\n"},"sortText":"00054","filterText":"Record","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Record"}},{"label":"SetDefault","kind":3,"detail":"func(l *slog.Logger)","documentation":{"kind":"markdown","value":"SetDefault makes l the default \\[Logger], which is used by the top-level functions \\[Info], \\[Debug] and so on. After this call, output from the log package's default Logger (as with [log.Print](https://pkg.go.dev/log#Print), etc.) will be logged using l's Handler, at a level controlled by \\[SetLogLoggerLevel].\n"},"sortText":"00055","filterText":"SetDefault","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"SetDefault(${1:})"}},{"label":"Source","kind":22,"detail":"struct{...}","documentation":{"kind":"markdown","value":"Source describes the location of a line of source code.\n"},"sortText":"00056","filterText":"Source","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Source"}},{"label":"SourceKey","kind":21,"detail":"string","documentation":{"kind":"markdown","value":"SourceKey is the key used by the built-in handlers for the source file and line of the log call. The associated value is a \\*\\[Source].\n"},"sortText":"00057","filterText":"SourceKey","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"SourceKey"}},{"label":"String","kind":3,"detail":"func(key string, value string) slog.Attr","documentation":{"kind":"markdown","value":"String returns an Attr for a string value.\n"},"sortText":"00058","filterText":"String","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"String(${1:})"}},{"label":"StringValue","kind":3,"detail":"func(value string) slog.Value","documentation":{"kind":"markdown","value":"StringValue returns a new \\[Value] for a string.\n"},"sortText":"00059","filterText":"StringValue","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"StringValue(${1:})"}},{"label":"TextHandler","kind":22,"detail":"struct{...}","documentation":{"kind":"markdown","value":"TextHandler is a \\[Handler] that writes Records to an [io.Writer](https://pkg.go.dev/io#Writer) as a sequence of key=value pairs separated by spaces and followed by a newline.\n"},"sortText":"00060","filterText":"TextHandler","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"TextHandler"}},{"label":"Time","kind":3,"detail":"func(key string, v time.Time) slog.Attr","documentation":{"kind":"markdown","value":"Time returns an Attr for a [time.Time](https://pkg.go.dev/time#Time). It discards the monotonic portion.\n"},"sortText":"00061","filterText":"Time","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Time(${1:})"}},{"label":"TimeKey","kind":21,"detail":"string","documentation":{"kind":"markdown","value":"TimeKey is the key used by the built-in handlers for the time when the log method is called. The associated Value is a [time.Time](https://pkg.go.dev/time#Time).\n"},"sortText":"00062","filterText":"TimeKey","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"TimeKey"}},{"label":"TimeValue","kind":3,"detail":"func(v time.Time) slog.Value","documentation":{"kind":"markdown","value":"TimeValue returns a \\[Value] for a [time.Time](https://pkg.go.dev/time#Time). It discards the monotonic portion.\n"},"sortText":"00063","filterText":"TimeValue","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"TimeValue(${1:})"}},{"label":"Uint64","kind":3,"detail":"func(key string, v uint64) slog.Attr","documentation":{"kind":"markdown","value":"Uint64 returns an Attr for a uint64.\n"},"sortText":"00064","filterText":"Uint64","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Uint64(${1:})"}},{"label":"Uint64Value","kind":3,"detail":"func(v uint64) slog.Value","documentation":{"kind":"markdown","value":"Uint64Value returns a \\[Value] for a uint64.\n"},"sortText":"00065","filterText":"Uint64Value","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Uint64Value(${1:})"}},{"label":"Value","kind":22,"detail":"struct{...}","documentation":{"kind":"markdown","value":"A Value can represent any Go value, but unlike type any, it can represent most small values without an allocation. The zero Value corresponds to nil.\n"},"sortText":"00066","filterText":"Value","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Value"}},{"label":"Warn","kind":3,"detail":"func(msg string, args ...any)","documentation":{"kind":"markdown","value":"Warn calls \\[Logger.Warn] on the default logger.\n"},"sortText":"00067","filterText":"Warn","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"Warn(${1:})"}},{"label":"WarnContext","kind":3,"detail":"func(ctx context.Context, msg string, args ...any)","documentation":{"kind":"markdown","value":"WarnContext calls \\[Logger.WarnContext] on the default logger.\n"},"sortText":"00068","filterText":"WarnContext","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"WarnContext(${1:})"}},{"label":"With","kind":3,"detail":"func(args ...any) *slog.Logger","documentation":{"kind":"markdown","value":"With calls \\[Logger.With] on the default logger.\n"},"sortText":"00069","filterText":"With","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"With(${1:})"}},{"label":"KindAny.String","kind":2,"detail":"func() string","documentation":{"kind":"markdown","value":""},"sortText":"00070","filterText":"KindAny.String","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"KindAny.String()"}},{"label":"KindBool.String","kind":2,"detail":"func() string","documentation":{"kind":"markdown","value":""},"sortText":"00071","filterText":"KindBool.String","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"KindBool.String()"}},{"label":"KindDuration.String","kind":2,"detail":"func() string","documentation":{"kind":"markdown","value":""},"sortText":"00072","filterText":"KindDuration.String","insertTextFormat":2,"textEdit":{"range":{"start":{"line":68,"character":8},"end":{"line":68,"character":8}},"newText":"KindDuration.String()"}}]}

What did you expect to see?
I expected gopls to just work.

Related Issues and Documentation

x/tools/gopls: constant crashing with emacs-lsp #37984 (closed)
x/tools/gopls: <fill this in> #38805 (closed)
x/tool/cmd/gopls: crashes frequently #32564 (closed)
x/tools/cmd/gopls: non .go files cause gopls log errors #32178 (closed)
x/tools/gopls: no completion candidates in emacs after `.` #38806 (closed)
x/tools/gopls:  #52425 (closed)
x/tools/gopls: infinite recursion, crash when presented with a recursively defined type #36637 (closed)
x/tools/gopls: automated issue report (crash) - unhandled basic type #40956 (closed)
x/tools/gopls: gopls crashes neovim  #51643 (closed)
log/slog: panic: bad kind: 9 in JSONHandler Handler().WithAttrs(LogValuer{}) #59727 (closed)

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Emacs Version
GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0)

Using gopls with eglot.
gopls version:
golang.org/x/tools/gopls v0.16.1

CC @adonovan, who works on gopls and uses eglot.
The LSP is very chatty and verbose, I'm afraid, and clients must be able to process rather large json blobs.  So, at least superficially, this seems like an emacs bug. However, Alan may have suggestions for how to investigate.


Remove page header

On every page we have a page header like this one

It would be nice if we get rid of it, I personally hate it. The icon in the tap bar indicates on what page you are, people don't need text to know that.
The only thing is, that's the place with the New Tweet button. There are several options.

Remove it entirely (we have shortcuts for that or the menu item)
Make it a floating button (little bit like the FAB buttons)
Other suggestions?

Slap a position: fixed on it and move it to the navbar.

That might be weird though because the top bar are all tabs.

I agree, that heading is pointless. The new tweet/message button should be next to the user avatar in the nav.

@paulmolluzzo user profile image is supposed to be removed, it's a bug that you're seeing it now. the options that are accessed using profile have been moved to shortcut keys. I don't think this is the right choice, personally. read about it here: https://github.com/sindresorhus/anatine/issues/93
Header classes are: ._1yjej2X8._2AIt9kbG
<svg class="_3eTIUPms" viewBox="0 0 64 72" style="display: inline-block; fill: currentcolor; height: 1.25em; max-width: 100%; position: relative; vertical-align: text-bottom;"><path d="M6.779 43.188a2.864 2.864 0 0 1-2.864-2.864V17.257a5.733 5.733 0 0 1 5.727-5.727h14.431a2.864 2.864 0 0 1 0 5.728H9.643v23.067a2.865 2.865 0 0 1-2.864 2.863zM55.793 60.474l-23.013-.048a2.864 2.864 0 0 1 0-5.728l23.012.048v-11.57a2.864 2.864 0 0 1 5.728 0v11.57a5.734 5.734 0 0 1-5.727 5.728zM64 2.942C45.864 7.084 32.298 22.584 23.111 36.309c-7.085 10.556-11.308 20.337-12.195 22.659-1.61 4.165-1.711 6.806-.965 7.057.748.252 2.738-2.344 4.728-5.446 1.278-1.993 3.028-4.629 5.276-8.21 4.626-7.41 10.103-13.302 16.177-14.365.014 0 .061-.046.078-.067 4.476-.503 14.106-4.28 15.31-9.817-3.104 1.169-6.271 1.732-9.439 1.599 0 0 1.892-2.461 4.927-3.43 5.205-1.663 8.425-3.15 11.422-7.283 1.036-1.447 1.515-2.516 2.09-4.09-3.293 1.821-7.62 2.854-10.076 2.765 2.418-2.973 5.916-4.594 9.334-7.596C63.927 6.435 64 2.942 64 2.942z"></path></svg>


Validate config values for 'not-null'

Recently, we provoked a generic NullReferenceException by accidentally passing a null value as configuration to the consumer constructor which took us some time to identify the parameter causing the trouble.
Therefore, this PR suggests to apply validation to the configuration passed to consumers and producers, checking all key-value-pairs' values for not null. In case the validation fails, an ArgumentExcpetion is thrown containing the configuration key name to make debugging more easy.
I've implemented the validation for the 1.0-experimental branch. However - if more appropriate - I can supply the patch for another branch as well.
Looking forward to your feedback!

It looks like @namelessvoid hasn't signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence.
Wikipedia

You can read and sign our full Contributor License Agreement here.
Once you've signed reply with [clabot:check] to prove it.
Appreciation of efforts,
clabot

@confluentinc It looks like @namelessvoid just signed our Contributor License Agreement. :+1:
Always at your service,
clabot

[clabot:check]

yep, i like this, thanks!
the alternative to throwing an exception would be to consider a null value to mean 'not set'. The benefit of that is it would allow inline expressions that return a config parameter, or indication that the default should apply (so allow terser code in some cases). The downside is that more often than not, a null passed as a parameter is likely to be something the developer didn't mean to do, so it's better to fail fast just in case. The latter argument wins for me.

one small formatting thing to fix, then I'm good to merge. a PR against master would also be awesome :-) - if not i'll take care of it. it may be easy to cherry-pick this, but I can't remember.

Thanks for your feedback! I'll fix formatting and provide a PR against master as soon as possible.


boards: arm: nrf52dk_nrf52832: Remove scratch partition

The scratch partition is not needed since MCUboot now operates in swap using move mode instead of swap with scratch, as a result, the main partitions on the nrf52832 can be expanded to help in fitting large applications to it.

It is still possible to configure mcuboot with CONFIG_BOOT_SWAP_USING_SCRATCH=y, which will make compilation fail.

I see no reason why anyone would do that given that swap using scratch is known broken and upstream MCUboot recommends avoiding it.

Added instructions for scratch mode setup here: https://github.com/mcu-tools/mcuboot/pull/1550


arcdps+radial+imgui+selectrenderer(gw2hook)

this combination is broken as of today with arc dps sep27 and sep28 release ... when i remove arcdps i can start gw2

Yes, this is a problem with arcdps and/or the addon loader, please report it over there, thanks!


Process started by VSCode plugin takes 100% CPU

Description:
Following process started by VS code plugin uses 100% CPU.
Process: xxxx/jdk1.8.0_221.jdk/Contents/Home//bin/java -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=xxxx/xxxx/language-server-heap-dump.hprof -Dballerina.home=xxxx/xxxx/ -Dballerina.debugLog= -Dexperimental=false -cp ::/xxxx/xxxx/bre/lib/*:/xxxx/xxxx/lang-server/lib/* org.ballerinalang.langserver.launchers.stdio.Main
Steps to reproduce:
Install latest ballerina vscode plugin
Start working on a ballerina project.
Affected Versions:
1.0.0-alpha
OS, DB, other environment details and versions:

MacOS Mojave
jdk1.8.0_221

Related Issues (optional):

Suggested Labels (optional):

Bug

Suggested Assignees (optional):

Fixed in latest master. Hence closing the issue


Question regarding QFT

Description

Hi, I am now using QISKit to realize quantum fourier transform. I run the code provided by you in this link.
The input state is set to 000 by default. Is there any methods to change the input, for example to 001?
Could you please answer my question? Thank you so much!
Your Environment

QISKit version: 0.6.0
Python version: 3.6

Hi @yangjy0826
To change the initial qubit from 0 to 1 you can apply the X gate.
In the 4th cell of the notebook the statement q = QuantumRegister(3) creates a quantum register with 3 qubits all in state 0.
To change one qubit from 0 to 1 you can apply X to that particular qubit (using the qubit index) right after you create the circuit. The 4th cell becomes:
q = QuantumRegister(3)
c = ClassicalRegister(3)
qft3 = QuantumCircuit(q, c)

qft3.x(q[0]) # changes the first qubit (with index 0 ) q[0] to 1

input_state(qft3, q, 3)
qft(qft3, q, 3)
for i in range(3):
    qft3.measure(q[i], c[i])
print(qft3.qasm())

Oh I understand! That's smart. Thank you so much! But I still have a question: when you design this package, why dont't you consider to design a function to set the initial value?

because that is really user code to make the state to have the Fourier transform applied to.  I think this should be left to the user but the user can use the initializer method to make the state they want.

OK, thanks!


Health Check / Duplicate Process

I wonder if ssh-agent-helper should be checking for an existing process via the environment, and starting a new one if it cannot find one. For example, ssh-agent normally puts its PID into the SSH_AGENT_PID variable. It might be possible to check for the existence of that process and start a new one, overwriting the variables if it doesn't exist. It might be possible to ALWAYS do this. Similarly, before starting a new process, it would be ideal to check for an existing one running and skip starting a new one if one is already running (and the environment is already setup for it).  Just thoughts...

I was actually working on that right now 😄


UpdateCollectionNodeFieldExpression modifies CollectionSelectionNode

I'm still back on 5.2.0, so might not be an issue in the current version - although a quick scan of the code I don't see anything that would fix it.
Noticed when an expression uses FirstOrDefault (and presumably a number of other methods) it gets converted to a where statement.
Unfortunately it seems to append this where statement every time the query is executed as it's modifying CollectionSelectionNode.ListExpression directly, which means after every run it has an extra Where statement appended and thus makes a unique expressiontree every time through, thus missing out on EF compile cache, SQL plan cache and any other caching one might have enabled.

OK this is interesting. I haven't really thought about the EF caching features. If it doesn't take this library depending on EF I'm all for making it work better with it.
Is it only FirstOrDefault style fields? As it builds a full expression every time as well.

It'll be any of the methods in this hashset
 public static readonly HashSet<Tuple<Type, string>> ListToSingleMethods =
 [
     Tuple.Create(typeof(Enumerable), nameof(Enumerable.First)),
     Tuple.Create(typeof(Enumerable), nameof(Enumerable.FirstOrDefault)),
     Tuple.Create(typeof(Enumerable), nameof(Enumerable.Last)),
     Tuple.Create(typeof(Enumerable), nameof(Enumerable.LastOrDefault)),
     Tuple.Create(typeof(Enumerable), nameof(Enumerable.Single)),
     Tuple.Create(typeof(Enumerable), nameof(Enumerable.SingleOrDefault)),
     Tuple.Create(typeof(Queryable), nameof(Queryable.First)),
     Tuple.Create(typeof(Queryable), nameof(Queryable.FirstOrDefault)),
     Tuple.Create(typeof(Queryable), nameof(Queryable.Last)),
     Tuple.Create(typeof(Queryable), nameof(Queryable.LastOrDefault)),
     Tuple.Create(typeof(Queryable), nameof(Queryable.Single)),
     Tuple.Create(typeof(Queryable), nameof(Queryable.SingleOrDefault)),
 ];

as that's what this method is using
  public static string? UpdateCollectionNodeFieldExpression(GraphQLListSelectionField collectionSelectionNode, Expression combineExpression)
  {
      string? capMethod = null;
      if (combineExpression.NodeType == ExpressionType.Call)
      {
          // In the case of a First() we need to insert that select before the first
          // This is all to have 1 nice expression that can work with ORMs (like EF)
          // E.g  we want db => db.Entity.Select(e => new {name = e.Name, ...}).First(filter)
          // we dot not want db => new {name = db.Entity.First(filter).Name, ...})

          var call = (MethodCallExpression)combineExpression;
          if (ListToSingleMethods.Contains(Tuple.Create(call.Method.DeclaringType!, call.Method.Name)))
          {
              // Get the expression that we can add the Select() too
              var contextExpression = collectionSelectionNode.ListExpression;
              if (contextExpression != null && call.Arguments.Count == 2)
              {
                  // this is a ctx.Something.First(f => ...)
                  // move the filter to a Where call so we can use .Select() to get the fields requested
                  var filter = call.Arguments.ElementAt(1);
                  var isQueryable = typeof(IQueryable).IsAssignableFrom(contextExpression.Type);
                  contextExpression = isQueryable
                      ? MakeCallOnQueryable(nameof(Queryable.Where), [combineExpression.Type], contextExpression, filter)
                      : MakeCallOnEnumerable(nameof(Enumerable.Where), [combineExpression.Type], contextExpression, filter);
                  // we can first call ToList() as the data is filtered so risk of over fetching is low
                  capMethod = call.Method.Name;
                  collectionSelectionNode.ListExpression = contextExpression;
              }
          }
      }
      return capMethod;
  }

I suspect the problem is as simple as the check is being done on the combineExpression, but the collectionSelectionNode.ListExpression is the one being modified.  So thus it modifies the same expression over and over every time it goes through the method.
So either UpdateCollectionNodeFieldExpression shouldnt' be called multiple times, or it needs a flag (or other way) to check if it's already been run.
My suspicion is you could probably just do it in the constructor.

Thanks for that info. Do you know an easy way to confirm that EF is using it's cache?

As long as it's not unique it should be a cache hit.
However there are event counters which expose the info.
https://learn.microsoft.com/en-us/ef/core/logging-events-diagnostics/metrics?tabs=windows

See https://github.com/EntityGraphQL/EntityGraphQL/blob/master/src/tests/EntityGraphQL.EF.Tests/EFCacheTests.cs
It appears the cache is being used. Not sure if you have a better way to reproduce the issue?

In TestEfCoreQueryCacheWithListToSingleNode add this
schema.UpdateType(c =>
{
c.ReplaceField("movie", new { id = 0 }, (c, args) => c.Movies.FirstOrDefault(x => x.Id == args.id), "");
});

Thanks! Odd as that is what SchemaBuilder builds!


Adds SVGR to move SVG code out of TSX files

With this change, icons can be saved as separate files and dynamically pulled in during build. This is based on this blog post. Icons are included via tags and can be modified with Tailwind classes as any other tag.
The PR includes 3 examples for play, avatar, and arrow-left icons.
Preview (the arrow in the top left corner is pulled in via SVGr from an SVG file)

Are you sure you ran your scripts with this branch checked out? I see different results.
The only SVG I did not replace was in the signup/login modals, since you're working on those in a separate PR.

Right, I was about to edit my comment sorry about that.


Fix Gradle-Junit4 integration doesn't support junit parametrized tests with dot in the parameter

Aim to fix the issue of Gradle-Junit4 integration doesn't support junit parametrized tests with dot in the parameter name(https://github.com/gradle/gradle/issues/27572), via adding an extra step into where segments were broken up based on the '.' to consider the case where parametrized test could contain a dot inside.

Fixes: https://github.com/gradle/gradle/issues/27572

Context
There exists use cases where users might have dot inside their parameter name, whilst its nice to have walkarounds, it would even be better if this issue is fixed.

The merge queue build has started. Click here to see all failures if any.


Failed to load plugin

I tried to install this (likely very awesome) plugin by downloading the zip file and extracting it in the plugins folder as described. If I try to "enable" it in the obsidian plugins menu, I get the message "Failed to load plugin obsidian-advanced-slides". Looking at the developer console, it says that "Plugin failure: obsidian-advanced-slides Error: ENOENT: no such file or directory, open '....obsidian\plugins\obsidian-advanced-slides\main.js". This file is indeed missing.

the zip file doesn't contain advanced slides itself. It contains only the runtime to display slides created by advanced slides. The easierst way to use advanced slides is to install it through community plugins.

I got confused because the documentation says that it is not yet available as a community plugin.

Yeah i noticed that i've forgot to update this part of the documentation, will fix it in the upcoming version


an item with the same key has already been added.

In one of our production environment we are getting the error message "ExceptionDetails":"System.ArgumentException: An item with the same key has already been added."
But this works fine in other instances.
{"FailedAt":"2023-03-27T06:15:13.4747422Z","ExceptionType":"System.ArgumentException","ExceptionMessage":"An item with the same key has already been added.","ExceptionDetails":"System.ArgumentException: An item with the same key has already been added.\r\n   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)\r\n   at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add)\r\n   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer`1 comparer)\r\n   at CopasysAPI.AuditRules.CPSAuditTask.Download(GetRecordsModel getrecords, String strFilePath, Int32 Id, String connectionString)"}
Any help will be highly appriciated.
Thank you,
sanjay

Hi @sanjaya321,
Kindly add more information.
stuff like:
Platform/Environment/Version
Description
Steps to Reproduce
Expected and Actual Result
Thanks!

closing due to inactivity


[patch] Expose coverage call options

Directories and the --omit field
Closes #32
Closes #89

Yeah, testing on https://github.com/pyiron/pyiron_ontology/pull/51 it looks like it's working perfectly


🐛 BUG: npm create cloudflare (C3) fails with astro framework - error adding type declarations to src/env.d.ts

Which Cloudflare product(s) does this pertain to?
C3 (npm create cloudflare)
What version(s) of the tool(s) are you using?
c3 v2.33.1<EMAIL_ADDRESS>What version of Node are you using?
22.11.0
What operating system and version are you using?
macOS Sequoia v15.1.1
Describe the Bug
Observed behavior
c3 exits with a fatal error when it tries to add type declarations in src/env.d.ts
This file appear to have been removed (made optional).

Expected behavior
c3 should not error out with astro projects.
Steps to reproduce

npm create cloudflare (with or without --experimental, both fail in the same way)
select "Framework Starter", and then "Astro"
select "Include sample files" (or "Blog" or "Empty")
select "Yes" for TypeScript (the default)

Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
Updating configuration in astro.config.mjs
Adding type declarations in src/env.d.ts
ERROR  Error: Error parsing file: src/env.d.ts

We changed the way types are declared in Astro v5: https://5-0-0-beta--astro-docs-2.netlify.app/en/guides/upgrade-to/v5/#changed-typescript-configuration

Thanks for the issue @jldec 🙂
#7497 should address this 👍


Create separate README files for each output

We should have a root README for the project as well as READMEs for the individual outputs
This work will include removing the 'copy files' logic to get the root README into the Stencil workspace

We can't run npm i from the stencil-workspace directory now beacuse it expects a README.md and a SUPPORT.md to be there. I think we should remove SUPPORT.md from the files array (not need in an npm package) and add the README.md.


NEP Dynamic Invoke

This NEP Proposal outlines a mechanism whereby a Smart Contract is provided the ability to invoke other Smart Contracts not known until runtime, rather than being limited to invoking only Smart Contracts that are defined at compile time. In order to retain the ability for Smart Contracts to interface with a future Dynamic Sharding process, included is a proposed specification to be used in the creation of Smart Contracts to denote whether a Smart Contract needs the Dynamic Contract Invocation feature or not.

Does dynamic invocation cost more fees?

It is my opinion that using the DYNAMICCALL should cost more than APPCALL or TAILCALL.  I also believe that publishing an SC with the HasDynamicInvoke should cost more than publishing one without that feature.

So should SC with HasStorage cost more than SC without HasStorage?

I think that would make sense.

What about this:

Every contract that be deployed costs 100 gas, this is the basic cost.
If it has a HasStorage flag, the cost is increased by 400 gas.
If it has a HasDynamicInvoke flag, the cost is increased by 500 gas.

That sounds about right. I will update the proposal with those figures.

Updated the fee structure, and removed the section of code demonstrating that the cost of a DYNAMICCALL would cost more than an APPCALL.

perfect

I've updated the NEP number in the proposal to 4 🎉
Is it ok to begin implementation?

Yes, let's do it!


Refs #27132 -- Added pylibmc to tests/requirements/base.txt

pylibmc needs to be installed in advance of #7168, so that when the global Jenkins test configuration (used for all branches) is updated, the tests don't fail with "no module named pylibmc".
This will need to be backported to all supported branches.
See:
https://github.com/django/django/pull/7168#issuecomment-242986039

Oh, I see. Then I guess I'll add something like this to the settings file if it seems reasonable:
if sys.platform.startswith('win'):
del CACHES['pylibmc']

Sounds great :-)