async-graphql-actix-web and sessions

Hi, I'm using cookies for authentication in one of my projects.
I had to split the authentication service in a REST server because I could not find a way to expose the (actix-web) session inside a resolver, this works in node/js graphql implementations (I think because of the weak typing or because node works on a single thread).
If I try to add the Session to the context it gives a lot of errors even by wrapping it in a Mutex.
I can expose the cookie inside the resolvers without any problem, I looked at the expose-header example.
I'd need this feature if it isn't currently implemented and I can try to work on it.

Maybe this example can help you.😄
https://github.com/async-graphql/examples/tree/master/actix-web/token-from-header

Maybe this example can help you.😄
https://github.com/async-graphql/examples/tree/master/actix-web/token-from-header

Hello,
The problem is not reading the cookie but setting the cookie inside a resolver.
Here I can easily read the cookie since I have access to the original actix methods
https://github.com/simoneromano96/federation-graphql-rust/blob/main/products-service/src/graphql/routes.rs
The problem is how can I set the cookie in a resolver?

pub struct Mutation;

impl Mutation {
    /// Logs in the user
    async fn login(&self, ctx: &Context<'_>, input: LoginInput) -> Result<Coffee> {
      // How can I do `session.set()`?
    }
}

Sorry, I wasn't careful enough.😄
This function can help you.
https://docs.rs/async-graphql/2.5.9/async_graphql/context/struct.ContextBase.html#method.append_http_header

And this issue:
https://github.com/async-graphql/async-graphql/issues/370

Thanks! I'll see if I can fix my authentication service then

I have come up with another solution to this which can directly access the actix_session from inside my GraphQL resolvers. It uses a shared wrapped type I created. I don't know if this is idiomatic Rust but it has been working for me so far.

Shared Type
use send_wrapper::SendWrapper;
use std::ops::Deref;

#[derive(Clone, Debug)]
pub struct Shared<T>(pub Option<SendWrapper<T>>);

impl<T> Shared<T> {
    pub fn new(v: T) -> Self {
        Self(Some(SendWrapper::new(v)))
    }
}

impl<T> Deref for Shared<T> {
    type Target = T;

    fn deref(&self) -> &Self::Target {
        &*self.0.as_deref().clone().unwrap()
    }
}

Then in the GraphQL HTTP handler:
// session is the actix_session::Session which can be included as an argument to the HTTP handler.
let session = Shared::new(session);
schema.execute(req.into_inner().data(session)) // This is just to show its usage. You would have more code here to make this work.

And finally access the actix_session inside your GraphQL resolver:
let actix_session = ctx.data::<Shared<actix_session::Session>>()?;
actix_session.set("some_key", "some_value")?;

@oscartbeaumont Are you getting the session from the index argument or from req.get_session?
#[post("/graphql")]
pub async fn index(
    schema: web::Data<MyGraphQLSchema>,
    req: HttpRequest,
    db: actix_web::web::Data<Database>,
    gql_request: GraphQLRequest,
    session: Session,
) -> GraphQLResponse {

I tried your approach but getting the error below. My app is running as a deployment in kubernetes with replicas and I'm using redis as my session storage.
Search...
thread 'actix-server worker 1' panicked at 'opo', graphql-mongo/src/app/user/mutation_root.rs:70:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'actix-server worker 2' panicked at 'opo', graphql-mongo/src/app/user/mutation_root.rs:70:14

simoneromano96
Were you able to figure out how to work with acitx-session and RedisSession in async-graphql without using REST API?
I have an issue opened here

I was using the session: Session as an argument as you showed. That should work. Can you share the code?
I am gonna take a guess from the information I have that the mutation_root.rs file on line 70 that you didn't wrap the Session in Shared when accessing it from the GraphQL context. It should be:
let actix_session = ctx.data::<Shared<actix_session::Session>>()?;
actix_session.set("some_key", "some_value")?;

If this doesn't help either share code or add me on Discord (on my GitHub profile page) and I can have a better look at it.

Thanks to @oscartbeaumont, I just cross-checked following your message and it now works 🎉 . It looks like the issue was that I was using session from req.get_session() rather than the session: Session argument 🤔
One thing though, I am concerned about using SendWrapper in Send as it seems to be intended for when a process should not move across threads? Since actix-web + tokio support multithreading and could potentially move session across threads, couldn't this lead to an issue down the road or am I misunderstanding something?
Would it be possible to use Mutex or RwLock wrapped in an Arc in this case? What was the rationale behind using SharedWrapper?

This is what the code looks like now:

My index for queries and mutations
#[post("/graphql")]
pub async fn index(
    schema: web::Data<MyGraphQLSchema>,
    _req: HttpRequest,
    // db: actix_web::web::Data<Database>,
    gql_request: GraphQLRequest,
    session: Session,
) -> GraphQLResponse {
    let mut request = gql_request.into_inner();
    let session = Shared::new(session);
    request = request.data(session);
    schema.execute(request).await.into()
}

My mutation
    async fn signin(&self, ctx: &Context<'_>) -> anyhow::Result<Something> {

        let session = ctx
            .data::<Shared<actix_session::Session>>()
            .expect("Failed to get actix session Object");

        session.insert("user_id", "id1234").expect("poor insertion");
        let uid = session
            .get::<String>("user_id")
            .expect("Failed to get user_id session")
            .expect("Failed to get user_id session value");
        Ok(Something {
            name: "Mars".into(),
            user_id: uid,
        })
    }

Appreciate you for taking the time 👍

@oscartbeaumont Yeah, that was my thought also. Having the change implemented upstream would be awesome! I wonder why Send is not supported already considering that actix supports multithreading.

Since request.data() expects Send, session should probably be made as such since it's usually needed in the resolvers anyways.
Wondering why there aren't tons of examples online related to this considering that session is fairly relatively popular and secure 🤔
Doing things in a stateless manner might end up causing more work with token revocation and whatnot.
Anyways, thanks for sharing and please do keep us updated if you find a new way out. I'll be sure to do the same

Instead of access the session directly, passing a trivial Identity struct is more easy and stable. Doing so, we can just keep the authentication logic out of Graphql codes.
pub struct Identity {
    pub id: Option<String>,
}

/// GraphQL endpoint
#[route("/graphql", method = "GET", method = "POST")]
pub async fn graphql(
    schema: web::Data<gql::Schema>,
    req: GraphQLRequest,
    session: Session,
) -> GraphQLResponse {
    let uid = session.get::<String>("user_id").unwrap_or(None);
    let id = Identity { id: uid };
    schema.execute(req.into_inner().data(id)).await.into()
}

@Oyelowo I keep the methods like renew of session before schema.execute  , i.e.
/// GraphQL endpoint
#[route("/graphql", method = "GET", method = "POST")]
pub async fn graphql(
    schema: web::Data<gql::Schema>,
    req: GraphQLRequest,
    session: Session,
) -> GraphQLResponse {
    /// session.renew();
    /// session.clear();
    let uid = session.get::<String>("user_id").unwrap_or(None);
    let id = Identity { id: uid };
    schema.execute(req.into_inner().data(id)).await.into()
}

@Oyelowo I keep the methods like renew of session before schema.execute , i.e.
/// GraphQL endpoint
#[route("/graphql", method = "GET", method = "POST")]
pub async fn graphql(
    schema: web::Data<gql::Schema>,
    req: GraphQLRequest,
    session: Session,
) -> GraphQLResponse {
    /// session.renew();
    /// session.clear();
    let uid = session.get::<String>("user_id").unwrap_or(None);
    let id = Identity { id: uid };
    schema.execute(req.into_inner().data(id)).await.into()
}

I think this is a great solution. How would you implement a login process?

@oscartbeaumont any news?

I have come up with another solution to this which can directly access the actix_session from inside my GraphQL resolvers. It uses a shared wrapped type I created. I don't know if this is idiomatic Rust but it has been working for me so far.
Shared Type
Then in the GraphQL HTTP handler:
// session is the actix_session::Session which can be included as an argument to the HTTP handler.
let session = Shared::new(session);
schema.execute(req.into_inner().data(session)) // This is just to show its usage. You would have more code here to make this work.

And finally access the actix_session inside your GraphQL resolver:
let actix_session = ctx.data::<Shared<actix_session::Session>>()?;
actix_session.set("some_key", "some_value")?;

fwiw, I tried implementing a similar solution to this, but immediately started getting these errors:
Actix runtime found; starting in Actix runtime
thread 'tokio-runtime-worker' panicked at 'Dereferenced SendWrapper<T> variable from a thread different to the one it has been created with.',

do not recommend, without an extreme caution

I've tried previous approaches but unfortunately I could not getting it working. Compiler throws the following error: Rc<RefCell<actix_session::session::SessionInner>>` cannot be shared between threads safely within `actix_session::Session`, the trait `Sync` is not implemented for `Rc<RefCell<actix_session::session::SessionInner>>
I have been thinking about using a function that receives and analyses query or mutation response like so:
async fn index(
    schema: web::Data<AppSchema>,
    session: actix_session::Session,
    req: GraphQLRequest
) -> GraphQLResponse {
    session_manager(&session, schema.execute(req.into_inner()).await.into());
}

The query output type had to include a defined structure to detect when we need to perform a session operation inside session_manager function. My only concern are security threats and extra logic being checked on every request... What are your thoughts on this?

I've tried previous approaches but unfortunately I could not getting it working. Compiler throws the following error: ``Rc<RefCell<actix_session::session::SessionInner>>` cannot be shared between threads safely
within actix_session::Session, the trait Sync is not implemented for `Rc<RefCell<actix_session::session::SessionInner>>``
I have been thinking about using a function that receives and analyses query or mutation response like so:

async fn index(

    schema: web::Data<AppSchema>,

    session: actix_session::Session,

    req: GraphQLRequest

) -> GraphQLResponse {

    session_manager(&session, schema.execute(req.into_inner()).await.into());

}

The query output type had to include a defined structure to detect when we need to perform a session operation inside session_manager function. My only concern are security threats and extra logic being checked on every request... What are your thoughts on this?

Fwiw, I just created my own sessions auth with a redis store. It really isn't that hard to salt/encrypt the passwords and so forth. It was certainly a more interesting thing to work on than figuring out how to bend this single threaded crate to my needs.

I have cloned this crate into a local file and changed /src/session.rs type to "pub struct Session(Arc<RwLock>)"
It seams to work fine. I am being able to pass actix_session into graphql context. I have not found any problem so far. Could this result in unexpected behavior in production?
use std::{
    //cell::{RefCell},
    collections::HashMap,
    error::Error as StdError,
    //mem,
    //rc::Rc,
    sync::{Arc, RwLock}
};

use actix_utils::future::{ready, Ready};
use actix_web::{
    body::BoxBody,
    dev::{Extensions, Payload, ServiceRequest, ServiceResponse},
    error::Error,
    FromRequest, HttpMessage, HttpRequest, HttpResponse, ResponseError,
};
use anyhow::Context;
use derive_more::{Display, From};
use serde::{de::DeserializeOwned, Serialize};

/// The primary interface to access and modify session state.
///
/// [`Session`] is an [extractor](#impl-FromRequest)—you can specify it as an input type for your
/// request handlers and it will be automatically extracted from the incoming request.
///
/// ```
/// use actix_session::Session;
///
/// async fn index(session: Session) -> actix_web::Result<&'static str> {
///     // access session data
///     if let Some(count) = session.get::<i32>("counter")? {
///         session.insert("counter", count + 1)?;
///     } else {
///         session.insert("counter", 1)?;
///     }
///
///     Ok("Welcome!")
/// }
/// # actix_web::web::to(index);
/// ```
///
/// You can also retrieve a [`Session`] object from an `HttpRequest` or a `ServiceRequest` using
/// [`SessionExt`].
///
/// [`SessionExt`]: crate::SessionExt
#[derive(Clone)]
pub struct Session(Arc<RwLock<SessionInner>>);

/// Status of a [`Session`].
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum SessionStatus {
    /// Session state has been updated - the changes will have to be persisted to the backend.
    Changed,

    /// The session has been flagged for deletion - the session cookie will be removed from
    /// the client and the session state will be deleted from the session store.
    ///
    /// Most operations on the session after it has been marked for deletion will have no effect.
    Purged,

    /// The session has been flagged for renewal.
    ///
    /// The session key will be regenerated and the time-to-live of the session state will be
    /// extended.
    Renewed,

    /// The session state has not been modified since its creation/retrieval.
    Unchanged,
}

impl Default for SessionStatus {
    fn default() -> SessionStatus {
        SessionStatus::Unchanged
    }
}

#[derive(Default)]
struct SessionInner {
    state: HashMap<String, String>,
    status: SessionStatus,
}

impl Session {
    /// Get a `value` from the session.
    ///
    /// It returns an error if it fails to deserialize as `T` the JSON value associated with `key`.
    pub fn get<T: DeserializeOwned>(&self, key: &str) -> Result<Option<T>, SessionGetError> {
        if let Some(val_str) = self.0.read().unwrap().state.get(key) {
            Ok(Some(
                serde_json::from_str(val_str)
                    .with_context(|| {
                        format!(
                            "Failed to deserialize the JSON-encoded session data attached to key \
                            `{}` as a `{}` type",
                            key,
                            std::any::type_name::<T>()
                        )
                    })
                    .map_err(SessionGetError)?,
            ))
        } else {
            Ok(None)
        }
    }

    /// Get all raw key-value data from the session.
    ///
    /// Note that values are JSON encoded.
    pub fn entries(&self) -> HashMap<String, String> {
        let inner = self.0.read().unwrap();
        inner.state.clone()
    }

    /// Returns session status.
    pub fn status(&self) -> SessionStatus {
        let inner = self.0.read().unwrap();
        inner.status.clone()
    }

    /// Inserts a key-value pair into the session.
    ///
    /// Any serializable value can be used and will be encoded as JSON in session data, hence why
    /// only a reference to the value is taken.
    ///
    /// It returns an error if it fails to serialize `value` to JSON.
    pub fn insert<T: Serialize>(
        &self,
        key: impl Into<String>,
        value: T,
    ) -> Result<(), SessionInsertError> {
        let mut inner = self.0.write().unwrap();

        if inner.status != SessionStatus::Purged {
            if inner.status != SessionStatus::Renewed {
                inner.status = SessionStatus::Changed;
            }

            let key = key.into();
            let val = serde_json::to_string(&value)
                .with_context(|| {
                    format!(
                        "Failed to serialize the provided `{}` type instance as JSON in order to \
                        attach as session data to the `{}` key",
                        std::any::type_name::<T>(),
                        &key
                    )
                })
                .map_err(SessionInsertError)?;

            inner.state.insert(key, val);
        }

        Ok(())
    }

    /// Remove value from the session.
    ///
    /// If present, the JSON encoded value is returned.
    pub fn remove(&self, key: &str) -> Option<String> {
        let mut inner = self.0.write().unwrap();

        if inner.status != SessionStatus::Purged {
            if inner.status != SessionStatus::Renewed {
                inner.status = SessionStatus::Changed;
            }
            return inner.state.remove(key);
        }

        None
    }

    /// Remove value from the session and deserialize.
    ///
    /// Returns `None` if key was not present in session. Returns `T` if deserialization succeeds,
    /// otherwise returns un-deserialized JSON string.
    pub fn remove_as<T: DeserializeOwned>(&self, key: &str) -> Option<Result<T, String>> {
        self.remove(key)
            .map(|val_str| match serde_json::from_str(&val_str) {
                Ok(val) => Ok(val),
                Err(_err) => {
                    tracing::debug!(
                        "Removed value (key: {}) could not be deserialized as {}",
                        key,
                        std::any::type_name::<T>()
                    );

                    Err(val_str)
                }
            })
    }

    /// Clear the session.
    pub fn clear(&self) {
        let mut inner = self.0.write().unwrap();

        if inner.status != SessionStatus::Purged {
            if inner.status != SessionStatus::Renewed {
                inner.status = SessionStatus::Changed;
            }
            inner.state.clear()
        }
    }

    /// Removes session both client and server side.
    pub fn purge(&self) {
        let mut inner = self.0.write().unwrap();
        inner.status = SessionStatus::Purged;
        inner.state.clear();
    }

    /// Renews the session key, assigning existing session state to new key.
    pub fn renew(&self) {
        let mut inner = self.0.write().unwrap();

        if inner.status != SessionStatus::Purged {
            inner.status = SessionStatus::Renewed;
        }
    }

    /// Adds the given key-value pairs to the session on the request.
    ///
    /// Values that match keys already existing on the session will be overwritten. Values should
    /// already be JSON serialized.
    pub(crate) fn set_session(
        req: &mut ServiceRequest,
        data: impl IntoIterator<Item = (String, String)>,
    ) {
        let session = Session::get_session(&mut req.extensions_mut());
        let mut inner = session.0.write().unwrap();
        inner.state.extend(data);
    }

    /// Returns session status and iterator of key-value pairs of changes.
    ///
    /// This is a destructive operation - the session state is removed from the request extensions
    /// typemap, leaving behind a new empty map. It should only be used when the session is being
    /// finalised (i.e. in `SessionMiddleware`).
    pub(crate) fn get_changes<B>(
        res: &mut ServiceResponse<B>,
    ) -> (SessionStatus, HashMap<String, String>) {
        if let Some(s_impl) = res
            .request()
            .extensions()
            .get::<Arc<RwLock<SessionInner>>>()
        {
            (s_impl.read().unwrap().status.clone(), s_impl.read().unwrap().state.clone())
            //let state = mem::take(&mut s_impl.borrow_mut().state);
            //(s_impl.borrow().status.clone(), state)
        } else {
            (SessionStatus::Unchanged, HashMap::new())
        }
    }

    pub(crate) fn get_session(extensions: &mut Extensions) -> Session {
        if let Some(s_impl) = extensions.get::<Arc<RwLock<SessionInner>>>() {
            return Session(Arc::clone(s_impl));
        }

        let inner = Arc::new(RwLock::new(SessionInner::default()));
        extensions.insert(inner.clone());

        Session(inner)
    }
}

/// Extractor implementation for [`Session`]s.
///
/// # Examples
/// ```
/// # use actix_web::*;
/// use actix_session::Session;
///
/// #[get("/")]
/// async fn index(session: Session) -> Result<impl Responder> {
///     // access session data
///     if let Some(count) = session.get::<i32>("counter")? {
///         session.insert("counter", count + 1)?;
///     } else {
///         session.insert("counter", 1)?;
///     }
///
///     let count = session.get::<i32>("counter")?.unwrap();
///     Ok(format!("Counter: {}", count))
/// }
/// ```
impl FromRequest for Session {
    type Error = Error;
    type Future = Ready<Result<Session, Error>>;

    #[inline]
    fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future {
        ready(Ok(Session::get_session(&mut req.extensions_mut())))
    }
}

/// Error returned by [`Session::get`].
#[derive(Debug, Display, From)]
#[display(fmt = "{_0}")]
pub struct SessionGetError(anyhow::Error);

impl StdError for SessionGetError {
    fn source(&self) -> Option<&(dyn StdError + 'static)> {
        Some(self.0.as_ref())
    }
}

impl ResponseError for SessionGetError {
    fn error_response(&self) -> HttpResponse<BoxBody> {
        HttpResponse::new(self.status_code())
    }
}

/// Error returned by [`Session::insert`].
#[derive(Debug, Display, From)]
#[display(fmt = "{_0}")]
pub struct SessionInsertError(anyhow::Error);

impl StdError for SessionInsertError {
    fn source(&self) -> Option<&(dyn StdError + 'static)> {
        Some(self.0.as_ref())
    }
}

impl ResponseError for SessionInsertError {
    fn error_response(&self) -> HttpResponse<BoxBody> {
        HttpResponse::new(self.status_code())
    }
}


Could not open input file: php-cs-fixer

I installed php-cs-fixer from ATOM and installing php-cs-fixer from Composer. But when i try to active php-cs-fixer on php file, it show information like the screenshoot. Please help..

Hello Ryan,
I am also facing this exact same issue. Were you able to fix it? If yes, then how?

This error means that php-cs-fixer is unable to find your php-cs-fixer.phar or php.cs-fixer-v2.phar files. Try downloading the php-fixer-cs.phar file from the this website: http://cs.sensiolabs.org/#installation. Then find where the file is located and put that in your php-cs-fixer plugin setting for the php-fixer-cs.phar.

Use this:

exclude('somedir')
    ->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php')
    ->in(__DIR__)
;

return PhpCsFixer\Config::create()
  //->setRules([
        //'@PSR2' => true,
        //'strict_param' => true,
        //'array_syntax' => ['syntax' => 'short'],
  //  ])
 //->setFinder($finder)
    //->setCacheFile(__DIR__.'/.php_cs.cache')
  ->setUsingCache(false)
  //->setCacheFile(__DIR__.'\.php_cs.cache')
;

7.  Then **It Works**.
8. About detail that code, you can see https://github.com/FriendsOfPHP/PHP-CS-Fixer#config-file

@ryanrahman26 , I really wish I had time to waste on stuff like this but I have real programming to do. So I can't waste time trying to find out why an installed package can't find it's own files. Thanks, though.


THX a lot.

New Issue Checklist
🚫 If this template is not filled out your issue will be closed with no comment. 🚫

[ ] I have looked at the Documentation
[ ] I have filled out this issue template.

Issue Info

Info
Value

Platform
e.g. ios/osx/tvos

Platform Version
e.g. 8.0

Masonry Version
e.g. 1.0

Integration Method
e.g. carthage/cocoapods/manually

Issue Description
⚠ Replace this with the description of your issue. ⚠

Thanks! 👍


Bump build script to support Java generation and testing

Pull Request Description
Regenerate Java AST from the Rust parser sources:
./run java-gen build
Run Java generated-code self-tests:
./run java-gen test
Important Notes

Also fixes a bug that was causing generate-java to fail.

Checklist
Please include the following checklist in your PR:

[x] The documentation has been updated if necessary.
[x] All code conforms to the
Scala,
Java,
and
Rust
style guides.
All code has been tested:

[x] Unit tests have been written where possible.
[x] If GUI codebase was changed: Enso GUI was tested when built using BOTH
./run ide dist and ./run ide watch.

[ci no changelog needed]

Actually since that code is currently in review, I'll merge these changes into that branch.


Shep build has unnecessary prompt?

Since we use environment variables now, I think that the choice of environment for shep build doesn't impact the build in any way by default. Should this prompt be removed?

@chris-olszewski explained this too me. 👍 remove it


DXF export - Layer name max length

Hello everybody,
it seems there is a strange 30 character limit to to length of the DXF layer names.
If I use the following:
var polyline= new makerjs.models.ConnectTheDots(false, points);
polyline.layer = "somelonglayernamewhichcontainsmorethanthirtycharacters"
var dxf = makerjs.exporter.toDXF(polyline);

the generated .dxf file can be imported without problems into AutoCAD.
However, I want to specifiy the color of the layer, so I add the code:
var options = {
        layerOptions: {
            "somelonglayernamewhichcontainsmorethanthirtycharacters": {
                color: 2
            }
};
var dxf = makerjs.exporter.toDXF(polyline,options);

Now AutoCAD fails to import the dxf file and tells me there is an invalid table entry on the line with the layer name. if I manually edit the dxf file and change the layer name back to a string with < 30 characters, the file can be imported without problems.
Is this a known issue? Are there any solutions for exporting layers with color definition and names with >30 characters? Thanks for help!

According to this page, a layer name can be up to 255 characters, but you may not use these characters: < > / \ “ : ; ? * | = ‘ Also, see #432

Thanks for your reply, however, there arent any of these special characters in the layer name, only [a-z,A-Z].

How about in AutoCAD itself? Are you able to name layers with long names, export, then import again?

DXF thru version R14 does not support long layer names, and will switch all lower case to UPPER case

Thanks @ru1973, this explains this strange behaviour. Seems like there is no way around this limitation :-(


[Regression] Forced psycopg2 dependency on Linux causes sudden build failures

Is this a regression?

[X] I believe this is a regression in functionality
[X] I have searched the existing issues, and I could not find an existing issue for this regression

Current Behavior
My existing build system now breaks due to introduction of hard psycopg2 dependency into pyproject.toml in 1.8.0 in #60 , which forces psycopg2 compilation from source on Linux, which hasn't got the dependencies installed in my docker image, which breaks the build. My desired production setup is psycopg2-binary (for consistency), and I do not wish to build psycopg2 from source (because I don't want the dev dependencies).
Expected/Previous Behavior
I expect a minor release to not break an existing build system, and I expect the same psycopg2 variant to be used across dev and prod for quality reasons (replicable build).
Steps To Reproduce

On an existing psycopg2-binary setup, update dbt-postgres to 1.8.0.

Relevant log output
#0 21.05   ChefBuildError
#0 21.05
#0 21.05   Backend subprocess exited when trying to invoke get_requires_for_build_wheel
#0 21.05
#0 21.05   running egg_info
#0 21.05   writing psycopg2.egg-info/PKG-INFO
#0 21.05   writing dependency_links to psycopg2.egg-info/dependency_links.txt
#0 21.05   writing top-level names to psycopg2.egg-info/top_level.txt
#0 21.05
#0 21.05   Error: pg_config executable not found.
#0 21.05
#0 21.05   pg_config is required to build psycopg2 from source.  Please add the directory
#0 21.05   containing pg_config to the $PATH or specify the full executable path with the
#0 21.05   option:
#0 21.05
#0 21.05       python setup.py build_ext --pg-config /path/to/pg_config build ...
#0 21.05
#0 21.05   or with the pg_config option in 'setup.cfg'.
#0 21.05
#0 21.05   If you prefer to avoid building psycopg2 from source, please install the PyPI
#0 21.05   'psycopg2-binary' package instead.
#0 21.05
#0 21.05   For further information please check the 'doc/src/install.rst' file (also at
#0 21.05   <https://www.psycopg.org/docs/install.html>).

Environment
- OS: Mac
- Python: 3.9
- dbt-postgres (working version): 1.7.14
- dbt-postgres (regression version): 1.8.0

Additional Context
There is also a comment here from @andy-clapson challenging Linux=prod assumption.

Is there a workaround that would let me force psycopg2-binary? I have to currently resort to editing my poetry.lock which isn't too nice 😁

second this regression - this fix should be reverted and the use case handled differently.

Thank you for your in-depth answer and understanding. I had a quick look at providing optional deps via extras, but didn't find anything over what you already provided.
Philosophically speaking, 1.8.0 is already backwards-incompatible and so perhaps there is a case here to embrace this, explain to the community, and switch to the most pythonic approach that's best for the long run?

To anyone that needs a working solution and doesn't care about using a bin version of Postgres connector. I have forked this repo and updated the readme with instructions so you can build your package. Here is the link: https://github.com/farovictor/dbt-postgres
If you do not want to pull the fork you still can do it by yourself, pull official repo and do this:

Change the dependency definition for psycopg2 in pyproject.toml, to look like this:

dependencies = [
    "psycopg2-binary>=2.9,<3.0",
    ...

Change yourself or just clone the repo I provided above.

Install hatch on your system or environment:

pip install hatch

Build the package

hatch build

Install dot-postgres from your wheel file located in the dist folder, created during the build process.

Be happy.

To follow up here, after some more investigation and discussion, this is the approach we've landed on:

we should make psycopg2-binary the default across the board, even for Linux. For production pipelines, we would then recommend that users add pip uninstall psycopg2-binary && pip install psycopg2 (and hope all transitive dependencies work). This is ugly, but it replicates the previous "opt-in" behavior, via two additional pip commands instead of setting DBT_PSYCOPG2_NAME=psycopg2.

I think that's a reasonable compromise. Just out of interest, would use of psycopg (v3) make things easier at all?


Expose .build() on Element and Block builders

Is your feature request related to a problem? Please describe.
For our specific use case slack-block-builder works very well for building block collections that we pass to the API. However, we also want to respond to Slack actions on our messages by editing the original message (e.g. reading in the current blocks object of a message and replacing certain sections).
Describe the solution you'd like
It would be ideal if the block and element builders types exposed the .build() function that is used under the hood by BlockCollection so that we could build a single element.
Describe alternatives you've considered
Currently I need to do something like:
const actionsObject = BlockCollection(Blocks.Actions().elements(element)).pop() as ActionsBlock | undefined;
const elementObject = actionsObject?.elements.pop();
return elementObject;

Where I'm casting to types exposed by @slack/bolt because SlackBlockDto doesn't have the elements field even when you can assert the type of the block.
I'd love for this to be simplified to just element.build() so we don't need to mess around with the BlockCollection and types.

Hi @itsjackgardner, thanks for this issue and sorry for the delayed response. This definitely has given me some things to think about!
I'd love to hear more about your use case! With the apps that I've created, I always build out messages and modals, even ones that have dynamic content, from scratch. So a message where content is modified depending on, say, the state of an entity, is always built from scratch and the logic on how it should be built is typically encapsulated in the function responsible for creating the UI. So I'd love to know more about why your particular app needs to access and modify existing messages and modals directly – first off, just curious and love any chance to find out more about how other developers are building things, and secondly, it may point us to a great solution!
On type casting, that's a great point to bring up. Currently, the library has a couple of general DTO classes that are built dynamically to make it a bit more maintainable, but I plan on moving back to a single DTO class for each builder class in version three. And I also plan to go ahead and use Slack's own types once that happens.
I'd love to hear more about your case, and from there work on a solution. In the meantime, I am happy to remove the internal comments from the build() methods so that TS includes them in the type definitions. Although it will still currently return a general SlackBlockDto, it would still keep you from having to use the surfaces or the collection functions.

Hi there, closing this for now. I will expose the methods in v.3, when they will provide more value, as each will return a specific type. Currently they all return a generalized DTO.
Thanks! And keep and eye out!

Hi @itsjackgardner, had a few other requests for similar feature, and as a viable option, since exposing the build() method can create side effects, I went ahead and added buildBlock() and buildBlocks() functions to the library for this purpose. It's available in the latest release, enjoy!


Switch to go modules

gb is now discontinued. It would be a good maintenance task to switch to go modules. From what I've seen it's not too difficult either.

(I was wondering how long it'd take for someone to open an issue)
Definitely a +1 from my side, even though I don't entirely know what they are.


not reset unit attempts when add back unit to queue

only add new coming pods, not reset QueuedUnitInfo when add unit back to queue

@lzlaa thanks for the fix, please squash the commits, and we can get it merged

finished


Feature branch automated deploys

Automated deployment of feature branches. See the readme for details on how to access the feature branch code.

I still need to figure out the best way to destroy feature branch environments when the branch is merged into master or closed.

I have more changes to make, so I will close this and open another PR.


Google Maps breaks core-js Array.from on IE 11, preventing stimulus controllers to load.

Faced an issue today where google maps API breaks core-js's Array.from with the following message :
This site overrides Array.from() with an implementation that doesn't support iterables, which could cause Google Maps JavaScript API v3 to not work correctly.

Google Maps appears to override core-js's Symbol.iterator with their own polyfill thus creating the error. Anyone loading google maps on their page on IE 11 will have a JS error preventing their stimulus controllers to initialize properly without further action.
A working solution is to add core-js's Symbol.iterator.
This is not a stimulus issue per-se, but a fix would greatly improve developer experience for those who are still supporting IE11.
I'll attach a PR to this issue for your review,

@virolea I think you have that backwards. That message looks like Google Maps JS is warning you someone else changed Array.from to not be the default implementation

https://github.com/zloirock/core-js/issues/618
https://github.com/zloirock/core-js/issues/618#issuecomment-522618151

Thanks! Perhaps you can follow https://github.com/auth0/auth0-spa-js/pull/592's lead (in your application):

To fix see the 2 worksrounds in zloirock/core-js#618
1. Put the maps api before the spa js SDK2.

2. Add `import 'core-js/es6/symbol';` before importing `array-from`

Closing since this isn't a Stimulus issue.

hi @javan thanks for your reply,
I had already added the workarounds in my application, I figured it was not a stimulus issue, hope this issue can help other people find a solution too.
Have a great one


Despite signing and adding cert to trusted root (and enabling test mode), minispy fails to load

Steps taken:

Compile minispy sample in Release mode
Enable TESTSIGNING using bcdedit -set TESTSIGNING ON (and reboot)
Install the cert file generated into the trusted root store
Generate a cat file and sign the driver package
Install the minispy.inf (right click -> install in explorer)
Attempt to load the FSF using fltmc load minispy in an elevated prompt.

This results in:
Load failed with error: 0x800704fb
This driver has been blocked from loading

Any suggestions on what I could be doing wrong would be appreciated, thanks.

I know this is 2 years late but try changing your CPU architecture then build the driver again


Setting Root Public Path with more than 1 character breaks Integrity

Current behavior
Integrity setting now works for a public path of /, but adding anything beyond that breaks it again producing the same errors as #42 and #43 (IE if your public path is /test
Expected behavior
Complex Root Public Path should work with integrity
Reproduction Example
https://github.com/SteffenBlake/html-bundler-webpack-plugin-bug-examples/blob/main/webpack.config.js#L32-L33
npm run build with current settings works and produces the expected output.
Switching the commented out publicPath config to be /test reproduces the bug.
Environment

OS: Windows
version of Node.js: v21.1.0
version of Webpack: 5.89.0
version of the Plugin: 2.15.1

Proposed Fix
Forking a branch, will be opening a PR shortly.

Hello @SteffenBlake,
thank you for the bugfix!
The v2.15.2 fix is published.


getting runtime exception with swift 3.3 compiler

[extension UIBarButtonItem: AnchorView {
public var plainView: UIView {
	return value(forKey: "view") as! UIView
}

}](url)
getting null reference while unwrapping the view with swift 3.3 compiler version.How to resolve this issue?Am I missing something?It seems that it is working with swift 3.2.

Got some time :) fixed crash using a UIButton as customView for BarButtonItem through code. And then setting up dropDown.anchorView = barButtonItem?.customView instead of dropDown.anchorView = barButtonItem?.plainView

Actually it doesn't really work, after this update i have DropDown menu in the center of the screen.

I have the same issue with a custom view in a BarButtonItem programatically.  The weird thing is that if runs OK  1 out of 3-4 times, and the rest it crashes with the nil reference to plainView.   It seems to be a timing issue and this fix seems to work.   At least I has not crashed for a number of runs.
		Timer.scheduledTimer(withTimeInterval: 0.01, repeats: false) { (nil) in
			self.filterMenuDropDown.anchorView = self.filterButtonItem?.plainView
		}

I don't know if this fixes anything, but you should be able to call:
dropDown.anchorView = barButtonItem

instead of:
dropDown.anchorView = barButtonItem.plainView

any solution ?

I started getting this issue recently, using swift 5 and the latest xcode
I am using an iPad running 12.4.6, this crash does not happen on the simulator but it seems to be happening on physical devices.
As usual the error message isn't that great

Fatal error: Unexpectedly found nil while unwrapping an Optional value: file

As above I'm setting the anchor view to a barButtonItem


Fetcher: PRE-OBSOLETE

Mappers dependent on this fetcher:

CMISAtomDCMapper(Mapper)

Some general links to know:

Development contribution process
"CIC all tasks" list view
"CIC current sprint" status view

Specific to this fetcher:

List of collections, by fetcher type: https://registry.cdlib.org/?harvest_type=PRE

Rikolti MVP project board cheat sheet:

Please @ CDL developers liberally, in the comments.
When picking up an "issue," please indicate:

a) Assignees: self assign;
b) Sprint: select the current sprint cycle;
c) Date started: indicate the start date -- see right side fields

CIC developers will likely need to create PRs (and possibly additional issues). When doing so, please also indicate the following:

a) Repository: Rikolti;
b) Milestone: "4 CIC work" (these details are required in order for them to surface in the Rikolti MVP project board); and
c) link the PR to the associated issue.

When requesting review, please:

a) include a comment & @ CDL developers; and
b) Date delivered: indicate the date delivered (field on the right)

This fetcher is obsolete. We will be using only the PRA fetcher. Closing.


Logs in examples directory should correspond to the same time period

Should we rewrite the examples to have the same time frame? Also when we add new examples in future, how do we handle it? Rewrite the timestamps to match the examples timeframe?


@MainActor on protocols with associated types causes compiler error: Circular reference

Describe the bug
This code produces the compiler error: Circular reference,
@MainActor protocol ProtocolWithAssociatedTypes {
    associatedtype ID: Hashable
    associatedtype Value

    subscript(_ id: ID) -> Value { get set }
}

final class ClassConforming<ID: Hashable,Value>: ProtocolWithAssociatedTypes {
    subscript(id: ID) -> Value {
        get { fatalError() }
        set { fatalError() }
    }
}

removing @MainActor makes it compile
protocol ProtocolWithAssociatedTypes {

Steps To Reproduce
Steps to reproduce the behavior:

type the code from above
swift build

Expected behavior
Should not be an error
Screenshots
Building for debugging...
/Generic_MainActor_Bug.swift:9:5: error: circular reference
    subscript(id: ID) -> Value {
    ^
/Generic_MainActor_Bug.swift:8:13: note: through reference here
final class ClassConforming<ID: Hashable,Value>: ProtocolWithAssociatedTypes {
            ^
/Generic_MainActor_Bug.swift:9:5: error: circular reference
    subscript(id: ID) -> Value {
    ^
/Generic_MainActor_Bug.swift:8:13: note: through reference here
final class ClassConforming<ID: Hashable,Value>: ProtocolWithAssociatedTypes {

Environment (please fill out the following information)

OS: macOS 13.0
swift-driver version: 1.62.15 Apple Swift version 5.7.1 (swiftlang-<IP_ADDRESS>.3 clang-14<IP_ADDRESS>)
swift-driver version: 1.62.8 Apple Swift version 5.7 (swiftlang-<IP_ADDRESS>.4 clang-14<IP_ADDRESS>)

Additional Info
removing subscript also compiles
@MainActor protocol ProtocolWithAssociatedTypes {
    associatedtype ID: Hashable
    associatedtype Value

    func getValue(id: ID) -> Value
    func setValue(_ value: Value, id: ID)
}

@MainActor final class ClassConforming<ID: Hashable,Value>: ProtocolWithAssociatedTypes {
    func getValue(id: ID) -> Value {
        fatalError()
    }

    func setValue(_ value: Value, id: ID) {
        fatalError()
    }
}

Looks like this reproduces since 5.6 and also on a near main snapshot
Swift version 5.8-dev (LLVM b9ce35da9a19288, Swift 7335d60c50dc6af)

Looks like the issue is due a cycle in ActorIsolationRequest::evaluate which is the reason for it only happens when @MainActor is involved.

Also, note that the cycle only happen with subscript due to specific way that ActorIsolationRequest::evaluate checks AccessorDecl.

rdar://101243966

I have a fix for this

Ah awesome, thanks @DougGregor =]
Sorry I assigned but wasn't able to look at it.


JDK 8 support

Hi
Thanks a lot for sharing this very useful maven surefire plugin.
Sadly, we still need to use JDK 8, so we can not use your plugin as is.
I just tested and think it's just the test ScalaTestProviderTest written in Java, which is not JDK 8 compatible.
Would you appreciate a contribution which adds JDK 8 support?
Thanks!

This has been fixed in version 0.3.

@janhicken Awesome, thanks a lot for the quick release. Will try it immediately. ;)
Very appreciated. 👏


[DOC] ForecastingHorizon is not in API reference of latest version of Docs

Describe the issue linked to the documentation
ForecastingHorizon is mentioned in the forecasting example but there isn't a mention of it in the API reference
I found this when I tried to debug an error trying to used it in my own work.
If there's a simple way of adding this I'm happy to do it, and I'd like to rewrite the imports for the forecasting tutorial too.
from sktime.forecasting.all import * isn't really best practice and makes it difficult to understand the underlying folder structure of sktime without going to github .
Suggest a potential alternative/fix
Add ForecastingHorizon to API reference and make forecasting imports more informative. I'm happy to pick this up

Thanks @evanmiller29, good catch, added it in #444! It was easy to fix, but take a look at the PR to find out how the docs work in case you're not familiar with it.
As far as I understand, there's nothing dangerous about sktime.forecasting.all import *. Fastai have proposed it as a compromise between easy importing and managing name space collisions. You can always use auto-complete to see what folders/files are there, no? But I'm happy to be convinced otherwise and replace it in the notebooks with explicit imports.

Hey yeah dangerous might have been a bit of an extreme way to describe it!
I know fastai does this but sklearn (where this package is inspired from)
is always very direct in where the imports come from. probably because they
have so many different areas of functionality and import * might create
some performance/namespace issues.
But the benefit of doing direct imports means that the people get a good
understanding of the underlying modules behind the package. And at the
worst case they can always import * if they really want to.
For instance in one of my projects I just read in smape_loss but since the
forecasting notebook just read imported * from sktime I had to look on
GitHub to understand the package structure to be able to find where
smape_loss was and read that in
On Fri, Oct 23, 2020, 21:13 Markus Löning<EMAIL_ADDRESS>wrote:

Thanks @evanmiller29 https://github.com/evanmiller29, good catch, added
it in #444 https://github.com/alan-turing-institute/sktime/pull/444! It
was easy to fix, but take a look at the PR to find out how the docs work in
case you're not familiar with it.
As far as I understand, there's nothing dangerous about sktime.forecasting.all
import *. Fastai have proposed it as a compromise between easy importing
and managing name space collisions. You can always use auto-complete to see
what folders/files are there, no? But I'm happy to be convinced otherwise
and replace it in the notebooks with explicit imports.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/alan-turing-institute/sktime/issues/443#issuecomment-715145153,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB5QM7RQLJ6QRT5BTUNTK3TSME3LPANCNFSM4S3UREHA
.


CloudFormation Refs do not always map to the CCAPI id

What happened?
CloudFormation has two ways of referencing attributes from a Resource. You can either use Ref or Fn::GetAtt.
The Ref is essentially a shortcut to get you the attribute that represents the CloudFormation Id of the resource. In the case of this library we are converting CloudFormation to CCAPI and we are currently assuming that the CloudFormation Ref is always the same as the CCAPI Identifier, but it turns out that is not always the case, especially for resources that have a CCAPI Identifier made up of multiple attributes.
Example
Take this CloudFormation template.
"Resources": {
    "RestApi": {
       "Type": "AWS::ApiGateway::RestApi",
       "Properties": {},
    },
    "ApiResource": {
       "Type": "AWS::ApiGateway::Resource",
       "Properties": {
          "RestApiId": {
           "Ref": "RestApi"
          }
       },
      },
      "ApiMethod": {
         "Type": "AWS::ApiGateway::Method",
         "Properties": {
            "ResourceId": {
             "Ref": "ApiResource"
            },
            "RestApiId": {
             "Ref": "Api"
            }
         }
    }
}

The ResourceId property of the AWS::ApiGateway::Method resource uses a Ref to the AWS::ApiGateway::Resource resource. CloudFormation will return the ResourceId from Ref. If we look at wha the CCAPI resource looks like:
{
    "Identifier": "xzpvi0s9e2|58778h",
    "Properties": "{\"ParentId\":\"aenyy5u7il\",\"PathPart\":\"api\",\"ResourceId\":\"58778h\",\"RestApiId\":\"xzpvi0s9e2\"}"
},

The Identifier is a reference to the primaryIdentifier which is a composite id made up of the ${RestApiId}|${ResourceId} and is not the same as what will be returned by CloudFormation Ref.
For the Method resource, the CCAPI Identifier is not the correct value for the ResourceId property. It should be using the ResourceId attribute of the Resource resource.
Output of pulumi about
N/A
Additional context
If we had access to the CloudFormation schema for the AWS::ApiGateway::Resource resource
https://github.com/pulumi/pulumi-aws-native/blob/cf710320d32c3b59067b81582ba8ff239bc4e452/aws-cloudformation-schema/aws-apigateway-resource.json#L31-L36
We may be able to make an assumption that if the primaryIdentifier is a composite identifier then we only take those values that also exist in the readOnlyAttributes.
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Added to epic https://github.com/pulumi/home/issues/2191

Related: https://github.com/pulumi/pulumi-aws-native/pull/1662


Accessibility supervisor's contact update

The accessibility supervisor's contact will be changed from 1st of January, 2025.

lgtm!

lgtm!


Generic BaseModel parsing from within a generic class

Initial Checks

[X] I confirm that I'm using Pydantic V2

Description
I have a generic class MyParser[T] which parses a python object into a generic type Payload[T]. When specifying a concrete type (SubPayload in this case), the generic field fails to be parsed into a SubPayload.
I am aware Payload[SubPayload].model_validate works, but for my purposes, I would like the MyParser generic wrapper because in reality, it contains more logic.
Thank you.
Example Code
from typing import Generic, TypeVar

from pydantic import BaseModel

T = TypeVar("T")

class SubPayload(BaseModel):
    result: str
    conf: float

class Payload(BaseModel, Generic[T]):
    job_id: int
    response: T

class MyParser(Generic[T]):
    def parse(self, obj) -> Payload[T]:
        return Payload[T].model_validate(obj)

parser = MyParser[SubPayload]()

out = {"job_id": 999, "response": {"result": "other", "conf": 0.99}}
parsed = parser.parse(out)

assert isinstance(parsed.response, SubPayload)  # this fails!

Python, Pydantic & OS Version
pydantic version: 2.7.0
        pydantic-core version: 2.18.1
          pydantic-core build: profile=release pgo=true
                 install path: /.venv/lib/python3.11/site-packages/pydantic
               python version: 3.11.8 (main, Feb 12 2024, 14:50:05) [GCC 13.2.1 20230801]
                     platform: Linux-6.6.28-1-lts-x86_64-with-glibc2.39
             related packages: typing_extensions-4.10.0 pydantic-settings-2.2.1 fastapi-0.110.0 email-validator-2.0.0.post2 typing_extensions-4.10.0 pydantic-settings-2.2.1 fastapi-0.110.1 mypy-1.9.0 pydantic-extra-types-2.6.0
                       commit: unknown

@hwong557,
Thanks for reporting this. Definitely doesn't seem like the right behavior. PRs welcome with a fix! Could be a great issue for someone looking to learn more about our internal generic processing.


Removing redundancy.

@manstis
@paulovmr
I noticed we have the class for docks in kie-wb-common. Is it ok to remove this one?

@Rikkola It's ok by me, if it is still working after the change :). I'll let @manstis take a look and give his +1 to be sure.

@Rikkola Did you try running drools-wb-webapp with the class deleted? (And checked Data Modeller still has the docks for annotations - "drools", "JPA" and "Advanced"?)

@wmedvede Hi... can you verify removing "Authoring Dock" from drools-wb-webapp is OK?

@Rikkola advised he'd ran drools-wb-webapp and (Data Modeller) Docks were OK.
+1 to merge.


Consider moving to a different strorage layer for cards

Using a realtime database seems like overkill because the card content doesn't change that often. It also makes it more likely there will be some kind of data corruption issue that loses the history.
Another approach would be to have the content exist as individual files in a flat structure in the project (under git version control) that is where the content is. Then there's a post-process step that calculates the linkages, map of all known cards, etc and produces index.json, where the actual card content is fetched only when it's viewed.
The downside of this is that in a future world where lots of different authors can create cards, it will get increasingly annoying to work with.

Still another approach: create a cloud function that, every time a card is modified, re-saves a cards.json which includes all of the information for each card, tag, and section. It's stored in a cloud storage bucket.
Only people with author ability actually collect to the database of cards,tags, and sections live, ensuring that what they see and are editing is the real thing.
Non-authors check every minute or so for whether the version number for the cards.json index has gone up, and if it has, re-fetches cards.json, and calls updateCards for any card whose updated property is larger than the last seen one. The actions/database.js abstracts over this logic so the rest of the client doesn't know.
Connections to threads, stars,reads, and readingLists is live.
Another approach is to have each card exist in a separate json blob, and then an index.js that encodes the section and tag indexes, and points to the current card blob within it, e.g. /static/cards/v12442/c-abc-12345.json, and then we only update the index.js with the new pointer. This allows downoading less data when things change, but realistically things shouldn't change that much anyway.

[ ] Replace all timestamps with the firebase serverTimestamp sentinel


Email Course Outline

Here's an in-progress outline for an email server setup course. I don't have the time to test it on a new server, so that should happen before this is merged.
Basically the modules are:

Setup Postfix
Setup rDNS
Setup Opendkim, dmarc and spf
Setup an email inbox (dovecot and spam assassin)
Security tutorial (fail2ban and postfix hardening)

As painful as email is to setup, hopefully this course will become a useful reference for "landchads".
Feel free to make corrections. Thanks!

I'm going to go ahead and publish this, although I will probably make amends based on testing and might merge the "hardening" page with the previous to "force" people to make more hardened servers.


Specifying { from: 0 } in options renders component unusable

Hi,
I am trying to allow date selection in the past. I have setup the options as:
options: CalendarComponentOptions = {
    from: 0
};

However, date selection gets completely disabled with this option.

any updates on this?

This is fixed in 18.0.0


Doc about InstallTracker files and install.root

resolves #9940

r? @alexcrichton
(rust-highfive has picked a reviewer for you, use r? to override)

Thanks!
@bors r+

:pushpin: Commit d54b10f5d9d975370efbe5e97e3a40d24517cb22 has been approved by ehuss

:hourglass: Testing commit d54b10f5d9d975370efbe5e97e3a40d24517cb22 with merge 6b6b0b486d73c03ed952591d880debec1d47c534...

:sunny: Test successful - checks-actions
Approved by: ehuss
Pushing 6b6b0b486d73c03ed952591d880debec1d47c534 to master...


Use libusb driver to make sure the library can detect MSI Steel Series Keyboard

Use libusb driver to make sure the library can detect MSI Steel Series Keyboard
Fix failed test setColor.

Nice - can you pin the node-hid library as well to the latest? I am pretty sure the post 0.7.9 release added the driver requirement

@stevelacy Done.

Thanks!


remove useless upgrade file

Questions
Answers

Description?
Remove this wrong and useless upgrade file, there is no 5.0.0 version (the 4.0.0 has been renamed)

Type?
bug fix

BC breaks?
no

Deprecations?
no

Fixed ticket?
Fixes https://github.com/PrestaShop/PrestaShop/issues/24814

How to test?
no way, no 5.0 version

@jf-viguier Could you move this commit in the another PR ? It will be more uniform.

thanks Franck

Could you move this commit in the another PR ? It will be more uniform.
Why ? I've posted an issue, it's the rule.

@PrestaShop/prestashop-maintainers I'll need access guys 🙏

@PrestaShop/prestashop-maintainers I'll need access guys 🙏

Sorry, some repositories access settings are a mess. Fixed ✅

@matks I've done a pr for version 4 upgrade: new hooks and conf values

Thx @jf-viguier


Week 22 CPT Updates and Improvements - Jeffrey Lee

Link to CPT Outline
Actual Written Response Portion has not been created yet. All features in backend are near completion, and will finish deployment and data requests in frontend soon.
Class Demo - Object Creation
Evidence of Defning Variables, and output in VSCode Terminal without FullStack completion.

Pair Grading

[x] .1 - CPT outline and relation to FE/BE code.

[ ] .1 - Frontend UI demo.   UI takes inputs and validates for garbage, data cleans and is read by JavaScript.

[ ] .1 - Postman API Demo.  JSON Raw/Body formatted API passes inputs to backend and receives data from database.

[ ] .1 - UI and API work together and data is returned, displayed, and formatted in Browser.

Extra for now, required at end of project

[x]  .1 - Class Demo - Object Creation.  Tester method that shows creation of Objects and outputs to Terminal, illustrating the ability to test change without using Full Stack.

[ ]  .1 - Python Demo - Model Init.  Show the creation and population of tables with database.   This requires you to delete sqlite.db file and see if it is regenerated with all tables and test data.

Final Grade = .2/.3


Update devDependencies.

Actually, I'll wait until the Hugo issue is fixed before updating the deps. The current version still has the error when a static file in mounts changes.


Deprecate @azure/core-arm package and delete the folder

The @azure/core-arm package is the counterpart to the older @azure/ms-rest-azure-js just like how @azure/core-http is the counterpart to the older @azure/ms-rest-js
The older @azure/ms-rest-azure-js was used when the code generator was used with a certain flag when you

needed support for long running operations
are one of the Cognitive Services and therefore used the common CognitiveServicesCredentials object

Both of these needs have different solutions in the new world where there is no real place for @azure/core-arm
Therefore, I would recommend that we mark this package as deprecated on npm and delete the folder from this repo
cc @bterlson, @xirzec, @sarangan12, @joheredi

No concerns, and yay for deleting unneeded software!

Yes! Goodbye @azure/core-arm 🗡 🗡 🗡


Selected text that has bg color

I'm using version 1.9
I added this to change the background color of my php code.
.cm-m-clike, .cm-meta {background: #e9e9e9;}
Which works but I can't see my text selection anymore.
How can I change the selected text background color for those classes?

I can't find any other place to ask this.  Thank you for your time.

Try this
.CodeMirror .CodeMirror-selected {     background-color: #e9e9e9; }

That changes all selected text to the same background as my php background color.  But I am still not able to see what I am selecting in php.

I was able to solve this problem by making the php code background color slightly transparent.


[Feature]: Include timestamps in exported logs

Describe the problem
Exporting my logs in BitKit does not include timestamp information. It would be nice to pinpoint the time of an issue.
Describe the solution
Probably would be included in https://github.com/synonymdev/react-native-ldk but wanted to log it here
Additional context
<MM/DD HH:MM:SS> LDK:

Will add this. I need to do a few more logging changes at the same time here anyways.


How to connect PostgreSQL and RabbitMQ

Hello guys,
PostgreSQL 9.6.1
RabbitMQ 3.6.6
I am new with rabbitmq and need your help. I am trying connect my rabbitMQ container and postgreSQL container.
Could you please explain how should I configure my rabbitMQ container if PostgreSQL container configured as:
host: postgresql
port: 5432
dbname: postgres
dbuser: postgres
dbpassword: 123456789

I've tried add the
{pgsql_listen_exchange,
[
    {host, "postgresql"},
    {port, 5432},
    {dbname, "postgres"},
    {user, "postgres"},
    {password, "123456789"}
]}

to my rabbitmq.config file in the rabbitMQ container and sent from the PostgreSQL container
NOTIFY test, 'Test message';

If I understand right than my listener should listen exchange named as x-pgsql-listen with keybind 'test' in any case here is my listener code:
<?php
require_once __DIR__ . '/../../../vendor/autoload.php';
use PhpAmqpLib\Connection\AMQPStreamConnection;
$connection = new AMQPStreamConnection('rabbitmq', 5432, 'admin', '123456789');
$channel = $connection->channel();
$channel->exchange_declare('x-pgsql-listen', 'topic', false, false, false);
list($queue_name, ,) = $channel->queue_declare("something", false, false, true, false);
$binding_keys = array_slice($argv, 1);
$channel->queue_bind($queue_name, 'x-pgsql-listen', 'test');
echo ' [*] Waiting for logs. To exit press CTRL+C', "\n";
$callback = function($msg){
  echo ' [x] ',$msg->delivery_info['routing_key'], ':', $msg->body, "\n";
};
$channel->basic_consume($queue_name, '', false, true, false, false, $callback);
while(count($channel->callbacks)) {
    $channel->wait();
}
$channel->close();
$connection->close();
?>

But nothing got in console log.
The question is how should I configure my RabbitMQ container according to my PostgreSQL container configurations via configuration file or via policy configurations?

Did you enabled this plugin?
rabbitmq-plugins enable pgsql_listen_exchange

Yes I did, I enabled plugin when I built the image with rabbitMQ. Also I double checked it and enabled inside the container again.

I think this was likely related to #13. Sorry for not addressing in a timely manner.


Support using npm ci instead of npm install

Short story:
Using the npm install command in a CI/CD pipeline in general is a bad idea. However jfrog does not support to use the preferred 'npm ci' command.
Full story:
npm ships with two slightly different commands for installation of dependencies. While 'npm install' is most known it has some real drawbacks when it comes to a predictable installation of packages.
That's why npm ships a 'ci' command. https://docs.npmjs.com/cli/ci.html

abort with error if package-lock.json does not match package.json
don't write to package.json or any lock file

Please support users of jfrog/artifactory/jenkins with a proper choice for npm integration via "npm ci" or "npm install"
https://github.com/jfrog/build-info/blob/0f9f8127bd43937dc2da6fcb74815df63b141d86/build-info-extractor-npm/src/main/java/org/jfrog/build/extractor/npm/NpmDriver.java#L44
See also this issue https://www.jfrog.com/jira/browse/HAP-1338

This is basic npm workflow to be supported!

Fully agree with this issue.
Use "npm ci" is the only way to guarantee the immutability of an npm artifact at the time of the build.

@pniederlag, @ricardf, @bolivard-k
Thanks for opening this issue and requesting for more features!
We have added support for 'npm ci' execution in the 'build-info-npm-extractor' version 2.21.0, see the relevant commit.
Our Jenkins Artifactory Plugin version 3.10.0 supports it, please see our documentation for declarative and scripted pipelines.
Looking forward to your feedback for it.

Great to see some progress here, many thx for tackling it. As we run our jenkins pipelines in kubernetes we found there is no way to use the artifactory-plugin as it is executed on the master-node where none of the relevant tools is available(they are all executed via docker). So we are running jfrog-cli inside our pipelines with a proper connection to artifactory. So my question is: when will this be available to jfrog cli as well? Thx for your feedback

... So my question is: when will this be available to jfrog cli as well? Thx for your feedback

it seems jfrog 1.41.2 does have it already :+1:


Could not find device path for /mnt

Describe the bug
Error in the HA logs
Expected behavior
No errors
Screenshots
No screenshot but copy of log
This error originated from a custom integration.

Logger: custom_components.unraid.api.disk_state
Source: custom_components/unraid/api/disk_state.py:64
integration: UNRAID (documentation, issues)
First occurred: 20:20:37 (34 occurrences)
Last logged: 21:47:41

Could not find device path for /mnt

Unraid (please complete the following information):

Version 7.0.0-rc.2

Home Assistant (please complete the following information):

Version 2025.1.0b3

Home Assistant installation type (please complete the following information):
Home Assistant OS

[ ] Docker / Container
[ ] Virtual Machine
[ ] Raspberry Pi

Priority of Request

[ ] High
[ ] Medium
[ ] Low

Additional context
Add any other context about the problem here.

same question

I made some updates today. Feel free to download latest source code, overwrite your existing unraid integration and restart home assistant.


node.status({text: ''}) results in Maximum call stack size exceeded

trying to change node status by setting text to empty results in call stack size exceedec
What are the steps to reproduce?

create three nodes: inject, function, debug
in function node put:

node.status({text: ''});
return msg;

connect inject to function input, function output to debug
deploy
inject

What happens?
in console chromium reports the following:

vendor.js:39 Uncaught RangeError: Maximum call stack size exceeded
at String.split ()
at F (vendor.js:39)
at E (vendor.js:39)
at Object. (vendor.js:39)
at Object.each (vendor.js:2)
at F (vendor.js:39)
at E (vendor.js:39)
at Object. (vendor.js:39)
at Object.each (vendor.js:2)
at F (vendor.js:39)
and flow is broken

What do you expect to happen?
no error, no broken flow
Please tell us about your environment:

[ ] Node-RED version: 0.20.3
[ ] node.js version: v10.14.2
[ ] npm version: 6.4.1
[ ] Platform/OS: hassio
[ ] Browser: chromium 73.0.3683.75

Hi - I cannot reproduce this on 0.20.3 (or 0.20.5).
Here's the flow, just as you describe:
[{"id":"69151122.9348b","type":"inject","z":"41b925f9.3c983c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":120,"wires":[["a3e75a12.3d2e18"]]},{"id":"a3e75a12.3d2e18","type":"function","z":"41b925f9.3c983c","name":"","func":"node.status({text:\"\"});\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":120,"wires":[["48ff3904.d12f88"]]},{"id":"48ff3904.d12f88","type":"debug","z":"41b925f9.3c983c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":490,"y":120,"wires":[]}]

It works as expected.

Can confirm.

10 Apr 08:24:45 - [info] Node-RED version: v0.20.5
10 Apr 08:24:45 - [info] Node.js  version: v10.14.0
10 Apr 08:24:45 - [info] Windows_NT 10.0.17134 x64 LE

Google Chrome
Version 73.0.3683.103 (Official Build) (32-bit)

vendor.js:39 Uncaught RangeError: Maximum call stack size exceeded
    at C (vendor.js:39)
    at E (vendor.js:39)
    at Object.<anonymous> (vendor.js:39)
    at Object.each (vendor.js:2)
    at F (vendor.js:39)
    at E (vendor.js:39)
    at Object.<anonymous> (vendor.js:39)
    at Object.each (vendor.js:2)
    at F (vendor.js:39)
    at E (vendor.js:39)

Firefox Quantum 60.2.2esr (64-bit)
Empty string passed to getElementById().                                  vendor.js:2:24487
too much recursion[Learn More]                                                vendor.js:39:13808
F
http://localhost:1880/admin/vendor/vendor.js:39:13808
E
http://localhost:1880/admin/vendor/vendor.js:39:11179
F/<
http://localhost:1880/admin/vendor/vendor.js:39:14194
each
http://localhost:1880/admin/vendor/vendor.js:2:3027
F
http://localhost:1880/admin/vendor/vendor.js:39:14168
E
 ..... long list continues here

Note that Firefox shows (twice) the warning at the moment the Inject button is pressed.
Empty string passed to getElementById()
No issue with  node.status({text:" "});
Can be reproduced with  node.status({text:""}); and node.status({text:''});

Hi @hotNipi
Please can you provide a flow that reproduces this error?

Tested with your flow (post 4 days ago)

Test with my laptop at home
10 Apr 16:59:00 - [info] Node-RED version: v0.20.5
10 Apr 16:59:00 - [info] Node.js  version: v8.11.3
10 Apr 16:59:00 - [info] Windows_NT 10.0.17134 x64 LE

Firefox Quantum 66.0.1 (64-bit)
Can't reproduce
Chrome Version 73.0.3683.103 (Official Build) (64-bit)
Can't reproduce

The error is in the runtime - so choice of browser is not relevant here.
So you can reproduce on one machine but not another?
Did you have any other flows deployed on the machine that can recreate it? Any Status nodes or subflows?

It was this flow only I think, only one tab, no subflows, may be some unused config nodes but can't check it out before tomorrow morning.

@knolleary - I have made it fail on that WIn10 VM I almost gave you....

@dceejay but can you reproduce it anywhere else?

not yet - but it is solid fail.

Same (copied) flow on Mac - works on chrome - and on FF - but DOES have same
Empty string passed to getElementById().    vendor.js:2:24487
error on FF 66.0.2 (64-bit) that precedes crash above.
[
    {
        "id": "5ef3fadf.31201c",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": ""
    },
    {
        "id": "c5ac061d.e47e78",
        "type": "function",
        "z": "5ef3fadf.31201c",
        "name": "",
        "func": "\nnode.status({text:\"\"});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x":<PHONE_NUMBER>265625,
        "y": 79.56982421875,
        "wires": [
            []
        ]
    },
    {
        "id": "76c90a29.b065a4",
        "type": "inject",
        "z": "5ef3fadf.31201c",
        "name": "",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 120,
        "y": 80,
        "wires": [
            [
                "c5ac061d.e47e78"
            ]
        ]
    }
]

Tried to get closer to cause of issue. Prettified the vendor.js
It seems to come from i18next section

Oh - sorry. I completely misread the original report and assumed the max call stack was happening in the runtime.... that changes everything...

@hotnipi  - for me it looks more like in jquery... - vendor.js
1216       if (d = y.getElementById(c[2]), d && d.parentNode) {
So it may well be that is just where it has gone bang

Then Chrome must have some kind of forgiveness about .getElementById("") . I did tests today only with Chrome and missed that completely.

well they may both be symptoms of something else entirely.

Highly possible.
As my experiences and understanding around node-red core is (still) way too limited to suspect anything I probably can be that guy who can do some dedicated tests with machine where it reproduces if needed but not more.


[Identity] Fix InteractiveBrowserCredential.GetToken deadlock with embedded browser

I tested these changes manually with a WinForms application, I'm not sure how we could automate the testing of it. I was able to reproduce the deadlock, and verify that this does fix the deadlock, Possibly there's a better approach than using Task.Run and I'm open to suggestion.
Fixes #18418

We still end up blocking the UI thread even when offloading the call to the thread pool. I'd like us to understand why that fixes things.


Add config.yaml option to fail an action when hooks fail

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

hooks:
  post-start:
    - exec: exit 1
    # Private files directory.
    - exec: mkdir /var/www/private

    # Install profile
    - exec: drush site-install server -y --existing-config

    # Compile theme
    - exec-host: ddev robo theme:compile

    # Generate one-time login link
    - exec: drush uli

Let's say we have a failing post-start command in our custom configuration.
Right now there's no trivial way to know if all the commands succeeded or not, as ddev start exits with code 0 even if something in the hooks failed.
Describe the solution you'd like
We could stop on the first failure for post-start and propagate the received exit code for the caller of ddev start.
Describe alternatives you've considered
As it might break existing configs, it could be a config option, like stop_on_hook_failure: true , with a default value false, it would ensure the backwards compatibility.

ddev used to exit on failure of a hook and too many people complained about it and wanted it to keep going :)

@rfay How does it sound to make it configurable?

I see that it originates from https://github.com/drud/ddev/pull/1860

A failed task does not fail the entire operation.

How about your travis recipe just doing a ddev exec to check to make sure that everything is set up properly after the ddev start ?

@rfay That could work, but then, we cannot use ddev config YML as a source of truth for the things we'd execute, it would be essentially the same on local. But that's an obvious workaround, thanks for the suggestion!

DDEV-Local tries to be optimized for what helps people doing local development, so that's the reason for the trade-off here.

How about your travis recipe just doing a ddev exec to check to make sure that everything is set up properly

I'm not sure if it's the right approach in general. I can think of some commands that if not executed, we'd like it to blow. That is, if some encryption/ sensitive data related command didn't work - we'd like the entire flow to stop.

I mean, in our case we can surely check that CSS file was compiled (which is currently our use case); but I think in general stopping on error can be a good thing.

I think even if the exit codes don't lead to a "ddev start" failing anymore, it would be more than welcome to have the option to achieve that if a critical hook is failing the ddev start gets interrupted as it was before.
Possible solutions:

Having at least 1 error code which still uses the old behavior (interrupting ddev start)
Having a range of error codes for interrupting ddev start, e.g. starting with 4 digit error codes
Having a command which could be called from within a ddev start hook which caused the ddev start to be interrupted

It would be highly appreciated to give any lead how to interrupt a "ddev start" on purpose. Thank you very much for your efforts.

@rfay Could you please provide a short update about this issue? Would be highly appreciated. Thank you for your efforts & have a great day :)

Hi @majamee - This issue is not currently slotted for work in v1.17. PRs are welcome. The more people that show their interest in the issue, the sooner it makes it onto the board. But this one is tricky because it used to work this way, and it seems more people are happy with the way it works now. A config option could make both work of course.

@rfay could you please show me the commit which changed that behavior? That way I would at least have a solid starting point to work on such a PR :-)

The PR that changed it was https://github.com/drud/ddev/pull/1860
The code in question is https://github.com/drud/ddev/blob/41cf849948e250f0971290b84d376216671a8b94/pkg/ddevapp/ddevapp.go#L807-L810
You'd also have to add config, which is slightly harder, but lots of examples.

@rfay I tried my best and you can find the according PR here:
https://github.com/drud/ddev/pull/2652
Maybe it is possible now to have this new option to be included for the next ddev version (v1.17) 😄
P.S.: I did read the CONTRIBUTING.md and followed it closely, please bare in mind that this is my first development work in "Go" though. So please be indulgent. 🙂

Awesome, looking forward to looking at it. Congrats! I imagine on the contributing.md you mean https://github.com/drud/ddev/blob/master/docs/developers/building-contributing.md ?

Actually https://github.com/drud/ddev/blob/master/CONTRIBUTING.md

OK, just pointing out that https://github.com/drud/ddev/blob/master/docs/developers/building-contributing.md will be useful to you.

Thank you very much for pointing that out, I just was reading through the Makefile and its comments instead, I think I should have covered anything important (maybe not the branch name, but it is pretty much self-explanatory though) 😉

The branch name isn't important. It's just the way I do it so I can distinguish old branches from current ones in git branch (and get decent descriptions for the branches)

@AronNovak @amitaibu nicely implemented here by @majamee - should be in next v1.17 alpha.


Address a couple nits in the walkthrough

Eliminate some unnecessary wording and make tenses agree with one another.

👍 lgtm

@MHBauer

Any guidelines on preferring the ing form? I find it awkward, but I find it difficult to explain why.

Not really - most of the headings were already in that form so I went with that.  I also find it a little awkward but I think consistency is an improvement for now.

Adding lgtm3 for morgan, since he forgot to.


chore: update ws to 8.18.0 from 8.11.0.

Bump ws because of high security vulnerability see #3800

This may not close the alert. ws 3.3.3 is still in here subordinate to websocket-stream

@MWein thanks, you are right. If I see it correctly, the solution for this would be to migrate to the aws-iot-device-sdk-v2 what I think will not be done because it's already part of ion?
Anyway, is it possible to still merge this PR to resolve 2 out of 3 alerts?


Fix vaccination 202204

This PR fixes #427 .
Switched from excel source to csv files on github.
Add single deltas for each vaccine.

Awesome! Thank you @Rubber1Duck!


feat: add return val to replace_bucket_with replace_entry_with

If a user has a RawOccupiedEntryMut, they should be able to use replace_entry_with to conditionally remove it. However, if a user wishes to extract data from this entity during the removal process, the current api necessitates the use of unwrap:
/// Extract the coolness of an item, possibly destroying it
fn extract_coolness<V>(v: V) -> (Option<V>, Coolness) {
    /// ...
}

let entry: RawOccupiedEntryMut< _, _, _, _> = unimplemented!();

let mut coolness = None;
let entry = entry.replace_entry_with(|_k, v| {
    let (maybe_v, rcool) = extract_coolness(v);
    coolness = Some(rcool);
    maybe_v
});
let coolness = coolness.unwrap(); // unwrap, ew

// Do some stuff with the coolness it doesn't really matter what
inspect_coolness(coolness);

This is because while F is bounded by FnOnce, it is under no obligation to call it, which in this example means there is no guarnatee that coolness is initialized. This proposed change introduces a new return value R which allows callers to transport this data out of F. Notably it also commits the replace_entry_with to calling F, since there is no other way to generate an R. With this, our example becomes:
/// Extract the coolness of an item, possibly destroying it
fn extract_coolness<V>(v: V) -> (Option<V>, Coolness) {
    /// ...
}

let entry: RawOccupiedEntryMut< _, _, _, _> = unimplemented!();

let (entry, coolness) = entry.replace_entry_with(|_k, v| extract_coolness(v));

// Do some stuff with the coolness it doesn't really matter what
inspect_coolness(coolness);

An alternative to this change is to introduce a new API with a new name instead of modifying the existing one as this is a breaking change.

Is there any interest in this change?

:umbrella: The latest upstream changes (presumably #425) made this pull request unmergeable. Please resolve the merge conflicts.

I spent some time thinking about this change. I don't think it is beneficial because it makes the common case where you don't want to return a value more complicated since you need to extract the new RawEntryMut from the returned tuple. Instead, it is better to let the uncommon case be more complex with the additional unwrap, which is going to be optimized away by the compiler anyways in release mode.

It is only a .0 to get the entry, but fair enough. I may just be overly biased against unwrap. Any consideration to having it as a separate API? Or is the burden too much for such little gains (unwrap haters unite!).

Long-term, I am planning on deprecating the whole RawEntry API and replacing it with a HashTable type which is somewhere between RawTable and HashSet. It will have a 100% safe API but allow customized hashing/comparison like RawTable.

I would like to deprecate the raw entry API in favor of HashTable in #466. Could you have a look at that to see if it addresses your use case better?


Migrate to ghc-lib

Since haskell-src-exts is no longer actively maintained (https://github.com/haskell-suite/haskell-src-exts#maintenance), it will struggle to keep up with ghc releases.
So, either this package stays with haskell-src-exts and will likely not work with newer ghc version or we migrate to ghc-lib.
Would you be interested in a PR migrating to ghc-lib?

On Tue, Mar 03, 2020 at 01:19:29AM -0800, fendor wrote:

Would you be interested in a PR migrating to ghc-lib?

Yes.
Are you interested in taking over the maintainership of 'hsimport'?

Yes, I would be interested!

On Tue, Mar 03, 2020 at 02:03:44AM -0800, fendor wrote:

Yes, I would be interested!

Great!
Should I transfer the 'hsimport' project to your 'fendor' github account?
I would also add you as a maintainer to 'hackage' and afterwards remove myself.
Is your 'hackage' name also 'fendor'?

Yes, that would be great! Yeah, I am fendor on hackage https://hackage.haskell.org/user/fendor

On Tue, Mar 03, 2020 at 03:44:23AM -0800, fendor wrote:

Yes, that would be great! Yeah, I am fendor on hackage https://hackage.haskell.org/user/fendor

It seems that I can't transfer it because of your 'hsimport' fork. Can you please remove the fork.
I would also transfer the 'hsimport-config' project to you, which is
only a minimal example for an user defined configuration.
I've added you as a maintainer to hackage.

It seems that I can't transfer it because of your 'hsimport' fork. Can you please remove the fork.

Done!

I would also transfer the 'hsimport-config' project to you, which is
only a minimal example for an user defined configuration.

Makes sense, thank you!

I've added you as a maintainer to hackage.

Thank you!


Tag current version

Could you please tag the current code base with a version string like 0.1 or similar? That would help using this project in package manager. Thanks.

Seriously please, could the 1.0.0 version be tagged? Thanks!

Done!


Namespaces no longer visible

Describe the issue
I have access to quite a few namespaces but if I am logged into IDIR, OpenShift logs me in with my gov account, but I have access with my Github account. So effectively, I do not see my name spaces. I understand that this is how it should work in the future but there is still a bit of history out there. This will confusion with people.
A temporary workaround is to use a private window and login to OpenShift with your GitHub account. Then you can add the role binding for your gov account. (Provided you are an admin).
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: <user>-admin
subjects:
  - kind: User
    apiGroup: rbac.authorization.k8s.io
    name<EMAIL_ADDRESS>roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: admin

Definition of done
The gov binding needs to be added to all the namespaces that only have github admin bindings.

@okanji can you please investigate this request and determine if it is still relevant, as we no longer support github IDs in the registry


Merging Cubes: Data Source Count in Side Panel

Go to: https://test.visualize.admin.ch/en/v/z5bLWGPFy_qH?dataSource=Prod
Copy and edit visualization
See at the bottom of the side bar in tthe Data Sources secion that 2 data sets are added but that when the section is collapsed the badge shows 5

To test @sosiology

Tested with 2 cubes on INT and the correct number of cubes were shown when the menu was collapsed 👍


[docs] Response to a question in FAQ.md is wrong

Have you read the FAQ and checked for duplicate open issues?
yes, the issue lies precisely in the FAQ itself :)
If the problem is related to FairPlay, have you read the tutorial?
N/A
What version of Shaka Player are you using?
N/A
Can you reproduce the issue with our latest release version?
yes
Can you reproduce the issue with the latest code from main?
yes
Are you using the demo app or your own custom app?
N/A
If custom app, can you reproduce the issue using our demo app?
N/A
What browser and OS are you using?
N/A
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
N/A
What are the manifest and license server URIs?
N/A
What configuration are you using?  What is the output of player.getConfiguration()?
N/A
What did you do?
On the FAQ page, the answer to the question Q: I am getting UNSUPPORTED_SCHEME or error code 1000 when loading from file://. is the following :
A: In a browser environment, trying to load a file from file:// is inappropriate. Therefore, we do not provide a default network plugin for such requests.

In other environments, for example Electron, it is appropriate. In those cases, before Shaka Player loads a manifest, you can register the existing http plugin for file:// requests:

shaka.net.NetworkingEngine.registerScheme('file', shaka.net.HttpXHRPlugin);

What did you expect to happen?
What actually happened?
The correct answer is the following :
shaka.net.NetworkingEngine.registerScheme('file', shaka.net.HttpXHRPlugin.parse); // <-- note the .parse

PRs are always welcome!

OK I'll create a PR for this one :)


[YouTube] Embed chapters show as "unnamed" instead of chapter name.

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

[X] I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

[X] I'm reporting that yt-dlp is broken on a supported site
[X] I've verified that I'm running yt-dlp version 2023.03.04 (update instructions) or later (specify commit)
[X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
[X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[X] I've searched known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue
[X] I've read about sharing account credentials and I'm willing to share it if required

Region
United States
Provide a description that is worded well enough to be understood
When downloading a YouTube with chapters embeded, said chapters show as "unnamed" instead of the chapter name.
Using nightly build of yt-dlp (2<IP_ADDRESS>044).
Provide verbose output that clearly demonstrates the problem

[X] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[x] If using API, add 'verbose': True to YoutubeDL params instead
[X] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
[debug] Command-line config: ['-vU', 'https://www.youtube.com/watch?v=m3lzIfi8e_A']
[debug] User config "C:\Users\Wild\AppData\Roaming\yt-dlp\config": ['-o', 'G:/YoutubeDLDownloads/%(extractor_key)s/%(uploader)s/%(title)s-%(resolution)s-%(id)s.%(ext)s', '--netrc', '--limit-rate', '2.5M', '--convert-thumbnails', 'png', '--add-metadata', '--embed-thumbnail', '--sub-lang', 'en.*', '--embed-sub', '--merge-output-format', 'mkv', '-S', 'res,fps,vcodec:h264,acodec:mp4a']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[6f10cdcf7] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-110925-g45fa85a777-20230529 (setts), ffprobe N-110925-g45fa85a777-20230529, phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1839 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Available version<EMAIL_ADDRESS>Current version<EMAIL_ADDRESS>Current Build Hash: 5703eaa3e1156bcd142186a9f4a1f04126ec5d5e80896070a069a24a33235c74
yt-dlp is up to date<EMAIL_ADDRESS>[youtube] Extracting URL: https://www.youtube.com/watch?v=m3lzIfi8e_A
[youtube] m3lzIfi8e_A: Downloading webpage
[youtube] m3lzIfi8e_A: Downloading android player API JSON
[debug] Loading youtube-nsig.bbe1b497 from cache
[debug] [youtube] Decrypted nsig 1tckqKAUfNTeg-bNgP => fg0U66AcinpulQ
[debug] Sort order given by user: res, fps, vcodec:h264, acodec:mp4a
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, res, fps, vcodec:h264(7), acodec:mp4a(9), quality, hdr:12(7), source, channels, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] m3lzIfi8e_A: Downloading 1 format(s): 308+140
[info] There are no subtitles for the requested languages
[info] Downloading video thumbnail 45 ...
[info] Writing video thumbnail 45 to: G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.webp
[ThumbnailsConvertor] Converting thumbnail "G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.webp" to png
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -f image2 -pattern_type none -i "file:G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.webp" -update 1 -movflags "+faststart" "file:G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.png"
Deleting original file G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.webp (pass -k to keep)
[debug] Invoking http downloader on "https://rr4---sn-vgqsrnsd.googlevideo.com/videoplayback?expire=1685428231&ei=p0N1ZKS1M4mqiwTwx7CYCw&ip=<IP_ADDRESS>&id=o-ABcgv__9_JhsKUSseu2KvNxCAS3cHKjyzOAW6nZM1tjv&itag=308&source=youtube&requiressl=yes&mh=e4&mm=31%2C29&mn=sn-vgqsrnsd%2Csn-vgqsknzs&ms=au%2Crdu&mv=m&mvi=4&pl=17&initcwndbps=1623750&spc=qEK7B1raVLWgAs7zATpI_H7ynq2OphXN8Jj_ih3V7A&vprv=1&svpuc=1&mime=video%2Fwebm&gir=yes&clen=1514738044&dur=1338.283&lmt=1684977336748101&mt=1685406287&fvip=5&keepalive=yes&fexp=24007246%2C51000011%2C51000013%2C51000023&c=ANDROID&txp=5532434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgFgYXIHMdjnS5C0hD2phwYmTM-0XZQe74ZD2_XCyNNxcCIQC-jQ-EXW2LxCvtPCHPc6awZcbeFEc26JwB4sJ8_RnmMQ%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAMhQJV9IsSGLkutOwfGgM72y1ht-KOp9onAQ906MXVdTAiA_d6VLiEu41VaBILpVJRHuixiNqKTSzruusesVR0uGfA%3D%3D"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.f308.webm
[download] 100% of    1.41GiB in 00:12:34 at 1.91MiB/s
[debug] Invoking http downloader on "https://rr4---sn-vgqsrnsd.googlevideo.com/videoplayback?expire=1685428231&ei=p0N1ZKS1M4mqiwTwx7CYCw&ip=<IP_ADDRESS>&id=o-ABcgv__9_JhsKUSseu2KvNxCAS3cHKjyzOAW6nZM1tjv&itag=140&source=youtube&requiressl=yes&mh=e4&mm=31%2C29&mn=sn-vgqsrnsd%2Csn-vgqsknzs&ms=au%2Crdu&mv=m&mvi=4&pl=17&initcwndbps=1623750&spc=qEK7B1raVLWgAs7zATpI_H7ynq2OphXN8Jj_ih3V7A&vprv=1&svpuc=1&mime=audio%2Fmp4&gir=yes&clen=21660503&dur=1338.351&lmt=1684961328294366&mt=1685406287&fvip=5&keepalive=yes&fexp=24007246%2C51000011%2C51000013%2C51000023&c=ANDROID&txp=5532434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAPozpOeW89X4shdaQygOkynzsKQd8mcTrl5oMV2ZxomXAiAINVlGrui4pYxUM-kNG0f-JJOeEswngvef4RCgKJo3WA%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAMhQJV9IsSGLkutOwfGgM72y1ht-KOp9onAQ906MXVdTAiA_d6VLiEu41VaBILpVJRHuixiNqKTSzruusesVR0uGfA%3D%3D"
[download] Destination: G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.f140.m4a
[download] 100% of   20.66MiB in 00:00:09 at 2.12MiB/s
[Merger] Merging formats into "G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.mkv"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.f308.webm" -i "file:G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.f140.m4a" -c copy -map "0:v:0" -map "1:a:0" -movflags "+faststart" "file:G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.temp.mkv"
Deleting original file G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.f140.m4a (pass -k to keep)
Deleting original file G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.f308.webm (pass -k to keep)
[EmbedSubtitle] There aren't any subtitles to embed
[Metadata] Adding metadata to "G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.mkv"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.mkv" -i "file:G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.meta" -map 0 -dn -ignore_unknown -c copy -map_metadata 1 -write_id3v1 1 -metadata "title=An Incorrect Summary of Resident Evil 4 | Fun Times in Europe" -metadata "date=20230523" -metadata "description=Where's everyone going? Bingo?
━━━━━━━━━━━━━━━━━━━━━━━━━━
Patreon: https://www.patreon.com/max0r
Follow me on Twitter! https://twitter.com/realMax0r
Join the Max0r Discord! https://discord.gg/max0r
Twitch: https://twitch.tv/max0r
━━━━━━━━━━━━━━━━━━━━━━━━━━
Kay Six (EuchreBB): https://www.twitch.tv/euchre_afgc
(https://twitter.com/VA_Kay_Six)
Kaneko Lumi: @KanekoLumi
Wes: @funnywes
Rimmy: @RimmyDownunder
Slimecicle: @Slimecicle
Martincitopants: @martincitopants
Jimothy Ross: @JimothyRoss
AmbiguousAmphibian: @ambiguousamphibian
━━━━━━━━━━━━━━━━━━━━━━━━━━
This video briefly contains art by @TheGoldenSmurf on Twitter. (12:44)

━━━━━━━━━━━━━━━━━━━━━━━━━━
0:00 - Intro
1:56 - President Evil Village
5:20 - Leon Goes to Church
7:49 - Leon Goes Fishing (and Destroys the Local Ecosystem)
9:12 - The Denny's Parking Lot
10:12 - The Owner of the Red Nissan Altima
11:35 - God Squad HQ
12:33 - Leon Goes to Whole Foods
16:39 - Fun Times in Europe
19:20 - Back at The Barnyard
21:30 - Conclusion" -metadata "synopsis=Where's everyone going? Bingo?
━━━━━━━━━━━━━━━━━━━━━━━━━━
Patreon: https://www.patreon.com/max0r
Follow me on Twitter! https://twitter.com/realMax0r
Join the Max0r Discord! https://discord.gg/max0r
Twitch: https://twitch.tv/max0r
━━━━━━━━━━━━━━━━━━━━━━━━━━
Kay Six (EuchreBB): https://www.twitch.tv/euchre_afgc
(https://twitter.com/VA_Kay_Six)
Kaneko Lumi: @KanekoLumi
Wes: @funnywes
Rimmy: @RimmyDownunder
Slimecicle: @Slimecicle
Martincitopants: @martincitopants
Jimothy Ross: @JimothyRoss
AmbiguousAmphibian: @ambiguousamphibian
━━━━━━━━━━━━━━━━━━━━━━━━━━
This video briefly contains art by @TheGoldenSmurf on Twitter. (12:44)

━━━━━━━━━━━━━━━━━━━━━━━━━━
0:00 - Intro
1:56 - President Evil Village
5:20 - Leon Goes to Church
7:49 - Leon Goes Fishing (and Destroys the Local Ecosystem)
9:12 - The Denny's Parking Lot
10:12 - The Owner of the Red Nissan Altima
11:35 - God Squad HQ
12:33 - Leon Goes to Whole Foods
16:39 - Fun Times in Europe
19:20 - Back at The Barnyard
21:30 - Conclusion" -metadata "purl=https://www.youtube.com/watch?v=m3lzIfi8e_A" -metadata "comment=https://www.youtube.com/watch?v=m3lzIfi8e_A" -metadata "artist=Max0r" -movflags "+faststart" "file:G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.temp.mkv"
[debug] ffprobe command line: ffprobe -hide_banner -show_format -show_streams -print_format json "file:G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.mkv"
[EmbedThumbnail] ffmpeg: Adding thumbnail to "G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.mkv"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.mkv" -map 0 -dn -ignore_unknown -c copy -attach "file:G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.png" "-metadata:s:2" "mimetype=image/png" "-metadata:s:2" "filename=cover.png" -movflags "+faststart" "file:G:\YoutubeDLDownloads\Youtube\Max0r\An Incorrect Summary of Resident Evil 4 ｜ Fun Times in Europe-2560x1440-m3lzIfi8e_A.temp.mkv"

Possible duplicate of #6859
Try downgrading to ffmpeg 6.0 or lower

Downgrading to 6.0 did resolve the issue.
[Apologies for reporting an already reported issue, I glossed over looking through the closed issues for it.]


Add a learn.md file

Learn.md file is missing in our current repository
The learn.md file in GitHub is typically used as a resource to provide guidance, tutorials, or educational content related to a specific repository. This file can serve various purposes, such as introducing new users to the project, providing detailed instructions for using the codebase, or offering learning pathways for different topics covered by the repository.
@ashitaprasad assign this issue to me I will add it,

Please go through the contributing guide to understand the project requirements and then raise a valid issue.