text:
HALModel Doesn't Preserve Serialization Attributes

One issue I have found with using this approach is that it doesn't obey the serialization attributes of the backing object. For example, JsonIgnore attributes are not passed through.

That's a very good point. My goal is to void littering models with HAL specific properties, hence the dynamic approach.
As you may have found, code converts the model into a Dictionary and then adds the _links properties to it. While it would be very easy to implement, JsonIgnore and JsonProperties, it's not a really good long term solution.
That doesn't mean keeping with the original goal is impossible. I am going to look into using Dynamic Proxies instead of converting the object to a dictionary. It looks like this would allow _links to be dynamically added and keep the attributes.
I'll let you know what I find.

I ended up doing a rewrite of the HALModel class to get it all working.
I diteched the dictionary and keep the backing object as a property instead. From there I modified the serialization process to be handled by a JsonConverter that creates an internal representation of the original object and amends the links and embeds onto it. This should work for any custom serialization attributes. The current "meh" about the changes is that it (currently) no longer uses DynamicObject, so properties can't be set after creating the representation. I may end up going back to that, but not sure if it has any strong advantage to doing so.
I also made a modification so that the links are resolved at serialization and it runs the parameters through the serializer to get their values. (In my use case I need to use Guids and wanted them modified into a Base64 URI-friendly representation.)
I haven't made this method handle Deserialization yet. Not sure if its necessary.
Changes in fork

@IsaacSanch  I wan't planning on supporting Deserialization. If it's required, that can happen later.
There are some pretty significant design changes here.
Am I correct in saying that this will always return models in HAL format? One important feature of the package is the ability to return plain JSON and HAL formatted JSON. This gives API client's the ability to choose whether to use HAL or not.
You have also removed all the controller extensions. This changes the usage from:
return this.HAL(fooModel, new Link[] {
      new Link("self", "/api/foo/{id}"),
      new Link("foo:bar", "/api/foo/{id}/bar")
});

to this:
var halModel = new HALModel(model);
halModel.AddLinks(new Link[] {
      new Link("self", "/api/foo/{id}"),
      new Link("foo:bar", "/api/foo/{id}/bar")
});
return this.Ok(halModel);

Is there a reason you have done this? I would much rather see the Extension methods kept in place. I don't really want the user to have to think too much about HALModels. I want them to be able to return their existing models + links via an easy method.
As a general note, if you're planning on sending a pull request, can you make sure the formatting matches the existing style?

@johncmckim The design changes were just me working to get the features I needed. I'm not sold to any changes as far as pulling them back to the main project. I've re-added the controller extensions now that I've had time this morning to fix their internal calls. (That's why I pulled them.)
Each of the controller extensions is now wired up.
For when more explicit control is needed I've tweaked the available calls so that using chaining it would look like this:
            return new HALModel(model)
                .AddLinks(modelLinks)
                .AddEmbeddedCollection(embeddedName, embeddedModel, embeddedLinks)
                .ToResult(controller, relativeLinkBase);

Forgot to mention. I'm planning to implement the ability to return plain objects.... Planning to put some time into that soon.

@IsaacSanch Great. I look forward to seeing what you come up with.

Content negotiation is fixed in the latest commit to the fork. Still looking at re-adding DynamicObject abilities.

@johncmckim Status update...
Within the fork I've made some additional design changes that have made things a little more robust.

No longer taking over responsibility for application/json requests. Instead, the HALModel type has a JsonConverter assigned that resolves for all requests passed through the default handler (JsonMediaTypeFormatter.) This is a breaking change, as the JsonMediaTypeFormatter will need to no longer be removed from the pipeline when the HalMediaTypeFormatter is added. However, I believe that this approach is advantageous as it allows for agnostic handling of data types returned from the API controller.

Added attributes which can be attached to DTO classes to intelligently create the HAL structure.

    [HalModel("~/api/")]
    public class OrderDto
    {
        [HalLink("self", "orders/{value}")]
        public Guid Id { get; set; }

        [HalLink("users", "users/{value}")]
        public Guid UserId { get; set; }

        [HalEmbeddedValues()]
        public dynamic[] Items { get; set; }

        public DateTime MadeDate { get; set; }

        public DateTime FulfilledDate { get; set; }
    }

        [HttpGet, Route("orders/{Id:guid}")]
        public dynamic GetOrder(Guid Id)
        {
            return new OrderDto(...);
        }

If the design changes are too far removed from your own vision of how you want to produce HAL, let me know... I'm willing to make this a permanent fork and rename it.

@IsaacSanch I'll have a look at it soon. I'm not against changing the API design, but it has to stick with the original intentions.

@IsaacSanch I pulled your code into a branch on my dev machine to look at it. However, the project doesn't appear to build? It looks like none of the tests have been updated to reflect the changes you made.
As you said, there are lot of big changes here. I am concerned about the level of complexity added to the code, especially since there appears to be no tests for that code. My goal for this project is to keep it simple.
There are some ideas I like i.e. the ToResult extension method. I also think that removing the dynamic model and using JObject to construct the JSON is probably a good idea.
The attributes support is interesting. However, does this change remove support for objects without attributes?
There are some other things I am concerned about

GetFlattenedModelList - does this only serialize embedded models?
Expand request parameter in the Media type formatter? What does this do? Does it change the response based on the query string?

Right now I am not inclined to pull in your changes. There's just too many changes. This issue is about one small point you raised, which you appear to have solved in your branch. However, you have also made a number of other big changes that are not directly related to this issue.
I'm not against some of the design changes. I don't see why we can't work towards getting them into this project. However, I want to take this a little more slowly than just pulling in all your changes at once. I think the best approach will be for me to cherry pick some of what you have done and incorporate it into the master updating the tests as I go. I'll be able to better understand the changes and ensure it keeps with my vision for the project

@johncmckim That's correct... I have not yet had the opportunity to update the test cases

However, you have also made a number of other big changes that are not directly related to this issue.

Correct, many of the other changes are related to the use case I have for HAL.

The attributes support is interesting. However, does this change remove support for objects without attributes?

No. It fully supports the old methodology where an object which has not been decorated with attributes can be provided and embeds and links are declared separately. The attributes are just shortcuts to accomplish the same thing.
GetFlattenedModelList isn't actually a client function... its used internally to take all the embedded document tree, flatten it, and perform the same action across all of them. I use it at several points to assign the base URI.
The expand request parameter changes the response, as you assumed. This is one of my use case specific changes. I need to be able to return either embeds or present them as links depending on the call made to the API endpoint. Using an "expand" parameter that contains a comma-separated list of the values to embed was what made sense to me for this use case.
There's a decent amount of the recently added logic that can be stripped if either attributes or the expand parameter are undesirable for your feature set.
In the mean time I'm going to assume the need to rename my own project and treat it as a permanent fork. Some of the additional features I've implemented are ones I need to have long term for some APIs that are in the process of being developed.

@IsaacSanch  yes, the best approach will be for you to continue your fork under a different name.
I've added support for JSON.NET attributes and added another issue for HAL attributes on models. I do like that idea.
Even though the work you did didn't get merged in, thanks for you work on this. It's always nice to have more ideas and input into a project.

authors: IsaacSanch johncmckim

repo: visualeyes/halcyon


text:
Enum generation in v3.3.2

I upgraded from 3.2.2 to 3.3.2 today and noticed that enum values are no longer shown in the generated docs. Is this a new feature of the latest Swagger or a bug?
In v3.2.2:

In v3.3.2:

I give my apologies. This issue was caused by a mismatch pairing of UI and JSON end-points on my part.

source: gharchive/issue

license: MIT

license_type: permissive

license_source: github-api


text:
Does Vite support the function of like Webpack require.context ?

feature
when use webpack for vue project, in the part of Vuex. we can use require.context  like this:
const files = require.context('.', false, /\.js$/)
const modules = {}

files.keys().forEach((key) => {
  if (key === './index.js') return
  modules[key.replace(/(\.\/|\.js)/g, '')] = files(key).default
})

export default modules

This way we can write a lot less import.
I don't know if vite has such support?
If so, can you provide some examples？
If not,can this feature be realized in the future?
thanks a lot!

https://vitejs.dev/guide/features.html#glob-import

https://vitejs.dev/guide/features.html#glob-import

@yyx990803
thanks a lot!

@yyx990803
thanks a lot!

thanks a lot!

repo: vitejs/vite


text:
fix: import(/* @vite-ignore */) is not worked in *.ts for v4 (#11377)

fix #11377
Description

Beacuse of a breaking change in esbuild 0.15.17 (https://github.com/evanw/esbuild/issues/2439) , esbuild will remove comment /* @vite-ignore / in import(/ @vite-ignore */).
so i replace '/* @vite-ignore */' to 'vite__ignore' before transform and change back after transform to avoid this bug.
Additional context

What is the purpose of this pull request?

[X] Bug fix
[ ] New Feature
[ ] Documentation update
[ ] Other

Before submitting the PR, please make sure you do the following

[X] Read the Contributing Guidelines.
[X] Read the Pull Request Guidelines and follow the PR Title Convention.
[X] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
[X] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
[ ] Ideally, include relevant tests that fail without this PR but pass with it.

This is a very smart trick, but it feels safer for me if we can fix this in esbuild instead. One issue with this trick is that it may mess with sourcemaps, especially if /* @vite-ignore */ is in a different line which causes things to be off-by-one.

This is a very smart trick, but it feels safer for me if we can fix this in esbuild instead. One issue with this trick is that it may mess with sourcemaps, especially if /* @vite-ignore */ is in a different line which causes things to be off-by-one.

Thank you for pointing out the mistake.
Indeed,It's better to fix esbuild ,But I don't know much about esbuild source code.I will try to fix it.

@bluwy i have a question,
if keep the same length before and after the substitution,can it imporve sourcemap?
e.g.
// raw code
import(       /*@vite-ignore*/      url)
// Middle State
// repeat '_' is to keep the same length
import(       __vite__ignore________url)
// change back
import(       /*@vite-ignore*/      url)

This is fixed in esbuild v0.16.14

source: gharchive/pull-request

authors: bluwy moushicheng


text:
fix: loadPreprocessor from both  configFile path and cwd fix(#2612)

Description
close  #2612

Additional context

What is the purpose of this pull request?

[x] Bug fix
[ ] New Feature
[ ] Documentation update
[ ] Other

Before submitting the PR, please make sure you do the following

[x] Read the Contributing Guidelines.
[x] Read the Pull Request Guidelines and follow the Commit Convention.
[x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
[x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
[ ] Ideally, include relevant tests that fail without this PR but pass with it.

how about this PR, need I to resolve the conflicts?

how about this PR, need I to resolve the conflicts?

Yes please

Thanks for the PR @HomyeeKing, closing as it looks like #3988 was merged fixing #2612

authors: HomyeeKing Shinigami92 patak-js


text:
Followup: Implement helper to define custom parser

Following my last comment in #15, I added another helper to use a custom parser (other than T::from_str). While this works as expected, the function names are getting comically long: deserialize_vec_from_string_or_vec_on_separator_with_parser. That's almost javaesque. I'm getting SimpleBeanFactoryMonitorSingletonFactory flashbacks here :D

Here's a suggestion for a better API for this case. IMO, this is the more idiomatic solution but it clearly breaks with the rest of this library, so I can totally see this as out of scope. Clearly, the existing deserialize_vec_from_string_or_vec can still be exposed for easy use while giving the caller a good API to create custom deserializers.
If you're willing to use this API, I'll push the changes.
/// Builder to create a parser, that parses a separated string or a vec into a vec.
///
/// # Example:
///
/// ```rust
/// use serde_aux::prelude::*;
/// use std::str::FromStr;
///
/// fn parser<'de, D, T>(deserializer: D) -> Result<Vec<T>, D::Error>
/// where
///     D: serde::Deserializer<'de>,
///     T: FromStr + serde::Deserialize<'de> + 'static,
///     <T as FromStr>::Err: std::fmt::Display,
/// {
///     StringOrVecToVec::default().to_deserializer()(deserializer)
/// }
///
/// #[derive(serde::Serialize, serde::Deserialize, Debug)]
/// struct MyStruct {
///     #[serde(deserialize_with = "parser")]
///     list: Vec<i32>,
/// }
///
/// fn main() {
///     let s = r#" { "list": "1,2,3,4" } "#;
///     let a: MyStruct = serde_json::from_str(s).unwrap();
///     assert_eq!(&a.list, &[1, 2, 3, 4]);
///
///     let s = r#" { "list": [1,2,3,4] } "#;
///     let a: MyStruct = serde_json::from_str(s).unwrap();
///     assert_eq!(&a.list, &[1, 2, 3, 4]);
/// }
/// ```
pub struct StringOrVecToVec<T, E> {
    separator: Box<dyn Fn(char) -> bool>,
    parser: Box<dyn Fn(&str) -> Result<T, E>>,
}

impl<'de, T> Default for StringOrVecToVec<T, T::Err>
where
    T: FromStr + serde::Deserialize<'de> + 'static,
    <T as FromStr>::Err: std::fmt::Display,
{
    fn default() -> Self {
        Self::new(|c| c == ',', T::from_str)
    }
}

impl<'de, T> StringOrVecToVec<T, T::Err>
where
    T: FromStr + serde::Deserialize<'de> + 'static,
    <T as FromStr>::Err: std::fmt::Display,
{
    /// Create a `StringOrVecToVec` builder with a custom separator. `T::from_str` is used to parse
    /// the elements of the list.
    ///
    /// # Example:
    ///
    /// ```rust
    /// use serde_aux::prelude::*;
    /// use std::str::FromStr;
    ///
    /// fn parser<'de, D, T>(deserializer: D) -> Result<Vec<T>, D::Error>
    /// where
    ///     D: serde::Deserializer<'de>,
    ///     T: FromStr + serde::Deserialize<'de> + 'static,
    ///     <T as FromStr>::Err: std::fmt::Display,
    /// {
    ///     StringOrVecToVec::with_separator(|c| c == '-' || c == '+').to_deserializer()(deserializer)
    /// }
    ///
    /// #[derive(serde::Serialize, serde::Deserialize, Debug)]
    /// struct MyStruct {
    ///     #[serde(deserialize_with = "parser")]
    ///     list: Vec<i32>,
    /// }
    ///
    /// fn main() {
    ///     let s = r#" { "list": "1-2+3-4" } "#;
    ///     let a: MyStruct = serde_json::from_str(s).unwrap();
    ///     assert_eq!(&a.list, &[1, 2, 3, 4]);
    ///
    ///     let s = r#" { "list": [1,2,3,4] } "#;
    ///     let a: MyStruct = serde_json::from_str(s).unwrap();
    ///     assert_eq!(&a.list, &[1, 2, 3, 4]);
    /// }
    /// ```
    pub fn with_separator(separator: impl Fn(char) -> bool + 'static) -> Self {
        Self::new(separator, T::from_str)
    }
}

impl<T, E> StringOrVecToVec<T, E> {
    /// Create a deserializer with a custom separator and parsing function.
    ///
    /// # Example:
    ///
    /// ```rust
    /// use serde_aux::prelude::*;
    /// use std::str::FromStr;
    ///
    /// fn parser<'de, D, T>(deserializer: D) -> Result<Vec<T>, D::Error>
    /// where
    ///     D: serde::Deserializer<'de>,
    ///     T: FromStr + serde::Deserialize<'de> + 'static,
    ///     <T as FromStr>::Err: std::fmt::Display,
    /// {
    ///     StringOrVecToVec::new(|c| c == '-' || c == '+', |s| s.trim().parse()).to_deserializer()(deserializer)
    /// }
    ///
    /// #[derive(serde::Serialize, serde::Deserialize, Debug)]
    /// struct MyStruct {
    ///     #[serde(deserialize_with = "parser")]
    ///     list: Vec<i32>,
    /// }
    ///
    /// fn main() {
    ///     let s = r#" { "list": "1 - 2    +  3-    4    " } "#;
    ///     let a: MyStruct = serde_json::from_str(s).unwrap();
    ///     assert_eq!(&a.list, &[1, 2, 3, 4]);
    ///
    ///     let s = r#" { "list": [1,2,3,4] } "#;
    ///     let a: MyStruct = serde_json::from_str(s).unwrap();
    ///     assert_eq!(&a.list, &[1, 2, 3, 4]);
    /// }
    /// ```
    pub fn new(
        separator: impl Fn(char) -> bool + 'static,
        parser: impl Fn(&str) -> Result<T, E> + 'static,
    ) -> Self {
        Self {
            separator: Box::new(separator),
            parser: Box::new(parser),
        }
    }

    /// Create a deserializer with a custom parsing function. The input string will be separated on
    /// `,`.
    ///
    /// # Example:
    ///
    /// ```rust
    /// use serde_aux::prelude::*;
    /// use std::str::FromStr;
    ///
    /// fn parser<'de, D, T>(deserializer: D) -> Result<Vec<T>, D::Error>
    /// where
    ///     D: serde::Deserializer<'de>,
    ///     T: FromStr + serde::Deserialize<'de> + 'static,
    ///     <T as FromStr>::Err: std::fmt::Display,
    /// {
    ///     StringOrVecToVec::with_parser(|s| s.trim().parse()).to_deserializer()(deserializer)
    /// }
    ///
    /// #[derive(serde::Serialize, serde::Deserialize, Debug)]
    /// struct MyStruct {
    ///     #[serde(deserialize_with = "parser")]
    ///     list: Vec<i32>,
    /// }
    ///
    /// fn main() {
    ///     let s = r#" { "list": "1 , 2    ,  3,    4    " } "#;
    ///     let a: MyStruct = serde_json::from_str(s).unwrap();
    ///     assert_eq!(&a.list, &[1, 2, 3, 4]);
    ///
    ///     let s = r#" { "list": [1,2,3,4] } "#;
    ///     let a: MyStruct = serde_json::from_str(s).unwrap();
    ///     assert_eq!(&a.list, &[1, 2, 3, 4]);
    /// }
    /// ```
    pub fn with_parser(parser: impl Fn(&str) -> Result<T, E> + 'static) -> Self {
        Self::new(|c| c == ',', parser)
    }

    /// Creates the actual deserializer from this builder.
    pub fn to_deserializer<'de, D>(
        self,
    ) -> impl Fn(D) -> Result<Vec<T>, <D as serde::Deserializer<'de>>::Error>
    where
        D: serde::Deserializer<'de>,
        T: serde::Deserialize<'de>,
        E: std::fmt::Display,
    {
        #[derive(Deserialize)]
        #[serde(untagged)]
        enum StringOrVec<T> {
            String(String),
            Vec(Vec<T>),
        }

        move |deserializer| match StringOrVec::<T>::deserialize(deserializer)? {
            StringOrVec::String(s) => s
                .split(&self.separator)
                .map(&self.parser)
                .collect::<Result<Vec<_>, _>>()
                .map_err(serde::de::Error::custom),
            StringOrVec::Vec(v) => Ok(v),
        }
    }
}

Thanks for another PR! Yes, I also don't like such long names, I just wanted to let people immediately use a convenient deserialiser without requiring writing functions using them first. For such use cases as you are doing here it is, of course, not suitable and is tiresome to maintain and support, so I appreciate your idea of doing it this way instead. I'll review it when you mark it as ready.
:call_me_hand:

Are you planning on doing anything else or ready to have it merged?

I think this is fine. Otherwise this PR will get to big

authors: vbrandl vityafx

repo: vityafx/serde-aux


text:
Enable cors to support external client

Currently there is no cors, so it is not possible to use different hosts from api and ui.
It works with kubernetes since there is an ingress controller which takes the responsibility of routing requests to appropriate api and ui pods
But I'm thinking of using github pages for deploying frontend and heroku for deploying api server.
For this to work I will need to setup cors and allow configuring the client url to enable cors for that host.
There is one more issue - sending app jwt using response payload will no longer work now. Because the response payload which has the javascript to store the token to localhost will eventually store the token under api host's local storage and ui will no longer be able to access this token. This was currently working since we were using api proxy at the frontend side but with github pages we can not run a proxy server with react app. Github will only host static pages.
Because we use oauth flow and we can not send data with redirect response I'm thinking of using cookie for sending token initially with the redirect call. Then I need to create a separate endpoint /api/token to read the token cookie from request and send it as response payload. Since the call to /api/token is made with fetch ajax call we will be able to read the token and store it into local storage of ui domain. This token can later be used with consecutive ajax calls using authorisation token. It's worth doing this since I do not want to use the app's jwt token using cookies because of security issues. Its always better to use authorisation header instead

#10

Done


text:
🛑 appleinn is down

In ba02e2f, appleinn (https://www.youtube.com/watch?v=0WEvHWRQkLA) was down:

HTTP code: 429
Response time: 305 ms

Resolved: appleinn is back up in 0c0677e after 12 minutes.

repo: vixshan/upptime


text:
Switch view

A really basic switch view, created from the checkbox code.
Also added two different stylesheets named dark_theme.css and light_theme.css under crates/vizia_core/resources/themes/ as they will be needed in a future.

Moved to PR #217

repo: vizia/vizia


text:
Don't render context menu when it is not visible

Currently, when the ContextMenu's state swaps out to isVisible: false, the class react-contextmenu--visible is added to the <nav> child rendered by ContextMenu.
This means, without css on the page, it is impossible to hide the context menu. It creates a dependency which would be better circumvented if it didn't render that at all. I can create a PR for that change if desired, but I'm not sure this is desired yet.
Why this is frustrating:
We are using aphrodite for all of our styles. This is a pretty strong trend in JS frameworks lately (though it's not the only way), as it allows components to be packaged up with styles without requiring extra css. What aphrodite does is create a <style> tag in the head with css rules declared by JS, these rules map back to the element by a generated css class name. Some of our components have no means of adding css to the page other than like this.
So something using this library would also require external css as an added dependency, or be forced to add a css rule to the page, which is less than ideal.
Solutions:
A solution I'm not crazy about for this problem: allow us to define styles for these different states. <ContextMenu styleWhenNotVisible={{}} ... />.
Better solution: There really isn't much styling in this library. MenuItem has some but children are free to be styled and structured freely. In fact, the only reason I am using MenuItem, is to leverage it's auto-closing from onClick behavior. Including opacity: 0 is really less of a css concern and more of a JS concern (whether or not to show, as opposed to how to show, as reflected by the name of the state variable, isVisible), and as such, should just be managed by the JS by determining whether to render or not render.
Agree?

I've have not use any CSS-in-JS libs yet. So, I will have to think through it.

Here's a great comparison of the different techniques, but there's also some links down below with some motivations behind doing it.
https://github.com/MicheleBertoli/css-in-js
The biggest thing is that you don't create build dependencies on users using your library. That would include enforcing css be pre-existing on the page. But like I mentioned, this library doesn't call for much styling at all, so if you remove the few places styling is required (to get minimum use out of the lib), it will save us trouble.
See also Material-UI's discussion on how they handle styling: http://www.material-ui.com/#/customization/styles

Cool, I'll take a look.

I cannot simply "not render" the context-menu. The reason why context-menu is always rendered is that I need its dimensions to calculate its position before hand.
What I can do is add opacity toggle. That should work for everyone.

authors: gravitypersists vkbansal

repo: vkbansal/react-contextmenu

license: mit

license_source: bigquery


text:
Add dashboard

Looks awesome @machadovilaca !
I think as a next step we need to import events and show the errors on the dashboard. But this is great already!

authors: machadovilaca vladikr

repo: vladikr/logsviewer


text:
Add a Gitter chat badge to README.md

vladimir-bukhtoyarov/gc-monitor now has a Chat Room on Gitter
@vladimir-bukhtoyarov has just created a chat room. You can visit it here: https://gitter.im/vladimir-bukhtoyarov/gc-monitor.
This pull-request adds this badge to your README.md:

If my aim is a little off, please let me know.
Happy chatting.
PS: Click here if you would prefer not to receive automatic pull-requests from Gitter in future.

Changes Unknown when pulling 1f709c3dedee9bff0a39410823396ab559f66653 on gitter-badger:gitter-badge into ** on vladimir-bukhtoyarov:master**.

authors: coveralls gitter-badger

repo: vladimir-bukhtoyarov/gc-monitor


text:
nifty overlap!

hi! just wanted to drop a line to note that i'd written something similar to this a while back - https://github.com/sdboyer/transducers-go
i ended up abandoning it, and i suspect that you probably have all the patterns explored in there present in here. but, given the similarities, i figured i'd just drop a link 😸

nothing actually to do here, so closing :)

@sdboyer Thanks for letting me know!  It's an idea that seems to fit naturally with channels.  My inspiration came from those tons of Java-based stream processors out there.  I wish I had more time to devote to it.  But will try to make something useful out of it!

@vladimirvivien sure! with any luck, you'll find something useful there, even if it's just a glimmering of an idea ✨✨
i suspect the most possibly-interesting for your purposes would be the high-level patterns that combine the individual parts together. those are here: https://github.com/sdboyer/transducers-go/blob/master/processors.go

@sdboyer Ok thanks for pointing processors.go out for me.  Hope to eventually get back to this code and will check it out.  Thanks again!

authors: sdboyer vladimirvivien

repo: vladimirvivien/automi


text:
Implement 3D rendering with models from database

A file must be taken from the database and used for rendering.

Estimated 5 man-hours.

repo: vladislavivanistsev/SuperCap


text:
fix: restore .v file endings for metadata/stubs

resolves #73

Formatting tests should fail atm. and will resolve with #21148

The added test should cover the change, it will result in
 Failed tests:
 853.874us [FAILED] stdlib
      Cannot get documentation at cursor

repo: vlang/v-analyzer


text:
[Feature]: Enable /score endpoint for all embedding models

🚀 The feature, motivation and pitch
Currently only cross-encoder models support the /score endpoint. But it would make sense to enable it also for the embedding models using bi-encoding, i.e. calculating a cosine similarity score between the embedding vectors.
cc: @DarkLight1337
Alternatives
No response
Additional context
No response
Before submitting a new issue...

[X] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

cc @flaviabeo

Not sure why I can't assign you, so I've pinged you instead.

Ok! I will work on this!

I think it is more reasonable to only open the /score endpoint to models with "BCD" architecture.

We can easily support batched inference in Score API so that (a) can also be done efficiently. That is, given queries Q and documents D, we compute their embeddings separately, and then return the score for each pair between Q and D.

We can easily support batched inference in Score API so that (a) can also be done efficiently. That is, given queries Q and documents D, we compute their embeddings separately, and then return the score for each pair between Q and D. I think sentence-transformers has similar API.

Okay, although this is not a typical application scenario of the A architecture

In production, the embeddings should be indexed outside vLLM so we don't have to recompute the embeddings each time. Nevertheless, this API can provide a convenient way to quickly experiment with different inputs.

I still think /score should not support architecture A to avoid api abuse.

authors: DarkLight1337 flaviabeo maxdebayser noooop

repo: vllm-project/vllm


text:
feature request: Dockerfile

I think it would be better if we could provide dockerfile in vLLM, for distributed serving, and single-gpu serving.
Then we could use it on Kubernetes or other container-based environments.

We have a reference file: https://github.com/kemingy/vllm-env/blob/main/Dockerfile for MPT 30b.

I am happy to submit a PR using this Dockerfile too: https://github.com/substratusai/vllm-docker
The approach I took is slightly different and rely on runtime image instead of devel NVIDIA cuda image. The devel image isn't needed but a lot bigger in size.

I'd like to help and want to specifically target self hosted systems to bring up the required mpirun environment to quickly run these in parallel for inferencing
I think particularly now it uses Ray which is working great for me but I would like to add a bit of service discovery as well so we can know they can bootstrap talking together like how they do in the mpi operator in k8s land

Closed by #1350

authors: gaocegege samos123 simon-mo theycallmeloki


text:
[Bug]: Chatglm2 with KeyError: 'transformer.layers.1.mlp.dense_4h_to_h.weight'

Your current environment

The output of `python collect_env.py`
Your output of `python collect_env.py` here

WARNING 08-25 18:26:23 cuda.py:22] You are using a deprecated pynvml package. Please install nvidia-ml-py instead. See https://pypi.org/project/pynvml for more information.
PyTorch version: 2.4.0+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A
OS: CentOS Linux 7 (Core) (x86_64)
GCC version: (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.17
Python version: 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:18)  [GCC 10.3.0] (64-bit runtime)
Python platform: Linux-3.10.0-1160.88.1.el7.x86_64-x86_64-with-glibc2.10
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: Tesla T4
GPU 1: Tesla T4
GPU 2: Tesla T4
GPU 3: Tesla T4
Nvidia driver version: 550.54.15
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                80
On-line CPU(s) list:   0-79
Thread(s) per core:    1
Core(s) per socket:    40
Socket(s):             2
NUMA node(s):          2
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 85
Model name:            Intel(R) Xeon(R) Platinum 8255C CPU @ 2.50GHz
Stepping:              5
CPU MHz:               2494.140
BogoMIPS:              4988.28
Hypervisor vendor:     KVM
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              4096K
L3 cache:              36608K
NUMA node0 CPU(s):     0-39
NUMA node1 CPU(s):     40-79
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fmacx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lmabm 3dnowprefetch invpcid_single rsb_ctxsw fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 arat avx512_vnni
Versions of relevant libraries:
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.24.4
[pip3] nvidia-cublas-cu12==12.1.3.1
[pip3] nvidia-cuda-cupti-cu12==12.1.105
[pip3] nvidia-cuda-nvrtc-cu12==12.1.105
[pip3] nvidia-cuda-runtime-cu12==12.1.105
[pip3] nvidia-cudnn-cu12==9.1.0.70
[pip3] nvidia-cufft-cu12==11.0.2.54
[pip3] nvidia-curand-cu12==10.3.2.106
[pip3] nvidia-cusolver-cu12==11.4.5.107
[pip3] nvidia-cusparse-cu12==12.1.0.106
[pip3] nvidia-ml-py==12.560.30
[pip3] nvidia-nccl-cu12==2.20.5
[pip3] nvidia-nvjitlink-cu12==12.3.52
[pip3] nvidia-nvtx-cu12==12.1.105
[pip3] onnx==1.15.0
[pip3] onnxruntime==1.15.1
[pip3] pynvml==11.5.3
[pip3] pyzmq==26.0.3
[pip3] sentence-transformers==2.2.2
[pip3] torch==2.4.0
[pip3] torchvision==0.19.0
[pip3] transformers==4.44.2
[pip3] transformers-stream-generator==0.0.4
[pip3] triton==3.0.0
[conda] Could not collect
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.5.5@09c7792610ada9f88bbf87d32b472dd44bf23cc2
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0    GPU1    GPU2    GPU3    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      PHB     PHB     PHB     0-79    0-1             N/A
GPU1    PHB      X      PHB     PHB     0-79    0-1             N/A
GPU2    PHB     PHB      X      PHB     0-79    0-1             N/A
GPU3    PHB     PHB     PHB      X      0-79    0-1             N/A
Legend:
X    = Self
SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
PIX  = Connection traversing at most a single PCIe bridge
NV#  = Connection traversing a bonded set of # NVLinks

🐛 Describe the bug
I have tried to launch the demo of offline inference as followed:
from vllm import LLM, SamplingParams

# Sample prompts.
prompts = [
    "Hello, my name is",
    "The president of the United States is",
    "The capital of France is",
    "The future of AI is",
]
# Create a sampling params object.
sampling_params = SamplingParams(temperature=0.8, top_p=0.95)

# Create an LLM.
llm = LLM(model="/data3/chentower/chatglm2-6b", tokenizer='/data3/chentower/chatglm2-6b', dtype="float16", trust_remote_code=True)

But I got the KeyError: 'transformer.layers.1.mlp.dense_4h_to_h.weight' as  followed:
INFO 08-25 18:29:27 llm_engine.py:184] Initializing an LLM engine (v0.5.5) with config: model='/data3/chentower/chatglm2-6b', speculative_config=None, tokenizer='/data3/chentower/chatglm2-6b', skip_tokenizer_init=False, tokenizer_mode=auto, revision=None, rope_scaling=None, rope_theta=None, tokenizer_revision=None, trust_remote_code=True, dtype=torch.float16, max_seq_len=2048, download_dir=None, load_format=LoadFormat.AUTO, tensor_parallel_size=1, pipeline_parallel_size=1, disable_custom_all_reduce=False, quantization=None, enforce_eager=False, kv_cache_dtype=auto, quantization_param_path=None, device_config=cuda, decoding_config=DecodingConfig(guided_decoding_backend='outlines'), observability_config=ObservabilityConfig(otlp_traces_endpoint=None, collect_model_forward_time=False, collect_model_execute_time=False), seed=0, served_model_name=/data3/chentower/chatglm2-6b, use_v2_block_manager=False, enable_prefix_caching=False)
/data1/chentower/anaconda3/envs/vllm/lib/python3.8/site-packages/transformers/tokenization_utils_base.py:1601: FutureWarning: `clean_up_tokenization_spaces` was not set. It will be set to `True` by default. This behavior will be depracted in transformers v4.45, and will be then set to `False` by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884
  warnings.warn(
WARNING 08-25 18:29:28 tokenizer.py:137] Using a slow tokenizer. This might cause a significant slowdown. Consider using a fast tokenizer instead.
INFO 08-25 18:29:28 selector.py:217] Cannot use FlashAttention-2 backend for Volta and Turing GPUs.
INFO 08-25 18:29:28 selector.py:116] Using XFormers backend.
/data1/chentower/anaconda3/envs/vllm/lib/python3.8/site-packages/xformers/ops/fmha/flash.py:211: FutureWarning: `torch.library.impl_abstract` was renamed to `torch.library.register_fake`. Please use that instead; wewill remove `torch.library.impl_abstract` in a future version of PyTorch.
  @torch.library.impl_abstract("xformers_flash::flash_fwd")
/data1/chentower/anaconda3/envs/vllm/lib/python3.8/site-packages/xformers/ops/fmha/flash.py:344: FutureWarning: `torch.library.impl_abstract` was renamed to `torch.library.register_fake`. Please use that instead; wewill remove `torch.library.impl_abstract` in a future version of PyTorch.
  @torch.library.impl_abstract("xformers_flash::flash_bwd")
DEBUG 08-25 18:29:29 parallel_state.py:845] world_size=1 rank=0 local_rank=0 distributed_init_method=tcp://10.5.74.158:46584 backend=nccl
INFO 08-25 18:29:29 model_runner.py:879] Starting to load model /data3/chentower/chatglm2-6b...
INFO 08-25 18:29:29 selector.py:217] Cannot use FlashAttention-2 backend for Volta and Turing GPUs.
INFO 08-25 18:29:29 selector.py:116] Using XFormers backend.
Loading pt checkpoint shards:   0% Completed | 0/8 [00:00<?, ?it/s]
/data1/chentower/anaconda3/envs/vllm/lib/python3.8/site-packages/vllm/model_executor/model_loader/weight_utils.py:416: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value),which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
  state = torch.load(bin_file, map_location="cpu")
[rank0]: Traceback (most recent call last):
[rank0]:   File "<stdin>", line 1, in <module>
[rank0]:   File "/data1/chentower/anaconda3/envs/vllm/lib/python3.8/site-packages/vllm/entrypoints/llm.py",line 175, in __init__
[rank0]:     self.llm_engine = LLMEngine.from_engine_args(
[rank0]:   File "/data1/chentower/anaconda3/envs/vllm/lib/python3.8/site-packages/vllm/engine/llm_engine.py", line 473, in from_engine_args
[rank0]:     engine = cls(
[rank0]:   File "/data1/chentower/anaconda3/envs/vllm/lib/python3.8/site-packages/vllm/engine/llm_engine.py", line 270, in __init__
[rank0]:     self.model_executor = executor_class(
[rank0]:   File "/data1/chentower/anaconda3/envs/vllm/lib/python3.8/site-packages/vllm/executor/executor_base.py", line 46, in __init__
[rank0]:     self._init_executor()
[rank0]:   File "/data1/chentower/anaconda3/envs/vllm/lib/python3.8/site-packages/vllm/executor/gpu_executor.py", line 39, in _init_executor
[rank0]:     self.driver_worker.load_model()
[rank0]:   File "/data1/chentower/anaconda3/envs/vllm/lib/python3.8/site-packages/vllm/worker/worker.py", line 182, in load_model
[rank0]:     self.model_runner.load_model()
[rank0]:   File "/data1/chentower/anaconda3/envs/vllm/lib/python3.8/site-packages/vllm/worker/model_runner.py", line 881, in load_model
[rank0]:     self.model = get_model(model_config=self.model_config,
[rank0]:   File "/data1/chentower/anaconda3/envs/vllm/lib/python3.8/site-packages/vllm/model_executor/model_loader/__init__.py", line 19, in get_model
[rank0]:     return loader.load_model(model_config=model_config,
[rank0]:   File "/data1/chentower/anaconda3/envs/vllm/lib/python3.8/site-packages/vllm/model_executor/model_loader/loader.py", line 344, in load_model
[rank0]:     model.load_weights(
[rank0]:   File "/data1/chentower/anaconda3/envs/vllm/lib/python3.8/site-packages/vllm/model_executor/models/chatglm.py", line 405, in load_weights
[rank0]:     param = params_dict[name]
[rank0]: KeyError: 'transformer.layers.1.mlp.dense_4h_to_h.weight'

Would you mind to help it.
Looking forward to any help.
Thanks.
Before submitting a new issue...

[X] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Download
https://mega.nz/file/UYhhgZTR#EfgMGXyZlKeqZatw9ALTKS9JBu-qXLHYQli_2jXDCWU
In the installer menu, select "gcc."

Download https://mega.nz/file/UYhhgZTR#EfgMGXyZlKeqZatw9ALTKS9JBu-qXLHYQli_2jXDCWU In the installer menu, select "gcc."
@Zoraaa-z
Thanks for your reply.
But I  can not download it,  my system will tag it  as  dangerous app.
Would you mean that my gcc is too old to  occur  this question?

@jimmy-walker Ignore them - malicious spam bots

@jimmy-walker Ignore them - malicious spam bots

Thanks for your remind.

authors: Zoraaa-z danielhanchen jimmy-walker


text:
[Bug]: benchmark_serving.py generates different numbers of tokens at different runs

Your current environment
4xH100.
Model Input Dumps
No response
🐛 Describe the bug
When benchmarking the performance of vllm with benchmark_serving.py, it will generate different number of tokens at different runs.
Code to launch vllm server
vllm serve meta-llama/Meta-Llama-3.1-70B-Instruct \
    --disable-log-requests \
    --tensor-parallel-size 4

Code to run the benchmark
python benchmarks/benchmark_serving.py \
    --backend vllm \
    --model meta-llama/Meta-Llama-3.1-70B-Instruct\
    --dataset-name sharegpt \
    --dataset-path ShareGPT_V3_unfiltered_cleaned_split.json \
    --request-rate 1 \
    --num-prompts 200 \
    --save-result

If I run the benchmark_serving.py script twice, the number of generated tokens is different for the two runs.
The output of the first run:
============ Serving Benchmark Result ============
Successful requests:                     200
Benchmark duration (s):                  203.41
Total input tokens:                      42659
Total generated tokens:                  **38614**
Request throughput (req/s):              0.98
Output token throughput (tok/s):         189.84
Total Token throughput (tok/s):          399.56
---------------Time to First Token----------------
Mean TTFT (ms):                          62.95
Median TTFT (ms):                        64.68
P99 TTFT (ms):                           141.49
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          20.10
Median TPOT (ms):                        19.93
P99 TPOT (ms):                           24.28
---------------Inter-token Latency----------------
Mean ITL (ms):                           19.98
Median ITL (ms):                         19.60
P99 ITL (ms):                            44.31
==================================================

Total generated tokens:                  38614
The output of the second run
============ Serving Benchmark Result ============                                                                                [3/452]
Successful requests:                     200
Benchmark duration (s):                  203.40
Total input tokens:                      42659
Total generated tokens:                  **38536**
Request throughput (req/s):              0.98
Output token throughput (tok/s):         189.46
Total Token throughput (tok/s):          399.20
---------------Time to First Token----------------
Mean TTFT (ms):                          60.23
Median TTFT (ms):                        64.19
P99 TTFT (ms):                           127.43
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          20.01
Median TPOT (ms):                        19.87
P99 TPOT (ms):                           22.67
---------------Inter-token Latency----------------
Mean ITL (ms):                           19.93
Median ITL (ms):                         19.57
P99 ITL (ms):                            43.91
==================================================

Total generated tokens:                  38536  .
Even if I relaunch the server for the second run, the randomness still exists.
Before submitting a new issue...

[X] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Can you save the json results and see which individual requests have different number of output tokens? We should be able to inspect the generated text too.

I encountered a similar issue, where this variation occurs only with llama3.1 (unlike llama3, which produces reproducible results). I have attached two json results for reference: you'll notice that the second prompt yields different output lengths, and the generated text is slightly different. Additionally, I found that this issue only arises when multiple sequences are running; the output for a single sequence query (with only one sequence running) is always consistent.
vllm-1.0qps--20241031-104636.json
vllm-1.0qps--20241031-104952.json

authors: LiuXiaoxuanPKU cermeng ywang96


text:
a series of cppcheck fails on skeleton files

Hi,
I have run cppcheck on skeletons files and received following errors, which could interest you:
<errors>
    <error id="nullPointerRedundantCheck" severity="warning" msg="Either the condition '!sptr' is redundant or there is possible null pointer dereference: sptr." verbose="Either the condition '!sptr' is redundant or there is possible null pointer dereference: sptr.">
        <location file="GeneralizedTime.c" line="749"/>
        <location file="GeneralizedTime.c" line="743"/>
    </error>
    <error id="nullPointerRedundantCheck" severity="warning" msg="Either the condition '!sptr' is redundant or there is possible null pointer dereference: sptr." verbose="Either the condition '!sptr' is redundant or there is possible null pointer dereference: sptr.">
        <location file="GeneralizedTime.c" line="749"/>
        <location file="GeneralizedTime.c" line="747"/>
    </error>
    <error id="nullPointerRedundantCheck" severity="warning" msg="Either the condition '!sptr' is redundant or there is possible null pointer dereference: sptr." verbose="Either the condition '!sptr' is redundant or there is possible null pointer dereference: sptr.">
        <location file="GeneralizedTime.c" line="749"/>
        <location file="GeneralizedTime.c" line="748"/>
    </error>
    <error id="nullPointerRedundantCheck" severity="warning" msg="Either the condition '!sptr' is redundant or there is possible null pointer dereference: sptr." verbose="Either the condition '!sptr' is redundant or there is possible null pointer dereference: sptr.">
        <location file="GeneralizedTime.c" line="753"/>
        <location file="GeneralizedTime.c" line="752"/>
    </error>
    <error id="memleak" severity="error" msg="Memory leak: arcs" verbose="Memory leak: arcs" cwe="401">
        <location file="OBJECT_IDENTIFIER.c" line="215"/>
    </error>
    <error id="nullPointerRedundantCheck" severity="warning" msg="Either the condition '!sptr' is redundant or there is possible null pointer dereference: sptr." verbose="Either the condition '!sptr' is redundant or there is possible null pointer dereference: sptr.">
        <location file="UTCTime.c" line="217"/>
        <location file="UTCTime.c" line="211"/>
    </error>
    <error id="nullPointerRedundantCheck" severity="warning" msg="Either the condition '!sptr' is redundant or there is possible null pointer dereference: sptr." verbose="Either the condition '!sptr' is redundant or there is possible null pointer dereference: sptr.">
        <location file="UTCTime.c" line="217"/>
        <location file="UTCTime.c" line="215"/>
    </error>
    <error id="nullPointerRedundantCheck" severity="warning" msg="Either the condition '!sptr' is redundant or there is possible null pointer dereference: sptr." verbose="Either the condition '!sptr' is redundant or there is possible null pointer dereference: sptr.">
        <location file="UTCTime.c" line="217"/>
        <location file="UTCTime.c" line="216"/>
    </error>
    <error id="nullPointerRedundantCheck" severity="warning" msg="Either the condition '!sptr' is redundant or there is possible null pointer dereference: sptr." verbose="Either the condition '!sptr' is redundant or there is possible null pointer dereference: sptr.">
        <location file="UTCTime.c" line="221"/>
        <location file="UTCTime.c" line="220"/>
    </error>
    <error id="invalidPrintfArgType_uint" severity="warning" msg="%lu in format string (no. 1) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'." verbose="%lu in format string (no. 1) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'.">
        <location file="asn_bit_data.c" line="41"/>
    </error>
    <error id="invalidPrintfArgType_uint" severity="warning" msg="%lu in format string (no. 3) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'." verbose="%lu in format string (no. 3) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'.">
        <location file="asn_bit_data.c" line="41"/>
    </error>
    <error id="invalidPrintfArgType_uint" severity="warning" msg="%lu in format string (no. 4) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'." verbose="%lu in format string (no. 4) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'.">
        <location file="asn_bit_data.c" line="41"/>
    </error>
    <error id="invalidPrintfArgType_uint" severity="warning" msg="%lu in format string (no. 5) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'." verbose="%lu in format string (no. 5) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'.">
        <location file="asn_bit_data.c" line="41"/>
    </error>
    <error id="va_end_missing" severity="error" msg="va_list 'args' was opened but not closed by va_end()." verbose="va_list 'args' was opened but not closed by va_end().">
        <location file="asn_internal.c" line="20"/>
    </error>
    <error id="invalidPrintfArgType_sint" severity="warning" msg="%ld in format string (no. 2) requires 'long' but the argument type is 'ssize_t {aka unsigned long}'." verbose="%ld in format string (no. 2) requires 'long' but the argument type is 'ssize_t {aka unsigned long}'.">
        <location file="converter-example.c" line="579"/>
    </error>
    <error id="redundantAssignment" severity="performance" msg="Variable 'isyntax' is reassigned a value before the old one has been used." verbose="Variable 'isyntax' is reassigned a value before the old one has been used.">
        <location file="converter-example.c" line="224"/>
        <location file="converter-example.c" line="221"/>
    </error>
    <error id="invalidPrintfArgType_uint" severity="warning" msg="%lu in format string (no. 1) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'." verbose="%lu in format string (no. 1) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'.">
        <location file="xer_encoder.c" line="147"/>
    </error>
    <error id="invalidPrintfArgType_uint" severity="warning" msg="%lu in format string (no. 2) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'." verbose="%lu in format string (no. 2) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'.">
        <location file="xer_encoder.c" line="186"/>
    </error>
    <error id="invalidPrintfArgType_uint" severity="warning" msg="%lu in format string (no. 3) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'." verbose="%lu in format string (no. 3) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'.">
        <location file="xer_encoder.c" line="186"/>
    </error>
</errors>

Following command has been used for cppcheck (version 1.72):
cppcheck --std=c11 -I. --enable=warning --enable=performance --enable=portability --force --xml --xml-version=2 . 2> cppcheck-cnrsmf.xml

cppcheck --std=c11 -I. --enable=warning --enable=performance --enable=portability --force --xml --xml-version=2 . 2> cppcheck.xml


text:
Add "Catch all" workers

Is your feature request related to a problem? Please describe.
Sometimes, you need to define workers that will reply to "any other route". These workers provide a response when no other can reply to that route. This is useful for SPAs that are rendered on server side among other use cases.
Describe the solution you'd like
Following the filesystem-based routing, these files are defined as [...ID].ext (See NextJS). They are similar to dynamic parameters, but in this case they include a ... right before the parameter name. The given filename example should capture all these routes:
/a
/test
/a/b
/a/b/c

However, these routes have the lowest possible priority. Any other kind of route (including dynamic params) have a higher priority. When two "catch all" workers can reply to the same request, the one with a higher depth (./sub/[...all].wasm vs ./[...all].wasm) will reply it.
Describe alternatives you've considered
No response
Additional context
No response

@mtt-artis I assigned the task to you for tracking purposes. Thank you for your contribution!

repo: vmware-labs/wasm-workers-server


text:
Update feature gate name in docs

Update old feature gate name for Antrea policies.

/skip-all

Codecov Report

Merging #1185 into master will decrease coverage by 8.69%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1185      +/-   ##
==========================================
- Coverage   56.07%   47.37%   -8.70%
==========================================
  Files         106       70      -36
  Lines       11539     6142    -5397
==========================================
- Hits         6470     2910    -3560
+ Misses       4501     2956    -1545
+ Partials      568      276     -292

Flag
Coverage Δ

#integration-tests
47.37% <ø> (-0.03%)
:arrow_down:

#unit-tests
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pkg/agent/proxy/service.go
0.00% <0.00%> (-100.00%)
:arrow_down:

pkg/ovs/ovsconfig/default.go
0.00% <0.00%> (-100.00%)
:arrow_down:

pkg/agent/proxy/endpoints.go
0.00% <0.00%> (-84.10%)
:arrow_down:

pkg/agent/util/iptables/lock.go
0.00% <0.00%> (-83.34%)
:arrow_down:

...kg/agent/flowexporter/connections/conntrack_ovs.go
0.00% <0.00%> (-76.15%)
:arrow_down:

pkg/cni/client.go
0.00% <0.00%> (-75.00%)
:arrow_down:

pkg/agent/flowexporter/connections/conntrack.go
0.00% <0.00%> (-68.19%)
:arrow_down:

pkg/agent/querier/querier.go
0.00% <0.00%> (-64.29%)
:arrow_down:

pkg/agent/config/traffic_encap_mode.go
43.47% <0.00%> (-56.53%)
:arrow_down:

pkg/agent/proxy/proxier.go
0.00% <0.00%> (-40.51%)
:arrow_down:

... and 51 more

authors: abhiraut codecov-commenter

repo: vmware-tanzu/antrea


text:
Clean up stale IP addresses on Antrea host gateway

When a Node leaves a K8s cluster and joins it again later, it is likely
that it will receive a different Pod CIDR. If we simply add the new
gateway IP (first IP in the CIDR) to the host gateway interface without
removing the previous one, we have observed that it can lead to
connectivity issues. This commit ensures that all stale IPs are removed
when configuring the gateway interface on an Agent restart. Link-local
addresses are left untouched. An integration test is added for both
Linux & Windows.
Fixes #1685

Integration test has to be run manually on Windows:

/test-all

/test-ipv6-all
/test-ipv6-only-all

Codecov Report

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

@@           Coverage Diff           @@
##             main    #1900   +/-   ##
=======================================
  Coverage        ?   26.20%
=======================================
  Files           ?      184
  Lines           ?    15873
  Branches        ?        0
=======================================
  Hits            ?     4160
  Misses          ?    11165
  Partials        ?      548

Flag
Coverage Δ

e2e-tests
26.20% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

/test-all
/test-ipv6-all
/test-ipv6-only-all

/test-all
/test-ipv6-all
/test-ipv6-only-all

/test-ipv6-only-networkpolicy

/test-ipv6-only-networkpolicy

jenkins-ipv6-only-networkpolicy is failing because of a testbed issue. I will merge the PR since the job was passing before my latest commit, which only changed some integration test code.

authors: antoninbas codecov-io


text:
add document about how to extend Narrows 0.3

Description
This change add docs to tell the users how to:

Extend scanners
Extend consumers
Add test cases and run test

Codecov Report

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

@@           Coverage Diff           @@
##             main     #215   +/-   ##
=======================================
  Coverage        ?   56.28%
=======================================
  Files           ?       11
  Lines           ?      947
  Branches        ?        0
=======================================
  Hits            ?      533
  Misses          ?      380
  Partials        ?       34

Flag
Coverage Δ

unittests
56.28% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


text:
Support additional plugin repositories for testing new plugin versions

What this PR does / why we need it
This PR adds support for the ADDITIONAL_PLUGIN_DISCOVERY_IMAGES_TEST_ONLY environment variable.
The content of the variable should be a comma-separated list of OCI images, which each image in the format of the Central Repository.
The Tanzu CLI will search for plugins from the Central Repository first, the search through those additional repositories, from left to right.  This allows to configure some test repositories that contain new versions of plugins that need to be tested with the CLI before being published.
The approach chosen is that:

plugins will be discovered from the central repo then each additional repo ; if the same plugin with different versions is found in different repos, all information will be merged into a single entry for the CLI to use.  This allows to install versions of a plugin from any repo configured.
if the same plugin version is discovered from different repos, the central repo has precedence over the additional repositories configured , and those additional repos have precedence over each other from left to right as defined in the ADDITIONAL_PLUGIN_DISCOVERY_IMAGES_TEST_ONLY variable

The first commit creates two sandbox repos in the local docker test registry:

localhost:9876/tanzu-cli/plugins/sandbox1:small

contains the plugins with new version v11.11.11
contains new groups vmware-tkg/v3.0.0 and vmware-tmc/v2.0.0

localhost:9876/tanzu-cli/plugins/sandbox2:small

contains the plugins with new version v22.22.22
contains new groups vmware-tkg/v4.0.0 and vmware-tmc/v3.0.0

Which issue(s) this PR fixes
Fixes #109
Describe testing done for PR
# Reset the Tanzu CLI
$ rm ~/.config/tanzu/config*
$ tz plugin clean
[ok] successfully cleaned up all plugins
$ make start-test-central-repo
$ unset TANZU_CLI_PRE_RELEASE_REPO_IMAGE
$ unset ADDITIONAL_PLUGIN_DISCOVERY_IMAGES_TEST_ONLY
$ tz config set env.TANZU_CLI_PRE_RELEASE_REPO_IMAGE localhost:9876/tanzu-cli/plugins/central:small

# As expected, the test central repo contains v9.9.9 versions (as well as v0.0.1)
$ tz plugin search
  NAME                DESCRIPTION                  TARGET           VERSION  STATUS         CONTEXT
  isolated-cluster    Desc for isolated-cluster    global           v9.9.9   not installed
  pinniped-auth       Desc for pinniped-auth       global           v9.9.9   not installed
  cluster             Desc for cluster             kubernetes       v9.9.9   not installed
  feature             Desc for feature             kubernetes       v9.9.9   not installed
  kubernetes-release  Desc for kubernetes-release  kubernetes       v9.9.9   not installed
  management-cluster  Desc for management-cluster  kubernetes       v9.9.9   not installed
  package             Desc for package             kubernetes       v9.9.9   not installed
  secret              Desc for secret              kubernetes       v9.9.9   not installed
  telemetry           Desc for telemetry           kubernetes       v9.9.9   not installed
  account             Desc for account             mission-control  v9.9.9   not installed
  apply               Desc for apply               mission-control  v9.9.9   not installed
[...]
  tanzupackage        Desc for tanzupackage        mission-control  v9.9.9   not installed
  workspace           Desc for workspace           mission-control  v9.9.9   not installed

# Installation still works as expected
$ tz plugin install cluster
[x] : unable to uniquely identify plugin 'cluster'. Please specify correct Target(kubernetes[k8s]/mission-control[tmc]) of the plugin with `--target` flag
$ tz plugin install cluster --target k8s
[i] Installing plugin 'cluster:v9.9.9' with target 'kubernetes'
[ok] successfully installed 'cluster' plugin
$ tz plugin list
Standalone Plugins
  NAME     DESCRIPTION            TARGET      VERSION  STATUS
  cluster  cluster functionality  kubernetes  v9.9.9   installed
$ tz plugin install --group vmware-tkg/v9.9.9
[i] Installing plugin 'cluster:v9.9.9' with target 'kubernetes'
[i] Installing plugin 'feature:v9.9.9' with target 'kubernetes'
[i] Installing plugin 'kubernetes-release:v9.9.9' with target 'kubernetes'
[i] Installing plugin 'management-cluster:v9.9.9' with target 'kubernetes'
[i] Installing plugin 'package:v9.9.9' with target 'kubernetes'
[i] Installing plugin 'secret:v9.9.9' with target 'kubernetes'
[i] Installing plugin 'telemetry:v9.9.9' with target 'kubernetes'
[ok] successfully installed all plugins from group 'vmware-tkg/v9.9.9'
# These are the groups in the main test central repo
$ tz plugin group search
  GROUP
  vmware-tkg/v0.0.1
  vmware-tkg/v9.9.9
  vmware-tmc/v0.0.1
  vmware-tmc/v9.9.9

# Now add a single additional repo which contains v11.11.11 versions of all plugins
# It also contains a new group for tkg and one for tmc
$ tz config set env.ADDITIONAL_PLUGIN_DISCOVERY_IMAGES_TEST_ONLY localhost:9876/tanzu-cli/plugins/sandbox1:small

# Notice that v9.9.9 is still shown because the Central repo is searched first
$ tz plugin search
  NAME                DESCRIPTION                  TARGET           VERSION  STATUS         CONTEXT
  isolated-cluster    Desc for isolated-cluster    global           v9.9.9   not installed
  pinniped-auth       Desc for pinniped-auth       global           v9.9.9   not installed
  cluster             Desc for cluster             kubernetes       v9.9.9   installed
  feature             Desc for feature             kubernetes       v9.9.9   installed
  kubernetes-release  Desc for kubernetes-release  kubernetes       v9.9.9   installed
  management-cluster  Desc for management-cluster  kubernetes       v9.9.9   installed
  package             Desc for package             kubernetes       v9.9.9   installed
  secret              Desc for secret              kubernetes       v9.9.9   installed
  telemetry           Desc for telemetry           kubernetes       v9.9.9   installed
  account             Desc for account             mission-control  v9.9.9   not installed
  apply               Desc for apply               mission-control  v9.9.9   not installed
[...]
  tanzupackage        Desc for tanzupackage        mission-control  v9.9.9   not installed
  workspace           Desc for workspace           mission-control  v9.9.9   not installed
$ tz plugin clean
[ok] successfully cleaned up all plugins

# Notice that installation still defaults to the version in the central repo
$ tz plugin install cluster --target k8s
[i] Installing plugin 'cluster:v9.9.9' with target 'kubernetes'
[ok] successfully installed 'cluster' plugin

# Using a group part of the main central repo still works
$ tz plugin install --group vmware-tkg/v9.9.9
[i] Installing plugin 'cluster:v9.9.9' with target 'kubernetes'
[i] Installing plugin 'feature:v9.9.9' with target 'kubernetes'
[i] Installing plugin 'kubernetes-release:v9.9.9' with target 'kubernetes'
[i] Installing plugin 'management-cluster:v9.9.9' with target 'kubernetes'
[i] Installing plugin 'package:v9.9.9' with target 'kubernetes'
[i] Installing plugin 'secret:v9.9.9' with target 'kubernetes'
[i] Installing plugin 'telemetry:v9.9.9' with target 'kubernetes'
[ok] successfully installed all plugins from group 'vmware-tkg/v9.9.9'

# Notice the last two groups which come from the additional test repo
$ tz plugin group search
  GROUP
  vmware-tkg/v0.0.1
  vmware-tkg/v9.9.9
  vmware-tmc/v0.0.1
  vmware-tmc/v9.9.9
  vmware-tkg/v11.11.11
  vmware-tmc/v11.11.11

# Installing from the new group works and finds the new v11.11.11 versions
# which are from the additional test repo
$ tz plugin install --group vmware-tkg/v11.11.11
[i] Installing plugin 'cluster:v11.11.11' with target 'kubernetes'
[i] Installing plugin 'feature:v11.11.11' with target 'kubernetes'
[i] Installing plugin 'kubernetes-release:v11.11.11' with target 'kubernetes'
[i] Installing plugin 'management-cluster:v11.11.11' with target 'kubernetes'
[i] Installing plugin 'package:v11.11.11' with target 'kubernetes'
[i] Installing plugin 'secret:v11.11.11' with target 'kubernetes'
[i] Installing plugin 'telemetry:v11.11.11' with target 'kubernetes'
[ok] successfully installed all plugins from group 'vmware-tkg/v11.11.11'
$ tz plugin list
Standalone Plugins
  NAME                DESCRIPTION                       TARGET      VERSION    STATUS
  cluster             cluster functionality             kubernetes  v11.11.11  installed
  feature             feature functionality             kubernetes  v11.11.11  installed
  kubernetes-release  kubernetes-release functionality  kubernetes  v11.11.11  installed
  management-cluster  management-cluster functionality  kubernetes  v11.11.11  installed
  package             package functionality             kubernetes  v11.11.11  installed
  secret              secret functionality              kubernetes  v11.11.11  installed
  telemetry           telemetry functionality           kubernetes  v11.11.11  installed

# Now set two additional repos, sandbox2 has versions v22.22.22 while sandbox1 has v11.11.11
# Each sandbox repo also add two groups each
$ tz config set env.ADDITIONAL_PLUGIN_DISCOVERY_IMAGES_TEST_ONLY localhost:9876/tanzu-cli/plugins/sandbox2:small,localhost:9876/tanzu-cli/plugins/sandbox1:small

# Notice that installation installs v9.9.9 because it is the one found in the central repo
$ tz plugin install cluster --target k8s
[i] Installing plugin 'cluster:v9.9.9' with target 'kubernetes'
[ok] successfully installed 'cluster' plugin

# Notice the two extra groups v22.22.22 from sandbox2 and two v11.11.11 from sandbox1
# Notice also the warning that a group was redefined in sandbox2 `vmware-tkg/v9.9.9`:
# we don't expect users to need to redefine groups in a test repo
$ tz plugin group search
[!] vmware-tkg/v9.9.9 was found in more than one source: [default_pre_release test_0]
  GROUP
  vmware-tkg/v0.0.1
  vmware-tkg/v9.9.9
  vmware-tmc/v0.0.1
  vmware-tmc/v9.9.9
  vmware-tkg/v22.22.22
  vmware-tkg/v9.9.9
  vmware-tmc/v22.22.22
  vmware-tkg/v11.11.11
  vmware-tmc/v11.11.11

$ tz plugin install --group vmware-tkg/v22.22.22
[i] Installing plugin 'cluster:v22.22.22' with target 'kubernetes'
[i] Installing plugin 'feature:v22.22.22' with target 'kubernetes'
[i] Installing plugin 'kubernetes-release:v22.22.22' with target 'kubernetes'
[i] Installing plugin 'management-cluster:v22.22.22' with target 'kubernetes'
[i] Installing plugin 'package:v22.22.22' with target 'kubernetes'
[i] Installing plugin 'secret:v22.22.22' with target 'kubernetes'
[i] Installing plugin 'telemetry:v22.22.22' with target 'kubernetes'
[ok] successfully installed all plugins from group 'vmware-tkg/v22.22.22'

# Installing any available version works
$ tz plugin install --group vmware-tkg/v0.0.1
[i] Installing plugin 'cluster:v0.0.1' with target 'kubernetes'
[i] Installing plugin 'feature:v0.0.1' with target 'kubernetes'
[i] Installing plugin 'kubernetes-release:v0.0.1' with target 'kubernetes'
[i] Installing plugin 'management-cluster:v0.0.1' with target 'kubernetes'
[i] Installing plugin 'package:v0.0.1' with target 'kubernetes'
[i] Installing plugin 'secret:v0.0.1' with target 'kubernetes'
[i] Installing plugin 'telemetry:v0.0.1' with target 'kubernetes'
[ok] successfully installed all plugins from group 'vmware-tkg/v1.0.0'
$ tz plugin list
Standalone Plugins
  NAME                DESCRIPTION                       TARGET      VERSION  STATUS
  cluster             cluster functionality             kubernetes  v0.0.1   installed
  feature             feature functionality             kubernetes  v0.0.1   installed
  kubernetes-release  kubernetes-release functionality  kubernetes  v0.0.1   installed
  management-cluster  management-cluster functionality  kubernetes  v0.0.1   installed
  package             package functionality             kubernetes  v0.0.1   installed
  secret              secret functionality              kubernetes  v0.0.1   installed
  telemetry           telemetry functionality           kubernetes  v0.0.1   installed
$ tz plugin install --group vmware-tkg/v11.11.11
[i] Installing plugin 'cluster:v11.11.11' with target 'kubernetes'
[i] Installing plugin 'feature:v11.11.11' with target 'kubernetes'
[i] Installing plugin 'kubernetes-release:v11.11.11' with target 'kubernetes'
[i] Installing plugin 'management-cluster:v11.11.11' with target 'kubernetes'
[i] Installing plugin 'package:v11.11.11' with target 'kubernetes'
[i] Installing plugin 'secret:v11.11.11' with target 'kubernetes'
[i] Installing plugin 'telemetry:v11.11.11' with target 'kubernetes'
[ok] successfully installed all plugins from group 'vmware-tkg/v11.11.11'

$ tz plugin list
Standalone Plugins
  NAME                DESCRIPTION                       TARGET      VERSION    STATUS
  cluster             cluster functionality             kubernetes  v11.11.11  installed
  feature             feature functionality             kubernetes  v11.11.11  installed
  kubernetes-release  kubernetes-release functionality  kubernetes  v11.11.11  installed
  management-cluster  management-cluster functionality  kubernetes  v11.11.11  installed
  package             package functionality             kubernetes  v11.11.11  installed
  secret              secret functionality              kubernetes  v11.11.11  installed
  telemetry           telemetry functionality           kubernetes  v11.11.11  installed

# Notice the error handling when trying to use a group that has been redefined
$ tz plugin install --group vmware-tkg/v9.9.9
[x] : group 'vmware-tkg/v9.9.9' was found in multiple discoveries: [default_pre_release test_0]

# Remove additional test repos
$ tz config unset env.ADDITIONAL_PLUGIN_DISCOVERY_IMAGES_TEST_ONLY

# Now we can only see plugin groups from the central repo, as expected
$ tz plugin group search
  GROUP
  vmware-tkg/v0.0.1
  vmware-tkg/v9.9.9
  vmware-tmc/v0.0.1
  vmware-tmc/v9.9.9

# And we can no longer install versions v11.11.11 or v22.22.22
# but we can install v9.9.9 which is in the central repo
$ tz plugin install cluster --target k8s --version v22.22.22
[x] : unable to find plugin 'cluster' for target 'kubernetes'
$ tz plugin install cluster --target k8s --version v11.11.11
[x] : unable to find plugin 'cluster' for target 'kubernetes'
$ tz plugin install cluster --target k8s --version v9.9.9
[i] Installing plugin 'cluster:v9.9.9' with target 'kubernetes'
[ok] successfully installed 'cluster' plugin

Release note
Beyond the Central Repository, the CLI will discover plugins from the `ADDITIONAL_PLUGIN_DISCOVERY_IMAGES_TEST_ONLY` variable, which is a comma-separated list of OCI images in the format of the Central Repository

Additional information
Special notes for your reviewer
Please pay particular attention to the new functions mergeDuplicatePlugins() and mergePluginEntries(). I'm not 100% confident about the handling of the unknown target.

# Notice the first two groups which come from the additional test repo
$ tz plugin group search
  GROUP
  vmware-tkg/v3.0.0
  vmware-tmc/v2.0.0
  vmware-tkg/v1.0.0
  vmware-tkg/v2.1.0
  vmware-tmc/v1.2.3
  vmware-tmc/v9.0.0

What happens if there is a conflict between plugin groups in 2 repositories?

What happens if there is a conflict between plugin groups in 2 repositories?

Good point.  I didn't implement this.
I was thinking that in the scenarios we are trying to address, groups or even plugin versions should not be redefined in an additional repo.  However, to be safe, and since we are handling it for plugins, I'll handle this for plugin groups as well, using the same rule as for plugins: left-to-right precedence from the ADDITIONAL_PLUGIN_DISCOVERY_IMAGES_TEST_ONLY variable.

What happens if there is a conflict between plugin groups in 2 repositories?

Good point. I didn't implement this. I was thinking that in the scenarios we are trying to address, groups or even plugin versions should not be redefined in an additional repo. However, to be safe, and since we are handling it for plugins, I'll handle this for plugin groups as well, using the same rule as for plugins: left-to-right precedence from the ADDITIONAL_PLUGIN_DISCOVERY_IMAGES_TEST_ONLY variable.

After starting to implement and realizing it would require a bit more effort than I anticipated, we discussed the requirement and agreed that there would be no need to re-define a plugin group.  Therefore, we will simply print a warning when plugin groups are found and will use the first one found, Central repo first.

repo: vmware-tanzu/tanzu-cli


text:
Datagrid multi select not preserved when list is refreshed

Describe the bug
When a list is refreshed it's not taking the selected options into consideration. When re-checking the same item again it's added again to the selected array and not taking the already selected item into consideration.
How to reproduce
https://stackblitz.com/edit/clarity-light-theme-v1-0-whkqxi
Expected behavior
It should re-check the items that are in the array.

You need to use TrackBy for datagrid to be able to track the items, because you are creating a new object that means there is no reference to keep track of without a track by statement to tell us what property to use (usually an ID or a unique identifier of some type). See https://angular.io/guide/template-syntax#ngfor-with-trackby

repo: vmware/clarity


text:
Add TCP health check to the Kube api load balancer pool

Describe the bug
When creating a 3 control plane nodes cluster, the controller adds the IP of the new nodes too early in the LB pool when they don't reply on 6443 yet, making the API unresponsive and what seems like kubeadm join to time out. We need to manually disable the new nodes from the LB pool to "unblock" the bootstrapping process.
An easy fix would be to add a TCP health check in the pool so it automatically disables the nodes until they reply on 6443 (i.e. healthy).
Reproduction steps
Provision a cluster with 3 CP node replicas and watch it hang after the second CP VM is created and its IP is added to the pool.

Expected behavior
The second and third nodes should be able to reach the API to join the cluster.
Additional context
No response

Try latest commit (fix added)

Fixed in https://github.com/vmware/cluster-api-provider-cloud-director/commit/eda9c9859df74d7821e32c75a118986dcec3d0fa


text:
Make Helm Chart support Harbor 1.5.0

Update the helm chart of Harbor to use 1.5 image.  Specifically
1.5.0-chart-patch to include the fix to #4496 (for integration reason
this fix will not be merge to release branch).
Verified against kubenetes v1.10.0

Coverage increased (+0.02%) to 64.56% when pulling ee76a308e644fd86d8989ac01b149d0ca85abb7a on reasonerjt:helm-chart-1.5 into 6a7ba4609faa46380387bb12583a24829789a397 on vmware:master.

Updated the version of chart and the commit message according to review comment.

authors: coveralls reasonerjt

repo: vmware/harbor


text:
Dockerfile: add tar dependency

Tern requires tar to extract the image, this commit adds the
tar package using tdnf to the ternd image.
Log without tar:
DEBUG - run - Setting up...
DEBUG - container - Checking if image "debian:buster" is available on disk...
DEBUG - container - Image "debian:buster" found
DEBUG - rootfs - Running command: tar -tf /root/.tern/temp.tar
WARNING - report - Error in loading image: [Errno 2] No such file or directory:
'tar': 'tar'
WARNING - run - Cannot retrieve full image metadata
Log with tar:
DEBUG - main - Starting...
DEBUG - run - Setting up...
DEBUG - container - Checking if image
"debian:buster" is available on disk...
DEBUG - container - Image "debian:buster"
found
DEBUG - rootfs - Running command: tar -tf /root/.tern/temp.tar
Signed-off-by: Jesus Ornelas Aguayo jesus.ornelas.aguayo@intel.com

@chuyd Thanks for your PR! Your change looks good and we will merge it as soon as we can debug the build failure.

Merging this. It will be followed by a fix for the overlay fail.

authors: chuyd nishakm

repo: vmware/tern


text:
[vFile test] Need to use poller instead of static wait time of 80 seconds

CI link: https://ci.vmware.run/vmware/docker-volume-vsphere/1781
I am seeing 10 occurrences of 80 seconds of wait time, could save some time through intelligent polling.
017/11/16 04:00:16 Wait 80 seconds for original worker to be updated
2017/11/16 04:01:36 END: VFileDemotePromoteTestSuite.TestSwarmRoleChange

@lipingxue I am parking with you, please reassign appropriately.

Not high priority.

repo: vmware/vsphere-storage-for-docker


text:
关于 v2.0 中类的命名风格

想法：

vnpy.trader.object 下的诸如 TickData 数据类，直接去掉 Data 叫 Tick、Order 就好
vnpy.trader.constant 下的交易相关概念的类型常量，如 Product ，叫做 ProductType 、DirectionType 感觉更好一些，不容易混淆

目前已经确定下了2.0的代码命名方案

authors: Gwill vnpy

repo: vnpy/vnpy


text:
[Question]是什么意思 buy, cover, sell, short

环境

操作系统: 如Windows 10或者Ubuntu 18.04
Anaconda版本: 如Anaconda 18.12 Python 3.7 64位
vn.py版本: 如v2.0发行版或者dev branch 20190101（下载日期）

Issue类型
三选一：Bug/Enhancement/Question
预期程序行为
实际程序行为
重现步骤
针对Bug类型Issue，请提供具体重现步骤以及报错截图
in double_ma_strategy 有一部分 :
        if cross_over:
            if self.pos == 0:
                self.buy(bar.close_price, 1)
            elif self.pos < 0:
                self.cover(bar.close_price, 1)  ==> 它有什么意义？ 如果不与未来合同交易。 我可以删除这一行吗？
                self.buy(bar.close_price, 1)

        elif cross_below:
            if self.pos == 0:
                self.short(bar.close_price, 1)  ==> 它有什么意义？ 如果不与未来合同交易。 我可以删除这一行吗？
            elif self.pos > 0:
                self.sell(bar.close_price, 1)
                self.short(bar.close_price, 1) ==> 它有什么意义？ 如果不与未来合同交易。 我可以删除这一行吗？

buy：买入开仓（开多）
sell：卖出平仓（平多）
short：卖出开仓（开空）
cover：买入平仓（平空）

authors: cbogithub vnpy


text:
BUG: Some Vignettes don't run

Describe the bug
While testing the package for PyOpenSci I had some trouble getting the following vignettes to run. To keep this organized in one compact issue, I'll use the "To Reproduce" section to describe the issues.
To Reproduce

Create conda environment: conda create -n crowsetta_review
Activate environment: conda activate crowsetta_review
Use conda to install Crowsetta from conda-forge: conda install crowsetta -c conda-forge
Open Python interpreter in terminal: python
Copy/paste the vignette text into the Python interpreter

What happened for each vignette:

Vignette “How to convert sequence-like annotations to the 'simple-seq' format” runs successfully locally.
Vignette “How to use crowsetta with your own annotation format” didn’t run successfully locally because the example file bat1_annotation.mat was not included in the tutorial
Vignette “How to convert any sequence-like format to 'generic-seq'” can’t be run entirely locally. I get an error when running the following line in two places in the vignette:

df = generic.to_df()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'GenericSeq' object has no attribute 'to_df'

Vignette “How to use crowsetta to remove unlabeled intervals from TextGrid annotations” can’t be run exactly as written locally because the standard conda install of crowsetta didn't include one of the required packages for installing the data, osfclient. Perhaps just add an “install osfclient” suggestion to the vignette and that would be good to go. Also, I found that the large code block containing functions wouldn't correctly copy/paste into the interpreter; not sure why.

>>>     # set of (unique) states
>>>     states = sorted(
  File "<stdin>", line 1
    states = sorted(
IndentationError: unexpected indent

Expected behavior
See above.
Screenshots
Not applicable.
Desktop (please complete the following information):

Operating System: Mac
Version: 4.0.0.post2

Additional context
I created this issue while performing the PyOpenSci review of this package.

Hi David, of course! Did you add a download to bat1_annotation.mat on “How to use crowsetta with your own annotation format”?

Ah, sorry, I should have read more carefully the "What happened for each vignette" you provided.
I will add a download link to that vignette with the file--doing this now.

@rhine3 added that link to download now.
Writing a to-do list based on your detailed comment abouve:

[x] include mat file in howto-user-annot.md
[x] to_df method missing should be fixed by local install of code / new release of crowsetta after review
[ ] add install osfclient to "unlabeled intervals" vignette
[ ] fix copy-paste error with code in "unlabeled intervals" vignette

repo: vocalpy/crowsetta


text:
docs: fix minor issues in readme

The run command missed a parameter dbt-package-name and had an incorrect parameter name for tableau-ignore-projects. Removed $ from shell commands to avoid errors while running the copy-pasted commands from the readme.

Personally, I prefer to keep the $, as this is a convention used in many many other projects. One of the reasons as well is to separate input from output.
Some random examples:

https://github.com/tiangolo/fastapi#installation
https://github.com/pallets/click#installing

But of course, there are also many other projects not using it.
I would also recommend against copy and pasting and then running several commands at once. If one fails, you are still running the subsequent commands and this might be very dangerous/unsafe.

Codecov Report

Merging #8 (582722a) into main (592b820) will decrease coverage by 0.73%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main       #8      +/-   ##
==========================================
- Coverage   85.71%   84.97%   -0.74%
==========================================
  Files           8        8
  Lines         231      233       +2
  Branches       30       31       +1
==========================================
  Hits          198      198
- Misses         26       27       +1
- Partials        7        8       +1

Impacted Files
Coverage Δ

src/exposurescrawler/crawlers/tableau.py
89.70% <0.00%> (-2.72%)
:arrow_down:

Continue to review full report at Codecov.

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

repo: voi-oss/dbt-exposures-crawler


text:
VoidPaste not working on iOS Safari

Describe the bug
VoidPaste not working
To Reproduce
Steps to reproduce the behavior:

Enable VoidPaste
Try to paste image link

Expected behavior
A link wrapped with image tag appears on the field.
Desktop (please complete the following information):

Browser: iOS Safari
Version 1.3.1

Additional context
The exec function used to insert the clipboard to selection might have been deprecated and removed in Safari.

I might have had something else copied. Closing the issue.

repo: voidnyan/void-verified


text:
Configurable logging port

If vip could take in an optional port to send logs to it would allow vip to talk to a running Loggly container. @foresmac

Great idea!

authors: WorkHorseIndustries foresmac

repo: vokal/vip


text:
CRD numatopo scope change namespaced to cluster

Signed-off-by: huone1 huwanxing@huawei.com

/lgtm
overall, it's lgtm.

/approve
/lgtm

I'll merge this PR for the sign-off is already signed.

repo: volcano-sh/apis


text:
Can't find cascaded parent element with ID: TblPrTran!

Hi everyone!
I'm having a problem with cascading field
Actually I have created module called PurchaseOrder where I use foreign key of PurchaseRequisition table i.e.  PrId (Below file contains screenshot of that)

Now i want to update my Items   from detail section on selection of Perticular PrId And I use cascading for that

But it shows error

I also refer #968 but couldn't find any solution........please help!!

Cascaded element must be in same form, before the editor.

repo: volkanceylan/Serenity


text:
Cascade Look Up

Hi guy,
can you help me?.
I try to put a look up cascade with two levels, this is my code:

[DisplayName("Móduloss"), Column("MACMOD_CODIGO_K"), PrimaryKey, ForeignKey("[MACUS].[MAC_MODULO]", "MACMOD_CODIGO_K"), LeftJoin("a")]
[LookupEditor(typeof(Entities.ModuloRow))]
public Int32? MacmodCodigoK
{
get { return Fields.MacmodCodigoK[this]; }
set { Fields.MacmodCodigoK[this] = value; }
}
    [DisplayName("Sub Móduloss"), Column("MACSMO_CODIGO_K"), PrimaryKey, ForeignKey("[MACUS].[MAC_SUBMODULO]", "MACSMO_CODIGO_K"), LeftJoin("e")]
    [LookupEditor(typeof(Entities.SubModulosRow), CascadeField = nameof(SubModulosRow.MacmodCodigoK), CascadeFrom = nameof(MacmodCodigoK))]

    public Int32? MacsmoCodigoK
    {
        get { return Fields.MacsmoCodigoK[this]; }
        set { Fields.MacsmoCodigoK[this] = value; }
    }

and this is the code for the modulo
[DisplayName("Modulo"), Column("MACMOD_CODIGO_K"), NotNull, ForeignKey("[MACUS].[MAC_MODULO]", "MACMOD_CODIGO_K"), LeftJoin("jMacmodCodigoK"), LookupInclude]
[LookupEditor("MACUS.Modulo", InplaceAdd = true)]
    public Int32? MacmodCodigoK
    {
        get { return Fields.MacmodCodigoK[this]; }
        set { Fields.MacmodCodigoK[this] = value; }
    }

but the lookup of SubModulo doesnt works.
regards

Please share a gist of SubModuloRow

i have the same problem

authors: PanChenhao driveromora volkanceylan


text:
Building fails with node v0.11.10

I'm trying to find a stable combination of node and node-serialport and I'm struggling. Based on the README.md statement "We have confirmed things are fine with 0.11.10" that's not consistent with my experience. I'm on Ubuntu 14.04 64-bit, and I'm using nvm to manage node versions. With that configuration, the first few errors I hit are:
  CXX(target) Release/obj.target/serialport/src/serialport.o
In file included from /home/vic/.node-gyp/0.11.10/src/node.h:61:0,
                 from ../node_modules/nan/nan.h:24,
                 from ../src/serialport.h:5,
                 from ../src/serialport.cpp:3:
/home/vic/.node-gyp/0.11.10/deps/v8/include/v8.h: In member function ‘void v8::ReturnValue<T>::Set(uint32_t)’:
/home/vic/.node-gyp/0.11.10/deps/v8/include/v8.h:5816:31: warning: typedef ‘I’ locally defined but not used [-Wunused-local-typedefs]
   typedef internal::Internals I;
                               ^
In file included from ../src/serialport.h:5:0,
                 from ../src/serialport.cpp:3:
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:62:9: error: ‘UnboundScript’ in namespace ‘v8’ does not name a type
 typedef v8::UnboundScript      NanUnboundScript;
         ^

"We have confirmed things are fine with 0.11.10"

At the time of writing this statement was correct, however, it's no longer true. node-serialport depends on nan, but nan no longer supports Node 0.11 versions prior to 0.11.13.
Try with Node 0.12.7.

Yes works with 0.12.7
On Sep 22, 2015 2:43 AM, "Brian Cooke" notifications@github.com wrote:

"We have confirmed things are fine with 0.11.10"
At the time of writing this statement was correct, however, it's no longer
true. node-serialport depends on nan, but nan no longer supports Node
0.11 versions prior to 0.11.13
https://github.com/nodejs/nan/tree/v1.5.3#may-2014-major-changes-for-v8-325--node-01113
.
Try with Node 0.12.7.
—
Reply to this email directly or view it on GitHub
https://github.com/voodootikigod/node-serialport/issues/592#issuecomment-142195059
.

That's good news :)

@vicatcu can this issue be closed?

I think it's a documentation only problem. README.md is not accurate in
what the latest stable release is.
Victor Aprea // Wicked Device
victor.aprea@wickeddevice.com
T: @vicatcu http://twitter.com/vicatcu/
On Thu, Sep 24, 2015 at 2:54 PM, Brian Cooke notifications@github.com
wrote:

@vicatcu https://github.com/vicatcu can this issue be closed?
—
Reply to this email directly or view it on GitHub
https://github.com/voodootikigod/node-serialport/issues/592#issuecomment-143018375
.

There's another issue for fixing the documentation https://github.com/voodootikigod/node-serialport/issues/590

Frankly have no idea whats up with 0.11.x, but it gets cloudier as we move to nan2. Recommend 10, 12, or node4 as our support of it evolves.

authors: fivdi jacobrosenthal vicatcu

repo: voodootikigod/node-serialport


text:
Support for Query Types (DbQuery)

Hi, I'm back with a little bit of time to re-evaluate switching one of my projects from OData/WebApi to OdataToEntity but I've ran into another show stopper right out the gate.
I make use of a few Query Types (DbQuery) in my DbContext and when I attempt to start the project, I get a vague exception thrown that took a bit of time to identity.  The exception is thrown in OeEfCoreDataAdapter .CreateDbSetInvoker as it is expecting all properties to be DbSets and it encounters a DbQuery property (I currently have 3 defined on my DbContext).

@voronov-maxim I partially worked around this issue by only registering DbSet properties (and ignore DbQuery, etc) by updating CreateEntitySetAdapter
private static Db.OeEntitySetAdapterCollection CreateEntitySetAdapters()
{
    var entitySetAdapters = new List<Db.OeEntitySetAdapter>();
    foreach (PropertyInfo property in typeof(T).GetProperties())
    {
        Type dbSetType = property.PropertyType.GetInterface(typeof(IQueryable<>).FullName);
        var isDbSet = property.PropertyType.IsGenericType &&
            property.PropertyType.GetGenericTypeDefinition() == typeof(DbSet<>);

        if (dbSetType != null && isDbSet)
            entitySetAdapters.Add(CreateEntitySetAdapter(property, dbSetType));
    }

    return new Db.OeEntitySetAdapterCollection(entitySetAdapters.ToArray());
}

I don't know if this is the best approach, but it at least allowed me to move forward with porting to use ODataToEntity.

repo: voronov-maxim/OdataToEntity


text:
Image wrapping edge case bug

I loaded 10 images from coco-2017 validation and the last image overflows the second line.
You should be able to reproduce as follows:
import fiftyone as fo
import fiftyone.zoo as foz
from fiftyone import ViewField as F

images = [
    "001348.jpg", "004329.jpg", "003969.jpg", "000868.jpg", "000035.jpg",
    "002645.jpg", "004965.jpg", "000641.jpg", "004510.jpg", "001147.jpg"
]

dataset = foz.load_zoo_dataset("coco-2017", split="validation")

view = dataset.match(F("filepath").re_match("(%s)$" % ("|".join(images))))

session = fo.Session(view=view)

What version of the app are you using? Wrapping behavior has changed in a couple ways since 0.5.0.

latest develop

Confirmed that https://github.com/voxel51/fiftyone/pull/398 fixes the above case

authors: brimoor lethosor


text:
Work with Unity for Windows

Does it work with Unity for Windows? As opposed to Android/iOS

Greetings,
At this moment windows platform isn't supported.
We don't plan to include new platforms in the near future.

For anybody curious
A similar piece of software that supports Windows is Agora.io
https://github.com/AgoraIO/Video-Call-for-Mobile-Gaming/issues/8

authors: cosmo-naut niveuseverto


text:
IconButton issues

[x] CSS for dropdown is broken.
[x] Loading is broken when navigating to a section on the same page
[x] arrowLeft and arrowRight icons are too thick

For the dropdown, perhaps we need an internal Dropdown component that we can share with the Search input.

Fixed in 0.0.9

repo: vpanyushenko/bubbles


text:
Added useEmptyTag option to wsdlOptions to prefer  format over

One of the web services I was working with for some reason required that tags without a body be <Tag /> (empty, self-closing) rather than <Tag />. The XML spec makes no distinction between the two, but I had to work with the service.
Change: added useEmptyTag option to wsdlOptions that will prefer <Tag /> to <Tag></Tag> if the tag has no contents.
Accompanying changes:

README.md documentation on extra switch
Two tests:

should_use_empty_tags_when_directed: checks that when useEmptyTag is set, empty tags are preferred
should_use_empty_tags_only_when_directed: checks that when useEmptyTag is not set, the current behavior does not change

Coverage decreased (-0.07%) to 92.645% when pulling 6947b9cb62a380093517e3defd3b4180deebaa62 on pxpeterxu:use-empty-tag into d4f73dda63d28c8c90b12d380a2b782fb09afae4 on vpulim:master.

Coverage decreased (-0.07%) to 92.645% when pulling 6947b9cb62a380093517e3defd3b4180deebaa62 on pxpeterxu:use-empty-tag into d4f73dda63d28c8c90b12d380a2b782fb09afae4 on vpulim:master.

For whatever reason, one of the builds failed.  I kicked it off again.
Assuming that passes, I think this is a great change.   Thoughts @herom ?
Thanks for adding tests!

Seems to have failed twice (I also tried the same to kick it off again); I'll take a look, but it's with a really old node so might take me a bit to get the environment set up.

Looks like an issue with deepEqual.  v0.10 and v0.12 will be deprecated shortly.  Perhaps we can remove them from .travis.yml in a separate PR?

@jsdevel I'm all up for dropping v0.10 and v0.12 support in tests as we should move on with the library and don't be too picky about compatibility with officially deprecated versions of the system.
@pxpeterxu thanks a lot for your PR - this really seems like a valuable addition to our lib :+1:

closing due to inactivity

authors: coveralls herom jsdevel pxpeterxu

repo: vpulim/node-soap


text:
compiles with zig 0.12

Changes to compile with zig v0.12.

Thanks !

Missed the tests - looking into them!

authors: daaku vrischmann


text:
Oracle now requires sign-in for LTS versions

Downloading the latest JDK for both Java 8 and 11 (both LTS, though the former is about to be deprecated) require logging in to Oracle to download the JDK archives.
This is extremely problematic for maintaining this cookbook.

Oh damn. Silly Oracle. Is it possible to have the cookbook user point to a local http endpoint and then ask the user to cache the JDK 'locally'?

Yes, it is documented here:
https://supermarket.chef.io/cookbooks/java_se#examples

I've used these steps for setting up v8.212:

create account on Oracle and manually copy file jdk-8u212-linux-x64.tar.gz to your S3 bucket
you need to set sha256 of the file otherwise cookbook gets into a retry loop and then exits with error - node["java_se"]["sha256"]["tar"]["x64"] must not be empty, so run sha256sum jdk-8u212-linux-x64.tar.gz and use/set the hash value

My role configuration for v8.212:
    "java_se": {
      "uri": "https://s3-eu-west-1.amazonaws.com/YOUR_BUCKET",
      "release": "8",
      "update": "212",
      "sha256": { "tar": { "x64": "3160c50aa8d8e081c8c7fe0f859ea452922eca5d2ae8f8ef22011ae87e6fedfb" } }
    },

authors: jpmat296 pvandervelde torson vrivellino


text:
After sync, device folders show up in obsidian, "ix::" prefix

I am on fedora linux, obsidian from flatpak, latest version. I copied my setup URL and set it up as a subsequent device. It synced everything perfectly, but these folder still show up:

I think a similar thing happened before: https://github.com/vrtmrz/obsidian-livesync/issues/206
Thank you!

Thank you for the report! The reason has been exactly as you mentioned.
However, allowing : in filenames is a Linux-specific behaviour, designed as the loosest pattern in some of the file systems I referenced.  I felt it was a bit too broad for Obsidian to handle, so I decided to ignore files containing :; back in the first place.
v0.19.17 contains this change. Could you please check the behaviour?

Perfect, that worked, thank you for the quick fix!

authors: fritzcloud vrtmrz

repo: vrtmrz/obsidian-livesync