Response.End not working inside Razor Class Library

Describe the bug
Trying to use Response.End from a Controller inside a Razor Class Library causes the exception bellow.
To Reproduce
        app.MapControllerRoute(
                name: "DataDictionary",
                pattern: "{culture}/{area:exists}/{controller=Element}/{action=Index}/{dictionaryName?}/")
            .PreBufferRequestStream().BufferResponseStream();
        app.MapControllerRoute(
                name: "MasterData",
                pattern: "{culture}/{area:exists}/{controller=Log}/{action=Index}/{dictionaryName?}/")
            .PreBufferRequestStream().BufferResponseStream();

Exceptions (if any)
Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HMJ5RQTKTINH", Request id "0HMJ5RQTKTINH:00000175": An unhandled exception was thrown by the application.
System.InvalidOperationException: Headers are read-only, response has already started.
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpHeaders.ThrowHeadersReadOnlyException()
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseHeaders.Microsoft.AspNetCore.Http.IHeaderDictionary.set_ContentType(StringValues value)
at Microsoft.AspNetCore.Http.DefaultHttpResponse.set_ContentType(String value)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable1 statusCode)          at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, String contentType, Nullable1 statusCode)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result)
at Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.SystemWebAdapters.BufferResponseStreamMiddleware.BufferResponseStreamAsync(HttpContext context, IHttpResponseBodyFeature feature, IBufferResponseStreamMetadata metadata)
at Microsoft.AspNetCore.SystemWebAdapters.PreBufferRequestStreamMiddleware.PreBufferAsync(HttpContext context, IPreBufferRequestStreamMetadata metadata)
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.HandleException(HttpContext context, ExceptionDispatchInfo edi)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

*ASP.NET Core Application*:
- Targeted .NET version:6.0
- .NET SDK version:6.0

Can you please share your controller code as well?

The controller code have a huge dependency tree, maybe useless to this review, soon JJMasterData will be open-source. Tried adding the [SingleThreadedRequest] atribute but it don't exists on the public API.
Controller from the RCL
using JJMasterData.Core.WebComponents;
using JJMasterData.Web.Controllers;
using JJMasterData.Web.Models;
using Microsoft.AspNetCore.Mvc;

namespace JJMasterData.Web.Areas.MasterData.Controllers;

[Area("MasterData")]
public class FormController : JJMasterDataController
{
    public IActionResult Render(string dictionaryName)
    {
        var form = new JJFormView(dictionaryName);
        return View(form);
    }
}

View from the RCL
@using JJMasterData.Web.Extensions
@model JJGridView

@using (Html.BeginForm())
{
    @Model.GetHtml().ToHtmlString()
}

Response.End being used in a deep level on JJMasterData.Core
    /// <summary>
    /// Ends the HttpResponse and sends the data to the client.
    /// </summary>
    /// <param name="data">Data to the client. Can be a HTML or JSON .</param>
    /// <param name="contentType">Optional. Usually application/json</param>
    public void SendResponse(string data, string contentType = null)
    {
        if (this.HasStarted) return;

        SystemWebCurrent.Response.Clear();

        if (contentType != null)
        {
            SystemWebCurrent.Response.ContentType = contentType;
        }

        WriteResponse(data);
        SystemWebCurrent.Response.End();
    }

        /// <summary>
    /// Writes content to the response.
    /// </summary>
    /// <param name="data">Data to the client. Can be a HTML or JSON .</param>
    public void WriteResponse(string data)
    {
#if NETFRAMEWORK
        SystemWebCurrent.Response.Write(data);
#else
        AspNetCoreCurrent.Response.WriteAsync(data).GetAwaiter().GetResult();
#endif
    }

How was this code used in .NET Framework? Calling End() seems like it would fail in a view there as well....

It's insane, but this exactly Controller works on .NET Framework too.  The front-end does alot of JS calls to the back-end and the method GetHtml get re-called.

I also implemented on my application the source code of SingleThreadedRequestAttribute and a SingleThreadedMiddleware but no success.

@gumbarros I'd like to try to repro this, but I can't see how the sample you shared would actually tie together. How does the controller end up at the SendResponse() method?

@gumbarros Since this worked on framework, I'd still love to see a full repro of what you're doing in case there's something we can do here.

@twsouthwick We're adding support to .NET Core in our CRUD generator based on database metadata. Also in this migration, we're going to open-source it to the community. We're writing some tests and creating documentation before releasing for the general public, in a few weeks is the prevision to release it. Copying and pasting code will not work, the codebase is very very huge. If you really want, I can send a copy of the project in your email without the Git (we have some private information in some commits before creating a new public repo).

On Preview 3 getting the following error:
warn: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[2]
      The response has already started, the error page middleware will not be executed.
fail: Microsoft.AspNetCore.Server.Kestrel[13]
      Connection id "0HMJF6U3HGAIO", Request id "0HMJF6U3HGAIO:0000005B": An unhandled exception was thrown by the application.
      System.InvalidOperationException: Headers are read-only, response has already started.
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpHeaders.ThrowHeadersReadOnlyException()
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseHeaders.Microsoft.AspNetCore.Http.IHeaderDictionary.set_ContentType(StringValues value)
         at Microsoft.AspNetCore.Http.DefaultHttpResponse.set_ContentType(String value)
         at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
         at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, String contentType, Nullable`1 statusCode)
         at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result)
         at Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
      --- End of stack trace from previous location ---
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
      --- End of stack trace from previous location ---
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
         at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
         at Microsoft.AspNetCore.SystemWebAdapters.BufferResponseStreamMiddleware.BufferResponseStreamAsync(HttpContext context, IHttpResponseBodyFeature feature, BufferResponseStreamAttribute metadata)
         at Microsoft.AspNetCore.SystemWebAdapters.BufferResponseStreamMiddleware.BufferResponseStreamAsync(HttpContext context, IHttpResponseBodyFeature feature, BufferResponseStreamAttribute metadata)
         at Microsoft.AspNetCore.SystemWebAdapters.PreBufferRequestStreamMiddleware.PreBufferAsync(HttpContext context, PreBufferRequestStreamAttribute metadata)
         at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
         at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
         at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
         at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
         at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
         at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.HandleException(HttpContext context, ExceptionDispatchInfo edi)
         at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
         at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
         at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
         at Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserRefreshMiddleware.InvokeAsync(HttpContext context)
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

Another update:
Calling Response.End inside the view don't cause errors, calling from the Controller causes. But on Linux the Response.End never happens.

@gumbarros Since this worked on framework, I'd still love to see a full repro of what you're doing in case there's something we can do here.

@twsouthwick  I don't know if it's still relevant, but we open-sourced the library, now you can see what we are doing with Response.End for both .NET Frame and Core. (I also implemented pull request #137 while it don't release)
https://github.com/JJConsulting/JJMasterData


TCX conversion fails on a spinning file

Unknown_20-55-46.ttbin.zip
(All conversions are failing:
Unable to process output format: csv
Unable to process output format: gpx
Unable to process output format: kml
Unable to process output format: tcx)
The file was produced with a tomtom runner 2, while spinning/cycling.
This issue was submited by one of ours RUNALYZE users. Sadly I cannot help. It would be great if you /anyone would have a short look at that file.
Is this file defect or something missing in ttwatch?
(Attaching files is always a great idea :D )

The file has an activity type code of 11. The ttwatch programs only support activity types of 0 (Running), 1 (Cycling), 2 (Swimming), 7 (Treadmill), 8 (Freestyle) and 9 (Gym).
This must be a new activity type that I don't know anything about. I don't have a Runner 2, so I can't really help much with adding support for this.
The software can currently only interpret the heart-rate information in the file; although there is lots of other data in the file, I don't know what it means and the software can't interpret it. If someone wants to add support for this, that would be great, but I don't think I'll be able to at the moment.

Than 11 must be the "indoor" activity with the runner 2.

I'm not sure about the following:
Another record:(I just named it INDOOR_CYCLING here
#define TAG_INDOOR_CYCLING              (0x33)
I played around with  https://github.com/dlenski/ttbindec and fixed some things so that I was able to read this file (version type 9)
# don't know what's in there and how many fields ...
class FILE_UNKNOWN1_RECORD(StructReprMixin, LittleEndianStructure):
    _pack_ = 1
    _fields_ = (
        ('timestamp',c_uint32), # local time
        ('unkown1',c_uint32), #
        ('frequency',c_uint16),
...
    )

I got the following:
00002366 33 FILE_UNKNOWN1_RECORD(timestamp=1482091366, unkown1=1459189568, frequency=88, ...)
I'm really sure about the frequency (looks good), but I don't know what is in the other fields. Don't know if it could help to find a solution
I'm really not good at reverse-engineering proprietary files
Unknown_20-55-46.ttbin.dump.zip

@mipapo indoor cycling activities may be exported into CSV files now.
Do you have any example TCX file containing indoor activity?

@misdoro See attachment - recorded with an Garmin 920XT
activity_1491283845 (2).tcx.zip

Thanks, I'll have a look!


Crash on initial load

Goals
Reload tableView after notificationBlock from objects filter initial
Expected Results
A tableView initially reloaded
Actual Results
Crash, with this logs
What did happened instead?
../realm/table.hpp:1634: [realm-core-2.3.0] Assertion failed: typeid(Col) == typeid(col)
0   Realm                               0x00000001006ba834 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 44
1   Realm                               0x00000001006baa7c _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 368
2   Realm                               0x00000001007f0740 _ZNK5realm5Table17linklist_is_emptyEmm + 0
3   Realm                               0x000000010059d60c -[RLMArrayLinkView initWithParent:property:] + 156
4   Realm                               0x00000001005aef24 RLMInitializeSwiftAccessorGenerics + 420
5   Realm                               0x00000001005b1340 _Z23RLMCreateObjectAccessorP8RLMRealmR12RLMClassInfoN5realm12BasicRowExprINS3_5TableEEE + 100
6   Realm                               0x000000010061d03c -[RLMResults objectAtIndex:] + 76
7   RealmSwift                          0x0000000101a43600 _TFC10RealmSwift7Resultsg9subscriptFSix + 72
8   POS                                 0x00000001000fee38 _TFC3POS15OrdersTableView9tableViewfTCSo11UITableView12cellForRowAtV10Foundation9IndexPath_CSo15UITableViewCell + 680
9   POS                                 0x00000001000ff55c _TToFC3POS15OrdersTableView9tableViewfTCSo11UITableView12cellForRowAtV10Foundation9IndexPath_CSo15UITableViewCell + 108
10  UIKit                               0x00000001932f6b58 <redacted> + 716
11  UIKit                               0x00000001932f6d88 <redacted> + 80
12  UIKit                               0x00000001932e4320 <redacted> + 2304
13  UIKit                               0x00000001932fbdec <redacted> + 116
14  UIKit                               0x0000000193097de8 <redacted> + 176
15  UIKit                               0x0000000192fb0a80 <redacted> + 1196
16  QuartzCore                          0x000000019045e9d8 <redacted> + 148
17  QuartzCore                          0x00000001904534cc <redacted> + 292
18  QuartzCore                          0x000000019045338c <redacted> + 32
19  QuartzCore                          0x00000001903d03e0 <redacted> + 252
20  QuartzCore                          0x00000001903f7a68 <redacted> + 512
21  QuartzCore                          0x00000001903f8488 <redacted> + 120
22  CoreFoundation                      0x000000018d0b20c0 <redacted> + 32
23  CoreFoundation                      0x000000018d0afcf0 <redacted> + 372
24  CoreFoundation                      0x000000018d0b0180 <redacted> + 1024
25  CoreFoundation                      0x000000018cfde2b8 CFRunLoopRunSpecific + 444
26  GraphicsServices                    0x000000018ea92198 GSEventRunModal + 180
27  UIKit                               0x000000019301e7fc <redacted> + 684
28  UIKit                               0x0000000193019534 UIApplicationMain + 208
29  POS                                 0x000000010012d228 main + 140
30  libdyld.dylib                       0x000000018bfc15b8 <redacted> + 4
IMPORTANT: if you see this error, please send this log to help@realm.io.(lldb)

Steps to Reproduce
In a notification block I first wait for initial to reload Data, the dataModel.count returns 4, but when I try to access dataModel[0] my App crashes with this error, but only happens in the first load after I login (I'm using ROS), when the app crashed and I open it again it loads everything normally.
Code Sample
let orders = realm.objects(Orden.self).sorted(byKeyPath: "date", ascending: false)
let result = orders filter("date==nil")
self.notification = result.addNotificationBlock { [weak self] (changes: RealmCollectionChange) in
    guard let tableView = self?.tableView else { return }
    switch changes{
    case .initial:
        tableView.reloadData()
    case .update: tableView.reloadData()
    case .error(let e):
        print(e.localizedDescription)
    }
}

on numberOfRowsInSection dataModel.count returns 4, but on cellForRowAt when accessing dataModel[0] it crashes.
Version of Realm and Tooling

Realm version: I'm on 2.4.2 in the Swift SDK and 1.0.3 in the ROS
Xcode version: 8.2.1
iOS/OSX version: iOS 10.2.1
Dependency manager + version: Carthage, latest

Hi @ArifADS. Thanks for reaching out. My apologies for the delay in getting back to you. Someone will review what you've shared and respond with a solution and/or follow-up questions soon.

Thanks for getting in touch with us, and sorry you're running into this issue. Can you send us a sample project that demonstrates this crash so we can investigate further? You can email a zip file to<EMAIL_ADDRESS>If you can't do that, please post your model definitions so we can see if anything there might be causing problems.

I sent the email with a little example project, hope it helps

Thanks for sharing the project, @ArifADS. I was able to use it to reproduce the crash you describe.

It looks like what's happening is that the Realm file on the server has the same properties as the model declared in the app, but in a different order. When we download the Realm from the server we reorder the properties in the Realm file on disk to match the order on the server, but for some reason we're not updating our in-memory mapping from property to column index. I'd expect the object store's schema change callback to be invoked when advancing to the version that reordered the columns, but it's not. TransactAdvancer::move_column is never called, despite sync applying a changeset that moves a column.

Great, well that is a great catch. If you need any other info just tell me.

@tgoyne, would you be able to help me look at this next week? I wrote up an object store test that attempts to reproduce the bug (here), but it correctly triggers the schema change notification and ends up with the in-memory schema reflecting the correct column indexes.

The problem is that after initializing the schema we end the read transaction, and then begin a new one once data is actually read from the Realm. In this case, the schema changes due to sync while we don't have an active read transaction, so we never process the schema changes and update the cached information.

Any news on this? If you need me to test something, or know any temporal workaround I would happily do it.

I'm working on a fix, but the problem is that some of the assumptions made in the schema management code were wrong rather than just a simple bug in the implementation so it's a bit involved.

Oh, I understand, I hope it's not that difficult.

When can I expect this fix to go into production build? So I can download it in my App and send it to my users.

If you build from master you'll get this fix included in your build.
We're pursuing an official release with this fix in the next day or two as well.


Fix long task description wrapping.

Overview
Fixes: https://github.com/CareEvolution/MyDataHelpsUI/issues/22
A small layout/CSS adjustment to prevent long task descriptions from overlapping the right chevron.
Security
REMINDER: All file contents are public.

[x] I have ensured no secure credentials or sensitive information remain in code, metadata, comments, etc.

[x] Please verify that you double checked that .storybook/preview.js does not contain your participant access key details.
[x] There are no temporary testing changes committed such as API base URLs, access tokens, print/log statements, etc.

[x] These changes do not introduce any security risks, or any such risks have been properly mitigated.

Describe briefly what security risks you considered, why they don't apply, or how they've been mitigated.
Checklist
Testing

[ ] MyDataHelps iOS app
[ ] MyDataHelps Android app
[ ] MyDataHelps website

Documentation

[x] I have added relevant Storybook updates to this PR as well.
[x] If this feature requires a developer doc update, tag @CareEvolution/api-docs.

Consider "Squash and merge" as needed to keep the commit history reasonable on main.
Reviewers
Assign to the appropriate reviewer(s). Minimally, a second set of eyes is needed ensure no non-public information is published. Consider also including:

Subject-matter experts
Style/editing reviewers
Others requested by the content owner

🚢


Add storage API to data volume

A new feature available in 4.10 is storage API
that will replace the PVC API.
At the moment, the default API of DataVolume class
will remain PVC as both available in 4.10.

/verified


Get IP from headers or request

added the function GetIPFromHeader that gets the gin.content and returns the ip, if there was x-real-ip header.

Thanks for the PR.
Gins Context.ClientIP() function will already read and return X-Real-Ip IF the remote address is a trusted proxy. Rewinged currently does not allow you to set a trusted proxy, it's hardcoded to nil:
https://github.com/jantari/rewinged/blob/9a619c5d27c67469a27259535d95bd8ff001c6d6/main.go#L148
However, I believe that would be the correct solution rather than re-implementing the feature in a broken way (you cannot trust client-controllable headers like X-Real-IP unless you know you get them from your own, trusted proxy).
Do you think you can update the PR?

@jantari updated

Thanks! I took a quick look, will go through it again when I have some more time next week and then merge.

Thanks a lot for the contribution. I have made some edits myself in https://github.com/jantari/rewinged/pull/8/commits/d214ad9c4d1f3cb1b860fa0ab03c499c7b20da9f, but now this will ship in the next release.


fix cased testing of psi4 keywords

qcengine not respecting REFERENCE in psi4 input for open-shell. for posterity, test script below, but no good reason to inspect it now.
I patched it here, but the greater question is is case something the runners in qcengine need to be careful of or is it something that the qcel model should validate into a uniform case. Certainly one shouldn't mess with the case of keyword values, but keyword names are generally uniform wrt case.
import pprint

inp = {'driver': 'energy',
# 'return_output': True,  # REMOVE FOR ENGINE
 'schema_name': 'qcschema_input',
 'schema_version': 1,
 'keywords': {'DF_SCF_GUESS': 0, 'REFERENCE': 'ROHF', 'SCF_TYPE': 'PK'},
 #'keywords': {'DF_SCF_GUESS': 0, 'reference': 'ROHF', 'SCF_TYPE': 'PK'},
 'model': {'basis': 'aug-cc-pvqz', 'method': 'scf'},
 'molecule': {'atom_labels': [''],
              'atomic_numbers': [3],
              'fix_com': True,
              'fix_orientation': True,
              'fragment_charges': [0.0],
              'fragment_multiplicities': [2],
              'fragments': [[0]],
              'geometry': [0.0, 0.0, 0.0],
              'mass_numbers': [7],
              'masses': [7.0160034366],
              'molecular_charge': 0.0,
              'molecular_multiplicity': 2,
              'name': 'Li',
              'provenance': {'creator': 'QCElemental',
                             'routine': 'qcelemental.molparse.from_string',
                             'version': 'v0.3.3'},
              'real': [True],
              'symbols': ['Li']},
}

# EITHER run Engine

import qcengine as qcng
ans = qcng.compute(inp, "psi4")
pprint.pprint(ans.dict())
scf = ans.dict()['return_result']
print('ENGINE')
print(qcng.util.which('psi4'), qcng.util.which_import('psi4'))
print(scf)

# Results
# /home/psilocaluser/gits/hrw-quaternary/objdir37/stage/bin/psi4 /home/psilocaluser/gits/hrw-quaternary/objdir37/stage/lib/psi4/__init__.py
# -7.365043815990735

# OR run Psi4

#import psi4
#from psi4.driver import json_wrapper
#ans = psi4.json_wrapper.run_json(inp)
#pprint.pprint(ans)
#scf = ans['return_result']
#print('RUN_JSON')
#print(psi4.__file__)
#print(scf)

# Results
# /home/psilocaluser/gits/hrw-quaternary/objdir37/stage/lib/psi4/__init__.py
# -7.432695429345809

QCFractal has this capability that we homogenize for the database. Not sure about here however.

Sounds like a case of the perils of unexpected entry points. When one goes through QCF, keyword keys get normalized to lowercase and (on the other issue) molecules get normalized to 8 digits, which makes sense for database/eq structures. But when one bypasses QCF by hitting engine directly, engine's keyword testing assumptions are violated. Sounds like ultimately, qcf keyword validation needs to happen at engine level? But more importantly, GEOMETRY_NOISE needs to be a parameter passed down to qcel model.Molecule so that qcng and qcf can handle findif.

I should note that for the moment, this engine trouble is easily avoided and the qcel trouble is one-liner easy, though not so clean, to avoid. So this can be handled post-ACS.

Im not convinced that this is too much of an issue. QCEngine in general doesn't handle case on keywords unless a program demands it (e.g. a program must have keywords in upper case). QCFractal is a bit of a different beast as we need to hash keyword sets.

It's not a common issue b/c engine isn't probing keywords much -- only implementing a quick "(auto)" for open-shell reference. But engine taking a valid json input and running a different calc (uhf) than that which the program would have run (rohf) with the same json is a definite issue.


Fixed missing entry from LD_LIBRARY_PATH for git pull to function

This is a very annoying oversight from yesterday's change.
git --version would work but git pull would fail all the time... luckily I had only pushed this to ci-usd!

I'm not very happy about this either... The missing library is a curl lib coming from that https package...
I first used scl enable rh-git218 and compared the environment but I grepped for the git218 and this lib comes from a different path, and only used by the network parts of git...
I'll probably release images like this, but will welcome a nicer solution in the future!

Installing git-rh218 on a bare CentOS 7 container I find:
# yum install centos-release-scl-rh
...
# yum install rh-git218
...
# ldd /opt/rh/rh-git218/root/usr/libexec/git-core/git-http-fetch
	linux-vdso.so.1 =>  (0x00007ffec73f7000)
	libcurl-httpd24.so.4 => not found
	libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007f0cd04ba000)
	libz.so.1 => /lib64/libz.so.1 (0x00007f0cd02a4000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0cd0088000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f0ccfe80000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f0ccfab2000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f0cd0abe000)

and indeed libcurl-httpd24.so.4 comes from:
# rpm -ql httpd24-libcurl
/opt/rh/httpd24/root/usr/lib64/libcurl-httpd24.so.4
/opt/rh/httpd24/root/usr/lib64/libcurl-httpd24.so.4.5.0
...

and when you enable that package:
# scl enable rh-git218 bash
# echo $LD_LIBRARY_PATH
/opt/rh/httpd24/root/usr/lib64

Haven't quite figured out where that LD_LIBRARY_PATH is configured from... I'm also unclear as to how httpd-libcurl24 differs from the standard system-installed libcurl, apart from being newer (DSO version 4.5.0 instead of 4.3.0).
Anyway, all this to say that I too don't see another option but to set the LD_LIBRARY_PATH

So I've just re-pushed the following images:
aswf/ci-opencue:2019.5
aswf/ci-opencue:2020.5
aswf/ci-opencue:2021.1```
I believe they work fine, I've just tried the USD equivalent. Let me know!

OpenCue images look good. Git 2.x is now the default version on Github Actions and works without any manual modifications to PATH or LD_LIBRARY_PATH.
Thanks @aloysbaillet!


Add codegen for public inputs and auxiliary columns

Adds codegen for public inputs and auxiliary columns.
Partly Addressing #10 and #15.

If I'm not mistaken, this also takes care of #14 , right? So #10, #14, #15 can all be closed with this PR?

If I'm not mistaken, this also takes care of #14 , right? So #10, #14, #15 can all be closed with this PR?

Ah yes, it should.


BUG || Admit Case Pending Task not shown after Issue Notice in QA

After Registering Case and Issuing Notice, Admit case button and pending task is not shown in Judge UI.
Attaching Video reference.
BLOCKER ADMIT CASE NOT AVAILABLE.webm

Hi @ashishbeehyv
Admit Case button is shown but no Pending Task is shown.
Button Screenshot

No Pending Task

@bhuvanyuguru  changes done , please re-test.

Not resolved @nileshgupta111
Pending task is still not shown
CC: @Ramu-kandimalla , @manimaarans

@bhuvanyuguru  updated the mdms check again

HI @nileshgupta111, please check this issue
admit case .webm

Bug is not resolved in QA  @ashishbeehyv,
CC: @anirudh-0

hi @bhuvanyuguru this is fixed in QA. please test again. cc: @Ramu-kandimalla


Does CSV still get created even if automated Google Sheets options is set?

I ran Lighthouse Parade with the --output google-sheets option.
I stepped away from my computer because an audit can take hours. I forgot to disable my laptop's sleep feature.
I then came back, and saw this error:
  FetchError: Invalid response body while trying to fetch https://sheets.googleapis.com/v4/spreadsheets/1QF4KmnIF6HYJ2Fdi4qZLV-87EpENzgblG_fMuYWwS_4/values/%27Lighthouse%20Results%27%21A409?valueInputOption=USER_ENTERED: read ECONNRESET

The Google Sheet was not being written to anymore.
How can we gracefully handle this use case?
Does a CSV still get created, or does the whole process stop?
An idea
At least a CSV gets created and some message/notification somewhere telling me along the lines of: "The Google Sheet write isn't working anymore, but no worries, you'll still get a CSV that you can [manually import](link to docs)".

@gerardo-rodriguez The --output option can be set multiple times, for example --output google-sheets --output something.csv. This could solve this use case if you wanted a backup.
If no --output is set, it defaults to a csv file. To answer the question in the title, no, if the output is set to google-sheets then it will not output to a csv file.
If your computer goes to sleep while running lighthouse-parade, then it won't be able to continue making new lighthouse reports, since doing that relies on an internet connection. I suspect that the data that it was trying to upload when that error came up was probably not useful data, the lighthouse data was likely not accurate if the computer was disconnected from the internet.
Maybe we could look into using something like this? https://www.npmjs.com/package/node-prevent-sleep (although it appears to only support windows).
I was looking into other options on npm and saw this 🙄 https://github.com/roldanjr/use-stay-awake that makes a react hook for this by loading and playing videos in the background 😂
Here's another option, macos only: https://github.com/nornagon/node-wake-lock
These are all a little sketchy to me since they all hook into native modules that call into OS API code. We can look into it more though, I don't think it's out of the question.

I was looking into other options on npm and saw this 🙄 https://github.com/roldanjr/use-stay-awake that makes a react hook for this by loading and playing videos in the background 😂

Wow. 😅

I suspect that the data that it was trying to upload when that error came up was probably not useful data, the lighthouse data was likely not accurate if the computer was disconnected from the internet.

Ah, that makes sense. So it seems a "stay awake" option might be the best and only option.
@calebeby We should at least update the docs and add a note/reminder saying "If you plan to leave your laptop running without supervision, ensure you disable sleep mode" or something like that. At least in the short term, this might be helpful.

The --output option can be set multiple times, for example --output google-sheets --output something.csv.

@calebeby This wasn't obvious to me when I read the next README docs. Let's add this to the docs as well. 🙂

It already mentions it in the list of flags (from the --help text):
-o, --output The output file(s). CSV and Google Sheets are supported. Can be passed multiple times for multiple outputs. Example: -o cloudfour-a.csv -o google-sheets -o google-sheets:"Spreadsheet Name"
Is there somewhere else you were looking & expecting it that I could add it to?

@calebeby LOL I guess the way the documentation is presented makes it harder to find. I didn't see it because it was horizontally scrolled out of view, even at larger viewports. Especially when the description is longer.
Maybe we can use a table to display that info? Something else?
Or, I don't know, @Paul-Hebert or @spaceninja, am I the only one that finds it harder to read the CLI options when presented as a fixed width horizontally scrolled view?

I can switch that to be headings+paragraphs. The reason it is the way it is currently is because it makes it much easier to avoid the --help text diverging from the readme text when I change either (my process is: edit the --help text, then copy-paste the whole blob into the readme). But I can understand that headings+paragraphs would be easier to read so I'll switch it to that.

Thanks, @calebeby, that makes sense why it is the way it is. I appreciate you taking an extra step to make the docs more user-friendly. 🙌🏽

But I can understand that headings+paragraphs would be easier to read so I'll switch it to that.

@calebeby It sounds like you have an idea already, but I was playing with this to see how it felt. I was playing with adding a heading for each option section to make it super easy to link directly to a specific option.
If you like this approach, I can finish the rest and submit a PR if that helps since I already started editing the README. 🙂

Yes, thanks, this is exactly what I'd had in mind! What do you think about using the flag itself as the heading? Like:
--max-crawl-depth
Control the maximum...
(I'm not overly attached to this idea)

@calebeby Oh, I think I like it better!

Thanks for the suggestion! I'll submit a PR with these changes in a bit. 👍🏽

Thanks :shipit:

Here's the PR!
https://github.com/cloudfour/lighthouse-parade/pull/148


Clean up and optimize JsonPatch

Motivation:

The classes in internal.jsonpatch violates our Checkstyle rules.
JsonPatchOperation implementations makes a deep copy of a whole JSON
document on each application.
DiffProcessor creates redundant intermediary DiffOperation objects.

Modifications:

Reorganization

Remove DiffOperation.
Merge JsonDiff into JsonPatch
Move the classes in 'jsonpath.diff' and 'jsonpatch.utils' to
'jsonpatch'.
Make all JsonPatchOperation classes package-local.
Extract some common logic in JsonPatchOperation implementations into
the common methods in JsonPatchOperation and PathValueOperation.

Optimization

Make a deep copy of a JSON document only once per JsonPatch.apply().
JsonPatch.unchangedValues() is invoked only when really necessary.
Optimize JsonPatchOperation implementations so that they do not
create unnecessary deep copies.

Un-exclude the 'internal.jsonpatch' from Checkstyle suppression.

Result:

JsonPatch.apply() and JsonPatch.generate() performs better.

Codecov Report

Merging #102 into master will decrease coverage by 0.1%.
The diff coverage is 91.62%.

@@            Coverage Diff             @@
##           master     #102      +/-   ##
==========================================
- Coverage   56.93%   56.82%   -0.11%
==========================================
  Files         233      231       -2
  Lines        8059     8035      -24
  Branches      947      950       +3
==========================================
- Hits         4588     4566      -22
+ Misses       2876     2870       -6
- Partials      595      599       +4

Impacted Files
Coverage Δ

...aldogma/internal/jsonpatch/JsonPatchException.java
50% <ø> (ø)
:arrow_up:

...raldogma/internal/jsonpatch/DualPathOperation.java
100% <ø> (ø)
:arrow_up:

...aldogma/internal/jsonpatch/JsonPatchOperation.java
100% <100%> (ø)
:arrow_up:

...traldogma/internal/jsonpatch/ReplaceOperation.java
100% <100%> (ø)
:arrow_up:

...internal/storage/repository/git/GitRepository.java
76.26% <100%> (ø)
:arrow_up:

...dogma/internal/jsonpatch/SafeReplaceOperation.java
89.65% <100%> (-1.26%)
:arrow_down:

...centraldogma/internal/jsonpatch/TestOperation.java
100% <100%> (ø)
:arrow_up:

...aldogma/internal/jsonpatch/PathValueOperation.java
100% <100%> (ø)
:arrow_up:

.../java/com/linecorp/centraldogma/common/Change.java
74.07% <100%> (+0.65%)
:arrow_up:

...ntraldogma/internal/jsonpatch/RemoveOperation.java
100% <100%> (ø)
:arrow_up:

... and 7 more

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 933835e...f8e8ea8. Read the comment docs.

Thanks for reviewing!


Display constructor arguments in deploy command hint

Which components does the task require to be changed? (think hard pls)
sncast
Description
When contract is declared, a hint with deploy command is displayed. However, when contract's constructor takes some arguments, they should be also displayed. In the scope of this issue, we should:

implement a mechanism which fetches contract's constructor
if constructor has params -> display them in hint deploy command

Blocked by https://github.com/foundry-rs/starknet-foundry/issues/2604

@franciszekjob hey I would like to work on this.

@Avinash-kumar-82 Hey, thanks for applying, however we mostly accept applications for tasks marked with "help wanted" or "good first issue" label.


Make path a required option when setting/deleting cookies

Describe the problem
See discussion in #9130. I'm not sure there's ever a good reason not to specify a path — it's almost always an annoying mistake, that we may or may not catch in time.
Describe the proposed solution
Make path required.
Alternatives considered
No response
Importance
nice to have
Additional Information
No response

Still not sure this is the right move. None of the other metaframeworks do this AFAIK, and the "default path" logic works without bugs now. If we were to introduce this, it means that people need to stringify the path they're currently on, and when it's not / then they're potentially introducing a bug when the route changes but they don't update the string in the cookie, etc etc.

What about defaulting the path to ${base}/? This is probably the most common case which I have to set in all of my projects.

Trying to figure out how to indicate 'use the default path behaviour'. Our implementation...
https://github.com/sveltejs/kit/blob/6818dd41cfb052da2b18b9edcf451552983c2972/packages/kit/src/runtime/server/cookie.js#L27-L28
...matches RFC 6265, but neither '' nor '.' nor '..' quite matches that:
normalized_url = '/foo/bar';

normalized_url.split('/').slice(0, -1).join('/') || '/'; // "/foo"
new URL('', 'https://example.com/foo/bar').pathname; // "/foo/bar"
new URL('.', 'https://example.com/foo/bar').pathname; // "/foo/"
new URL('..', 'https://example.com/foo/bar').pathname; // "/"

Having said that, I'm not sure the default behaviour is particularly useful. I think it's probably fine to just say 'you have to specify path but if you want to specify a relative path that's cool too'. Thoughts?

What would it mean specifying a relative path? Relative to the current location, so that ./ means "the route I'm on"? In which way does it take trailing slashes into account?

Re "discussion about default path behavior": the idea was to provide a shortcut so that people get the same cookie path they would get today when omitting the path, like "pass in . to trigger the default path logic"

Yeah, I just don't get why today's behavior ever existed

We're not talking about a browser API at all, we're talking about whether — in a world where we require you to provide a path, to avoid a common source of bugs (but without defaulting to path: '/' which is insecure) — it makes sense to provide a way to say 'I want the default browser behaviour you get when you return a Set-Cookie header without specifying a path'.
My vote is 'no', because the default browser behaviour seems dumb.

What would it mean specifying a relative path?

Specifying '' would mean 'the current pathname'; '.' would mean 'the current directory', and so on. In fact this is how it works today for '.' (if your Set-Cookie header includes Path=./relative then the browser will resolve it against the current path) — the only change is that '' is currently treated as 'unspecified', i.e. the default behaviour.
Trailing slashes work exactly as you'd expect:
new URL('', 'https://example.com/foo/').pathname; // '/foo/'
new URL('.', 'https://example.com/foo/').pathname; // '/foo/'
new URL('..', 'https://example.com/foo/').pathname; // '/'

new URL('', 'https://example.com/foo/bar').pathname; // '/foo/bar'
new URL('.', 'https://example.com/foo/bar').pathname; // '/foo/'
new URL('..', 'https://example.com/foo/bar').pathname; // '/'

Because it's what the browser does if you don't set a path

(One thing to note: our resolve(base, path) internal helper currently misbehaves if path is the empty string. We need to fix that behaviour at the same time as we fix the cookies API. Working on it)

One thing that speaks for having some string reserved for the current "omit path" behavior is that we can automigrate the user's code

Feels a bit tail-wagging-the-dog

Yeah, I'd not make an effort to keep the current behavior. It's better to make the user do some work to migrate so that we all have nicer APIs

But what if you do want the current default behavior? Sounds weird to not have an ergonomic option for that. Absolute paths are prone to get out of sync

You can just use .. and strip the trailing slash (assuming you have the default trailingSlash setting).
If we really want to support the old behavior I suppose we could introduce an additional shortcut such as ... or something

The default behaviour isn't hard to implement yourself if you really need it. The question is, why would you ever need it? What's a scenario in which it's helpful?

Ok asked differently: If I'm on admin/login and I want to set the cookie to the admin scope, how do I do that without hardcoding /admin which may get out of sync? How would a relative path look like to do this? We should explain this in the docs a little.

I just saw https://github.com/sveltejs/kit/pull/11237 was merged. One suggestion on that - I think we should add the relative path support in 1.x. Otherwise it's weird to deprecate the old behavior, but not yet have available the new functionality that we want users to migrate to

I want to set the cookie to the admin scope

'.' would set it to /admin/. To set it to /admin then yeah, you would need to hardcode it. But that's what I'd suggest anyway — otherwise if you move the login route to /admin/auth/login then you're just as hosed.
If we're worried about things getting out of date (or handling use cases like translated routes) then we should probably just build tools to accommodate those scenarios (like path: validate('/admin') where validate has a list of valid routes; ideally it would also be type safe)

I think we should add the relative path support in 1.x

It's already supported, except for '' (which is treated as 'unspecified') — that's just how cookies work

I suppose the other way to tackle this is to make path required but continue making '' mean 'the default behaviour'. I just think that behaviour is a bit confusing since it doesn't work the way path resolution works in any other context (and it makes things harder in the more likely case that you want to express 'the current path, and only the current path')

It's already supported

Oh actually there is one caveat here — it's support insofar as the cookie path will be correct in the browser, but cookies.get(...) within the same request as the cookie is set may get confused, because it checks whether the path matches, and the path isn't resolved in the internal lookup

I agree making '' keep the old behavior would be confusing

IMO, this is the wrong move. event.cookies.set() is the lowest available API to set cookies in SvelteKit (you don't have access to response headers in actions). Making the API as close to the HTTP spec is important, and it shouldn't be the place to introduce SvelteKit specific concepts (path is required, "" means current path, `"." means current dir).
Also, this breaks compatibility with every other meta-framework (including Astro, Next.js, and Unjs/Nuxt), as well as the popular cookie package. That's disappointing from a library author perspective

I'll be honest, I'm very surprised at the number of 👍 reactions here. It would be useful to know how many of those are because of the compatibility-with-other-frameworks thing, and how many are because people genuinely want the confusing default behaviour. (Sound off if you're one of the 21 — so far — people who reacted!) Doing the default-HTTP-spec thing is good in the absence of an alternative, but when relying on the default behaviour is a frequent source of confusion and bugs, it's the framework's job to push people towards more reliable outcomes.
I'm sympathetic to the cross-framework issue! But I'm not sure it should be decisive — if anything, I'd love to see other frameworks (and libraries that support them) adopt the same constraint. I do think it's better for users in the long run.

I just don't think it's the right place to put it. From the API/types, I'd expect it to work exactly like how HTTP cookies would. secure is a boolean because the flag exists or doesn't. I can omit the expiration to make it a session cookie. I don't set the path option to limit it to the current path. It's the same issue in Express - its maxAge option uses milliseconds instead of seconds. It's another thing I have to check with the docs. It's another thing inconsistent with the standard. Because, I do think, for better or for worse, the previous API can be considered the de-facto standard in JS and will likely continue to be so. I don't think deviating it from it and adding SvelteKit specific concepts to patch it is worth the safe guard it provides - especially since it's not a security issue. You learn once in SvelteKit or whatever framework you first made the mistake, and you live with it. It's just part of the web.

I don't set the path option to limit it to the current path

Which perfectly encapsulates why we made this change — omitting path doesn't limit the cookie to the current path — if you omit path when setting a cookie on /foo/bar, then the cookie will apply to /foo/bar but also to /foo and /foo/baz. The cases where that outcome is desirable are very rare, in my experience. If the behaviour is confusing enough that the maintainer of an auth library misstates its effects, it's probably not a very good default!
And we already deviated from those defaults — we default httpOnly to true, and secure to true unless you're developing locally — because the defaults are bad. Having opinions about these things, and nudging people towards better outcomes, is the whole point of a framework. The only difference between path and httpOnly/secure is that there's no default we can set on your behalf, so it has to be a required option.
I strongly encourage you to consider this question from the opposite angle — rather than asking SvelteKit to undo a necessary change to facilitate compatibility with cross-framework libraries, what if cross-framework libraries made path required like we do? More people will benefit that way.

Sorry I meant to say path directory there. Anyway, I guess it's just different design philosophy. I value standardized API that's consistent with the spec over potentially safer API, and I don't want/expect the framework to do everything for me. Even if other frameworks change their API, we still have a fractured ecosystem right now - and IMO for very little reason.

I'll be honest, I'm very surprised at the number of 👍 reactions here. It would be useful to know how many of those are because of the compatibility-with-other-frameworks thing, and how many are because people genuinely want the confusing default behaviour

it linked to from pilcrow's twitter with thousands of followers:
https://twitter.com/pilcrowonpaper/status/1735468834843418738
so that might one of the reasons why there are lots of 👍 reactions


raspisump installs improperly with PIP9

This appears to be caused by pip 9 using wheels to install and I used sdist when packaging raspisump and have some commands in setup.py that setup the folder environment.
Older versions of pip still work fine but pip 9.x is the default on Raspbian Stretch that was just released.  if you install raspisump and it does not create the /home/pi/raspi-sump directory you can do the following until I figure this out.
sudo pip3 uninstall raspisump
sudo pip3 install --no-binary :all: raspisump
This will force pip to run all commands in setup.py.
This is temporary as I need to read up more on wheels

Good afternoon  Al,
I'm not a newbie in linux but not far from that ;-)
I tried to install Raspisump without succes
I tried these command to overcome the PIP 9 issue that you mention here
sudo pip3 uninstall raspisump
sudo pip3 install --no-binary :all: raspisump
And when I search in the filesystem there is no raspisump.py anywhere.
Any help would be much appreciate.
Regards
Dan

The file is rsump.py and should be located in /usr/local/bin

I am closing this issue.  I don't  think there is a solution.   Everything I read seems to tell me that the ugly pip command is what is needed to install extra files.    I am considering a major refactoring of the code to make it more compliant with standards for file locations and releasing a deb for it so it can be installed from the repos.


Help tooltips, resource links

If you have suggestions to improve the help tooltip texts or better "learn more" resources for them, I'll be very happy to hear.

Resources page 4aa3f8e1c98e003a075d8a0d6481fc5ef622c9b7

Perhaps a simple nested directory similar to this may help https://www.futuretools.io/.
See code reference here - https://www.youtube.com/watch?app=desktop&v=l0kHyQBs69M


Set custom views

I'm using a custom layout, but I want to pre-set the value of a seekbar to make it start at a certain value. But I don't want to do it in the xml layout file because the value will change based on user usage. How can I do this?

https://github.com/afollestad/material-dialogs#later-access

This is to access later, I want to access before

Then you inflate the View before building the dialog and pass in the inflated view.

Could you give me an example please?

LayoutInflater li = LayoutInflater.from(context);
View view = like.inflate(R.layout.name, false);
// Setup view
new MaterialDialog.Builder(context)
   .customView(view, ...)
   .show();

Actually, using "Later Access" is what you should do. You just show the dialog after setting the view up.

MaterialDialog dialog = new MaterialDialog.Builder(context)
   .customView(R.layout.name, ...)
   .Build();

View view = dialog.getCustomView();
// Setup view

dialog.show();

Both of the above are equivalent.

Ok thank you, I'll try tomorrow and I'll tell you if I solved the problem 😄

It works 👍


scripts:  update to the status quo in executable args

This updates the scripts so they are up-to-date with the required args.

After a discussion with @disassembler, we extended scope to fix the socket path business.
The changes in https://github.com/input-output-hk/cardano-node/pull/178 removed a singular scheme for deriving socket paths from node IDs, which has a fractal of repercussions we'd rather avoid.

bors r+


Add enclave support for peer pods to aws provider

Can we include enclave option for aws provider when create ec2 instances for peed pod? The option can only be configured when launch a new instance.
aws cli:
aws ec2 run-instances --image-id ami- --count 1 --instance-type c5.2xlarge --key-name dev_nitro.pem --region us-east-1 --enclave-options 'Enabled=true' --subnet-id

Can we include enclave option for aws provider when create ec2 instances for peed pod? The option can only be configured when launch a new instance.
aws cli: aws ec2 run-instances --image-id ami- --count 1 --instance-type c5.2xlarge --key-name dev_nitro.pem --region us-east-1 --enclave-options 'Enabled=true' --subnet-id

@gaussye how do you plan to use nitro enclave with peer-pods ?

@bpradipt We are still in the POC phase. If everything goes well, we may start the testing on enclave instance in Jan 2025.

@gaussye once you have something ready, may be we can discuss in our community call on the best way to integrate it.


Update README.md

Made Irit-approved grammar changes [mostly changing passive voice to active voice and fixing hyphens]

Under "Creating a new program for mbed OS 2," both links in the following sentence go to the same place:
"mbed CLI is also compatible with mbed OS 2 programs based on the mbed library, and will automatically import the latest mbed library release if you use the --mbedlib option:"
Should one of these links go somewhere else?

Changes look good to me! Care to take a look @screamerbg?

Thanks!


Deploy script fails on travis if there were no changes in the files to be deployed.

This is fixed now.


build html skeleton

Remove unnecessary files & putting necessary files in their correct place. Some files that were repeated by creating Public directory added copies in root.


handle virtual packages

nom provides

Would the implementation of this be something in https://github.com/paultag/go-resolver/blob/ebf7e68577f7d86bf91628ac4b1cba5a89cba623/index.go#L28 to loop over all the Provides too?

Oh, we don't have Provides at that point.  Hmm.

Well. We can't decide if there are multiple - so only if there's exactly
one. Might need better modeling.
On Aug 6, 2015 12:07 PM, "Tianon Gravi"<EMAIL_ADDRESS>wrote:

Would the implementation of this be something in
https://github.com/paultag/go-resolver/blob/ebf7e68577f7d86bf91628ac4b1cba5a89cba623/index.go#L28
to loop over all the Provides too?
—
Reply to this email directly or view it on GitHub
https://github.com/paultag/go-resolver/issues/4#issuecomment-128420256.

Although something later in the chain might relate. Hurm.
On Aug 6, 2015 12:08 PM, "Paul R. Tagliamonte"<EMAIL_ADDRESS>wrote:

Well. We can't decide if there are multiple - so only if there's exactly
one. Might need better modeling.
On Aug 6, 2015 12:07 PM, "Tianon Gravi"<EMAIL_ADDRESS>wrote:

Would the implementation of this be something in
https://github.com/paultag/go-resolver/blob/ebf7e68577f7d86bf91628ac4b1cba5a89cba623/index.go#L28
to loop over all the Provides too?
—
Reply to this email directly or view it on GitHub
https://github.com/paultag/go-resolver/issues/4#issuecomment-128420256.


Blueprint provisioning fails when ansible playbooks runs a long time

Now we are using sync rest api for sending commands to peer-os. It fails when blueprint ansible runs too long time. Error catches end of file
We have to change rest api to async for sending commands.


How to load model on Flask app?

I've got this working on the Google collab document, but am running into issues with Flask with the error AttributeError: Can't get attribute 'FeatureLoss' on <module '__main__' from '/home/ubuntu/anaconda3/bin/flask'>. I believe this is related to https://discuss.pytorch.org/t/error-loading-saved-model/8371 and https://stackoverflow.com/questions/27732354/unable-to-load-files-using-pickle-and-multiple-modules where some solutions have been suggested, but I can't work out how to get it working in this case.
Basic Flask app (this is of course incomplete, but throws the AttributeError error when trying to load the model):
from flask import Flask
app = Flask(__name__)

import fastai
import time
from fastai.vision import *
from fastai.utils.mem import *
from fastai.vision import open_image, load_learner, image, torch
import numpy as np
import urllib.request
import PIL.Image
from io import BytesIO
import torchvision.transforms as T
from PIL import Image
import requests
from io import BytesIO
import fastai
from fastai.vision import *
from fastai.utils.mem import *
from fastai.vision import open_image, load_learner, image, torch
import numpy as np
import urllib.request
import PIL.Image
from io import BytesIO
import torchvision.transforms as T

class FeatureLoss(nn.Module):
    def __init__(self, m_feat, layer_ids, layer_wgts):
        super().__init__()
        self.m_feat = m_feat
        self.loss_features = [self.m_feat[i] for i in layer_ids]
        self.hooks = hook_outputs(self.loss_features, detach=False)
        self.wgts = layer_wgts
        self.metric_names = ['pixel',] + [f'feat_{i}' for i in range(len(layer_ids))
              ] + [f'gram_{i}' for i in range(len(layer_ids))]
    def make_features(self, x, clone=False):
        self.m_feat(x)
        return [(o.clone() if clone else o) for o in self.hooks.stored]
    def forward(self, input, target):
        out_feat = self.make_features(target, clone=True)
        in_feat = self.make_features(input)
        self.feat_losses = [base_loss(input,target)]
        self.feat_losses += [base_loss(f_in, f_out)*w
                             for f_in, f_out, w in zip(in_feat, out_feat, self.wgts)]
        self.feat_losses += [base_loss(gram_matrix(f_in), gram_matrix(f_out))*w**2 * 5e3
                             for f_in, f_out, w in zip(in_feat, out_feat, self.wgts)]
        self.metrics = dict(zip(self.metric_names, self.feat_losses))
        return sum(self.feat_losses)
    def __del__(self): self.hooks.remove()

path = Path(".")
learn=load_learner(path, 'ArtLine_650.pkl')

@app.route("/", methods=["POST"])
def home():
    # take user's sent image and turn it into line drawing
    return ''

if __name__ == '__main__':

    app.run(debug = True)

How would I get this working with Flask?

The complete stacktrace when running the above Flask app is as follows:
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/bin/flask", line 10, in <module>
    sys.exit(main())
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 966, in main
    cli.main(prog_name="python -m flask" if as_module else None)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 848, in run_command
    app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 305, in __init__
    self._load_unlocked()
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 330, in _load_unlocked
    self._app = rv = self.loader()
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 392, in load_app
    app = locate_app(self, import_name, None, raise_if_not_found=False)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 240, in locate_app
    __import__(module_name)
  File "/home/ubuntu/ArtLine/flask/app.py", line 52, in <module>
    learn=load_learner(path, 'ArtLine_650.pkl')
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/fastai/basic_train.py", line 621, in load_learner
    state = torch.load(source, map_location='cpu') if defaults.device == torch.device('cpu') else torch.load(source)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/torch/serialization.py", line 584, in load
    return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/torch/serialization.py", line 842, in _load
    result = unpickler.load()
AttributeError: Can't get attribute 'FeatureLoss' on <module '__main__' from '/home/ubuntu/anaconda3/bin/flask'>

Hi, I made a runnable flask demo, see: https://github.com/jwenjian/artline-demo

Thanks for that, in the Flask app though I'm still getting the same error. Stacktrace when running your Flask app:
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/bin/flask", line 10, in <module>
    sys.exit(main())
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 966, in main
    cli.main(prog_name="python -m flask" if as_module else None)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 848, in run_command
    app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 305, in __init__
    self._load_unlocked()
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 330, in _load_unlocked
    self._app = rv = self.loader()
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 392, in load_app
    app = locate_app(self, import_name, None, raise_if_not_found=False)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 240, in locate_app
    __import__(module_name)
  File "/home/ubuntu/artline-demo-main/app.py", line 29, in <module>
    pl.load_pkl()
  File "/home/ubuntu/artline-demo-main/app.py", line 24, in load_pkl
    learn = load_learner(path, 'ArtLine_650.pkl')
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/fastai/basic_train.py", line 621, in load_learner
    state = torch.load(source, map_location='cpu') if defaults.device == torch.device('cpu') else torch.load(source)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/torch/serialization.py", line 584, in load
    return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/torch/serialization.py", line 842, in _load
    result = unpickler.load()
AttributeError: Can't get attribute 'FeatureLoss' on <module '__main__' from '/home/ubuntu/anaconda3/bin/flask'>

Hi, I made a runnable flask demo, see: https://github.com/jwenjian/artline-demo

I was able to run it with this.


Support populating DestinationTable in the response when using CREATE OR REPLACE table.name.foo AS (...) syntax

We're looking at using the bigquery emulator as a testing backend with the dbt-bigquery project - While investigating issue https://github.com/dbt-labs/dbt-bigquery/issues/358#issuecomment-1561763403 I found that this project doesn't populate the DestinationTable fields in the response to the client if the query uses the CREATE OR REPLACE table.name.foo AS (...) syntax. The emulator handles the case when DestinationTable is part of the Job Submit API call and a normal select * from source.table.foo (ie: bq --api ... query --destination_table 'table.name.foo' 'select * from source.table.foo), but dbt-bigquery likes to use the CREATE OR REPLACE table.name.foo AS (...) syntax because you can have more controls over how the results are materialized https://docs.getdbt.com/docs/build/materializations
I cannot speak to the feasibility of such a change, I'm just logging it as a behavior difference between BQ the service and the emulator.

this is a duplicate of https://github.com/goccy/bigquery-emulator/issues/180
there is also a merge request linked to this issue. I tried it myself and it works like a charm.


Fix the rat exclude for .policy.yml

This fixes the broken build introduced by https://github.com/palantir/spark/pull/451

Still not sure why the required checks disappeared. I would assume that the only thing could be that circle 2.0 was down yesterday, but seems like a big leap.


Showing Weapon Damage on weapons

As title says, a little visual of damage on weapons when looking at the description in your inventory (similar to how it shows cost + level)
Crappy photoshop to show it

if no one else wants to work on it, if you could point me in the right direction I could take a crack at it

I can imagine this being handled in a similar way to how spells are, prepending the description.

Yes exactly the thought process I was thinking!


Repeated values

This PR includes the ability to define and set default values inside a list.
key = [
  "UPDATE",
  "{{ input:name }}",
  "WHERE",
  "{{ input:id }}"
]

Codecov Report

Merging #119 into master will decrease coverage by 0.87%.
The diff coverage is 15.87%.

@@            Coverage Diff             @@
##           master     #119      +/-   ##
==========================================
- Coverage   86.64%   85.77%   -0.88%
==========================================
  Files          89       89
  Lines        5144     5201      +57
==========================================
+ Hits         4457     4461       +4
- Misses        426      474      +48
- Partials      261      266       +5

Impacted Files
Coverage Δ

pkg/codec/proto/message.go
57.80% <0.00%> (-9.77%)
:arrow_down:

pkg/providers/schemas.go
96.58% <0.00%> (-3.42%)
:arrow_down:

pkg/references/forwarding/references.go
90.36% <0.00%> (-2.24%)
:arrow_down:

pkg/references/references.go
80.00% <0.00%> (-1.82%)
:arrow_down:

pkg/specs/property.go
95.65% <ø> (ø)

pkg/providers/hcl/specs.go
73.62% <15.00%> (-2.74%)
:arrow_down:

pkg/codec/metadata/manager.go
85.71% <100.00%> (+1.84%)
:arrow_up:

pkg/transport/grpc/utils.go
80.00% <100.00%> (ø)

pkg/transport/http/http.go
55.76% <100.00%> (ø)


Remove waitForANodeToBecomeActive from Docker

Signed-off-by: Morgan Davies<EMAIL_ADDRESS>

run tests


Allow custom attributes for meta links in footer

One of our requirements is that our meta links must open in a new tab. For this to work we need to be able to add the following custom attributes to each meta (footer) link: target: '_blank', rel: 'noopener noreferrer'.
These attributes appear to be accepted by the implementation but not actually applied:

Is it possible to honour these custom attributes?

Thanks @rhysbarrett - this was an oversight on my part. The custom_meta_html_attributes are applied to the meta container not each item. I've raised a PR (#349) that adds support for an array of hashes (in addition to the current hash) which should give you what you need.

Fixed by #349


Cleanup header analysis

Cppcheck hinted that the last header++; has no effect. So I analyzed this code a bit deeper.  Variables names were sometimes horrible so I suggested better ones.

@richsalz Yes, most likely there're more important problems. Yet the codebase is large and has been extensively inspected by core maintainers. Something new is needed - this time it was a static analysis tool which spotted a useless statement and also helped identify an unclear variable name so that both can be fixed and forgot about and something more problematic can be advanced to. Noise is often perceived as something to ignore but it's often better to clean the noise so that something interesting can be found behind it.

Sure, fixing the ++ is worthwhile.  Changing the variable name, or adding a new one, is not.

@richsalz I replaced the commit.

+1  I'll merge once another team member reviews.

+1

pushed at 33a6d5a, thanks!

aargh.https://rt.openssl.org/Ticket/Display.html?id=4320  This is why "code cleanup" must be done carefully and safely.  :(

@richsalz That page requires to log in. What's there?

You can loign user/pass guest/guess.  But never mind, the RT seems wrong.

@richsalz The RT is correct. header_pp stores address of header and is used after the removed line. The removed line has effect.

Arg, aliased pointers.  Missed that, thanks.

@richsalz Although it is a false positive in Cppcheck I'd say the code would get simpler and better if pp_header variable is eliminated and &header is used instead.

I agree with remove pp_header.

@richsalz I submitted https://github.com/openssl/openssl/pull/705


added things from bose

Vertical gradient layer
to array from array slice
some geometry helpers like ip_topLeft

Comments ... Bump ... Ship It


#2179 - Queued Assessments - Create DB migrations

Created new columns on sims.student_assessments.
Created new column on sims.applications.
The enum for the new type (StudentAssessmentStatus) was already present. The new enum items were added, and the Submitted type was kept for backward compatibility, ticket #2188 will be responsible for having it removed.

Nice start to queued assessments. Just few minor comments.


Add methods for manual flushing and changing write offset

Use case - generating fragmented MP4s for HLS streaming requires
creating an initialization segment with decoder-specific config
(the moov box). Manual flush allows writing out the moov box
before adding samples.
Similar with write offset - after writing the moov box, one wants
to write media segments that begin with a moof box and have 1 or more
mdat boxes. This adds a method for overwriting the write offset,
in case the library user wants to treat MP4E_mux_t as an opaque type.

Realized I broke some compatibility by never updating the fragments count - pushed an updating to increment it when writing out the header.


Crash on startup

What are you experiencing an issue with?

[x] Aurora
[ ] Aurora supported game, (Fill in the game)
[ ] Aurora Wrapper
[ ] Aurora Profile
[ ] Aurora supported device, (Fill in problematic devices)
[ ] Aurora Scripts
[ ] Aurora Updater
[ ] Aurora Lighting issue
[ ] Other, (Fill in another issue here)

What kind of an issue is it?

[x] Crash
[ ] Performance problems
[ ] Visual bug
[ ] Localization issue
[ ] Enhancement suggestion
[ ] Device issue
[ ] Other, (Fill in another type of issue here)

Expected behavior:
Explain here what should happen.
The program should launch
Actual behavior:
Explain here what happened instead.
Program crashes on start ("Program stops working" window comes up)
How often does this problem occur?

This problem occurs... (Every time)
Please describe the steps to reproduce this issue:
The issue can be reproduced by doing following steps:

Launch the program (As admin or not, it happens with both)
Program launches
Program stops working ("Program stops working" window comes up)

What is the version of Aurora you are experiencing this issue with?

My version is... (File version: <IP_ADDRESS> and the Product version: 0.6.1-dev4)
Does the previous version of Aurora have this issue?
The previous version, (Not on 0.6.0b Beta, but after i followed the disabling csgo and dota 2 profiles from the logitech software the program did nothing else), did/did not have this issue.
Please include any logs, screenshots, or files that are related to this issue:

No logs

I have no problems with launching Aurora itself, but I can't reach Aurora UI, it will crash. Using old versions won't help, deleting settings as  well.

@RubiRubyx @woloss Could you both post your log files?

@simon-wh Unfortunately i uninstalled aurora long ago, do i do not have those logs


[Question] [ws-nexus-integration] How does it work for offline??

I used nexus On-Prem. Does Mend generate update-request.txt??
How will Mend upload the results?
BR,
Rina

Hi @RinaGSS ,
Mend integration with nexus doesn't generate update-request.txt as it works by default with offline=False
Meaning the scan results are sent directly to your Mend application.
To scan in an offline mode ( create update-request.txt in the end of the scan) - please set the WS_OFFLINE environment variable to True.
It will generate the update-request.txt in the tmp directory that you will need to upload later on :
/tmp/ws-nexus-integration/whitesource/update-request.txt
For example :

Hi @rammatzkvosky
Where is "WS_OFFLINE"??
In the tmp\ws-nexus-integration-22.10.1\config\params.config??
There is no offline parameter here.


Detect screen mirroring and setup the view accordingly

When presenting, I like to have one window opened with slides + notes (presenter view) and the second window with the slides only (this is what the audience sees). To do this today you need to disable screen mirroring and then move one window to the projector and another one (with notes) to your laptop). This works, however, sometimes I do demos and like to switch to the terminal or a different window. This means that I need to turn on screen mirroing, do the demo, then switch back to separate displays.
Does anyone know if there's a way in Javascript to detect that screens are being mirrored and set up the presenter view accordingly (i.e. main screen with the presentation only and laptop screen with slides + notes)?

@peterj: Not a solution to your problem but an alternative for demos: You can actually run the dem inside your presentation using somtehing like https://xtermjs.org.

Thanks for this - I'll take a look, it might definitely work for terminal only based demos.

this request makes no sense, at least not how you're phrasing it.
if screens are mirrored, no software can manage to render different stuff in each screen. there's no way to do it either with remark or powerpoint or any other tool, afaik.

Have you read the description where I explain in more detail what I mean?
PowerPoint does exactly what I want - changes/switches the way screens are mirrored/extended and automatically opens and sets up presenter notes on one screen and presentation on the other.


[REQUEST & QUESTION] pSilent Aimbot & VAC Bypass

Request : pSilent Aimbot
Question : Can't open the menu while using VAC Bypass (https://github.com/danielkrupinski/VAC-Bypass)

Use the vac bypass loader  here.

You have to execute your Injector as Administrator, otherwise it won't work.

pSilent is RIP since 2015, LOL.

Use the vac bypass loader  here.

yes i am using that bypass but still it wont load Osiris, i use As0nar Injector

yes i am using that bypass but still it wont load Osiris, i use As0nar Injector

Use a injector not this.


Improving Retrieval Performance through Combined Cross-Encoder and Bi-Encoder Approach

Issue Description:
We are currently utilizing a neural retriever based on the bi-encoder vector search method. However, it has come to our attention that the performance of the bi-encoder approach is suboptimal when compared to the cross-encoder method, as highlighted in the referenced research paper (link).
Desired Solution:
We propose the integration of both Cross-Encoder and Bi-Encoder methods to enhance retrieval performance, particularly in scenarios involving large datasets. Cross-Encoders demonstrate superior performance, but they encounter scalability challenges with extensive datasets. To address this, a hybrid approach can be employed in scenarios like Information Retrieval and Semantic Search. Here's the suggested process:
Initiate retrieval using an efficient Bi-Encoder to identify the top 100 most similar sentences for a given query.
Subsequently, employ a Cross-Encoder to re-rank the initial 100 matches. This involves computing scores for each (query, hit) pairing.
By incorporating a Cross-Encoder-based re-ranker after the initial retrieval, a notable enhancement in final results for users can be achieved.
Considered Alternatives:
We have evaluated several alternative solutions and features in pursuit of improved retrieval performance. However, none have proven as effective as the combined Cross-Encoder and Bi-Encoder approach proposed above.
Additional Context:
For a more comprehensive understanding, any supplementary context or relevant screenshots related to this feature request will be provided as necessary. Your consideration of this enhancement would be greatly appreciated.

@navneet1v  -- Let's move this to the neural-search repo

@opensearch-project/admin I think we need an OpenSearch maintainer or admin to move this to https://github.com/opensearch-project/neural-search


blocking-pod-selector blocks on non-running pods

kured's --blocking-pod-selector appears to only look for the existence of Pods matching the given selector. This means that pods in, e.g., the state Completed (such as a finished CronJob) will block reboots; I don't believe this is how this feature is intended to work.
We run kured in a Kubernetes cluster, and we have a few CronJobs that we run that we want to block reboots. Thus, we configured kured with --blocking-pod-selector=kured-prevent-reboot=true; we then set that label on the relevant CronJobs. We are seeing kured refuse to reboot nodes, even when those jobs aren't running.
The code I think is involved in this process is here, and appears pretty straight-forward: it merely lists out pods according to the provided label, and adds a field selector to restrict to only pods scheduled on the same VM as the kured that is doing the query. I think the only thing it misses is that it isn't ignoring pods in the Completed or Error states; they exist, but they're not really running, and preventing reboots means a CronJob that — even though it doesn't overlap kured's window — keeps getting scheduled on the same node can prevent reboots indefinitely by just having the Completed pod hanging around.

As an example, In our logs, we see:
time="2020-11-08T00:59:52Z" level=warning msg="Reboot blocked: matching pods: [AAA-1604739600-v876j BBB-1604732400-pr2ps CCC-1602165600-fptr4 CCC-1602165600-j8m4f DDD-1604296800-qx5pb]"

(I've masked the names of the jobs.)
As an example, the -v876j Pod is first created:
"I1107 09:00:08.288281    2228 kubelet.go:1901] SyncLoop (ADD, \"api\"): \"AAA-1604739600-v876j_eee(<snip>)\""

About 10 minute later, it finishes:
"I1107 09:11:01.820871    2228 kubelet.go:1946] SyncLoop (PLEG): \"AAA-1604739600-v876j_eee(<snip>)\", event: &pleg.PodLifecycleEvent{ID:\"<snip>\", Type:\"ContainerDied\", Data:\"<snip>\"}"

Then, much later, we get the above message from kured:
time="2020-11-08T00:59:52Z" level=warning msg="Reboot blocked: matching pods: [AAA-1604739600-v876j BBB-1604732400-pr2ps CCC-1602165600-fptr4 CCC-1602165600-j8m4f DDD-1604296800-qx5pb]"

(kured continues to try, but keeps failing, eventually reaching the end of its window.)
Then, later, k8s actually deletes the pod:
"I1108 09:14:13.307793    2228 kubelet.go:1917] SyncLoop (DELETE, \"api\"): \"AAA-1604739600-v876j_eee(<snip>)\""

This implies to me that the pod was Completed well before kured's window.

I will take this.

Thanks @chentex ! There are a few PRs touching this code, so let's see what your analysis returns and synchronise with those PR to avoid conflicts :)

Has this been fixed or just closed? It doesn't look like it's been fixed.

/remove-lifecycle stale


AES encrypt/decrypt does not validate input length

Reported by @Lukasa

It seems you have a risk of generating encrypted cookies that you cannot decrypt.
Specifically, CookieCryptography.decode just assumes that the original input was only 36 bytes long. However, CookieCryptography.encrypt does not actually check that.
So you have a risk of getting garbage output.
Is there any reason you aren't just using PKCS7 padding? It seems to be supported by BlueCryptor.

Closing since PR have been merged and released in sessions 3.3.2


Dataloader crashes if num_worker>0 on MacOS with Python 3.8

🐛 Bug

When using a DataLoader with num_workers > 0, the process crashes with a stack trace which contains
...
RuntimeError:
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.
...
RuntimeError: DataLoader worker (pid 88201) exited unexpectedly with exit code 1. Details are lost due to multiprocessing. Rerunning with num_workers=0 may give better error trace.
...

The full stack trace is here: https://gist.github.com/PiotrJander/e82ca1d94ae85e746f33a18d7ca2d492
The error does not occur when num_workers is set to 0.
The error only occurs on MacOS (specifically tested on 10.15.7) with Python 3.8 (specifically tested with Python 3.8.5). I could not reproduce it on Linux, or on MacOS with Python 3.6 or 3.7.
To Reproduce
Steps to reproduce the behavior:
Run the following script which is taken verbatim from the official documentation: https://gist.github.com/PiotrJander/be093261db295b2571e3dde952a61ff4
on MacOS with Python 3.8 in an environment containing
pytorch-lightning==1.0.0
torch==1.6.0
torchvision==0.7.0

The full stack trace is here: https://gist.github.com/PiotrJander/e82ca1d94ae85e746f33a18d7ca2d492
Expected behavior

Environment
PyTorch version: 1.6.0
Is debug build: No
CUDA used to build PyTorch: None

OS: Mac OSX 10.15.7
GCC version: Could not collect
CMake version: version 3.16.2

Python version: 3.8
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip3] numpy==1.18.5
[pip3] pytorch-lightning==1.0.0
[pip3] torch==1.6.0
[pip3] torchvision==0.7.0
[conda] Could not collect

Additional notes
This seems to be related to https://github.com/pytorch/pytorch/issues/5301 and https://github.com/pytorch/pytorch/issues/25302 but those issues were closed without providing a solution.
This issue was also reported as a PyTorch issue but maintainers suggested it should be cross-posted here as well.

Isn't this just a limitation of torch.multiprocessing?
Please check
https://discuss.pytorch.org/t/multiprocessing-not-working-on-pytorch-on-macbook/80663/2
There is little evidence here that it is Lightning related.

Hi @awaelchli , thanks for the hint, adding if __name__ == '__main__' helped.
But:
(1) The thread you linked to explains why if __name__ == '__main__' is needed on Windows (no forking semantics). Do we know why this is also a problem on MacOS with Python 3.8, but not with other Python versions, and not on Ubuntu?
(2) Since the problem occurs in a very basic example in the intro to Lighting in the official docs, then perhaps those docs should be updated with a relevant note?

https://github.com/pytorch/pytorch/issues/36515#issuecomment-613150083
Here this person is saying that in python 3.8 the multiprocessing default changed from fork to spawn on mac.
The issue itself is not related directly, but this is one difference I can identify so far which could answer your first question.

That makes sense, thanks! Looks like it's a Pytorch issue, so closing the issue here.