Manage multiple sessions with single application

We new to node js,
We are using passport.js for authentication and session management.
Using vhost for multiple domain, front-end and back-end.
Below are 2 domain names:
example.com
admin.example.com
While doing deserializeUser it is taking an object of the first domain called
below is the snippet, this is written in app.js
if (req.get('host') == envConfig.siteurl) {
    console.log('this is front-end');
    var User = mysqlObj.Model.extend({
    tableName: 'users'
});

passport.deserializeUser(function(sessionUser, done) {
    console.log('front');
    new User({
      id: sessionUser.id
    }).fetch().then(function(user) {
      console.log(user);
      done(null, user);
    });
  });
}

if (req.get('host') == envConfig.adminurl) {
  console.log('this is back-end (admin)');
  var AdminUser = mysqlObj.Model.extend({
    tableName: 'admin_user'
  });

  passport.deserializeUser(function(sessionAdminUser, done) {
    console.log('admin');
    new AdminUser({
      id: sessionAdminUser.id
    }).fetch().then(function(user) {
      console.log(user);
      done(null, user);
    });
  });
}

Now when we login to front-end it console's 'front'
and then when we try to login to back-end it still console's 'front' instead of 'admin'
By this we understand it's calling the same object of "deserializeUser"
But our objective is based on domains and we are querying two different tables for each of the domains.
Which is failing in above case.
Please help!!!
Thanks in advance...

@Sujit50 you need to create a new instance of passport (not use the default instance) for each domain (express app)
var passport = require('passport');
var authWeb = new passport.Passport();
var authtAdminWeb = new passport.Passport();

// do your .deserializeUser config for each passport's instance here...

@Sujit50 you need to create a new instance of passport (not use the default instance) for each domain (express app)
var passport = require('passport');
var authWeb = new passport.Passport();
var authtAdminWeb = new passport.Passport();

// do your .deserializeUser config for each passport's instance here...

Thanks @bjrmatos this help us resolve the issue :+1:

@bjrmatos  , if I create different instances of passport for different type of users, then I suppose I'll have to use passport.authenticate() for different passport instance for each type of user and I can't just use default instance which we get by require('passport'). Am I right? If that's the case, then what would be the good way to maintain global instances of passport instances and use them in all different routers?

if I create different instances of passport for different type of users

just in case that there is some confusion: note that in most cases you need a new instance per domain that you are handling, not per each user (that would be overkill)

if I create different instances of passport for different type of users, then I suppose I'll have to use passport.authenticate() for different passport instance for each type of user and I can't just use default instance which we get by require('passport'). Am I right?

yes, you need to use the .authenticate method of the instance that you manually created, not the default one that come in the passport export.

If that's the case, then what would be the good way to maintain global instances of passport instances and use them in all different routers?

just create a new file called authenticator.js and add some functions to create and get passport instances and then in your routes just import authenticator.js and call something like passportInstanceOfMySubdomain = authenticator.get('mysubdomain.com') to get the corresponding passport instance and then just use it normally like any passport instance  passportInstanceOfMySubdomain.authenticate(... -> that is what i do currently

@bjrmatos Thanks for the quick reply. I have one more doubt, is it bad to use different instances for different kind of users. The way I know to use it for different type of users is, in passport.deserializeUser(), first look for the user model in first type of user using the _id, if not found, then check for the user model in the other type of user. So, if I'm using three type of users, it may take three database operations for a particular type, just for deserializing it. I haven't used passport much, so I don't have much idea about what better I can do, so I thought of using different instances. Can you please suggest some better way? I'd be thankful for any help.

hmm i think that you can handle your use case with the default instance of passport (seems like you don't need multiple instances for your case), you just need to add more data when you are serializing the user, something like this:
passport.serializeUser(function(user, done) {
  done(null, {
    id: user.id,
    type: user.type
  });
});

and then use the new user.type information in your deserializeUser function to conditionally select a different database or create a different query. with that, you handle all types of users with just one hit to the database

@bjrmatos , Thanks for the solution. It works for using different type of users. But this method of serializing extra info in same passport instance still doesn't solve all problems. Referring to the req.login() function code at https://github.com/jaredhanson/passport/blob/07bff37406241b0cf8db35986788d2dadbf93763/lib/http/request.js#L31 , it saves the info of logged in user in property field set at line property = this._passport.instance._userProperty || 'user';. So for a particular instance, it'll save the info in req.user(req[property] to be exact). So, if I use a single instance of passport, then only one type of user will be logged in per session. If another type of user logs in, then it'll be replaced. Its not an issue for same type of user, because only one user of one type should be logged in at one time. But it makes a problem for different type of user. Also, the isAuthenticated() method does return (this[property]) ? true : false;. I can write my own isAuthenticated() method, but the problem is in req.login(). Old user info will just be replaced by new user in the information stored in session. If I use multiple instances, then I can just set userProperty differently for different instances during initialization of each instance. So, now, should I be using multiple instances, or there is still a better way?

how to apply session-ing for every pages i have,  for eg. i have multiple pages like, /user/login, /user/register, /projects, /profiles, /datasources/projects etc... all i could do is followed some tutorial and created git clone. right now i could do is creating session-id for login and register page and destroy the session in logout page. My question is how to apply the same for all

@LostInCode404
Could you please provide a code snippet? I am not exactly sure where to create new instances and how to import them into other files.

Hi @bjrmatos , i want to make 2 types of users one as User(<model_name>) and Other as Recruiter(<model_name>) , I am using Passport for the same , the Recruiter One Works Fine but each Time i register From the User Route ,the Browser Shows up : unauthorized , here is the code
//jshint esversion:6
require("dotenv").config();
const express = require("express");
const bodyParser = require("body-parser");
const mongoose = require("mongoose");
const passport = require("passport");
const passportLocalMongoose = require("passport-local-mongoose");
const session = require("express-session");
const GoogleStrategy = require('passport-google-oauth20').Strategy;  // google added
const findOrCreate = require("mongoose-findorcreate");    // google added
const app = express();
app.set("view engine" , "ejs");
app.use(bodyParser.urlencoded({extended: true}));
app.use(express.static("public"));
app.use(session({
secret: "ThisisaNewSecret",
resave: false,
saveUnitialized: false
}));
app.use(passport.initialize());
app.use(passport.session());
mongoose.connect("mongodb://localhost:27017/userDB", {useUnifiedTopology: true , useNewUrlParser: true});
mongoose.set("useCreateIndex" , true);
const recruiterSchema = new mongoose.Schema({
id: String,
Company: String,
Recruiter_name: String,
Recruiter_Pos: String,
Recruiter_email: String,
Company_email: String,
Recruiter_Phno: String,
Country: String,
City: String,
Experience: String,
Level: String
});
const projectSchema = new mongoose.Schema({
Name: String,
Desc: String,
link: String
});
const studentSchema  = new mongoose.Schema({
email: String,
password: String,
googleId: String,
first_name: String,
last_name: String,
highest_Quali: String,
course: String,
Specialization: String,
College: String,
course_type: String,
Grad_Year: String,
projects: [projectSchema],
Skills: [String]
});
studentSchema.plugin(passportLocalMongoose); // for Student
recruiterSchema.plugin(passportLocalMongoose); //for Recruiter
studentSchema.plugin(findOrCreate);  // google added
const User = mongoose.model("User", studentSchema);
const project = mongoose.model("project" , projectSchema);
const Recruiter = mongoose.model("recruiter", recruiterSchema);
passport.use(User.createStrategy()); // Student
passport.use(Recruiter.createStrategy()); //Recruiter
passport.serializeUser(function(user, done) {    //student // works for all the strategies // google added
done(null, user.id);
});
passport.deserializeUser(function(id, done) {   //Student // works for all the strategies // google added
User.findById(id, function(err, user) {
done(err, user);
});
});
passport.deserializeUser(function(id, done) {   //Recruiter // works for all the strategies // google added
Recruiter.findById(id, function(err, user) {
done(err, user);
});
});
// passport.serializeUser(function(user, done) {
//   done(null, user);
// });
// passport.deserializeUser(function(user, done) {
//   if(user!=null)
//     done(null,user);
// });
let TempObj = {
name: ""
}
// google added
passport.use(new GoogleStrategy({
clientID: process.env.CLIENT_ID,
clientSecret:  process.env.CLIENT_SECRET,
callbackURL: "http://localhost:3000/auth/google/secrets",
userProfileURL: "https://www.googleapis.com/oauth2/v3/userinfo" //changed
},
function(accessToken, refreshToken, profile, cb) {
TempObj.name = profile.displayName;
User.findOrCreate({ googleId: profile.id }, function (err, user) {
return cb(err, user);
});
}
));
app.get("/", function(req, res){
res.render("home");
});
app.get("/auth/google",                                          /* "/auth/google" is the First to be invoked path and it is basically a passport / //google added
passport.authenticate("google", { scope: ['profile'] }));     /  plugin for authenticating the user using   /
/ google strategy at the Lines : 61-74 and is  demanding for the profile containing all the info about the user /
app.get("/auth/google/secrets",
passport.authenticate("google", { failureRedirect: "/login" }),   //authenticate locally // google added
function(req, res) {                                             / "/auth/google/secrets" is the Link where one is redirected by google  when  /
// Done Finally                                               / it is authenticated by the google serves */
  res.render("Student_login", {user: TempObj});

});
app.get("/Student_edit", function(req, res){
if(req.isAuthenticated()){
res.render("Student_edit", {user: TempObj});
}else{
res.redirect("/register");
}
});
app.get("/login", function(req, res){
res.render("login");
});
app.get("/register", function(req, res){
res.render("register");
});
app.get("/logout" , function(req, res){
req.logout();
res.redirect("/");
});
app.post("/Student_edit", function(req, res){
console.log(req.body);
let x  = req.body.skillwala;
let y = x.split(",");
console.log(y);
});
app.post("/student_register", function(req, res){
TempObj.name = req.body.username;
User.register({username: req.body.username}, req.body.password , function(err , user){
if(err){
console.log(err + " at Student register route" );
res.redirect("/register");
}else{
passport.authenticate("local")(req, res, function(){
res.redirect("/Student_edit");
});
}
});
});
app.post("/recruiter_register", function(req, res){
TempObj.name = req.body.username;
Recruiter.register({username: req.body.username}, req.body.password, function(err, recruiter){
if(err){
console.log(err + " at Recruiter register Route");
res.redirect("/register");
}else{
passport.authenticate("local")(req, res, function(){
res.render("Recruiter_edit", {user: TempObj});
});
}
});
});
app.post("/student_login", function(req, res){
const user = new User({                // add More entries here
username: req.body.username0,
password: req.body.password
});
TempObj.name = req.body.username;
req.login(user, function(err){
if(err){
console.log(err);
res.redirect("/login");
}else{
passport.authenticate("local")(req, res, function(){
res.render("Student_login" , {user: TempObj});
});
}
});
});
app.post("/recruiter_login", function(req, res){
const recruiter = new Recruiter({
username: req.body.username,
password: req.body.password
});
TempObj.name = req.body.username;
req.login(recruiter, function(err){
if(err){
console.log(err);
}else{
passport.authenticate("local")(req, res, function(){
res.render("Recruiter_login", {user: TempObj});
});
}
});
});
app.listen(3000, function(){
console.log("The server is Running Properly at Port 3000");
});

@Sujit50 you need to create a new instance of passport (not use the default instance) for each domain and set-up properly in each app (express app)
var passport = require('passport');
var authWeb = new passport.Passport();
var authtAdminWeb = new passport.Passport();

// do your .deserializeUser config for each passport's instance (authWeb, authAdminWeb) here...

the problem persist!! :(

Thanks Man..! it Worked ..!
On Fri, Apr 16, 2021 at 6:38 AM Christopher Duran @.***>
wrote:

@Sujit50 https://github.com/Sujit50 you need to create a new instance
of passport (not use the default instance) for each domain and set-up
properly in each app (express app)
var passport = require('passport');var authWeb = new passport.Passport();var authtAdminWeb = new passport.Passport();
// do your .deserializeUser config for each passport's instance (authWeb, authAdminWeb) here...
the problem persist!! :(
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/jaredhanson/passport/issues/450#issuecomment-820837128,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AO67RDNU4ETRNQLNIUTHETLTI6EYZANCNFSM4BXTNP4A
.


error about ev_city

I'm currently working on a project using the ev2gym package and encountered an issue when trying to run my script.
The error message indicates that the module ev2gym.ev_city is missing.
[train_stable_baselines.py : 61 lines code]
gym.envs.register(id='evs-v0', entry_point='ev2gym.ev_city:ev2gym',
Here's the code I'd met the error.
I've checked the ev2gym package installation and the expected directory structure, but the ev_city module doesn't seem to be present.
I also couldn't find any reference to ev_city in the package's GitHub repository.
Despite these efforts, I haven't been able to resolve the issue.
Thank you for your help!

Hello, there is an error indeed in this script. The newer version registers the environment with entry point:
gym.envs.register(id='evs-v0', entry_point='ev2gym.models.ev2gym_env:EV2Gym',
                      kwargs={'config_file': config_file,
                              'reward_function': reward_function,
                              'state_function': state_function,
                              })


Update image ghcr.io/onedr0p/sonarr to v<IP_ADDRESS>3

This PR contains the following updates:

Package
Update
Change

ghcr.io/onedr0p/sonarr (source)
patch
<IP_ADDRESS>9 -> <IP_ADDRESS>3

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

Edited/Blocked Notification
Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.
You can manually request rebase by checking the rebase/retry box above.
⚠ Warning: custom changes will be lost.


More examples and tutorials for metaflow

Thanks a lot for open-sourcing this great library. Is it possible to provide more real-world examples of using this tool?  It would be really helpful to have a real-world example that goes through a whole Data Science or Machine Learning project life cycle, such as data loading/cleaning, parameter tuning, model deployment and performance monitoring. Many thanks!

@xzenggit Yes indeed! Providing case studies is high up on our fast-follow list. We should have something available really soon.

It would be really great with at least one example on how to use the library to do ML predictions. It would be great if it showed the following use cases
Batch prediction (Fairly obsious)
Real time prediction for instance in a rest service (Not as obvious)

I would really appreciate more tutorials. I'm a student and I'm trying to implement metaflow into a project, but I use complex classes and inheritance. At the moment I don't understand how to implement metaflow into my reusable classes, which do more than one thing.

Is inhertance available with metaflow? I would have two flows, two start functions and so on. That doesn't seem to work.
Can I implement more than one flow into one class? Same problem as with inheritance.

@Machuntox, I am not quite sure what you would like to do. In Metaflow, one class is one flow. If you would like to reuse portions of code between flows, I would recommend you implement the common functionality in regular methods in a non-Metaflow Python class and then call that from your various flows.
@elben10: We plan on open sourcing our hosting solution which would allow you to do a REST service easily but it is not yet available (see #3)

I think I am in a similar situation to @Machuntox. My project has a complex class hierarchy, and the problem that I'm facing is that the flow steps that I tried to implement on the parent class are not recognized.

@Machuntox @pdMa2s Here are some thoughts on organizing more complex projects.
I like to implement complex business logic in a separate class that does not inherit from FlowSpec. I like to make it completely stateless (e.g. no attributes, purely functional), the class just organizes your complex model training and scoring logic, and any other 'business logic'. You can test this code in a notebook to make sure it works as expected, independent of your Flow:
Example:
class MyModelClass(object):
     def init_model(self, ...):
          ...
          return model_object

     def train(self, model_object, data, ...):
          ...
          return model_object

     def score(self, model_object, data, ...):
          scores = ...
          return scores

You can then re-use this class in your different workflows as a mixin (e.g. inherit from FlowSpec and then your custom class).  Since your custom class is purely functional, the state can be nicely managed in you flow. This keeps the flow more about the code narrative and the state management, where the model and business details are in your reusable custom class:
class MyTrainingFlow(FlowSpec, MyModelClass):
     @step
     def start(self):
          self.model = self.init_model(...)
          self.next(self.train)

     @step
     def train(self):
          self.model = self.train(self.model, ...)
          self.next(self.end)

     @step
     def end(self):
          pass

And similarly, for scoring:
class MyScoringFlow(FlowSpec, MyModelClass):
     @step
     def start(self):
          training_run = Flow('MyTrainingFlow').latest_successful_run
          self.model = training_run['end'].task.data.model
          self.next(self.score)

     @step
     def score(self):
          self.scores = self.score(self.model, ...)
          self.next(self.end)

     @step
     def end(self):
          pass

When we release our hosting solution, you can use the custom class and data artifacts in a similar way.

@bergdavidj Thank you for taking your time to compose such a detailed response. I'll take those suggestion into consideration. Even so, I have a problem when I try to access attributes of the parent class (AttributeError). But that's an issue that I can easily workaround.

I will close this issue since we now have many tutorials available at https://outerbounds.com/docs/data-science-welcome/


[Feature Proposal][OpenAPI] - Custom Operation Id Field

Is your feature request related to a problem? Please describe.
Our team uses the Google API Design Guide to guide our OpenAPI service specs.  Following the guide results in operation ids like the following operationId: organization.resource_get.  We have lots of code-gen tooling built around those naming conventions.  We would like to use GraphQL Mesh with the OpenAPI handler but the resulting GraphQL field names that are generated from the above operationId are not user-friendly.  In the above example, it becomes organizationsResourceGet.
Describe the solution you'd like
I would like to add a configuration option operationIdField that would allow us to point to a different OpenAPI field for selecting the operationId.  In our case, we have a much more readable x-yv-rpc-method that in the example above is defined as getOrganization.    We would fall back to operationId if the custom field is undefined.
This solution could also help address this issue #2270
Describe alternatives you've considered
I considered using the Rename transform to accomplish this however, that would require us to rename every operation which would add development time costs and significant runtime performance issues as current transform restrictions require us to use wrap mode for our transforms.
Additional context
I have a POC MR on my fork here:  https://github.com/paradigm314/graphql-mesh/pull/1/files
It does not yet pull the custom field target from a custom option, I wanted to get maintainer feedback/input before continuing in this direction.

This issue should be fixed in the latest version of @graphql-mesh/openapi

@ardatan Thanks for looking at this.  I looked for the changes you made and I am assuming this MR is the change you reference https://github.com/Urigo/graphql-mesh/pull/3380/files.  If I am missing another change let me know.
That MR finished the operationIdFieldNames: boolean  configuration option.   Unfortunately this addition does not address my issue.  I am needing to configure the openAPI handler to use a custom OpenAPI field to for the operationId/naming instead of the operationId falling back to the operationId if that field is undefined.
I am happy to contribute the feature just want to ensure I implement a solution maintainers have approved
Couple of Solution Options:
Solution 1
Add a configuration option operationIdField: string that, when supplied, the openapi handler would look for the field specified in each of the paths defined in the spec and use it as the operationId falling back to the operationId if undefined.
Example
# This would tell the openapi handler to search for the field `my-custom-graphql-operation` when looking at the
# OAS operation and if the field was defined use it as the operationId
operationIdField: my-custom-graphql-operation

Solution 2
As an option to avoid adding a new configuration option we could make the operationIdFieldNames a boolean | array which would allow for these configurations:
Example
 # This does what you have now forces the use of the OAS operationId for naming
operationIdFieldNames: true

# This would tell the openapi handler to search for the specified fields, in order, when looking at the
# OAS operation and if any of the fields are defined use them as the operationId if not fall back to using the operationId field
operationIdFieldNames:
  - my-custom-graphql-operation
  - my-fallback-field

As I mentioned in my original issue I have an example of hard-coding a custom field in my fork that I have tested here:  https://github.com/paradigm314/graphql-mesh/pull/1/files


Cant decode token with this package but https://jwt.io/ does it

The error object says key bytes can only be specified for HMAC signatures. So, please specify a PublicKey or PrivateKey instance.

What is the algorithm you're trying to use?

RS256

Then it will not work, the lib doesn't work with RS algorithms yet...

Thanks for prompt reply. I will create a PR if I find a workaround.

You're welcome. One thing I wondered was to pass the relative URL to the .pem (I think), this URL being a string, relative to the root of the app, which will be resolved on the native side. What do you think?

Actually I want to use some existing java code without having to reimplement it in javascript for practice. I have not written java code before but few copy pasting of snippets might get the job done. If  I succeed I will create a PR.


Otiostat program: validate and print information about your .otio file.

This PR adds the bin/otiostat.py program, which prints various information about .otio files out and can be used to validate .otio files.

Removing the "[WIP]" tag for now.  We're going to check this in and gather features as time goes on (if people find it useful).


Support serializing Float32Array, Float64Array, BigInt64Array, BigUint64Array

Int and Uint variants of TypedArrays are supported (e.g. Uint8Array, Int32Array) but Float32Array, Float64Array, BigInt64Array and BigUint64Array are not at present.

I'm also not sure if Uint8ClampedArray is supported at present.


Add Tidelift as FUNDING option

@akrabat I noticed Slim on Tidelift wasn't linked in the FUNDING.yml file.

Coverage remained the same at 100.0% when pulling 1fc917c30acbb36b4db519966f981c207ad81ddf on phated:patch-1 into 430ac45997ce1fbd7ee20a354d26351f3fa985ae on slimphp:4.x.


Better errors when running burrito with the wrong zig version in your PATH

We currently don't do any checks for the Zig version that's in the build machine's path, which leads to confusing errors (see in #46 and in #2),
We should do a pre-build check (like how we test for prerequisites in the PATH) and compare it against the expected Zig version.
We don't have to block the build, but at least print a verbose warning stating that things might be broken.

We're basically in maintenance mode for the zig wrapper at this point while we migrate to Rust. Closing.


Formal code formatting and documentation improvements

Since I didn't find a code style for the project.
This PR applies The formal Rust code formatting via cargo fmt --all and improves the code documentation.
It also sorts some imports across the library as well as prefixes some unused parameters in the code.

BTW if you are interested to add CI testing for the project I could also help with it.


Fix build output filename collision warnings

The bin target client in package oda_639_ri v0.1.0 (/]oda-api-ri-rust/tmf639) has the same output filename as the bin target client in package oda_634_ri v0.1.0 (/oda-api-ri-rust/tmf634).
Colliding filename is: /oda-api-ri-rust/target/debug/client.dwp
The targets should have unique names.
Consider changing their names to be unique or compiling them separately.
This may become a hard error in the future; see <https://github.com/rust-lang/cargo/issues/6313>.

Resolved with issue #10 changes.


Need help with utoipa::IntoResponses macro and unresolved document reference

Hi! I'm really excited about your project, I've been looking for something like this for a while. Thank you for your work!
I'm hitting the following error in the Swagger UI while trying to use an error IntoResponses-derived enum:

Resolver error at paths./v1/{domain}/{name}.get.responses.500.content.application/json.schema.$ref
Could not resolve reference: Could not resolve pointer: /components/schemas/anyhow.Error does not exist in document

Enum
#[derive(thiserror::Error, Debug, utoipa::IntoResponses)]
pub enum AppError {
    /// 400 type errors, the user did something wrong, pass the error on to the user
    #[error("{0}")]
    #[response(status = BAD_REQUEST)]
    ValidationError(String),

    /// 403 type errors, the requested resource isn't allowed to be distributed
    #[error("unauthorized request")]
    #[response(status = FORBIDDEN)]
    Forbidden,

    /// 404 type errors, an underlying resource doesn't exist
    #[error("{0}")]
    #[response(status = NOT_FOUND)]
    NotFound(String),

    /// 500 type errors, all other errors  are internal and should return an opaque 500 to the user
    #[error(transparent)]
    #[response(status = INTERNAL_SERVER_ERROR)]
    UnexpectedError(#[from] anyhow::Error),
}

Utoipa::path attribute macro definition:
#[utoipa::path(
    get,
    path = "/v1/{domain}/{name}",
    params(selector::PathSelector),
    responses(
        (status = OK, response = datamodel::Object),
        AppError, // Use the AppError Enum for Error response variants
    ),
)]
pub async fn.....

I've been searching through other issues and digging through the docs, but I just can't figure this out. There are similar issues, but they all seem to be for the ToSchema derive.
Can you help me understand how I can resolve an anyhow::Error in the Schema document?
Thank you!!!

Hey,
From the docs https://docs.rs/utoipa/latest/utoipa/derive.IntoResponses.html:

Unnamed field struct decorated with IntoResponses will by default create a response with referenced schema if field is object or schema if type is primitive type. #[to_schema] attribute at field of unnamed struct can be used to inline the schema if type of the field implements ToSchema trait. Alternatively #[to_response] and #[ref_response] can be used at field to either reference a reusable response or inline a reusable response. In both cases the field type is expected to implement ToResponse trait.

The error occurs because the anyhow::Error is an external type and it does not have ToSchema implementation that is not registered to the #[openapi(components(schemas(...)))].
To fix this we need to somehow implement ToSchema for the anyhow::Error and register it as a schema component. In this case the existing issues concerning the ToSchema will actually help to solve this as well.
Since we cannot directly implement the ToSchema for anyhow::Error we need to do it manually similarly to the serde's with attribute, but in utoipa there is as attribute.
#[derive(ToSchema)]
#[schema(as = anyhow::Error)]
struct Error {
  // ... implement fields that should exists in the anyhow::Error
}

// or alternatively if you want it to be represented as any type you can do following
#[derive(ToSchema)]
#[schema(as = anyhow::Error, value_type = Value)]
struct Error(anywho::Error)

#[derive(OpenApi)]
#[openapi(components(schemas(Error)))]
struct Doc;

Now you don't need to use the Error as an argument to the UnexpectedError(#[from] anyhow::Error), because of the as attribute. Also instead of Value there is also Object virtual type that renders as typeless schema object. However if you want to inline the schema of anyhow::Error instead of the default $ref then you need to actually use the custom Error as an argument to the enum variant in question.
Another way is to manually edit the generated schema and use for example PartialSchema to create the schema for anyhow::Error and register it to the openapi.
fn foo() {
  let mut my_doc = Doc::openapi();
  let mut components = my_doc.components.get_or_insert(Components::default());
  let schema = String::schema(); // .. anyhow error is just a string

  components.schemas.insert("anyhow::Error", schema);
}

Thanks for the detailed response. I'm still struggling to get this to work, but you've given some helpful advice.

Anytime, :slightly_smiling_face:


Allow Username and Group impersonating.

Most tools allow username and group impersonating like kubectl does.
      --as string                      Username to impersonate for the operation
      --as-group stringArray           Group to impersonate for the operation

Would be cool.

Hey @zbindenren, thanks for the idea, I'm not quite sure I understand the use case though. I'm used  to use --as or --as-group for commands like kubectl auth can-i, but it's less clear to me how this would help with kube-capacity. This tool is primarily for showing resource requests, limits, and utilization, things that are generally accessible for most users accessing a cluster. If they can't access them, they likely also wouldn't be able to impersonate someone with the --as flag. Do you have workflows that regularly require impersonation?

At our company we use the following concept to protect admins from mistakes: https://github.com/postfinance/kubectl-sudo/blob/master/README.md
So an admin has only access to all resources with impersonation. That is why it would be nice for us to have that option. Some tools have already included those options:

https://github.com/derailed/k9s
https://github.com/derailed/popeye

@zbindenren Thanks for describing the use case. I agree that this could be useful. I don't have a lot of extra cycles these days but very open to contributions on this front.


ORSP: Implement mock-ups for Data Use Letter Link

Addresses
https://broadinstitute.atlassian.net/browse/BTRX-741
Changes
Update Consent Group -> Documents tab. Including Sample Collection date range and repository deposition question. Populate DUL form with the information just added in documents tab
Testing
Go to:

Consent Group -> Documents tab. Fill in  Data Use Limitation Record Request information and get shareable link.
Go to the link. Information that you added in Data Use LImitation Record must be populated

[ ] Submitter: Verify all tests go green, including CI tests
[ ] Submitter: Get a thumb from Belatrix
[ ] Submitter: Get a thumb from @rushtong
[ ] Submitter: Merge to develop using github's "Squash and Merge" feature
[ ] Submitter: Delete branch after merge

@rushtong Can you ckeck it please? Thanks!


Move deploy to Travis from Jenkins

Jenkins is no more. RIP.
Migration instructions are here:
https://github.com/protocol/infra/issues/434
This affects #287, #207, #152, #167...

PR #294 moves the deploy to CircleCI.


how to use the groovy-language-server in monaco editor

I need to integrate the groovy-language-server to monaco editor.
For groovy, is there groovy language service extracted from VSCode to be reused in Monaco Editor? e.g., vscode-css-languageservice and vscode-json-languageservice.

The Groovy language server is written in Java. I suspect that this will make it difficult to integrate with Monaco, unless you are using Electron or something else that allows you to start a Java process.


docker support

@faddat can you look at this, i created a docker file, all ports works except port 3000 for lotion, i am not able to access that. I have updated the readme, you can check the docker readme part

completed


FIT field name should not be translated

The 1st parameter of createField is name, however that should not be translated IMHO. I imported my Garmin data to runalyze.com and there I can see the data recorded by walker, and when I did a test and my watch was set to Hebrew it added fields like:
מספר_צעדים_הממוצע_לשעה
and
צעדים
which are "Steps / Hour" and "Steps" respectively.
However it makes no sense to have these translated. This is pure data, not really displayed to the user, and in fact I would argue that it actually is worse to translate it than to have it in English. I think you should only use the translations in fit-contributions.xml. (BTW this will even free a few bytes of code) which then is used in GCM, web to translate the labels.
The same is true for the units.
BTW I would even remove the ", :units => stepsUnits" part (I did that in my app, because when you don't set it then in GCM and web you'll see the proper translation set in fit-contributions.xml, the con is that then you don't see it in places like runalyze.com)

Right, so a couple of things on this.
On the first parameter to createField() this value definitely does get displayed to the user, in the Garmin Connect App (see screenshot below). You're right that it is technically pure data (a theoretically internal field name), but Garmin provides no way of defining a display label for the field name in the Garmin Connect app and plonks this internal field name on screen in the app.
So whilst I concede that it would be more useful to have a consistent field name that is unaffected by device language if you happen to be uploading your FIT data to a third party website that can make use of third party FIT contributions, I'd argue that changing this to a something like stepsPerHour regardless of language would make the presentation uglier and less readable in the Garmin Connect App, especially for non-English speakers. So it comes down to a judgement - how many users of a casual walking app are uploading their FIT data to third party apps, vs how many people are only ever looking at the data in the Garmin Connect app. I suspect (though I have no data to back this up) that it is overwhelmingly more common that people look at the data in Garmin Connect and nowhere else, and for that reason I'm inclined to keep it as it is.
With regards to the units, I'm not sure I've fully grasped your point, but the documentation does state for this value specifically that This should use the current device language. Surely if I removed it, I just wouldn't see the word "steps" (or the relevant translation) in the Garmin Connect app?

all the strings in the red circle and "steps" (unit) are displayed in GCM according to the strings in the fitcontribution.xm and they are translated according to the language of the android where GCM runs. So for this you shouldn't worry. When you export it to a 3rd party app then you'll see the string that you set in the code, and then you can argue what makes more sense.
The 1st parameter in createField is not displayed anywhere in Garmin, that too you'll only see when you export it to 3rd party. I started with full names like "avg_lap_heart_rate", but since I had 7 fields it was lot of bytes in the code, so I changed them to much shorter acronyms. Though I admit if it's exported then it helps if it's a bit more readable. Maybe it's worth to test how many bytes the code for WatchUi.loadResource(Rez.Strings.foo) + the reference in the Strings table adds to the memory footprint and decide accordingly if it's worth to use the loadResource (with or without actually translating the string or just use it for shortening the memory footprint and keep it in the default language only) or just hard-code some english field name like avg_lap_heart_rate.


The Ventura Core Foundation Merge

This PR brings the FOSS portions of Core Foundation on par with with macOS Ventura, iOS 16, watchOS 9 and tvOS 16. This includes the changes shipped during the previous releases.
Most of the changes include bug fixes and performance improvements, but some are useful to highlight:

Updated Unicode definitions of CFString and NSString-based methods, including a new method of generating and storing this information by producing headers rather than bundling binary blobs.
Updated CFURLComponents to support Internationalized Domain Names (IDNs) via Punycode encoding.
Updates to calendrical calculation correctness.
Improved performance in several spots throughout the framework.

Some development notes:

CF_CROSS_PLATFORM_EXPORT has been renamed to CF_EXPORT_NONOBJC_ONLY to make its use clearer.
Development has continued using primarily os_*_lock_* functions rather than CFLock or CFMutex. To avoid the codebase diverging too far and make future merges easier, this patch uses os_unfair_lock and similar facilities where they were previously replaced by CFLock. These types shim to CFLock implementations outside of Darwin.

@swift-ci please test

cc @parkera

cc @compnerd - Similar to previous merges, can we kick off a Windows build to see if there's anything breaks?

@iCharlesHu I thought this was the source compiled at Apple for macOS?


Improve markdown linting and spelling

Improve markdown linting and fix a few typos. :-)

Looks great. Thanks for your contribution!


Laboratory work #7, Maxim Tatarinov - 20FPL2

It's time to write the loading of your dataset.

And again: it's time to write the loading of your dataset.

And again: it's time to write the loading of your dataset.

It's time to start doing your first lab.


UI-Support-Videos

[x] created /video/<vid_name> to serve videos from server.
[x] supported video rendering through nanogallery2 .
[x] made appropriate changes in default.conf.
[x] render thumbnail image for video properly.
[ ] auto generate thumbnails for uploaded videos? @sam17 @nuwandavek ?

@TheCodeYoda Can you add screenshots for easier reviewal too?


Refactor repository reading for recursive directory searching

Description
This PR does some refactoring of the repository class to better handle recursive directories and make its role more flexible. There are still some updates needed to add searching a local recursive repository (mostly regarding locating specific integrations), but that will be enabled when catalog metadata is added.
Issues Resolved
Resolves #1236
Check List

[X] New functionality includes testing.

[X] All tests pass, including unit test, integration test and doctest

[ ] New functionality has been documented.

[ ] New functionality has javadoc added
[ ] New functionality has user manual doc added

[X] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Does this need backport to 2.x?

Does this need backport to 2.x?

Yes, but I think we're planning on changing the branching strategy to avoid needing as many backports for our next releases. I'll hold off on backporting until after that discussion has developed further.


Update testcontainers-scala-postgresql to 0.41.4

About this PR
📦 Updates com.dimafeng:testcontainers-scala-postgresql from 0.40.17 to 0.41.4
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.dimafeng", artifactId = "testcontainers-scala-postgresql" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "com.dimafeng", artifactId = "testcontainers-scala-postgresql" }
}]

labels: test-library-update, early-semver-major, semver-spec-minor, commit-count:1

Superseded by #639.


document catch-all redirect hack

Documents the -P http://localhost:8080? proxy hack from https://github.com/indexzero/http-server/issues/338#issuecomment-338601211 in the Readme
Fixes #338, closes #331, closes #194, closes #80

@BigBlueHat @houston3 what do you think about the wording here?

Looks good to me.

This does not work with ssl certificates, though
/node_modules/http-server/node_modules/http-proxy/lib/http-proxy/index.js:120
    throw err;
    ^

Error: unable to verify the first certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1055:34)
    at TLSSocket.emit (events.js:198:13)
    at TLSSocket._finishInit (_tls_wrap.js:633:8)
error Command failed with exit code 1.

Encountering the same issue as @grundmanise , no SSL support for fallback routing.  Did you find an alternative package to meet these requirements @grundmanise ?  Thanks!

This command worked for me..yes, with sudo 🤷♂
$ sudo npx http-server ./build -p 433 -a whatever.com -S -C ./ssl/_wildcard.pem -K ./ssl/_wildcard.key.pem -c-1

Prior to running it you should also add <IP_ADDRESS> whatever.com to your hosts file /private/etc/hosts and generate those ssl certificates. I don't remember which lib I've used to generate certificates, but you can try pem.
I also had to delete and rewrite webpack certificates on every run (?) if I'm not mistaken. But maybe that's due to CRA:
$ rm -f ./node_modules/webpack-dev-server/ssl/server.pem && cat ./ssl/server.pem > ./node_modules/webpack-dev-server/ssl/server.pem

otherwise it didn't work for me. server.pem is a file that has both key and certificate in it (i.e. _wildcard.pem + _wildcard.key.pem).
I could be doing it wrong, so if any one knows an easier solution pls comment.


F8 hotkey seems to be hardcoded

Godot version
3.5 stable
System information
Windows 7 x64 SP1
Issue description
So, Godot allows you to rebind your keys. Everything i rebinded works as expected except "F8" or "Stop execution" command. i rebinded this action to F12 key and when i run the game and want to terminate it by pressing F12 - nothing happens. But F8 for some reason still terminates my game.
Steps to reproduce
Assign F12 to "Stop" command.
Run the game and press F12
Nothing will happen. But F8 still executes this command
Minimal reproduction project
No response

Duplicate of https://github.com/godotengine/godot/issues/23929.


Memory: Swap probe_read to kernel or user version

We should always use the probe_read_kernel or probe_read_user helpers over the probe_read helper (ditto for _str versions).
This commit changes all probe_read to either probe_read_kernel or probe_read_user (ditto for _str versions).

In general this seems the right direction. Does BTF report if its a user ptr or not? The kernel annotates these so we could learn it from the BTF type I think. Might need some BTF extensions to do I'm not sure off-hand.


webCookie problem

My Code:
function reWebLogOn(steam, callback) {
    steam.webLogOn(function(newCookie){
        helper.msg('webLogOn ok');
        cookies = newCookie;
        offers.setup({
            sessionID: currentSessionId,
            webCookie: newCookie
        }, function(){
            if (typeof callback == "function") {
                callback();
            }
        });

var SteamCommunity = require('steamcommunity');
var community = new SteamCommunity();
var SteamTotp = require('steam-totp');
require('./node_modules/steamcommunity/components/confirmations.js');
var SteamCommunity = require('steamcommunity');
var SteamTotp = require('steam-totp');
var code = SteamTotp.generateAuthCode('');
console.log(code);
var client = new SteamCommunity();
client.login({
    "accountName": "",
    "password": "",
    "twoFactorCode": code
}, function(err, sessionId, cookies, steamguard) {
var hash = require('crypto').createHash('sha1');
hash.update(Math.random().toString());
hash = hash.digest('hex');
device_id = 'android:' + hash;
console.log(this.device_id);
var SteamcommunityMobileConfirmations = require('steamcommunity-mobile-confirmations');
var steamcommunityMobileConfirmations = new SteamcommunityMobileConfirmations(
{
    steamid:         "...",
    identity_secret: "=",
    device_id:       this.device_id,
    webCookie:       newCookie
});

steamcommunityMobileConfirmations.FetchConfirmations((function (err, confirmations)
{
    if (err)
    {
        console.log(err);
        return;
    }
    console.log('steamcommunityMobileConfirmations.FetchConfirmations received ' + confirmations.length + ' confirmations');
    if ( ! confirmations.length)
    {
        return;
    }
    steamcommunityMobileConfirmations.AcceptConfirmation(confirmations[0], (function (err, result)
    {
        if (err)
        {
            console.log(err);
            return;
        }
        console.log('steamcommunityMobileConfirmations.AcceptConfirmation result: ' + result);
    }).bind(this));
}).bind(this));

})

    });
}

The problem is that the only way the boat can start. And he confirms only one trade at startup. How can this problem be solved? If this code use return in a different place, then gives an error "Can not read property 'forEach' of undefined"
Or how to get webCookies?

Same problem, only 1 offer at startup, next offers... m... looks like confirmed by mobile, but not proccessed by steam

Same problem! Only 1 offer at startup.

The sample code you're using is only meant to confirm one trade when it is ran. It needs to be modified to iterate the confirmations array.


Make buildable package

Currently, it's really hard to build this project from ground up. Things that have to be done:

Refactor project so as to make it build comparatively easily.
Add changed files to version control (VrGUI part, changes marked with [CHANGED])

More unstaged changes:

added up-to-date libs from https://github.com/nothings/stb because buggy (probably should use a more sophisticated lib)
had to change VrAppFramework\Projects\AndroidPrebuilt\jni\Android.mk to not use the prebuilt libs (2.02)


Update sbt-scalajs to 1.1.1

Updates org.scala-js:sbt-scalajs from 1.0.1 to 1.1.1.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scala-js", artifactId = "sbt-scalajs" } ]

labels: sbt-plugin-update, semver-minor

Codecov Report

Merging #60 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #60   +/-   ##
=======================================
  Coverage   79.24%   79.24%
=======================================
  Files           6        6
  Lines         106      106
=======================================
  Hits           84       84
  Misses         22       22

Continue to review full report at Codecov.

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


Count session bans only once

If 25 requests are made with a single session (X-Crawlera-Session) and Crawlera receives a 503 for one of them, it will reply to the client with 503 for all of them (and all subsequent requests on that session).  The middleware will count 25 bans and this will cause the job to immediately die in the cloud.
Since there is a high delay between single session requests, it's unlikely that any of the other 25 requests had been sent (they were probably just queued) so the 503s received for those do not indicate actual bans.
The middleware should count this event as 1 ban and not kill the job.
This is an example fix, there may be a better way to do this.

Current coverage is 91.85% (diff: 93.75%)

Merging #30 into master will decrease coverage by 0.33%

@@             master        #30   diff @@
==========================================
  Files             2          2
  Lines           128        135     +7
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits            118        124     +6
- Misses           10         11     +1
  Partials          0          0

Powered by Codecov. Last update d3b5175...a3ecacc

hi @andrewbaxter thanks for the contribution.
The middleware isn't counting all the requests sent as bans if only 1 response comes with a bad status.
It counts the number of bans per response, not per request.
Maybe I am not understanding correctly your point, could you please delve more into your idea?

Here is a spider that illustrates the issue:
import scrapy
from scrapy.http import Request

class MyspiderSpider(scrapy.Spider):
    name = 'myspider'

    def start_requests(self):
        yield Request(
            'http://httpbin.org/status/200',
            headers={
                'X-Crawlera-Session': 'create',
            },
        )

    def parse(self, response):
        yield Request(
            'http://httpbin.org/status/503',
            headers={
                'X-Crawlera-Session': response.headers['X-Crawlera-Session'],
            },
            dont_filter=True,
            callback=self.parse2,
            priority=10,
        )

        for x in range(20):
            yield Request(
                'http://httpbin.org/status/200',
                headers={
                    'X-Crawlera-Session':
                        response.headers['X-Crawlera-Session'],
                },
                dont_filter=True,
                callback=self.parse2,
            )

    def parse2(self, response):
        pass

I ran it with CRAWLERA_MAXBANS at 5, CONCURRENT_REQUESTS* at 100.  The job exited with these stats:
downloader/response_status_count/200 	7
downloader/response_status_count/503 	16

Notice the spider only makes one request that returns a 503.  If sessions are not used the job completes with 1 503 and 22 200s.
The 200s are off by one because of robots.txt.

could you share your logs too please? The spider should have done 16 requests with 503 statuses.
Now, I see that your codes "says" it will only do 1 "bad" request, but you'll also have to take into account scrapy retries, crawlera retries, and the session proxy being banned after hitting a banned site. So this isn't controllable by Scrapy, but how Crawlera works.
Now, Scrapy retries can be configured with [RETRY_TIMES] (https://doc.scrapy.org/en/latest/topics/downloader-middleware.html#std:setting-RETRY_TIMES) and Crawlera retries with the X-Crawlera-Max-Retries header.
I think the counter is correct, it is taken into account so the spider can finish because it is doing bad requests to a domain, which not only affects your spider and the data it gets, but also the site because of unnecessary bad requests.

First of all, thank you for taking the time to look into this.
Here's a link to a job I ran in the cloud:  https://app.scrapinghub.com/p/68918/2/35
I disabled the retry middleware.  Retries made within Crawlera itself should not matter since the response is not sent to the client until it gives up.

Maybe this will help illustrate - requests made in parse:
|------------+---------------+---------------+---------|
|  request   | from Crawlera | from upstream | counter |
|------------+---------------+---------------+---------|
| status/200 |      200      |      200      |    0    |
|------------+---------------+---------------+---------|
| status/200 |      200      |      200      |    0    |
|------------+---------------+---------------+---------|
| status/200 |      200      |      200      |    0    |
|------------+---------------+---------------+---------|
| status/200 |      200      |      200      |    0    |
|------------+---------------+---------------+---------|
| status/200 |      200      |      200      |    0    |
|------------+---------------+---------------+---------|
| status/200 |      200      |      200      |    0    |
|------------+---------------+---------------+---------|
| status/503 |      503      |      503      |    1    |
|------------+---------------+---------------+---------|
| status/200 |      503      |       -       |    2    |
|------------+---------------+---------------+---------|
| status/200 |      503      |       -       |    3    |
|------------+---------------+---------------+---------|
| status/200 |      503      |       -       |    4    |
|------------+---------------+---------------+---------|
| status/200 |      503      |       -       |    5    |
|------------+---------------+---------------+---------|

There has only been one ban (to status/503) - upstream has only sent a 503 once.  Crawlera replies to subsequent status/200 requests on the session with 503s because the session is effectively unusable.  These 503s do not indicate additional bans, however the middleware counts each 503 as a ban and prematurely closes the spider.

I am afraid "not counting" the bans isn't a good way to approach this problem.
We need to remember that crawlera is a different service than scrapy. Crawlera effectively returns bad statuses (503 in this case) when it is being hit by a lot of requests knowing that it was already banned.
The best approach here would be to slow down the requests scrapy is doing to the service, and this is totally configurable for the user (building a spider to handle such cases).
It would be very good for example if crawlera could return a header with the information on when to hit it again, specifically when using crawlera sessions, but sadly, that isn't the case yet.

@scrapy-plugins/core any comments here?

@andrewbaxter do you still think we need this functionality? For me your example spider is working  without returning bans.


Release 5.5.1

Expected behavior
The current release of JMeter includes an active vulnerability CVE-2022-42889.
This has been resolved in commits that are targeted for 5.5.1.
Can we request this be released.
Actual behavior
Current release is 5.5 which is over 6 months old.
Steps to reproduce the problem
Not applicable.
JMeter Version
5.5
Java Version
No response
OS Version
No response

any news regarding this issue?

related ticket: https://github.com/apache/jmeter/issues/5718

We wait on Xalan 2.7.3 to be available on Central.
They published the jars to https://xalan.apache.org/xalan-j/downloads.html#latest-release, however, they have not yet published the jars to Central.
Hopefully, xalan team would be able to release it soon: https://lists.apache.org/thread/2m8c0kb94gxbxwvnjq498bll11fph79z.

Xalan 2.7.3 was published on Central May 4th. Any news on JMeter 5.5.1?

We probably release directly Apache JMeter 5.6 with fxalan 2.7.3 in a couple of days/weeks

We probably release directly Apache JMeter 5.6 with fxalan 2.7.3 in a couple of days/weeks

this is a critical security issue. is it possible you can release 5.5.1? need this patched ASAP.

Hi, there's a workaround: you could replace the jar.
We will release JMeter 5.6 soon: https://github.com/apache/jmeter/milestone/10
It would help if you could test a recent nightly build: https://jmeter.apache.org/nightly.html
If you find your issue/PR missing in 5.6 milestone, don't hesitate to ask.
If somebody could volunteer testing or reviewing the change, it would help as well.

Recently we configured Renovate bot for automatic dependency suggetions, so JMeter would release with more up-to-date versions rather than previously when version updates were fully manual.

Note: JMeter is not affected by the commons-text CVE (JMeter does not use the impacted class, see https://github.com/apache/jmeter/commit/fb557d548d829812591d041fe8218f87d857e0c5 ), so I do not think there's urgency for releasing 5.5.1 for the sake of fixing commons-text

@vlsi  .. Many of us are in corporate environments which have automated security enforcement systems.
And they aren't sophisticated enough to know that you're not using the affected classes. Only that you're using the JAR at all.
Which means we are constantly having to lodge risk reports justifying why JMeter shouldn't be banned.

agreed with @nadenf

Tenable is very convenient that you are.
On Thu, May 18, 2023, 4:57 PM markti @.***> wrote:

Note: JMeter is not affected by the commons-text CVE (JMeter does not use
the impacted class, see fb557d5
https://github.com/apache/jmeter/commit/fb557d548d829812591d041fe8218f87d857e0c5
), so I do not think there's urgency for releasing 5.5.1 for the sake of
fixing commons-text
ok. how do I prove this to my compliance team? ....asking for a friend....
—
Reply to this email directly, view it on GitHub
https://github.com/apache/jmeter/issues/5766#issuecomment-1553634221,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACNMKYAIYTX5OEDRD2FCOMLXG2ELVANCNFSM6AAAAAAUF3LGDY
.
You are receiving this because you commented.Message ID:
@.***>


Fix setJavaOwner return type

GearVRf-DCO-1.0-Signed-off-by: Mihail Marinov<EMAIL_ADDRESS>

Since this is a trivial change I am planning to merge it lunch-time.


[c2cpg] Handle preprocessed files

cpp/gcc/g++ offer the -E switch. This switch forces the compiler to stop after the preprocessing phase and spit out the result where all preprocessor directives are expanded or processed, all macros expanded, and all header files included. Typically, this result is stored as *.i file.
With this PR we process such files and exclude all the others with the exact same name.
Fixes: https://github.com/joernio/joern/issues/4462

Do not merge yet - will put that behind a command line flag.


When using a custom logger, next logs aren't being logged using my logger (winston)

It seems the console logs look like they did before I made the change.  Do you have advice on how to make this work?
    "next": "^14.0.4",
    "next-logger": "^3.0.2",
    "winston": "^3.10.0"

     node:  20.10.0

I did the following:

Added next-logger.config.js to the root of the project, see below
Stopped the server
Started the app again
Logging looked the same

// next-logger.config.js

const { createLogger, format, transports } = require('winston');

// eslint-disable-next-line no-underscore-dangle
const _logger = createLogger({
  level: 'debug',
  defaultMeta: { type: 'nextjs' },
  transports: [
    new transports.Console({
      handleExceptions: true,
      format: format.combine(format.colorize(), format.simple()),
    }),
  ],
});

const logger = () => ({
  error: _logger.error,
  warn: _logger.warn,
  trace: _logger.trace,
  info: _logger.info,
});

module.exports = {
  logger,
};

Actual Log output:
[0] Warning: data for page "/degrees" is 284 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
[0] See more info here: https://nextjs.org/docs/messages/large-page-data
[0]  GET /degrees 200 in 2021ms
[0]  GET /_next/static/webpack/78ea0d5b1a7e3004.webpack.hot-update.json 404 in 406ms
[0] Warning: data for page "/" is 280 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
[0] See more info here: https://nextjs.org/docs/messages/large-page-data

It looks like you're using next@14, which we're currently trying to add support for (#22).
Please can you try using the latest beta version of next-logger, and let me know if it works for you?
npm i<EMAIL_ADDRESS>

Using the beta version I get this error
 % yarn start
yarn run v1.22.19
$ NODE_OPTIONS='-r next-logger' NODE_ENV=production yarn server
error: uncaughtException: logger.child is not a function
TypeError: logger.child is not a function
    at getPinoMethod (..../node_modules/next-logger/lib/patches/next.js:6:30)

The exported logger is expected to have a .child method - which both pino and winston do. In your config, you're exporting a plain object with method properties - rather than a winston instance.
If you export the winston instance itself, it should work.
// next-logger.config.js

const { createLogger, format, transports } = require('winston');

const logger = createLogger({
  level: 'debug',
  defaultMeta: { type: 'nextjs' },
  transports: [
    new transports.Console({
      handleExceptions: true,
      format: format.combine(format.colorize(), format.simple()),
    }),
  ],
});

module.exports = {
  logger,
};

After fixing the config, this works. Thank you
I suggest adding this to the docs, along with perhaps some examples for other popular loggers

Glad it works. I'll try to get it released today, along with a README update as suggested.

Version 4.0.0 has been published, bringing Next 14 support!


WSLENV is broken from one direction but not the other

Version
Microsoft Windows [Version 10.0.19042.1466]
WSL Version
WSL 2
Kernel Version
Linux version <IP_ADDRESS>-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) <IP_ADDRESS>00220)
Distro Version
Distributor ID: Ubuntu
Description: Ubuntu Jammy Jellyfish (development branch)
Release: 22.04
Codename: jammy
Other Software
No response
Repro Steps

Install and set up WSL2
Run C:\Windows\System32\wsl.exe and execute the following commands

export FORWSL=/mnt/c/Users/
export WSLENV=FORWSL/p
cmd.exe
set FORWSL

     and FORWSL=C:\Users\ is returned which means it works
3. Run C:\Windows\System32\cmd.exe and execute the following commands
set FORWSL=C:\Users\
set WSLENV=FORWSL/p
wsl.exe
echo $FORWSL

     but $FORWSL is empty and echo $WSLENV also returns nothing
The behavior is the same regardless of whether cmd.exe was run with or without administrator rights.
The above was based on the instructions at https://devblogs.microsoft.com/commandline/share-environment-vars-between-wsl-and-windows/ so either WSLENV is broken in one direction or the documentation is wrong.
Expected Behavior
set FORWSL=C:\Users\
set WSLENV=FORWSL/p
wsl
echo $FORWSL

     should return /mnt/c/Users/
Actual Behavior
set FORWSL=C:\Users\
set WSLENV=FORWSL/p
wsl
echo $FORWSL

     returns nothing
Diagnostic Logs
No response

Looks like this is working on 22000 and version 0.58.0 of store WSL.

It seems to work on a slightly updated Windows 10, also:
Microsoft Windows [Version 10.0.19044.1645]
(c) Microsoft Corporation. All rights reserved.

C:\Users\tux>set WSLENV
WSLENV=WT_SESSION::WT_PROFILE_ID

C:\Users\tux>set FORWSL=C:\Users\

C:\Users\tux>set FORWSL
FORWSL=C:\Users\

C:\Users\tux>set WSLENV=%WSLENV%:FORWSL/p

C:\Users\tux>set WSLENV
WSLENV=WT_SESSION::WT_PROFILE_ID:FORWSL/p

C:\Users\tux>wsl
tux@RIPPER:/c/Users/tux$ echo $FORWSL
/c/Users/
tux@RIPPER:/c/Users/tux$

WSL info:
C:\Users\tux>wsl --status
Default Distribution: Ubuntu
Default Version: 2

Windows Subsystem for Linux was last updated on 3/26/2022
WSL automatic updates are on.

Kernel version: <IP_ADDRESS>

I am still having this issue:
wsl --version
WSL version: <IP_ADDRESS>
Kernel version: <IP_ADDRESS>
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.3086


feat(protocol): Batch Encoding

Description
Implements encoding for batch types.
Steps in the direction to batch submission.

📚 $\text{Stack Overview}$
Pulls submitted in this stack:

#259 👈
main

This comment was automatically generated by st.


How do I see complete package description instead of "..."

I have searched the command line reference and FAQ and not found any way to have the vcpkg search [pkg] command to list the FULL text of the package description.  Many are quite short, but many others end with '...' after about 63 columns, regardless of how wide my terminal may be (using Windows Terminal v 1.4.3243.0)
If this option exists, what is it?
If not, please consider adding it, because it can be very helpful to read the full description of a package before installing it.

I think we should add a detail option to vcpkg.

I think we should add a detail option to vcpkg.

And you can see the description in VCPKG_ROOT/port/PORT_NAME/CONTROL or VCPKG_ROOT/port/PORT_NAME/vcpkg.json.

And you can see the description in VCPKG_ROOT/port/PORT_NAME/CONTROL or VCPKG_ROOT/port/PORT_NAME/vcpkg.json.

To clarify for those of us who only rarely use vcpkg, both of the places referenced where one may "see the description" are (or are not) available WITHOUT installing the package?
I am interested in this because my nearly 40 years of experience with all sorts of software packages (on both Windows and Linux) has shown that few completely and cleanly remove themselves after having been installed.  That's why I really want to read the full description of a package before I install it.

To clarify for those of us who only rarely use vcpkg, both of the places referenced where one may "see the description" are (or are not) available WITHOUT installing the package?
I am interested in this because my nearly 40 years of experience with all sorts of software packages (on both Windows and Linux) has shown that few completely and cleanly remove themselves after having been installed.  That's why I really want to read the full description of a package before I install it.


Remove .devcontainer

Can we keep this please? We can migrate it to node one.

@Yaikava Good idea!


"Tests" menu in the sidebar is non-functional when sidebar is minimized

Describe the bug
When we minimize the sidebar, all other menus like "Dashboard", "Monitoring", "Quick Input" and "Config" are functional except "Tests".
To Reproduce
Steps to reproduce the behavior:
1. Minimize the sidebar by clicking on the hamburger.
2. Click on the "Tests" icon.
3. You can see, nothing happens when we click on the "Tests" icon.
Expected behaviour
Tests menu options should appear.
Screenshots

Desktop (please complete the following information):

OS: Windows 10

can i work on this issue?

I created this issue and I want to work on this, please assign this issue to me?


Fix for React strict mode double initialization errors

React strict mode creates everything two times and destroys one instance again to check for potential leaks in dev move.
This behaviour causes swiper to potentially handle an already destroyed instance.

Merged, thanks!


load runs before beforeNavigate finishes

Describe the problem
I'm not sure if this is a bug or feature request. But since I think the way these two functions are implemented I assume it is more of a feature request.
The way we use beforeNavigate and load is that we save our data to our back end when beforeNavigate runs. And then (usually) load the data from the back end in load. Sometime we want to load data that depends on what was saved in beforeNavigate.
 And then beforeNavigate runs and save our data. But the issue then becomes that load runs before beforeNavigate is "complete" (i.e. the fetch request is resolved in beforeNavigate). So we get the old data in load instead of the fresh and saved date in beforeNavigate.
Describe the proposed solution
What we would like is to somehow. Either in load or beforeNavigate say that we want to wait to load our data until the request is resolved in beforeNavigate.
Alternatives considered
We have came up with a solution that we think might work.
Basically have a store that is sort of like a dependency tree. So lets say that we make our PUT request in beforeNavigate. Then we say to all fetches that gets the data that the data is now "invalid". When the PUT request resolves we say that there is "fresh" data to get and we fetch.
With this solution we would have to move all of our GET requests that depend on some data in onMount or even afterUpdate. So we can listen on the dependency tree store if the GET request could be done (the PUT request has resolved). And that would be quite a lot of extra work. Putting skeletons and stuff when the data can't be fetched
Importance
would make my life easier
Additional Information
I have made this repo where I fetch in both beforeNavigate and load where we can see that the load fetch runs before the beforeNavigate fetch finishes:
https://github.com/Addeuz/load-issues
Picture from network tab:

This is expected behaviour — beforeNavigate is synchronous by design, as it's important to eliminate opportunities for navigation to be delayed. It also needs to be synchronous for cancel to work when unloading a page.
You could get the desired behaviour like so...
beforeNavigate(async ({ to, cancel }) => {
  if (has_unsaved_changes) {
    cancel();
    await save();
    goto(to.href);
  }
});

...though it would be a little unconventional, and users might be unclear on what's happening — I'd generally recommend having an explicit save button, perhaps with background auto-save.

Thanks for the answer Rich, we figured that it was working as intended.
We do have some auto saving in different routes. And the reason for saving in beforeNavigate is mainly done to make sure that we save the latest state.
We have thought about adding save buttons but our client doesn't want them.. But it certainly would make a developers life easier.
We think we can make your suggestion work, basically almost have like a dependency tree. So we only cancel the request if we are going to a route that depends on the data we are saving.. And hopefully it won't feel super intrusive..

I'm making an "are you sure you want to abandon" changes confirmation, using the above approach, but the problem is the goto triggers another beforeNavigate so the confirmation keeps appearing. Anyone have any clever ideas of how to include some "force" boolean?
beforeNavigate(async ({ to, from, cancel }) => {
  if (to.routeId != 'foo' && from.routeId == 'foo' && dirty) {
    cancel();
    let ok = await confirmationService('Are you sure you want to abandon these changes?');
    if (ok) {
      go(to.href):
    }
  }
});

Well I guess this works:
let left = false;
beforeNavigate(async ({ to, from, cancel }) => {
  if (to.routeId != 'foo' && from.routeId == 'foo' && dirty && !left) {
    cancel();
    let ok = await confirmationService('Are you sure you want to abandon these changes?');
    if (ok) {
      left = true;
      goto(to.url):
    }
  }
});

Well I guess this works:
let left = false;
beforeNavigate(async ({ to, from, cancel }) => {
  if (to.routeId != 'foo' && from.routeId == 'foo' && dirty && !left) {
    cancel();
    let ok = await confirmationService('Are you sure you want to abandon these changes?');
    if (ok) {
      left = true;
      goto(to.url):
    }
  }
});

Imo, this begs the question as to why onNavigate doesn't also pass a cancel option since, unlike beforeNavigate, it will hold for promises.
The following (if possible) would be a much cleaner implementation with less workaround.
onNavigate(async ({cancel}) => {
    if (formDirty) {
        let doNavigate = await Modal.confirm({
            ...
        });

        if (!doNavigate) cancel();
    }
}

<form on:change={() => formDirty = false} > ... </form>


URL is unable to be decoded

Describe the bug
At some point after 2.3.0, PostgresKit cannot decode Foundation's URL struct stored in database.
To Reproduce

I am using Vapor and Fluent. But I am guessing that it is reproducible on postgres-kit's own.

Use Vapor/Fluent and PostgresKit package 2.3.3.
Make a model with a URL field, and two endpoints - one for creating object, the other for fetching.
Send a request to create and store the object on the database.
Send another request to read the object.
See error below.

{
    "error": true,
    "reason": "invalid field: fieldname type: Optional error: typeMismatch(Swift.String, Swift.DecodingError.Context(codingPath: [], debugDescription: \"Expected to decode String but found a dictionary instead.\", underlyingError: nil))"
}

Expected behavior
An object with stored URL will be returned.
Environment

Vapor Framework version: 4.52.1
Vapor Toolbox version: 18.3.3
OS version: macOS 12.0.1

Additional context

Once I manually added PostgresKit 2.3.0 as dependency to my project, it started working just fine.
Data is safely stored on the database, even on 2.3.3. The error only occurs when you try to decode it afterwards.

I'm hitting this issue as well with Fluent 4.6.0 and fluent-postgres-driver 2.5.0.

Looks like adding the following to my project fixed it, but I have no idea what I'm doing here.
import Foundation
import PostgresKit

extension URL: PostgresDecodable {
    @inlinable
    public init<JSONDecoder: PostgresJSONDecoder>(
        from buffer: inout ByteBuffer,
        type: PostgresDataType,
        format: PostgresFormat,
        context: PostgresDecodingContext<JSONDecoder>
    ) throws {
        switch (format, type) {
        case (.binary, .varchar),
             (.binary, .text),
             (.text, .text),
             (.text, .varchar):
            guard buffer.readableBytes > 0 else {
                throw PostgresDecodingError.Code.failure
            }

            guard let url = buffer.readString(length: buffer.readableBytes).flatMap({ URL(string: $0) }) else {
                throw PostgresDecodingError.Code.failure
            }

            self = url
        default:
            throw PostgresDecodingError.Code.typeMismatch
        }
    }
}

extension PostgresData {
    public init(url: URL) {
        var buffer = ByteBufferAllocator().buffer(capacity: url.absoluteString.lengthOfBytes(using: .utf8))
        _ = try! buffer.writeString(url.absoluteString, encoding: .utf8)
        self.init(type: .text, formatCode: .text, value: buffer)
    }

    public var url: URL? {
        guard var value = self.value else {
            return nil
        }

        switch self.formatCode {
        case .binary:
            switch self.type {
            case .varchar, .text:
                return self.string.flatMap { URL(string: $0) }
            default:
                return nil
            }
        case .text:
            return nil
        }
    }
}

@available(*, deprecated, message: "Deprecating conformance to `PostgresDataConvertible`, since it is deprecated.")
extension URL: PostgresDataConvertible {
    public static var postgresDataType: PostgresDataType {
        return .text
    }

    public init?(postgresData: PostgresData) {
        guard let url = postgresData.url else {
            return nil
        }
        self = url
    }

    public var postgresData: PostgresData? {
        return .init(url: self)
    }
}


it always keep on the login to github page

Can you please open a new issue and fill out the 'Bug Report' issue template with more details?


Mapping a device to a geofence in firefox not achievable

It is not possible to map a device to a geofence in firefox 58.0.2 by clicking on the device in the device list then clicking on the gears -> geofences. If one of the checkboxes is clicked nothing happens. This is not an issue with chrome - everything works there.

My friend, I took the test here, and everything is working in Mozilla 58.0.2!
Ubuntu 17.10 64-bit / Mozilla 58.0.2

Try clicking slightly to the right of checkbox.

Yes it works when I click on the right 20% of the table cell. Thanks for the feedback and this great piece of software!


compile error on Ubuntu

After the latest pull request (#21) was merged to fix compile issues on OS X, I am unable to compile on Ubuntu:
$ make
cc  -c -Wall -O0 -g SeqPrep.c -o SeqPrep.o
SeqPrep.c: In function ‘main’:
SeqPrep.c:136:8: warning: variable ‘print_overhang’ set but not used [-Wunused-but-set-variable]
SeqPrep.c: At top level:
SeqPrep.c:108:5: warning: ‘spcount’ is static but used in inline function ‘update_spinner’ which is not static [enabled by default]
SeqPrep.c:90:12: warning: ‘spcount’ is static but used in inline function ‘update_spinner’ which is not static [enabled by default]
cc  -c -Wall -O0 -g utils.c -o utils.o
cc  -c -Wall -O0 -g stdaln.c -o stdaln.o
stdaln.c: In function ‘aln_local_core’:
stdaln.c:548:25: warning: variable ‘b’ set but not used [-Wunused-but-set-variable]
stdaln.c: In function ‘aln_extend_core’:
stdaln.c:868:16: warning: variable ‘tmp_len’ set but not used [-Wunused-but-set-variable]
cc  SeqPrep.o utils.o stdaln.o -lz -lm -o SeqPrep
SeqPrep.o: In function `main':
/home/ubuntu/SeqPrep/SeqPrep.c:350: undefined reference to `update_spinner'
collect2: ld returned 1 exit status
make: *** [SeqPrep] Error 1

It seems that the issue is the extern keyword added to update_spinner (this line). When I remove extern, I'm able to successfully compile. I'm not sure how this will affect compatibility with OS X or other systems though.
System info:
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 12.04.2 LTS
Release:	12.04
Codename:	precise
$ uname -a
Linux ip-10-88-103-45 3.2.0-39-virtual #62-Ubuntu SMP Thu Feb 28 00:48:27 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
$ cc --version
cc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Please let me know if you need more info or if I can help in any way with testing/fixing this. Thanks!

I have a very similar issue on our HPC cluster.
gcc  -c -Wall -O0 -g SeqPrep.c -o SeqPrep.o
SeqPrep.c: In function ‘main’:
SeqPrep.c:137:8: warning: variable ‘print_overhang’ set but not used [-Wunused-but-set-variable]
   bool print_overhang = false;
        ^
SeqPrep.c: At top level:
SeqPrep.c:109:5: warning: ‘spcount’ is static but used in inline function ‘update_spinner’ which is not static
     spcount++;
     ^
SeqPrep.c:91:12: warning: ‘spcount’ is static but used in inline function ‘update_spinner’ which is not static
     switch(spcount % 4){
            ^
gcc  -c -Wall -O0 -g utils.c -o utils.o
gcc  -c -Wall -O0 -g stdaln.c -o stdaln.o
stdaln.c: In function ‘aln_local_core’:
stdaln.c:548:25: warning: variable ‘b’ set but not used [-Wunused-but-set-variable]
  int gap_open, gap_ext, b;
                         ^
stdaln.c: In function ‘aln_extend_core’:
stdaln.c:868:16: warning: variable ‘tmp_len’ set but not used [-Wunused-but-set-variable]
  int q, r, qr, tmp_len;
                ^
gcc  SeqPrep.o utils.o stdaln.o -lz -lm -o SeqPrep
SeqPrep.o: In function `main':
/home/sejj036/SeqPrep/SeqPrep.c:355: undefined reference to `update_spinner'
collect2: error: ld returned 1 exit status
make: *** [SeqPrep] Error 1```

```lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	RedHatEnterpriseServer
Description:	Red Hat Enterprise Linux Server release 7.1 (Maipo)
Release:	7.1
Codename:	Maipo

$uname -a
Linux login06 3.10.0-123.20.1.el7.x86_64 #1 SMP Wed Jan 21 09:45:55 EST 2015 x86_64 x86_64 x86_64 GNU/Linux

$cc --version
cc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.```

@Cistron #33 should resolve this issue on your cluster. I discovered this solution while building this software for an HPC cluster I administer.


Report subs enabled and eligigle

Task/Issue URL: https://app.asana.com/0/488551667048375/1206887290583771/f
Description
See Asana task
Steps to test this PR
code review

#4344  👈
develop

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @aitorvs and the rest of your teammates on  Graphite


[CAMEL-14401] Restore default host/port properties for IPFS

-1
Defaults in context-path for host:port works really bad. All the tests and examples have ip and port number anyway. So try to fix it that way instead.

Similar to Blockchain, users are encouraged to run a local node rather than connecting to a remote node. IMHO "ipfs:add" (as a shorthand for ipfs:<IP_ADDRESS>:5001:add) should work.
Are you sure, that only C should work out of those three?
                from("direct:startA").to("ipfs:add");
                from("direct:startB").to("ipfs:<IP_ADDRESS>/add");
                from("direct:startC").to("ipfs:<IP_ADDRESS>:5001/add");

IPFS nodes (like blockchain nodes) are expected to mirror content. There are a number of public IPFS nodes out there, that folks can use when they don't want to run a node themselves. Configuring host/port on the component would be fine I think.
How would I do that?

You add the options on the component class, and remove them from the endpoint. On component you annotate with @Metadata instead of uripath. And on endpoint you update the syntax in the top to just have the command.


Add guidance around additional reference requests being cancelled

Context
At the moment, when a candidate can request as many references as they want. However, when they receive 2 sets of feedback. We cancel all the other references with outstanding feedback(in both the awaiting reference and not requested yet states).
We don't actually tell the candidate that this is going to happen.
This PR adds in this content (can be found in the Trello ticket)
Changes proposed in this pull request

Before

If no references are in the not_requested_yet, feedback_requested or feedback_provided state show

If one references are in the not_requested_yet, feedback_requested or feedback_provided state show

If more than one

Does not render if 2 have been received

Guidance to review
Is the logic correct around what we consider a viable reference?
I understand that a cancelled reference can be re-requested so in that sense it could technically potentially be viable.
Link to Trello card
https://trello.com/c/FOoQq16W/2532-💔2⃣-dev-guidance-around-additional-reference-requests-being-cancelled-when-2-have-been-received
Things to check

[x] This code does not rely on migrations in the same Pull Request
[x] If this code includes a migration adding or changing columns, it also backfills existing records for consistency
[x] API release notes have been updated if necessary
[x] New environment variables have been added to the Azure config

Paul. I thought about localising the strings.

Paul. I can localise the strings, but wanted to get your thoughts as the differences between them are quite subtle and it might obfuscate them. Thought I'd open it up to PR and see what you think.

We currently localise page titles and form text, but there’s a whole other category which we don’t, such as this. Not sure what the solution is to that (or even if one is needed), but don’t think we need to localise the strings here.

Made the changes. Sorry I was on autopilot while in a v important meeting. So i think the viable references in this case are:

Cancelled/declined/bounced emails shouldn't be counted into their two 'potentially successful' references, but not_requested_yet, received and requested references should be right?

Content LGTM.

This seems to work, just a bit hard to wrap my head around the logic as written. Wonder if it’d be a bit easier to parse if used same terminology across the different scenarios, so minimum_viable_references and no_viable_references?

would it be easier to have
no_viable_references?
do x
one_viable_reference?
do y
else
do z

would it be easier to have
no_viable_references?
do x
one_viable_reference?
do y
else
do z

Yeah, I think so. The ‘add a second referee’ state is a bit of an outlier.

Much clearer – thanks @davidgisbey!


feat: temporary support for sparse aggregate.

Temporary support for sparse aggregate.  This will be replace by #476.

@usamoi PTAL. Let's merge a simple one first.


[iOS] ItemSource update during transition leads to an exception

Are you using .Net Standard?

You are not supposed to do ItemsSource changes during a transition.

I would implement this in a different way if this functionality is needed but i have to test it.

The API allows to do it. So there is no reason not to do it )).

Great, then you will get this issue unless i prevent it to happen :)


APA Citation in KaoBook

Is there anyway to use APA CItations instead of the default kaobook side citations?

Does \usepackage[style=apa]{kaobiblio} work?

not sure about this, will give it a try, i instead just used the apacite package and commented out the kaobiblio dependencies, everything else worked out great. Thank you!


Get Size crashing Sketch

Hi,
I was using Measure on a few Artboards just fine. For some reason now if I choose an object and GET SIZE, Sketch sits there, shows these black boxes over the screen, and then ultimately crashes.
I copied a few Artboards into a new Sketch file and it seems like 1 Artboard is causing the issues. If the Artboard is present in the file, it will crash Sketch. On that Artboard I deleted all the spec folders as well. It still crashes.
Thoughts?

I got it. maybe you can check your all style shared, will find names is the same, delete one of them.
btw What is your version of mac os?

All style shared, what's that exactly?
Hmm, it's my work laptop. I believe it's 10.10.2 or 10.10.3

find the same name, and delete it


Added version to index template schemas.

Signed-off-by: Jeff Wright<EMAIL_ADDRESS>Issue #, if available: #569
Description of changes:

Added logic in ES Sink to check version of index templates before attempting to POST them into the cluster.
Added an integ test which asserts index templates are not overwritten by prior versions
Multiple whitespace/formatting fixes from IDE auto-formatter. Suggest viewing this PR with whitespace changes hidden.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Manually ran integ tests here - https://github.com/wrijeff/simple-ingest-transformation-utility-pipeline/actions


fix: Bind proper object to setAuth on Realtime callback

What kind of change does this PR introduce?
Bind proper object to setAuth on Realtime callback

Pull Request Test Coverage Report for Build<PHONE_NUMBER>7
Details

1 of 2 (50.0%)  changed or added relevant lines in 1 file are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+1.6%) to 67.633%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/SupabaseClient.ts
1
2
50.0%

Files with Coverage Reduction
New Missed Lines
%

src/SupabaseClient.ts
1
67.27%

Totals

Change from base Build<PHONE_NUMBER>7:
1.6%

Covered Lines:
99

Relevant Lines:
128

💛  - Coveralls


import @jayneflux's ad type classification work

lot of refactoring to integrate with existing setup. added comments and renamed some functions.
mostly changed files that update ad types. little to no work on data_analysis.py or ad_type_classifier_trainer.py

@jayneflux done, PTAL


Elmo sequence_taggers not working

Environment Google Colab
Training purpose > NER
Ktrain version > 0.28.3
Allennlp version > 2.8.0
error> allennlp not installed
if name in sys.modules:
print(f"{name!r} already in sys.modules")
'allennlp' already in sys.modules
model   = text.sequence_tagger('bilstm-crf-elmo', preproc, bert_model='dmis-lab/biobert-v1.1')#, wv_path_or_url = WV_URL)
Exception: To use ELMo embedings, please install allenlp:
pip install allennlp

It looks like the pip install allennlp error message is being displayed if importing modules from allennlp fails for any reason.  In this case, using bilstm-crf-elmo eventually results in allennlp trying to do:
from typing import OrderedDict

If your version of Python is less than 3.6, this will fail and output the pip install allennlp error message.
To solve, you can either downgrade allennlp to an older version that support Python 3.6 or upgrade Python to 3.7 or 3.8.
Note, however, that we will likely remove support for ELMo NER embeddings in the future and replace it with better-performing and more efficient transformers-based approaches.
Thanks for posting an issue to make us aware.


[PackageGraph] Use build pattern to build the package graph

We were relying on the fact that the manifests are topologically sorted
when creating the package graph. This is needlessly complex and the
builder pattern is simple and easier to maintain. This will also help in
establishing dependencies between the root packages.

WIP

@swift-ci please smoke test


Specify individual fieldsets in templates

Hello,
I was wondering if the possibility of specifying a particular fieldset in the templates is something desirable/planned. The idea would be something along the lines of:

while keeping the possibility of doing

which would place all fieldsets - as before.
Additionally, by being able to individually name the fieldsets, we can use custom templates for the fieldset itself. The advantage would be to gain flexibility on the custom templates.
I have noticed that during the render of the Form there is a search for the [data-editors], [data-fields] and [data-fieldsets], but while the editors and the fields are key-value objects, the fieldsets are an array, making each element anonymous.
An option would be to make the fieldsets a key-value object as well, or introduce another concept of something like a named-fieldset.
If this sounds like something that could interest you I could try preparing a pull request.

Memento for anybody whom is using this library (just like me).
Example how to personalize fieldsets using different templates:
let schema = {};/// your schema
let model = new Backbone.Model({});
let form = new Form({
        model: model,
        schema: schema,
        fieldsets: [
            {
                fields: [
                    'field1',
                    'field2',
                    'field3'
                ],
                template: _.template([
                    '

',
                ].join("\n"))
            },
            {
                fields: [
                    'field4',
                    'field5',
                    'field6'
                ],
                template: _.template([
                    '

',
                ].join("\n"))
            }
        ]
    });


Insufficent memory pool on GPU

ggml_new_tensor_impl: not enough space in the context's memory pool (needed 13340448, available 10485760)
I get the above error when I use a word that is very common in documents.
I tried to fix by adding
import torch
device = torch.device("cuda:0")
memory_fraction = 1.0 torch.cuda.set_per_process_memory_fraction(memory_fraction, device=device)
Unfortunately nothing changed when i added this code
current version of cuda
11.8
My system requirements are sufficient
NVIDIA GeForce RTX 3080 Ti Laptop GPU, compute capability 8.6

I also got the same error when try to run Langchain which call the API server by LlamaCppPython. Any idea to fix it? I do believe I have enough resources on the machine: 128G RAM + 24G GPU RAM.
Error message:
Llama.generate: prefix-match hit
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 35007776, available 12582912)
./run4_stablebeluga-13b.ggmlv3.q8_0.sh: line 1:   432 Segmentation fault      python -m llama_cpp.server --verbose True --host <IP_ADDRESS> --port 8000 --n_gpu_layers 100 --n_ctx 4096 --n_batch 4096 --n_threads 16 --model /mnt/c/TechBuilder/HuggingFace.co/TheBloke/StableBeluga-13B-GGML/stablebeluga-13b.ggmlv3.q8_0.bin

I found if set the  --n_batch 4096 to a small number, ex,  --n_batch 512, could avoid this problem.

Got the same problem here: "ggml_new_tensor_impl: not enough space in the context's memory pool (needed 45034832, available 10485760)" when launching a prompt of 2800 tokens on a model llama 7b chat q3K_M in python, althouh n_ctx = 4048, and 32 GB Ram. I'm not using any VRAM. My llama-cpp-python dates from 31 july 2023.

I really can't emphasize enough how important this is. It's being resolved in codestar model,as I understand, but not in Llama-cpp-python. I downloaded the llama.cpp directory directly, and copied over the new dll's, but now my software doesn't recognize the model anymore.
I'm now limited to 500 tokens, and that is far from enough and from the reason why I developed a model myself.
I'm really disappointed. Put in a few weeks of work to make it all work, langchain isn't helping by the way, so I rewrote big parts of langchain myself. And finally, it doesn't work because of some parameter ctx -> mem that I cannot change.
High regards,
Hans

@jasoncaojingren I realized that changing the batch size might be the solution, but it does create performance changes and it looks like I'll have to lower the batch size each time as the file size continues to grow. I don't have any information on how the batch size should be determined exactly. I just know what it does :( I don't know exactly how it affects optimum values or low values.

I tried downgrade llama-cpp-python to 0.1.74 and it works.


Setup timeout at IdleStart event causing IdleWarn not appearing

I created plunkr http://plnkr.co/edit/0mkNfee9DotCfqPJdgzp?p=preview to show if
Idle.setTimeout() happen when IdleStart event happen all other event is not broadcasted.

I'm not sure what you're trying to accomplish. setTimeout is used in the event that your application or users want to change the timeout value once the application is already running. When it is called, it starts the watch all over again, effectively resetting the idle/timeout state.
I don't know why you are calling it within the IdleStart event, but at any rate it won't work.


Update headings and body text stylings

Tasks
Go through every heading on every Desktop and Mobile page to align with style guide (see below):
Primary Font: Poppins (for headings and buttons) — Choose bold for headings.
Secondary Font: Roboto (for body text) — Use regular and medium weights for contrast.
Font Sizes:
Headings: H1 - 32px, H2 - 24px, H3 - 20px
Body Text: 16px for paragraphs, 14px for labels and smaller text.
Line Height: 1.5 for improved readability.
Letter Spacing: 0.5px for headings to create a crisp, clean look.
Important!

Update all the Headings on every page to be Bold (most of them are Black, not Bold)
Update body font sizes on mobile (they are too small now) - should be 16px or minimum 12px at least

Im done with the task, please take a look at it and give me a feedback :)