HDDS-5253. make balancer HA aware

What changes were proposed in this pull request?
make balancer HA aware
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-5253
How was this patch tested?
unit test

@lokeshj1703 @ChenSammi @siddhantsangwan PTAL! if the logics looks good , i will add more unit test in additional commit, thanks

i have updated the PR according the comments, @lokeshj1703 @ChenSammi @siddhantsangwan  please take a look!

@JacksonYao287 Can you also add a UT with HA to test the consistency of move?

Can you also add a UT with HA to test the consistency of move?

@lokeshj1703 , sure, thanks, if the logic looks good to you now,  i will add UT in a new commit

@lokeshj1703 I have added UT and integration tests for move HA, PTAL!

CI failures seems not caused by this patch, i will merge mater branch again after they are fixed! #2420

Also we will need to make sure that balancer is always restarted on leader with the new configuration. This would be a separate PR.

Also we will need to make sure that balancer is always restarted on leader with the new configuration. This would be a separate PR.

sure , will do this

@JacksonYao287 We will also need to add timeout for move with the leader changes. After a leader change the move will be reset so I think we will need to handle the timeouts as well. It might require some thought. Please see if you would like to address it in this PR.
Let's also rename jira and PR to sth like Support move with HA.

We will also need to add timeout for move with the leader changes. After a leader change the move will be reset so I think we will need to handle the timeouts as well. It might require some thought. Please see if you would like to address it in this PR.

thanks @lokeshj1703 for pointing out this. i think it is better off addressing it in a new jira, will do it later

@JacksonYao287 Thanks for the contribution! I have committed the PR to master branch.

thanks @lokeshj1703 for the review!


RN 0.47+ android support

Thanks for the pull request.  Do you mind updating the readme with any information android users might need?

Hi ! I don't see any more information I could to provide regarding this PR :)

Ok, cool.  Just want to make sure.  This works with older version of RN too?  If so, I'll merge.


md-list-item not a known element

Bug, feature request, or proposal:
Bug
What is the expected behavior?
Should render md-list and md-list-item
What is the current behavior?
Receives an error:
Uncaught Error: Template parse errors:
'md-list-item' is not a known element:
1. If 'md-list-item' is an Angular component, then verify that it is part of this module.
2. If 'md-list-item' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the<EMAIL_ADDRESS>of this component to suppress this message. ("

 <md-list> [ERROR ->]<md-list-item> </md-list-item> </md-list>

 "): ng:///AppRoutingModule/Login.html@0:52
'md-list' is not a known element:
1. If 'md-list' is an Angular component, then verify that it is part of this module.
2. If 'md-list' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the<EMAIL_ADDRESS>of this component to suppress this message. ("

 [ERROR ->]<md-list> <md-list-item> </md-list-item> </md-list>

 "): ng:///AppRoutingModule/Login.html@0:42

Here is my app.module.ts:

// Angular Core
import { RouterModule, Routes } from '@angular/router';
import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";

// Angular Material
import { MaterialModule, MdCoreModule, MdToolbarModule, MdSidenavModule, MdButtonModule, MdChipsModule, MdListModule, MdInputModule } from '@angular/material';

// App Component
import { AppComponent } from "./app.component";
import { AppRoutingModule } from "./app.routes";

@NgModule({
  // Components, Pipes, Directive
  declarations: [
    AppComponent
  ],
  // Entry Components
  entryComponents: [
    AppComponent
  ],
  // Providers
  providers: [
  ],
  // Modules
  imports: [
    BrowserModule,
    AppRoutingModule,
    MaterialModule,
    MdCoreModule,
    MdListModule,
    MdInputModule,
    MdToolbarModule,
    MdSidenavModule,
    MdButtonModule,
    MdChipsModule
  ],
  // Main Component
  bootstrap: [ AppComponent ]
})
export class AppModule {
  constructor() {

  }
}

Please try to export your angular/material  modules.

@DerekTBrown, where are you using the md-list? In a component Inside AppModule? Or in other module? You must import material modules in the module you want to use them.

You need to import MdListModule in whatever component uses <md-list-item>. Somewhere in your application it is missing.

@jelbourn No, one doesn't need to import the module in every component that needs a material component, all he needs to do is import the module in his own module, just like he did.
It's probably because you are importing 'MaterialModule, MdCoreModule', try to delete these two, they are not needed, just import the modules you need.
Or you can just import MaterialModule and delete the rest, MdListModule, MdInputModule, etc.
// Angular Core
import { RouterModule, Routes } from '@angular/router';
import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";

// Angular Material
import { MdToolbarModule, MdSidenavModule, MdButtonModule, MdChipsModule, MdListModule, MdInputModule } from '@angular/material';

// App Component
import { AppComponent } from "./app.component";
import { AppRoutingModule } from "./app.routes";

@NgModule({
  // Components, Pipes, Directive
  declarations: [
    AppComponent
  ],
  // Entry Components
  entryComponents: [
    AppComponent
  ],
  // Providers
  providers: [
  ],
  // Modules
  imports: [
    BrowserModule,
    AppRoutingModule,
    MdListModule,
    MdInputModule,
    MdToolbarModule,
    MdSidenavModule,
    MdButtonModule,
    MdChipsModule
  ],
  // Main Component
  bootstrap: [ AppComponent ]
})
export class AppModule {
  constructor() {

  }
}

I am experiencing this issue after upgrading from 2.0.0-beta.6 to 2.0.0-beta.11.

+1

Alternate way is to use class attribute of button or any relevant element. Like -  Foo . Ultimately md-button or md-raised are css classes.

I fixed this by adding: import {MatListModule} from '@angular/material/list'; to my module

@leeroya  I did that but the same error keeps coming.
Also I don't have any extra modules being imported like @dungahk has said above.
I'm importing mat-list in app.module.ts and using it in menu.component.html as shown:
Also I don't think I need to import it everywhere like in app.component.ts  or menu.component.ts ??


How to store the datetime by unix timestamp

I set the $dateFormat = 'U' is not work.

I personaly use Carbon::now()->timestamp  to save current time to Unix timestamp format.

@nhanle92 It wil still use mongotime to save the updated_at When I updated the document.

Why not use
use MongoDB\BSON\UTCDateTime;

new UTCDateTime('your date');

$modelResult = [
    'date'=> $obj['date']->toDateTime()
]

I had a similar problem.
using the protected $dates = ['entry_date']; only worked for Date fields that where not nested.
This is the workaround I found that is now working for me. I created an Observer on "saving" of my model that casts any nested date fields using the below function and these then save in the correct format
     * Returns the date as required by dates format in MongoDB
     *
     * @param   string $date The string to check
     * @return  string
     */
    function get_mongo_date($date)
    {
        if ($date instanceof \MongoDB\BSON\UTCDateTime)
        {
            return $date;
        }
        else if ($date instanceof \Carbon\Carbon)
        {
            return new \MongoDB\BSON\UTCDateTime(new DateTime($date->toDateTimeString()));
        }
        else
        {
            return new \MongoDB\BSON\UTCDateTime(new DateTime($date));
        }
    }


⚠ Bofrost.be has degraded performance

In f217b7d, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 2156 ms

Resolved: Bofrost.be performance has improved in 9d3a663 after 6 minutes.


Input validation

Can you please assign input validation task to me under #gssoc label @Vin205

@HarshadaGirase resolved!


SidebarSearch on mobile device

Dear @volkanceylan,
I'm not able to use the sidebar search from a mobile device...
I tried also with your demo site but the behaviour is always the same: as soon as I click on the input, I lose the focus and I'm unable to write inside...
Any idea?
Thank you very much
Bye

I think that when the android software keyboard appears, some kind of resize event is activated and then I lost focus...
In fact if I "long click" the input (when the paste menu shows up) then I'am able to keep the focus (no software keyboard appears in that case)...
Still digging btw...
Bye

Update: this piece of code in the _Layout.cshtml file seems to patch the issue:
var isFocus = false;
$('#SidebarSearch').focusin(function(event) {
isFocus = true;
});
$('#SidebarSearch').focusout(function(event) {
isFocus = false;
});
$(window).resize(function(event) {
if(isFocus){
event.stopImmediatePropagation();
}
});
Any idea on how to do it in a cleaner way?
Thank you very much
Bye

It might be due to some AdminLTE scale event handling. Need to dive deeper but hard to debug in android browser. Maybe search in its repository issues and see if something similar there?

Good idea I'll try to search in the AdminLTE repository...
Probably this kind of resize/scale event introduced some kind of side effect in Serenity because in the original AdminLTE demo here:
https://almsaeedstudio.com/themes/AdminLTE/index2.html

the search input keep the focus when clicked (although there isn't any kind of event bound to it).
I let you know if I discover something else!

Same scenario I am experiencing.. But in IOS , it works fine..

It's not easy to debug on mobile...I already tried to disable the search functionality, but nothing changes...
I think that there is some kind of resize event not related to AdminLTE, but honestly I don't know...

I've worked with browser devices while using ionic to develop some apps...
I remember that, in Ios, when keyboard is shown, the page is actually shifted up. So it does not trigger the resize event...
But in Android.... oh well... that thing triggers and it's hard to know whether the keyboard was shown or not...
Have you tried debuging using chrome://inspect ? It makes a webapp/hybrid app developer's life easier. I'll have a look later.
Best Regards.

Thanks for your feedback @edson!
I'll try with your chrome suggestion and I let you know...
Bye

OK, your report has missed that even latest AdminLTE has this same issue. You won't notice it by default, because it doesn't use Fixed Layout by default. In your android browser, enter AdminLTE site, check fixed layout and see for yourself @marcobisio. So i can confirm this is an issue with Fixed Layout + AdminLTE + SlimScroll

Well looks like i've managed to fix this issue by not applying slimscroll to full sidebar, but only to UL containing menu items. AdminLTE recreates slimscroll div on resize, so search input gots lost then comes back again thus loses focus.
Try it on serenity.is and let me know if it works. It does in my Z3 compact.

You're right Volkan...
I had not ever noticed ... the default layout of adminlte has cheated me :-/
I'll open an issue on the adminlte github and we will see!
Thanks again Volkan!

Whooops concurrent comments!
Sure let me check...

Yes now it's working fine!!!
I tested it with my Galaxy Note 4 (you know, those that do not explode yet :-D) and Chrome last version.
Give your fix also to the AdminLTE guys!!
Thanks again Volkan!

You're welcome


[move-prover] Add mod to $shl functions

Motivation
This PR add mod to $shl to match the behavior of shift operation between the Move language and the prover.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
cargo test

Nó

The biggest issue for adding mod is correctly getting (or marking) the concrete type for the shift operator for expressions in the spec. In the expression let scaled_value = val << 32;, the type of val will be inferred as u64, which leads to incorrect result. Please feel free to add more concrete comments to the PR, thanks!
public fun create_from_u64(val: u64): FixedPoint32 {
        let value = (val as u128) << 32;
        assert!(value <= MAX_U64, ERATIO_OUT_OF_RANGE);
        FixedPoint32{value: (value as u64)}
    }
    spec create_from_u64 {
        pragma opaque;
        include CreateFromU64AbortsIf;
        ensures result == spec_create_from_u64(val);
    }
    spec schema CreateFromU64AbortsIf {
        val: num;
        let scaled_value = val << 32;
        aborts_if scaled_value > MAX_U64;
    }


Call to a member function wrap() on a non-object when using Yajra datatables

I'm trying to use https://github.com/yajra/laravel-datatables with this MongoDB project.  If I try to use the Eloquent or QueryBuilder, it causes FatalErrorException in QueryBuilderEngine.php line 96:
Call to a member function wrap() on a non-object.
The datatable works fine if I use a collection but with 7k records, processing becomes too slow.
Example
return Datatables::of(DB::collection('Sessions'))->make(true);
Thanks

Have you tried with https://github.com/OpenSkill/Datatable/?
I use it with a couple of MongoDB tables and it works OK.

I'm have same error.
if use  https://github.com/OpenSkill/Datatable/ <== collection get all: ex: User::all()

$this->connection->getQueryGrammar() is null

i'm try change code in line:
$row_count = $this->connection->getQueryGrammar()->wrap('row_count');
to
$row_count = "row_count";
it's work, but, total is 0. And paging do not work.
I think, problem is:
return $this->connection->table($this->connection->raw('(' . $myQuery->toSql() . ') count_row_table'))

in mongodb
select * from (select '1' as row_count from "posts") count_row_table
in Mysql

select * from (select '1' as row_count from posts) count_row_table

Any solution to this problem? Is there any trick to get data from mongodb server-side on datatable?

I'm having the same issue, has anyone made any progress on this?

<?php
namespace App;
use Closure;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Str;
use Yajra\Datatables\Helper;
use Yajra\Datatables\Request;
use Yajra\Datatables\Engines\QueryBuilderEngine;
class MongoQueryBuilderEngine extends QueryBuilderEngine
{
    public function __construct($model, Request $request)
    {
        parent::__construct($model->getQuery(), $request);
        $this->query      = $model;
        $this->query_type = 'eloquent';
    }
    public function count()
    {
        $myQuery = clone $this->query;
        return $myQuery->count();
    }
    public function paging()
    {
        $this->query->skip((int)$this->request['start'])
                    ->take((int) $this->request['length'] > 0 ? (int)$this->request['length'] : 10);
    }
}

use it with your query
new MongoQueryBuilderEngine($query, YRRequest::capture())
...... ->make(true);

hai @marlborock can you explain where is YRRequest come from?

Oh, So you mean YRRequest is \Yajra\Datatables\Request. Ok got it.

Fixed QuerySearch
    protected function compileQuerySearch($query, $column, $keyword, $relation = 'or')
    {
        $query->orWhere(''.$column.'','like','%'.$keyword.'%');
    }

Hi,
I'm with problems in grid @fathur . When i tried create a grid, return this error:
(1/1) FatalThrowableError
Call to undefined method Yajra\Datatables\Request::capture()
Do you can i help?

$query = Permission::select('*');

$datatables = new MongoQueryBuilderEngine($query, \Yajra\Datatables\Request::capture());
return $datatables->make(true);

\Yajra\Datatables\Request::capture()
https://github.com/yajra/laravel-datatables cannot support version 7.5 +


Handle 5xx errors more gracefully in Chat #2495 #2557

Description
Make it clear that the error is on the provider’s side, not Continue’s, and ensure the chat history is preserved.

Checklist

[X] The base branch of this PR is dev, rather than main
[X] The relevant docs, if any, have been updated or created

I'm seconding Patrick's comments here. I think it's probably good to start fresh here, so I'm going to close this particular PR. If we could still use the Toast, but just display some more useful message that would help a lot


How can I redifine shortcuts?

Hi,
Is it possible to redefine keyboard shortcuts? Here is why:
ctrl+shift+t: in Linux ctrl+shift+t is a standard combination to restore a previously closed tab in all web browsers so I can't use it to create a new terminal;
ctrl+shift+{j,k}: just don't work (yes, I ensured the terminal was focused)
Many thanks for this great package!

Just saw in the command palette that the shortcuts are redefined to use Meta instead Ctrl - so all is well!


"protocol" system field is indexed in Elasticsearch with garbage

This is one example @Ivan-Shestakov found. Output below was taken from x-info:
{
    "system":{
        "kind":"ObjectInfoton",
        "path":"/test.permid.org/Test201811_08_1013_03/overwrite/1-21525577150",
        "lastModified":"2018-11-08T10:41:24.756Z",
        "uuid":"2884bf2a6d23feb31ae78ee191a1cf46",
        "parent":"/test.permid.org/Test201811_08_1013_03/overwrite",
        "dc":"cluster1",
        "indexTime":1541673684863,
        "quad":[  ],
        "current":true,
        "protocol":"{{cmwell.rdfDefaultProtocol}}"
    },
    "fields":{  .....  }
}

Root cause found:
bg/application.conf:
rdf {
  defaultProtocol = "{{cmwell.rdfDefaultProtocol}}" #"http"
}

cons logic to populate placeholders:
"cmwell.defaultRdfProtocol" -> defaultRdfProtocol
… but “defaultRdfProtocol” != “rdfDefaultProtocol” :disappointed:

Validated on 1.5.164 environments. Moving to Done.


added integration with Vertex AI

I added Google Vertex AI models for the following use cases:

LLM
chat (single-turn and multi-turn chat)
embeddings

In order to use them, you need to install VertexAI SDK (that is is the private preview) and be whitelisted to list the models themselves:
gsutil cp gs://vertex_sdk_llm_private_releases/SDK/google_cloud_aiplatform-1.25.dev20230413+language.models-py2.py3-none-any.whl .
pip install invoke
pip install google_cloud_aiplatform-1.25.dev20230413+language.models-py2.py3-none-any.whl "shapely<2.0.0"

Your end-user credentials would be used to make calls (make sure you've run gcloud auth login first).

what's the status of this @dev2049, I can address the comments if this is still a WIP?

@MarcDAFrame we're working on a new one that would incorporate the latest changes in the SDK.


ghcjs: bump version number to 0.2.0

Actually should have been this for a while.
cc @luigy

This patch doesn't look right. Did you test that the change actually works? I would have expected the src attribute to change as part of the update?

Sorry @peti I should have written a clear description. This is in response to https://github.com/NixOS/nixpkgs/pull/11252#issuecomment-159752344 and @luigy 's and my conversing on IRC, and indeed is intentionally just changing the number.
Since this commit of ours, https://github.com/NixOS/nixpkgs/commit/5ed4e0c2fdfabdc962582d277d960eb88ab91768#diff-fa89339cb0778ec309597098f017953fR60, from early October, the GHCJS version number has been 0.2.0: https://github.com/ghcjs/ghcjs/blob/2ae1276a97c9f32c4b02080d1bb363cf0c2c553c/ghcjs.cabal#L2


解析MSSQL SSMS客户端发送的SQL出错

SELECT
tbl.name AS [Name],
SCHEMA_NAME(tbl.schema_id) AS [Schema],
'Server[@Name=' + quotename(CAST(

        serverproperty(N'Servername')

       AS sysname),'''') + ']' + '/Database[@Name=' + quotename(db_name(),'''') + ']' + '/Table[@Name=' + quotename(tbl.name,'''') + ' and @Schema=' + quotename(SCHEMA_NAME(tbl.schema_id),'''') + ']' AS [Urn],
tbl.create_date AS [CreateDate],
CAST(tbl.is_memory_optimized AS bit) AS [IsMemoryOptimized],
CAST(CASE idx.type WHEN 5 THEN 1 ELSE 0 END AS bit) AS [HasClusteredColumnStoreIndex],
CAST(tbl.is_remote_data_archive_enabled AS bit) AS [RemoteDataArchiveEnabled],
tbl.temporal_type AS [TemporalType],
CAST(CASE WHEN 'PS'=dsidx.type THEN 1 ELSE 0 END AS bit) AS [IsPartitioned],
CAST(

        ISNULL((SELECT distinct 1 from sys.all_columns

        WHERE object_id = tbl.object_id

        AND is_sparse = 1), 0)

       AS bit) AS [HasSparseColumn],
CAST(ISNULL((select top 1 1 from sys.indexes ind where ind.object_id = tbl.object_id and ind.type > 1 and ind.is_hypothetical = 0 ), 0) AS bit) AS [HasNonClusteredIndex],
CAST(CASE idx.index_id WHEN 1 THEN 1 ELSE 0 END AS bit) AS [HasClusteredIndex],
CAST(case idx.index_id when 1 then case when (idx.is_primary_key + 2*idx.is_unique_constraint = 1) then 1 else 0 end else 0 end AS bit) AS [HasPrimaryClusteredIndex],
CAST(ISNULL((select top 1 1 from sys.indexes ind where ind.object_id = tbl.object_id and ind.type = 3 and ind.is_hypothetical = 0 ), 0) AS bit) AS [HasXmlIndex],
CAST(ISNULL((select top 1 1 from sys.all_columns as clmns join sys.types as usrt on usrt.user_type_id = clmns.user_type_id where clmns.object_id = tbl.object_id and usrt.name = N'xml'), 0) AS bit) AS [HasXmlData],
CAST(ISNULL((select top 1 1 from sys.all_columns as clmns join sys.types as usrt on usrt.user_type_id = clmns.user_type_id where clmns.object_id = tbl.object_id and usrt.name in (N'geometry', N'geography')), 0) AS bit) AS [HasSpatialData],
CAST(ISNULL((select top 1 1 from sys.indexes ind where ind.object_id = tbl.object_id and ind.type = 6 and ind.is_hypothetical = 0 ), 0) AS bit) AS [HasNonClusteredColumnStoreIndex]
FROM
sys.tables AS tbl
INNER JOIN sys.indexes AS idx ON

        idx.object_id = tbl.object_id and (idx.index_id < @_msparam_0  or (tbl.is_memory_optimized = 1 and idx.index_id = (select min(index_id) from sys.indexes where object_id = tbl.object_id)))

LEFT OUTER JOIN sys.data_spaces AS dsidx ON dsidx.data_space_id = idx.data_space_id
WHERE
(CAST(

 case

    when tbl.is_ms_shipped = 1 then 1

    when (

        select

            major_id

        from

            sys.extended_properties

        where

            major_id = tbl.object_id and

            minor_id = 0 and

            class = 1 and

            name = N'microsoft_database_tools_support')

        is not null then 1

    else 0

end

             AS bit)=@_msparam_1 and tbl.is_filetable=@_msparam_2 and CAST(tbl.is_memory_optimized AS bit)=@_msparam_3 and tbl.temporal_type=@_msparam_4 and CAST(tbl.is_external AS bit)=@_msparam_5)
OPTION (FORCE ORDER)

运行结果
com.alibaba.druid.sql.parser.ParserException: syntax error, error in :'m_5)
OPTION (FORCE ORDER)
', expect IDENTIFIER, actual IDENTIFIER pos 3037, line 48, column 200, token IDENTIFIER OPTION

	at com.alibaba.druid.sql.parser.SQLParser.printError(SQLParser.java:287)
	at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:532)
	at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:171)
	at com.cloudbility.dbproxy.v2.common.sqlparser.MsSqlSQLParser.getTables(MsSqlSQLParser.java:21)

应该是不支持OPTION（FORCE ORDER）的解析。


null is not an object (evaluating 'ARTrackingTargetsModule.createTargets')

[x] Review the documentation: https://docs.viromedia.com/
[x] Search for existing issues: https://github.com/viromedia/viro
[x] Use the latest ViroReact release: https://docs.viromedia.com/docs/releases

Environment
Please provide the following information about your environment:

Development OS: Mac, Windows, Linux
Mac
Device OS & Version: What Android OS version (7.0, 8.0, etc.) or iOS version (11.0, 11.2) is your device running on?
iOS 11.2
Version: ViroReact version and React Native version
react-viro: 2.17.0
react-native-cli: 2.0.1
react-native: 0.59.8
Device(s): What device(s) are you are seeing the issue on (i.e. iPhone X, Samsung Note 8, etc)
All iOS Devices.

Description
Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know.
I am facing an issue while using the below function. I have tried to run it on React Native as well as on Expo but all the time I am facing the error on
ViroARTrackingTargets.createTargets({})
On this line it always says
null is not an object (evaluating 'ARTrackingTargetsModule.createTargets')
Reproducible Demo
Let us know how to reproduce the issue. Include a code sample, screen capture, video recording. The more information you provide, the better we can support you.
It can be produced by running on react native with xcode 10.2 or on expo. I can make a snack on expo if further details are needed.

I have found issues in the
require('react-native').NativeModules.VRTMaterialManager;
and all the nativemodules used in this project. None of them is working. Commenting them makes it run but it doesn't work.
Any Solutions will be appreciated.

Hey! First, you need to update your react-native version to 0.59.9 to be compatible with your viromedia version. Second, do you really need a tracking target? if not, is better to remove that from code. Remember to set a target this way:
ViroARTrackingTargets.createTargets({
  target1: {
    source: require('path/to/file.png'),
    orientation: "Up",
    physicalWidth: 0.1 // real world width in meters
  }
});

Share some code if you need any help.
Cheers!

I have tried to use it in expo and on expo i am getting this error and secondly yes i need the target and the source path is available. Actually I am using the Code in figment-ar repo and tried the examples in the current repo but no success on anything.

Hey! That’s because Expo doesn’t support Viro, you should init it from a bare react-native project. Use this as guide: https://docs.viromedia.com/docs/quick-start . Don’t be afraid of initializing a new project and pulling the code you need. Aaaaaand be sure you are using react native 0.59.9 due to possible compatibility issues.

Yes Sure thanks I will try it. I initialized a React Native Project as well but will try with the latest Version this time. I will let you know. Thanks a lot for the guidance.

I'm having this issue as well.


Windows live Icon for Login with Microsoft Live OAuth

Hi
I did not find inside the icon a windows live OAuth Icon and i was wondering whether someone was able to find an icon so that we may add a login with windows live Oauth. Windows live is now very popular because of Windows Phone, Windows 8.1 and Tablets.
So please someone know how to get the social Icon with AdminLte, that will be great.

Hi,
Maybe you can use FontAwesome Windows Icon
http://fortawesome.github.io/Font-Awesome/icons/

@lenamtl  Thanks a lot


InputTrimModule

Added InputTrimModule to prevent redeclaration of directives inside the users' code.
ERROR in type InputTrimDirective in ... is part of the declarations of 2 modules

Updated README.md with the proposed import, as well as the example version. The usage still remains the same.

Thank you for fixes! The isolation of directives is a right approach. 👍😊

https://gist.github.com/stephenparish/9941e89d80e2bc58a153#allowed-type


test: logging: Add more test cases for log core

Minimize CONFIG_* and platform restriction.
Handle logging message synchronously or asynchronously depend on board
config.
Signed-off-by: Meng xianglin<EMAIL_ADDRESS>

@nordic-krch could you please take a look?


How to Remove "the current time has expired"

"the current time has expired" occur when finished countdown timer . how to remove it?

CountdownTimer(
            endTime: endTime,
            emptyWidget: Container(), ///This is the widget that appears at the end
          ),


Problems with CommandProcessor::processCommand and I2C

Hi,
I have a RoverC with I2C controlled Motors.
Because of this I try to change the "CommandProcessor::processCommand" and insert  some I2C Commands like below.
After the change (i.e. forward) it run once and then the Command recognition is broken. It seems related to the Wire.xxx Call.
Thanks in advance.
case 0: // forward
        ledcWrite(0, calcDuty(leftForward));
        ledcWrite(1, calcDuty(rightForward));
        vTaskDelay(1000 / portTICK_PERIOD_MS);
        break;

to
case 0: // forward
        Wire.beginTransmission(0X38);
        Wire...
        vTaskDelay(1000 / portTICK_PERIOD_MS);
        break;

Hi,
I found the solution for the M5StickC. The problem was the wrong init of I2C. How this influence the  "Command recognition" is still unknown for me.
Wrong: Wire.begin(0,26,1000);
OK:       Wire.begin(0,26,400000);
Thx


Add BytesMessage

Useful with things like voice chat assets which return byte[] and used sendbytes in unet

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


[Event Request] Table 5330 "CRM Connection Setup" - OnBeforeVerifyBaseCurrencyMatchesLCY

Hi, would it be possible to add an OnBeforeVerifyBaseCurrencyMatchesLCY event in table 5330 "CRM Connection Setup"?
local procedure VerifyBaseCurrencyMatchesLCY()
var
    CRMOrganization: Record "CRM Organization";
    CRMTransactioncurrency: Record "CRM Transactioncurrency";
    GLSetup: Record "General Ledger Setup";
    IsHandled: Boolean;
begin
    IsHandled := false;
    OnBeforeVerifyBaseCurrencyMatchesLCY(IsHandled);
    if IsHandled then
        exit;

    CRMOrganization.FindFirst;
    CRMTransactioncurrency.Get(CRMOrganization.BaseCurrencyId);
    GLSetup.Get();
    if DelChr(CRMTransactioncurrency.ISOCurrencyCode) <> DelChr(GLSetup."LCY Code") then
        Error(LCYMustMatchBaseCurrencyErr, GLSetup."LCY Code", CRMTransactioncurrency.ISOCurrencyCode);
end;

[IntegrationEvent(false, false)]
local procedure OnBeforeVerifyBaseCurrencyMatchesLCY(var IsHandled: Boolean)
begin
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 40908.


05/02/2018 21:03 : Create Pull Request for branch master -> prTesting1_2018050221

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

split/updateTestCon1.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


It needs to output Embulk version number when command run  --log option.

It needs to output Embulk version number when command run  --log option.
Reference.
Twitter (Japanese text).

👍
Current sample here.
sample config
in:
  type: command
  command: gzip -dc /tmp/hoge/csv/sample_01.csv.gz
  parser:
    charset: UTF-8
    newline: LF
    type: csv
    delimiter: ','
    quote: '"'
    escape: '"'
    null_string: 'NULL'
    trim_if_not_quoted: false
    skip_header_lines: 1
    allow_extra_columns: false
    allow_optional_columns: false
    columns:
    - {name: id, type: long}
    - {name: account, type: long}
    - {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
    - {name: purchase, type: timestamp, format: '%Y%m%d'}
    - {name: comment, type: string}
out: {type: stdout}

wihout log
embulk run /tmp/config.yml
2017-03-16 19:22:01.600 +0900: Embulk v0.8.18 # <-- Embulk version output to stdout.
2017-03-16 19:22:04.879 +0900 [INFO] (0001:transaction): Loaded plugin embulk-input-command (0.1.4)
2017-03-16 19:22:05.029 +0900 [INFO] (0001:transaction): Using local thread executor with max_threads=8 / output tasks 4 = input tasks 1 * 4
2017-03-16 19:22:05.039 +0900 [INFO] (0001:transaction): {done:  0 / 1, running: 0}
2017-03-16 19:22:05.061 +0900 [INFO] (0015:task-0000): Running command [sh, -c, gzip -dc /tmp/hoge/csv/sample_01.csv.gz]
1,32864,2015-01-27 19:23:49,20150127,embulk
2,14824,2015-01-27 19:01:23,20150127,embulk jruby
3,27559,2015-01-28 02:20:02,20150128,Embulk "csv" parser plugin
4,11270,2015-01-29 11:54:36,20150129,
2017-03-16 19:22:05.254 +0900 [INFO] (0001:transaction): {done:  1 / 1, running: 0}
2017-03-16 19:22:05.279 +0900 [INFO] (main): Committed.
2017-03-16 19:22:05.280 +0900 [INFO] (main): Next config diff: {"in":{},"out":{}}

with log
embulk run  --log /tmp/hoge.log /tmp/config.yml
2017-03-16 19:23:07.487 +0900: Embulk v0.8.18  # <-- Embulk version output to stdout.
1,32864,2015-01-27 19:23:49,20150127,embulk
2,14824,2015-01-27 19:01:23,20150127,embulk jruby
3,27559,2015-01-28 02:20:02,20150128,Embulk "csv" parser plugin
4,11270,2015-01-29 11:54:36,20150129,

logfile(hoge.log)
# No embulk-core version in log file.
2017-03-16 19:23:50.765 +0900 [INFO] (0001:transaction): Loaded plugin embulk-input-command (0.1.4) # <-- plugin version
2017-03-16 19:23:50.900 +0900 [INFO] (0001:transaction): Using local thread executor with max_threads=8 / output tasks 4 = input tasks 1 * 4
2017-03-16 19:23:50.913 +0900 [INFO] (0001:transaction): {done:  0 / 1, running: 0}
2017-03-16 19:23:50.937 +0900 [INFO] (0015:task-0000): Running command [sh, -c, gzip -dc /tmp/hoge/csv/sample_01.csv.gz]
2017-03-16 19:23:51.170 +0900 [INFO] (0001:transaction): {done:  1 / 1, running: 0}
2017-03-16 19:23:51.195 +0900 [INFO] (main): Committed.
2017-03-16 19:23:51.195 +0900 [INFO] (main): Next config diff: {"in":{},"out":{}}


http://localhost:8083

URL for relevant page?
What products and version are you using?
Where did you look before opening the issue?

Hi @CMShuyuhui, could you provide some context for your issue? Is there a problem in the docs regarding the Admin UI? Thanks!

Feel free to reopen this if you have more detail!


Weeding

Identifying and removing dead code.

@TimSheard Could you review the second commit? There is a bunch of stuff in SetAlgebraInternal that appears as a "weed". I've tried to keep the bits that look like they're meant to form part of an API, but the bits I removed seemed superfluous.


Ignoring package_data when include_package_data is True

Hi, firstly, thanks for the work you maintainers do on this library :)
I could be incorrect in saying this, but it's come to my understanding that setting include_package_data=True in setup includes data files specified by MANIFEST.in and only in MANIFEST.in. At the very least, this behaviour is not clearly explained in the docs, and at the worst it is unexpected and implicit behaviour.
Here is a sentence from the docs which seems to be trying to say the above, although elsewhere in the docs include_package_data is not explained in this way:

If using the setuptools-specific include_package_data argument, files specified by package_data will not be automatically added to the manifest unless they are listed in the MANIFEST.in file.

Doesn't this make package_data redundant when include_package_data is True? Does it really make sense to have a param called include_package_data which implicitly ignores package_data?
In summary, this is the behaviour I seem to have come across when using these options in various combinations:

Including files in package_data with include_package_data=False:

Files specified by package_data are included as well as everything in MANIFEST.in.

Including files in package_data with include_package_data=True:

Only the files specified by MANIFEST.in are included, files in package_data not specified by MANIFEST.in are excluded.

Omitting package_data with include_package_data=True:

Same result as point 2.

I'm sorry if I've got this wrong, any correspondence is much appreciated :)

I tend to agree that the intuitive behavior would either be:

include_package_data + package_data does the union of everything found between the two of them
an error is raised as these are incompatible arguments

My preference would be 1, but that is a backwards-incompatible change that could probably cause all kinds of issues with existing packages, and a shocking number of projects don't test their packages as installed. I think we can detect if both are specified and switch it over to a warning for a few releases, then an error.
Also, I find include_package_data to be a very misleading name. I suspect we'd be better off deprecating this keyword entirely. It could be replaced with a find_package_data function similar to find_packages. Alternatively (and I like this less), we could do something like add an include_manifest_data or include_manifest_specified_data, which would have the "union of specified package data and manifest data" behavior.

As a newcomer to the Python packaging world I experienced that confusion first hand

This is completely confusing and frustrating. Hope to see this resolved very soon

I suspect this issue is related to this hacky behavior.

@abravalheri 	here is the project branch: https://github.com/zoj613/polyagamma/tree/remove_poetry
This is an attempt to replace poetry with setuptools since the only dependency of the project is numpy. It uses a local C-library that is compiled via cython. I have found issues while building a sdist and wheel locally. If I use setuptools-scm as a build requirement then it seems like it ignores everything I put in pyproject.toml and include everything in the root directory no matter the combination of the config. I even attempted to add a MANIFEST.in it still did not work. If I dont include setuptools-scm then im faced with the problem of the build not including the header file folder include and the wheel distribution only including the shared library and nothing else.
I'm really not sure how to move forward now. I've read the docs multiple times and followed the instructions but still not having any luck.

Hi @zoj613, thank you very much for providing the link.
I tried the following:
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,4 @@
+prune .github
+prune examples
+prune scripts
+prune tests
diff --git a/pyproject.toml b/pyproject.toml
index 27180ed..ac7bf8d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,6 +5,7 @@ requires = [
     "setuptools>=61.0.0",
     "numpy==1.21.3; python_version=='3.10'",
     "numpy==1.19.0; python_version<='3.9'",
+    "setuptools-scm",
 ]
 build-backend = "setuptools.build_meta"

@@ -32,23 +33,12 @@ classifiers = [
 ]

 [tool.setuptools]
-zip-safe = false
-include-package-data = false
 packages = ["polyagamma"]

 [tool.setuptools.dynamic]
 version = {attr = "polyagamma.__version__"}

-[tools.setuptools.packages.find]
-exclude = [".github*", "examples*", "scripts*", "tests*"]
-include = ["include*"]
-
-[tool.setuptools.package-data]
-polyagamma = ["*.c", "*.pyi", "*.pxd"]
-"*" = ["include*"]
-
 [tool.setuptools.exclude-package-data]
-"*" = [".github", "examples", "scripts", "tests"]
 polyagamma = ["*.pyx"]

 [tool.coverage.run]

As a result, I managed to obtain the following distributions:
% unzip -l dist/*.whl
Archive:  dist/polyagamma-1.3.3-cp38-cp38-linux_x86_64.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
      198  2022-06-20 11:06   polyagamma/__init__.pxd
      120  2022-06-20 11:30   polyagamma/__init__.py
      168  2022-06-20 11:06   polyagamma/__init__.pyi
  1847392  2022-06-20 11:56   polyagamma/_polyagamma.cpython-38-x86_64-linux-gnu.so
      859  2022-06-20 11:06   polyagamma/_polyagamma.pxd
     3270  2022-06-20 11:06   polyagamma/_polyagamma.pyi
     1525  2022-06-20 11:56   polyagamma-1.3.3.dist-info/LICENSE
    13576  2022-06-20 11:56   polyagamma-1.3.3.dist-info/METADATA
      103  2022-06-20 11:56   polyagamma-1.3.3.dist-info/WHEEL
       11  2022-06-20 11:56   polyagamma-1.3.3.dist-info/top_level.txt
      917  2022-06-20 11:56   polyagamma-1.3.3.dist-info/RECORD
---------                     -------
  1868139                     11 files

% tar tf dist/*.tar.gz
polyagamma-1.3.3/
polyagamma-1.3.3/.gitignore
polyagamma-1.3.3/LICENSE
polyagamma-1.3.3/MANIFEST.in
polyagamma-1.3.3/Makefile
polyagamma-1.3.3/PKG-INFO
polyagamma-1.3.3/README.md
polyagamma-1.3.3/include/
polyagamma-1.3.3/include/pgm_density.h
polyagamma-1.3.3/include/pgm_random.h
polyagamma-1.3.3/polyagamma/
polyagamma-1.3.3/polyagamma/__init__.pxd
polyagamma-1.3.3/polyagamma/__init__.py
polyagamma-1.3.3/polyagamma/__init__.pyi
polyagamma-1.3.3/polyagamma/_polyagamma.pxd
polyagamma-1.3.3/polyagamma/_polyagamma.pyi
polyagamma-1.3.3/polyagamma/_polyagamma.pyx
polyagamma-1.3.3/polyagamma.egg-info/
polyagamma-1.3.3/polyagamma.egg-info/PKG-INFO
polyagamma-1.3.3/polyagamma.egg-info/SOURCES.txt
polyagamma-1.3.3/polyagamma.egg-info/dependency_links.txt
polyagamma-1.3.3/polyagamma.egg-info/requires.txt
polyagamma-1.3.3/polyagamma.egg-info/top_level.txt
polyagamma-1.3.3/pyproject.toml
polyagamma-1.3.3/requirements-dev.txt
polyagamma-1.3.3/setup.cfg
polyagamma-1.3.3/setup.py
polyagamma-1.3.3/src/
polyagamma-1.3.3/src/pgm_alternate.c
polyagamma-1.3.3/src/pgm_alternate_trunc_points.h
polyagamma-1.3.3/src/pgm_common.c
polyagamma-1.3.3/src/pgm_common.h
polyagamma-1.3.3/src/pgm_density.c
polyagamma-1.3.3/src/pgm_devroye.c
polyagamma-1.3.3/src/pgm_macros.h
polyagamma-1.3.3/src/pgm_random.c
polyagamma-1.3.3/src/pgm_saddle.c

Which seems to be more or less what you want (PKG-INFO and *.egg-info are always generated/included by setuptools).
You can use MANIFEST.in to exclude directories/files included by default with setuptools-scm. prune will remove the entire-directory (other directives can be found here: https://packaging.python.org/en/latest/guides/using-manifest-in/).
If you are still having problems with the build, please try removing the cache with:
rm -rf build dist polyagamma.egg-info

Hi @abravalheri , thanks a lot your proposed patch works and I can reproduce your results locally. The problem now is that the shared library cannot be used. It appears as though the import statement cannot find it: I get the following error after installing the package via the wheel and sdist:
>>> from polyagamma import random_polyagamma
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/zoj/dev/polyagamma/polyagamma/__init__.py", line 1, in <module>
    from ._polyagamma import (
ModuleNotFoundError: No module named 'polyagamma._polyagamma'

The shared library is named polyagamma._polyagamma in the setup.py file and compiles successfully so im not sure why it cannot be imported with this installation. Do you have any suggestion for me to fix this?
I have two other tangential questions:

Why was the zip-safe = false option removed in your patch? I thought this option was important when packing extension modules?
How could I use setuptools-scm to dynamically specify the version number using a generated polyagamma/_version.py file? When I used

[tool.setuptools.dynamic]
version = {attr = "polyagamma._version.version"}

it did not seem to work?

The shared library is named polyagamma._polyagamma in the setup.py file and compiles successfully so im not sure why it cannot be imported with this installation. Do you have any suggestion for me to fix this?

If I had to guess, I would say that this problem is very likely to be caused because you are trying to test a package that uses a "flat-layout" from the project root.
Have you tried cd-ing into a different folder before running the Python REPL?  This means that the polyagamma folder from your project structure can be overshadowing the polyagamma folder from your site-packages installation. When Python tries to load the local polyagamma folder, it cannot find any compiled file there...
The flat-layout is very tricky to use and has several caveats, specially for testing. I always recommend people to use the src-layout.

Why was the zip-safe = false option removed in your patch?

I don't think zip-safe has any effect on wheel installations via pip. It might be useful only if someone is importing your package directly via pkg_resources (from a zip), but I think no one does that anymore nowadays...

How could I use setuptools-scm to dynamically specify the version number...?

I believe you can have setuptools-scm to write the version it gets from git/mercurial to a file via the write_to configuration parameter in the [tool.setuptools-scm] table. Please check the details on https://github.com/pypa/setuptools_scm/#configuration-parameters. If I am not wrong, when you do that you don't need to use the version = {attr = ...} directive (you still need dynamic = ["version"]).

@abravalheri you were right, It worked once I changed to another directory. Thank you so much for the help. I will look into automating versioning via setuptools-scm at a later stage.


Aptly cannot mirror Elastic logstashforwarder mirror

Add Elastic's logstashforwarder repo to aptly and attempt update:
$ aptly mirror create logstashforwarder http://packages.elastic.co/logstashforwarder/debian stable main
$ aptly mirror update logstashforwarder
Downloading http://packages.elastic.co/logstashforwarder/debian/dists/stable/InRelease...
Downloading http://packages.elastic.co/logstashforwarder/debian/dists/stable/Release...
Downloading http://packages.elastic.co/logstashforwarder/debian/dists/stable/Release.gpg...
gpgv: Signature made Thu 05 Mar 2015 08:04:12 PM UTC using RSA key ID D88E42B4
gpgv: Good signature from "Elasticsearch (Elasticsearch Signing Key<EMAIL_ADDRESS>Downloading & parsing package files...
Downloading http://packages.elastic.co/logstashforwarder/debian/dists/stable/main/binary-noarch/Packages.bz2...
Downloading http://packages.elastic.co/logstashforwarder/debian/dists/stable/main/binary-noarch/Packages.gz...
Downloading http://packages.elastic.co/logstashforwarder/debian/dists/stable/main/binary-noarch/Packages...
ERROR: unable to update: HTTP code 404 while fetching http://packages.elastic.co/logstashforwarder/debian/dists/stable/main/binary-noarch/Packages

This appears to be because the architectures in Elastic's Release file don't match the actual package architectures:
$ curl http://packages.elastic.co/logstashforwarder/debian/dists/stable/Release
Architectures: noarch
...
SHA1:
 da39a3ee5e6b4b0d3255bfef95601890afd80709                0 Release
 5f6fcbd97954082f65caf5fd11802a558e8c7dc8              690 main/binary-all/Packages
 be5ae50d21ecd76e0779bb934a601897b434520c              476 main/binary-all/Packages.gz
 5f6fcbd97954082f65caf5fd11802a558e8c7dc8              690 main/binary-amd64/Packages
 be5ae50d21ecd76e0779bb934a601897b434520c              476 main/binary-amd64/Packages.gz
 5f6fcbd97954082f65caf5fd11802a558e8c7dc8              690 main/binary-i386/Packages
 be5ae50d21ecd76e0779bb934a601897b434520c              476 main/binary-i386/Packages.gz
...

Would be good to be able force Aptly to override the Architectures: line in the Release file.
I will raise a similar issue with Elastic about this mismatch in their repository.

Issue for logstash-forwarded: https://github.com/elastic/logstash-forwarder/issues/531

@jstangroome you can override list of architectures using -architectures flag. You can do that during aptly mirror create, or later using edit:
aptly mirror edit -architectures=i386,amd64 logstashforwarder
aptly mirror update logstashforwarder

@smira this does not work in aptly 0.9.5.
$ aptly mirror create -architectures=amd64 logstashforwarder http://packages.elastic.co/logstashforwarder/debian stable main
Downloading http://packages.elastic.co/logstashforwarder/debian/dists/stable/InRelease...
Downloading http://packages.elastic.co/logstashforwarder/debian/dists/stable/Release...
Downloading http://packages.elastic.co/logstashforwarder/debian/dists/stable/Release.gpg...
gpgv: Signature made Thu 05 Mar 2015 08:04:12 PM UTC using RSA key ID D88E42B4
gpgv: Good signature from "Elasticsearch (Elasticsearch Signing Key<EMAIL_ADDRESS>ERROR: unable to fetch mirror: architecture amd64 not available in repo [logstashforwarder]: http://packages.elastic.co/logstashforwarder/debian/ stable

and also
$ aptly mirror create logstashforwarder http://packages.elastic.co/logstashforwarder/debian stable main
$ aptly mirror edit -architectures=amd64 logstashforwarder
Downloading http://packages.elastic.co/logstashforwarder/debian/dists/stable/Release...
ERROR: unable to edit: architecture amd64 not available in repo [logstashforwarder]: http://packages.elastic.co/logstashforwarder/debian/ stable

oh... I've added -force-components some time ago to deal with wrong component list. Looks like we need -force-architectures as well to workaround broken repos...


vsxmake project breaks with conditionnal targets

Describe the bug
using:
if is_mode("debug") then
    print("hello")
else
    target("test")
        ...
end

Will error out when generating the vsxmake (see below).
Note that building such a project works fine from the command line.
Expected behavior
vsxmake project generates.
Error output
https://pastebin.com/Ft4YaFLz
Related Environment
Please provide compiling and running environment information:

xmake version: 2.5.2
os: Windows 10
target platform: x64

I will fix it, please wait ..


Translate docs to Russian and Chinese

Our two largest non English user bases seem to be China and Russia, it would be nice to have translated documentation.

Do you mean README file? As a Russian native speaker I can help with that.

Yes Readme ideally  the recipes that are in the wiki as well.  Thank you for thinking to contribute!

Maybe a naive question but don't all devs speak English? Never seen any German class names so far.

Yup! Most code is in English. Documentation is not the same. For example android docs are localized.  I actually got the idea from OkBuck repo which had Chinese translations for readme/wiki

Hi as a Chinese native speaker I think I can help with that!

@digitalbuddha  I'm going to translate recipes to Russian.

Thank you good sir!
On Mar 14, 2017 11:01 AM, "Ivan Balashov"<EMAIL_ADDRESS>wrote:

@digitalbuddha https://github.com/digitalbuddha I'm going to translate
recipes to Russian.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NYTimes/Store/issues/145#issuecomment-286448775, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AEUX3JA_k9W0w1VB1i_qCIid8NXcX_8mks5rlqvggaJpZM4MQeWQ
.


Overriding a Task.Source with a Task causes unnecessary invalidation during ./mill --watch

example.thirdparty[gatling].testRepoRoot seems to invalidate unnecessarily when running ./mill -w docs.fastPages and editing example/large/selective/9-selective-execution/build.mill
The methodCodeHashSignatures.dest doesn't list any changes, but mill-invalidation-tree.json lists example.thirdparty[gatling].testRepoRoot as the root of the invalidation, but example.thirdparty[gatling].testRepoRoot is a normal Task{} and should not be the root of an invalidate tree unless there was a methodCodeHashSignatures.dest change

Cross posted from the linked PR
Splitting out downloadTestRepo does mitigate the problem, but the underlying question remains why "example.thirdparty[gatling].testRepoRoot" seems to be an invalidation root when neither of its upstream tasks changed and it itself is not a source or input task
The problem appears to come from the fact that the preparatory input evaluation done in selective execution uses a subset of the tasks, resulting in the inputs being labelled differently during planning, such that the overridden example.thirdparty[gatling].testRepoRoot in the preparatory evaluation has the same label as the overridingexample.thirdparty[gatling].testRepoRoot in the main evaluation. This causes them to collide on disk and results in the latter unnecessarily invalidating since the hashes appear to have changed (since the other task stomped over the json files on disk)
This whole "tasks are assigned their final label during planning" thing is an endless source of bugs, and was originally introduced because we started using the ordering of tasks during planning to determine override ordering which is necessary to assign .super.Foo suffixes as part of the labels.
We probably should try to detect move override detection and label allocation to task instantiation time to avoid this footgun.

Might need to go into Mill 0.13.0 if we need to add more implicit macro parameters to the Task constructors, to capture the class that they were defined in so we can decide which one is the override and which ones are overridden

The problem is that it is difficult to determine whether a given task is overridden or not at instantiation time.

We cannot use any compile-time reflection at definition site, because it does not contain enough information (since any definition may or may not be overridden later)

Java runtime reflection does not make it easy to distinguish real definitions from synthetic forwarders

We want to avoid Scala runtime reflection due to its performance penalty

Discover[T] may have this information, but Discover is pretty frozen until Mill 0.13.0

Seems like we may need to wait for 0.13.0, and once we have the change to break bincompat we can update Discover to contain this information


Use a Stack not Navigator for all these showDialog methods

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Use case
We should use Stack and not pop from the navigation stack without ever pushing onto it. Other Dialog libs are used instead of the ones in the core framework because they don't require that BuildContext AND they don't mess with your navigation stack but just insert themselves at the top of the Widget tree using Stack. Way too much in the core framework requires BuildContext when it doesn't have to
https://github.com/flutter/flutter/blob/ec0b7443c42691df6b86cf9bd5d84e3b63cadefe/packages/flutter/lib/src/material/dialog.dart#L1402
Proposal
example: https://pub.dev/packages/flutter_smart_dialog

Hi @FreddyJohn
To be clear, is this equivalent to showDialog without using BuildContext from underlying page? If so, you can use a navigator key as below:

Sample code using navigator key
import 'package:flutter/material.dart';

final GlobalKey<NavigatorState> _navigatorKey = GlobalKey<NavigatorState>();

void main() {
  runApp(
    MaterialApp(
      navigatorKey: _navigatorKey,
      theme: ThemeData(useMaterial3: true),
      home: const MyWidget(),
    ),
  );
}

class MyWidget extends StatefulWidget {
  const MyWidget({super.key});

  @override
  State<MyWidget> createState() => _MyWidgetState();
}

class _MyWidgetState extends State<MyWidget> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: const Center(
        child: Text('hello'),
      ),
      floatingActionButton: FloatingActionButton(onPressed: () {
        showDialog(
          context: _navigatorKey.currentContext!,
          builder: (BuildContext context) {
            return const Text('Hello');
          },
        );
      }),
    );
  }
}

Otherwise, can you please specify the detailed proposal for this change? (flutter_smart_dialog mentioned above is a whole package, you should disperse it and only show a snippet code/pseudocode). Thanks!

Fully aware you can use a Navigator Key, Still, not all libraries are going to respect how your application wants to interact with the Navigation Stack and passing around Build Context is dangerous in such a way that is not known exactly what this flutter framework class will do with it without examining source code. I have seen context with the nav stack used inconsistently in a way that has forced me to examine source code if I want to be responsible for my nav stack and know the push/pop history.

This is an interesting idea. Only marking it P3 because we're not planning to work on it at the moment.


feat: implement section of form to edit existing facility

Resolves #785

[x] PR title follows Conventional Commits specs

🔧 What changed
Before there was no form to edit existing facilities in our database. This now creates the UI for that form that can be used in the edit-facility page, in which the functionality can be added later. It is also reusable and can be imported into the ModEditSubmissionForm to make the component smaller and easier to read.
🧪 Testing instructions
Run the cypress tests. As tests were added for the UI of this component.
📸 Screenshots

Before

N/A

After

It's off to a really great start. Left a couple suggestions. Nice work with the PR description and commits! Noticing and improvement. 🙌🏾

@all-contributors
please add @Ntlja for coding.
please add @Ntlja for design.
please add @NabbeunNabi  for coding.

@all-contributors please add @NabbeunNabi for coding

@all-contributors please add @Ntlja for coding

@all-contributors add @Ntlja for coding


Added support ES6 support

Hi, ich hab für Coureon im Starter ES6 Support ergänzt. Kann das mit rein?
Beste Grüße,
Chris

sounds good. :+1:  let me check if that would significantly slow down build process for developers not using ES6..

Even with the empty javascript file, build process is about 700ms slower when using babelify. That doesn't mean we shouldn't merge it in.
But maybe it gets more important now to enable incremental building as well:
https://github.com/babel/babelify/issues/116
I'm open for any PRs on this :)

if i may:
i'd keep any browserify plugin / transformation away from the main task as you can easily add the plugins / transformations in package.json under browserify field - this way the task stays clean and your project can take advantage of transformations it needs
more on that here
example:
{
  "devDependencies": {
    "babelify": "^6.3.0",
    "browserify": "^11.1.0"
  },
  "browserify": {
    "transform": [
      [
        "babelify",
        {
          "ignore": [
            "/angular/"
          ]
        }
      ]
    ]
  }
}

@stryju sounds good, I currently don't have any time on my hands, but will do the change later


Feature Request: Supports prefetching data to GPU

User Story
As a recommender system engineer, I want to read large batch of tabular data on GPU efficiently, so that training performance of large deep recommenders can be improved.
Detailed requirements

It should be easy to use with TensorFlow Dataset API

API Compatibility

Only new APIs should be introduced.

Willing to contribute
Yes

大佬，这个有没有和tf 自带 prefetch_to_device的性能比较呢

@2sin18 Thx~


Cannot launch osv at the beginning of a neovim configuration

I would like to debug some code, in my neovim configuration, that executes at the start of nvim.
Setup
I made and reduced this setup solely for the purpose of reproducing the problem
OS: Debian 12
NVIM version: v0.10.0
NVIM package manager: lazy.nvim
~/.config/nvim/init.lua:
local lazydir = vim.fn.stdpath("data") .. "/lazy"

-- Debug
local osvpath = lazydir .. "/one-small-step-for-vimkind"
if (vim.uv or vim.loop).fs_stat(osvpath) then
  local nvim_debug = vim.fn.getenv("NVIM_DEBUG")
  if nvim_debug ~= vim.NIL and nvim_debug == "y" then
    vim.opt.rtp:prepend(osvpath)
    require("osv").launch({ port = 8086 })
    vim.print("Press any key to continue")
    vim.fn.getchar()
  end
end

-- Code to debug
local some_number = require("do_something").add_some(1)

-- lazy.nvim bootstrap
local lazypath = lazydir .. "/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

vim.g.mapleader = " " -- Make sure to set `mapleader` before lazy so your mappings are correct
vim.g.maplocalleader = "\\" -- Same for `maplocalleader`

-- Keybindings
vim.api.nvim_set_keymap('n', '<F4>', [[:lua require"dapui".toggle({})<CR>]], { noremap = true })
vim.api.nvim_set_keymap('n', '<F8>', [[:lua require"dap".toggle_breakpoint()<CR>]], { noremap = true })
vim.api.nvim_set_keymap('n', '<F9>', [[:lua require"dap".continue()<CR>]], { noremap = true })
vim.api.nvim_set_keymap('n', '<F10>', [[:lua require"dap".step_over()<CR>]], { noremap = true })
vim.api.nvim_set_keymap('n', '<S-F10>', [[:lua require"dap".step_into()<CR>]], { noremap = true })
vim.api.nvim_set_keymap('n', '<F12>', [[:lua require"dap.ui.widgets".hover()<CR>]], { noremap = true })
vim.api.nvim_set_keymap('n', '<F5>', [[:lua require"osv".launch({port = 8086})<CR>]], { noremap = true })

-- Install packages
require("lazy").setup({
  { "mfussenegger/nvim-dap", },
  {
    "rcarriga/nvim-dap-ui",
    dependencies = {
      "mfussenegger/nvim-dap",
      "nvim-neotest/nvim-nio",
    },
    keys = {
    },
    config = function()
      local dap = require("dap")
      local dapui = require("dapui")
      dapui.setup()
      dap.listeners.after.event_initialized["dapui_config"] = function()
        dapui.open()
      end
      dap.listeners.before.event_terminated["dapui_config"] = function()
        dapui.close()
      end
      dap.listeners.before.event_exited["dapui_config"] = function()
        dapui.close()
      end
    end
  },
  {
    "jbyuki/one-small-step-for-vimkind",
    dependencies = { "mfussenegger/nvim-dap", },
    config = function()
      local dap = require("dap")
      dap.configurations.lua = {
        {
          type = "nlua",
          request = "attach",
          name = "Attach to running Neovim instance",
        },
      }
      dap.adapters.nlua = function(callback, conf)
        callback({
          type = "server",
          host = conf.host or "<IP_ADDRESS>",
          port = conf.port or 8086,
        })
      end
    end,
  },
})

~/.config/nvim/lua/do_something.lua:
local M = {
  add_some = function(a)
    local b = a + 1
    local c = b + 1
    local d = c + 1
    return d
  end,
}

return M

The general idea
I added a debug code (-- Debug) at the beginning of ~/.config/nvim/init.lua. I would like this code to launch osv if nvim was started with the environment variable NVIM_DEBUG equal "y". Right after osv is launched, nvim has to wait for a key press, so I have the time to setup the debugger on the other nvim. After I press any key on the debugged nvim, it has to continue its execution until it reaches a breakpoint.
How to reproduce the problem

Start nvim so it setups everything
Close nvim
Open the file containing the code to debug:

$ nvim "~/.config/nvim/lua/do_something.lua"

Place a break point in the add_some function
Start a nvim instance to debug:

$ NVIM_DEBUG=y nvim

Expected course of action

The debugged nvim instance launchs osv
It waits for a key press
I press <F4> in the client nvim to open the debug ui
I press <F9> so the dap connects to the debugged nvim
I press any key in the debugged nvim
The debugged nvim stops at the break points so I can start debugging

Actual course of action:

The debugged nvim prints this error message:

Server failed to launch on port 8086

Questions

How can I launch osv properly at the beginning of a configuration so I can debug it?

Thank you for opening an issue.
This is expected as launch() will spawn a headless neovim instance, and this headless instance will by means of theinit.lua launch itself again, resulting in an recursive launch which fails. To use launch directly in the init.lua, it requires a check so that that doesn't happen. This is currently in  discussion in the open issue #43.
For an immediate solution, I would:

Launch a neovim instance without loading init.lua. With -u NORC, or -u NONE.
Add the path to the plugins folder (packpath, runtimetimepath, rtp)
Launch osv with launch()
Connect with another instance
Manually source init.lua

I made some modifications to my debug code:

The nvim debug environment variable is now NVIM_CONFIG_DEBUG
I temporarily change NVIM_CONFIG_DEBUG to something that is not "y" before launching osv and reset it back to its original value right after.

Here is the code:
local lazydir = vim.fn.stdpath("data") .. "/lazy"

-- Debug
local osvpath = lazydir .. "/one-small-step-for-vimkind"
if (vim.uv or vim.loop).fs_stat(osvpath) then
  local nvim_config_debug = vim.env.NVIM_CONFIG_DEBUG
  if nvim_config_debug ~= vim.NIL and nvim_config_debug == "y" then
    vim.opt.rtp:prepend(osvpath)
    vim.env.NVIM_CONFIG_DEBUG = ""
    require("osv").launch({ port = 8086 })
    vim.env.NVIM_CONFIG_DEBUG = nvim_config_debug
    vim.print("Press any key to continue")
    vim.fn.getchar()
  end
end

Now I can start the debugger at the beginning of the config.
I will leave this issue open since, osv, itself, alone, cannot be started at the beginning of the configuration. This is a hack to avoid this problem.
Thank you @jbyuki!

Nice one!
Yes, this is an on-going issue that needs better thought. Leaving it open will remind me/others that it's a problem that needs solving. Glad that it worked in your case for now.

I just ran into this very same issue the other day. Thanks for the recommendation @ramboman.

A more elegant way to debug configuration files has been added. The help file goes into more details on how it is done.
https://github.com/jbyuki/one-small-step-for-vimkind/blob/5417de4beb8f95856a45de3a27afca9a16e82540/doc/osv.txt#L197-L224
I will close this for now as a more permanent solution has been now added to the plugin.

Here it is in action.
https://github.com/user-attachments/assets/ea3e5a55-f6f9-4149-a94f-c444b7e8f4e5


Asset multiselection in loader

Feature: Multiselection of assets in loader
With this feature it is possible to load multiple subsets from multiple assets at once.

This feature is used only in loader, rest of tools should work the same (visually) as before and if only one asset is selected then nothing should change too.
How it works (basics):

When multiple assets are selected, subsets with same name are grouped in subsets view with colored circle, other are just kept in list.
At the same time "Asset" column is added to know which item is related to which asset.
Subset group has number representing number of assets having the subset.
Group color is helper to identify the subset. There are 10 predefined(hardcoded) colors atm. They are reused if more than 10 subsets has same name.

If colored group is selected you can see in assets view that selected assets has bar with colors. The color helps to identify which subsets are available for the asset -> missing color == missing subset.

It is not possible to see subset groups when multiple assets are selected.

RESOLVES: https://github.com/getavalon/core/issues/453

Had a try on this feature, it looks like the original subset groups gets un-grouped if multiple assets selected.

It is not possible to see subset groups when multiple assets are selected.

Just saw this line at the end. XD
This might be a problem for my studio, the artists here sometimes produce subsets that were just for testing or marking them as deprecated in subset groups which named like "Trash Bin" or "Tests".
If those subsets that should have been hidden will re-appear when enabled multi-assets selecting, then it's kind of like backward incompatible in UX.
Could you elaborate a bit more about why it is not possible ? The first problem that I can think of is how to visualize two different subset grouping motive in one view, and yes, it is really tricky.

One potential solution would be to change the subset grouping's visual implementation from group item in subset tree view to
leaf item in asset tree view.
The goal of subset grouping was like creating visual partitions inside each asset, so it should also be reasonable if the grouping gets implemented in asset tree view, like the leaf item at the end of any asset branch.
Let's change the term from subset group to asset partition for now.
And we could even treat that asset partition like a normal asset, and grouping same named subset in subset tree view when using multi-asset selecting.
Seems like a good way to go !

Let's change the term from subset group to asset partition for now.

So, you're saying, that subset groups won't be shown in subset view but will kind of "children" visualization in asset view?

So, you're saying, that subset groups won't be shown in subset view but will be kind of "children" visualization in asset view?

Yes, that's right !

Let's change the term from subset group to asset partition for now.

I think we have to resolve the visual subset grouping conflict befroe merging this, so I'll try submit an issue with a proof of concept for asset partition.

I think we have to resolve the visual subset grouping conflict befroe merging

It looks like asset partition is similar idea to visualParent concept.

Yeah, but it's at the end of the asset's hierarchy.

Truth be told I'd prefer thinking of a different solution, rather than moving the groups under assets. It is not very consistent, especially when you only have some subsets in group and others are not. We use the grouping for render AOVs for example.  Having all of the subsets under assets, but having to click one level lower for renders feel very counter-intuitive.
We actually have a way of dealing with "deprecated" in a different way. Rather than grouping them and just relying on the artist to name the trash group consistently, we change the type in mongo from subset or asset to archived_subset, archived_asset. That way they automatically drop out of the GUI, but stay in the system.
The question is whether it is not more systematic to allow for doing this from the loader and giving the option to "un-archive" from there when needed as well. That would solve the first issue with your bin group workflow.
The second of course is the fact that it would be great to preserve both behaviours at the same time, but it could be though out properly how to do it visually. Should the group show above the dynamic multiselection grouping, or bellow for example?
That being said let's think of how to actually do this with full compatibility of course. Just wanted to throw the archive approach out there

We had a good old school paper brainstorm in the office and thin we have an elegant solution, we'll try to implement.
If you have existing groups, we'll treat them similarly as subsets and when you select multiple assets, we will visually keep any groups in the subset view and only group subsets themselves one level lower. That way, if multiple assets share the same groups and subsets, we should be able to fully keep that hierarchy. Of course if asset 1 has group1/modelMain while asset 2 has modelMain mong subsets. These two won't be considered as equivalent in multiselection if the enable grouping tickbox is on. Once it's turned off, they will be consider as equivalent in the same way as current implementation.
This way we should keep best of both worlds and on top of that let the artist choose what the prefer by switching the grouping tickbox on and off.

Sorry for late reply, was on vaca pass few days. ☺

If you have existing groups, we'll treat them similarly as subsets and when you select multiple assets, we will visually keep any groups in the subset view and only group subsets themselves one level lower.

I did think of that path, but I was worried that pushing existing subset groups one level lower would complecate codes, and maybe or maybe not, require a few more clicks for user to expand groups and see what's in it.
The reason why I proposing asset partitioning was mostly because it's easier to implement and maintain in my imaging, and the GUI interaction result is also easier to match user's expectaion when involving multi-assets selection.

I did think of that path, but I was worried that pushing existing subset groups one level lower would complecate codes

Having that said, maybe I was thinking wrong. I'll see if I could implement the asset partition and trying both ways for the best outcome.

Would love to know where we're at with this feature.

Would love to know where we're at with this feature.

We though about solution and there is one, but we have to find spare time for implementation.

Updated code but don't have ready testing environment to realy check if I did it right. Can someone test, please?

I checked out this branch directly and looks like the data was loaded correctly, but the view can not show anything ?
But there are colored underlines on selected assets when I selecting subsets blindly.

Not sure what problem would it be, updating PyQt5 version doesn't resolve this.

I comment out these lines and the subset widget is showing stuff now.
https://github.com/getavalon/core/pull/550/files?file-filters[]=.py#diff-657d23f15ec9e63b3877669b575e43a9e4532a6ef82b2a6633e77e1c3b67c756R453-R460
Looks like the problem was the loading screen didn't go off. :D

but the view can not show anything

My fault, forgot to add few lines.

Looks like the problem was the loading screen didn't go off. :D

The issue was that loading state was never set, so is_empty was always True.

Thanks !
Just had another quick test, can confirm that works now.
But sometimes (really rare, but happens) the loading screen still there.
Anyway, I'll try reviewing this one ASAP.


Menu breaks the Mine Little Pony Mod

as the title suggests the mine little pony mod adds a button on the home screen but when modmenu is loaded it makes it disappear

nvm AGAIN i guess the mod has an auto feature for hidding the button


Improve README and remove the remaining references to the laboratory-operator

Description
This PR removes the references to the legacy laboratory resources, and updates them with the new names. Additionally, it also updates the general README with more up-to-date information.

/merge

/merge

/merge

/merge


Helping Delegators to Manage Unbonding Locks within the Explorer

What is this discussion about? (required)
This discussion is about giving users the ability to manage their UnbondingLocks from the AccountDelegating page in the explorer.
What do you hope to learn by the end of this discussion? (required)
Given that unbonding (whether partially or fully) creates an UnbondingLock each time a Delegator unbonds, that Delegators can use to withdraw their tokens when a certain period has passed (currently 7 days). I am proposing to add a Pending UnbondingLocks section within the AccountDelegators page in the explorer. This section will only appear when Delegators have pending unbonding locks. This will help Delegators in the following ways:

Whenever their lock(s) are able to be withdrawn/rebonded they can do so with a single click of a button.
They will no longer need to interact directly with the BondingManager's smart contract and will be able to avoid the hassle/confusion and have a much better UX.
Less time spent searching or trying to find out what happened to their tokens when they try to unbond.
Creates less confusion because now the explorer will be able to tell Delegators when their tokens can be withdrawn.
All the history can be shown in the accounts overview page.

Additional context
When a Delegator unbonds and the tx is processed we can do either of two things:

Redirect to the AccountDelegating page where the Unboding Locks section will appear.
Show a pop out notification about where pending UnbondingLocks can be viewed.

I like the second solution better.
I am proposing to put this within the AccountDelegating page because that is where all the information regarding a Delegator's tokens can be viewed.

I like this very much from a technical perspective. Putting the unbonding locks on the account delegation page with the options to:

rebond
withdraw (when available)

will be very helpful.
From a product/communication perspective, this is definitely a new and confusing concept for users though. What is an unbonding lock? Why do they have to manage it? Perhaps rather than use that term and telling users to "Manage their unbonding locks", I could imagine something a little more context oriented in the UX. For example:
You unbonded 100 LPT on 11/16. It will be available to withdraw on 11/23 | Rebond 100 LPT
You unbonded 250 LPT on 11/1. It is available to withdraw now | Withdraw 250 LPT | Rebond 250 LPT
(Just a suggestion for discussion - not a full UX design!)
There is also a small detail to understand, which is that I think if the user has fully unbonded, he no longer has an active transcoder he's bonded towards, so the rebond() method actually doesn't work and instead they have to call "rebondFromUnbonded" and specify an input transcoder. I'm not sure if the UX needs to support this as a first iteration, but I wanted to mention it.


Add nonblocking HystrixCommandTest.queue() unit tests back

Finishes off #526, now that the synchronous timeout mechanism is removed (#579)

Hystrix-pull-requests #252 FAILURE
Looks like there's a problem with this pull request

NetflixOSS » Hystrix » Hystrix-pull-requests #13 SUCCESS
This pull request looks good


"Unirea" is listed in the drop-down menu

Description:
"Unirea" is listed in the drop-down menu alongside its corresponding county and commune, according to the law.
Precondition:
The website is up an running.

Step 1
Type "Unirea" in the search bar.

Expected results
The location is listed in the drop-down menu as "Comuna Unirea, DOLJ".


Store mimetype of uploaded file in database

This is a proof of concept.
By storing the MIME-type in model File, many existing problems can be avoided:
While serving files through the DefaultServer, first the file had to be opened to guess the proper MIME-type, so that the HTTP-header Content-Type could be set. This now is not required anymore.

Codecov Report

Merging #1152 into develop will decrease coverage by 0.11%.
The diff coverage is 73.07%.

@@             Coverage Diff             @@
##           develop    #1152      +/-   ##
===========================================
- Coverage       71%   70.89%   -0.12%
===========================================
  Files           62       63       +1
  Lines         3032     3058      +26
  Branches       424      427       +3
===========================================
+ Hits          2153     2168      +15
- Misses         731      740       +9
- Partials       148      150       +2

Impacted Files
Coverage Δ

filer/server/views.py
37.14% <0%> (-1.1%)
:arrow_down:

filer/models/abstract.py
75.89% <100%> (ø)
:arrow_up:

filer/server/backends/xsendfile.py
100% <100%> (ø)
:arrow_up:

filer/admin/clipboardadmin.py
83.78% <100%> (+0.22%)
:arrow_up:

filer/server/backends/default.py
100% <100%> (ø)
:arrow_up:

filer/server/backends/nginx.py
100% <100%> (ø)
:arrow_up:

filer/server/backends/base.py
86.36% <50%> (-4.95%)
:arrow_down:

filer/models/filemodels.py
84.57% <57.14%> (-0.93%)
:arrow_down:

filer/utils/files.py
69.87% <60%> (-1.18%)
:arrow_down:

filer/migrations/0012_file_mime_type.py
72.72% <72.72%> (ø)

... and 1 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 64ba3fe...42d67eb. Read the comment docs.

With this feature, I will be able to do better PR #1143.
Thank you @ Jacob!

To the maintainers of django-filer: This feature is ready for review.
It will help to fix some other problems, I encountered, while implementing. For instance, the NGiNX server until now, just swallowed the MIME-type.
From my humble point of view, the MIME-type is a really important information of a file. And it should be stored as part of the files meta-data inside the database. Having to always open the file on disk, just to find the proper MIME-type, is not such a good idea.

This pull-request has been rebased against the latest commit on branch master, aka version 1.6.
I also have added all sorts of unit tests to check that the mime-type of uploaded files is used and checked. It would be great to see this feature it in the upcoming version 1.7.
This feature would especially make sense for the urgently required bypassing of thumbnailing SVG images as demonstrated in #1166.


Expand Testing to Include C Target

This pull request introduces a new C target for testing, mirroring the behavior of the existing C++ target. These tests will broaden project support to encompass both C++ and C targets. It closes #21.

The failed test on Ubuntu will be resolved by #23, as it's already in the main branch and not introduced by this pull request.


[Bug] inconsistent inference results about lppool between PyTorch and TVM

For the following script, it produced different inference results between PyTorch and TVM.
Actual behavior

Steps to reproduce
import torch
from tvm import relay
import tvm
import numpy as np
from torch.nn import Module

input_data = torch.randn([1, 3, 7], dtype=torch.float64)
class lp_pool1d(Module):
        def forward(self, *args):
            return torch.nn.functional.lp_pool1d(args[0], 1.5, 2)

m = lp_pool1d().float().eval()

torch_outputs = m(input_data)

trace = torch.jit.trace(m, input_data)
input_shapes = [('input0', torch.Size([1, 3, 7]))]

mod, params = relay.frontend.from_pytorch(trace, input_shapes)
print(mod)
with tvm.transform.PassContext(opt_level=3):
    exe = relay.create_executor('graph', mod=mod, params=params, device=tvm.device('llvm', 0), target='llvm').evaluate()

input_tvm = {'input0': np.array(input_data, dtype='float64')}
tvm_outputs = exe(**input_tvm).asnumpy()

np.testing.assert_allclose(torch_outputs, tvm_outputs, rtol=1e-3, atol=1e-3)

Triage

needs-triage
frontend:pytorch

Analysis
This inconsistency was triggered only we use lpool1d and with input_shape=[1, 3, 7]. other input_shape will not produce any inconsistency.
Wish your further analyzing and fixing.

It should be noticed that lp_pool2d has the same problem with this issue.


scale the ground truth flow by 20

Thank you for the  awesome work.
I have a question:
The authors scaled the ground truth flow by 20  in their paper.
However, I didn't find the scale operation  in this project? Am I missing anything?
Thank you.

Hi @yiyang811
Indeed, we do not divide the groundtruth u,v vectors by 20. Our code does not use a bilinear filter to upsample low-resolution flows and features in its main loop. Instead, we use tf.layers.conv2d_transpose(). This operator performs the same function (upsampling), but it learns the weights of the upsampling filter. Our assertion is that, no matter what constant we multiply or divide scaled flows by, the optimizer will simply work with/around/against the arbitrary scaling factors and come up with what it believes are the best upsampling weights through backprop anyway. Whenever we use tf.image.resize_bilinear(), however, as in pwcnet_loss() for instance, or when generating the final full-res predicted flow, we do scale the flows by the appropriate factor because the bilinear filter uses weights determined by the dimension scaling ratio.
That being said, there still is a glaring discrepancy between our explanation above and the code in def nn(self, x_tnsr, name='pwcnet') , inside the else statement below:
    if lvl == self.opts['pyr_lvls']:
        # Compute the cost volume
        corr = self.corr(c1[lvl], c2[lvl], lvl)

        # Estimate the optical flow
        upfeat, flow = self.predict_flow(corr, None, None, None, lvl)
    else:
        # Warp level of Image1's using the upsampled flow
        scaler = 20. / 2**lvl  # scaler values are 0.625, 1.25, 2.5, 5.0
        warp = self.warp(c2[lvl], up_flow * scaler, lvl)

        # Compute the cost volume
        corr = self.corr(c1[lvl], warp, lvl)

        # Estimate the optical flow
        upfeat, flow = self.predict_flow(corr, c1[lvl], up_flow, up_feat, lvl)

If that discrepancy will keep you awake at night, we humbly suggest one of these two approaches:
a) retrain the models, dividing the groundtruth vectors by 20 and multiplying the final full-res predicted flow at the application level;
b) go all in, and replace the original code in def nn(self, x_tnsr, name='pwcnet') with the following:
with tf.variable_scope(name):

    # Extract pyramids of CNN features from both input images (1-based lists))
    c1, c2 = self.extract_features(x_tnsr)

    flow_pyr = []

    for lvl in range(self.opts['pyr_lvls'], self.opts['flow_pred_lvl'] - 1, -1):

        if lvl == self.opts['pyr_lvls']:
            # Compute the cost volume
            corr = self.corr(c1[lvl], c2[lvl], lvl)

            # Estimate the optical flow
            upfeat, flow = self.predict_flow(corr, None, None, None, lvl)
        else:
            # Warp level of Image1's using the upsampled flow
            warp = self.warp(c2[lvl], up_flow, lvl)

            # Compute the cost volume
            corr = self.corr(c1[lvl], warp, lvl)

            # Estimate the optical flow
            upfeat, flow = self.predict_flow(corr, c1[lvl], up_flow, up_feat, lvl)

        _, lvl_height, lvl_width, _ = tf.unstack(tf.shape(c1[lvl]))

        if lvl != self.opts['flow_pred_lvl']:
            if self.opts['use_res_cx']:
                flow = self.refine_flow(upfeat, flow, lvl)

            # Upsample predicted flow and the features used to compute predicted flow
            flow_pyr.append(flow)

            up_flow = self.deconv(flow, lvl, 'up_flow')
            up_feat = self.deconv(upfeat, lvl, 'up_feat')
        else:
            # Refine the final predicted flow
            flow = self.refine_flow(upfeat, flow, lvl)
            flow_pyr.append(flow)

            # Upsample the predicted flow (final output) to match the size of the images
            scaler = 2**self.opts['flow_pred_lvl']
            if self.dbg:
                print(f'Upsampling {flow.op.name} by {scaler} in each dimension.')
            size = (lvl_height * scaler, lvl_width * scaler)
            flow_pred = tf.image.resize_bilinear(flow, size, name="flow_pred") * scaler
            break

    return flow_pred, flow_pyr

After training, all other things being equal, you should observe very similar performance results. If not, our analysis will have been disproved and you should feel free re-open this issue for further investigation.
Hope this helps!

Thanks for explanation. But I'm still confused about this sentence:

we do scale the flows by the appropriate factor because the bilinear filter uses weights determined by the dimension scaling ratio

Could you please expain it further or with a simple example? Thx 😄
@philferriere


fix: make Grid hashable if T is hashable

I think this should work to make this hashable if the element type is hashable. Closes #43.

Thanks for the pull request. It seems not to work though if not using the std lib. Which is supported by this crate. See failing pipeline with --no-default-features set.

I think that fixes it. I didn't have a hash impl (std::collections::hash_map::DefaultHasher) to use without std, so didn't test it without std. But it compiles without std now and works with std.


[ovn-adoption] Modify OSCP name

OVN adoption guide uses openstack-galera-network-isolation for OSCP CR but if you follow the guide (on 'Deploying backend services') the OSCP name will be "openstack". This is inconsistent.
Modifying OSCP name on ovn-adoption section to make it consistent.

LGTM! I saw this too while following the docs :+1:


Create send_at and send_batch_at functions receiving a timestamp

/claim #315
Closes #315
This pull request creates two functions - send_at and send_batch_at - which receive a timestamp and convert it to seconds from now.
This also documents both functions.

@ChuckHend So is there anything else left to work on or can this be merged now?

@ChuckHend So is there anything else left to work on or can this be merged now?

Test cases would be great1

You are correct, we don't have a test to ensure that the delay feature continues to work as intended, but there are tests calling the function (in the future we should add tests to ensure delay continues to work as intended on send() too). Please add test cases for the new functions that are introduced in this PR.

@ChuckHend I have added tests, tell me your thoughts.

I think it would probably be a better API if instead send and send_batch were overloaded to support both a delay and a timestamp.

@v0idpwn I've already talked with ChuckHend about this
And an issue remains and that is, which function to run when you only 2 arguments

Sorry, missed it because it was resolved :)

if both variable are not none, you can simple raise an exception to user that those variable can not be use together.

another question if user add delay can change it to vt or vise versa? what will happened? what we except?
what scenario use delay or vt or both?

if both variable are not none, you can simple raise an exception to user that those variable can not be use together.

No, the issue is that Postgres will raise an exception if there are two overloading functions with the only difference being a default parameter.

another question if user add delay can change it to vt or vise versa? what will happened? what we except? what scenario use delay or vt or both?

What do you mean?
The user can use delays and change it to vt yes, that's always been an option. The other way around can be done too with CURRENT_TIMESTAMP. It's up to the user to use timestamps or delays.

Is there anything else I'm missing or is this PR done now?

if both variable are not none, you can simple raise an exception to user that those variable can not be use together.

No, the issue is that Postgres will raise an exception if there are two overloading functions with the only difference being a default parameter.

Sorry, but I can't understand why we can't use delay as an option beside vt with default none or zero?

if both variable are not none, you can simple raise an exception to user that those variable can not be use together.

No, the issue is that Postgres will raise an exception if there are two overloading functions with the only difference being a default parameter.

Sorry, but I can't understand why we can't use delay as an option beside vt with default none or zero?

Look, if we overload two functions like this
pgmq.send_batch(
     queue_name text,
     msgs jsonb[],
     delay timestamp DEFAULT CURRENT_TIMESTAMP
 );

pgmq.send_batch(
     queue_name text,
     msgs jsonb[],
     delay integer DEFAULT 0
 );

Postgres will raise an exception because it won't know which one to run if you just put the first two parameters.

@ChuckHend Fixed tests, tell me if there's anything missing now.

@Neptune650 jfyi, I plan to take a look on this PR and do some tests with it by, at most, the weekend.  Consider it accepted, but I may push some changes.

@Neptune650 jfyi, I plan to take a look on this PR and do some tests with it by, at most, the weekend.  Consider it accepted, but I may push some changes.

Sounds good to me, thanks.

@v0idpwn any update on this?

@ChuckHend @tavallaie not sure what should be done with the python client after these changes :)

@Neptune650 I pushed the following changes:

Overload pgmq.send/pgmq.send_batch instead of adding new send_at and send_batch_at
Refactor to remove code duplication
Remove unnecessary timestamp -> duration -> timestamp conversion

I think the extension code is fine now. We just need to figure what to do in the python api.

@Neptune650 I pushed the following changes:

Overload pgmq.send/pgmq.send_batch instead of adding new send_at and send_batch_at
Refactor to remove code duplication
Remove unnecessary timestamp -> duration -> timestamp conversion

I think the extension code is fine now. We just need to figure what to do in the python api.

@Neptune650 All sounds good to me, I was thinking we could leave the Python function names as is, while internally calling the overloaded pgmq.send

@Neptune650 I pushed the following changes:

Overload pgmq.send/pgmq.send_batch instead of adding new send_at and send_batch_at
Refactor to remove code duplication
Remove unnecessary timestamp -> duration -> timestamp conversion
Take timestamp with tz instead of timestamp without tz

I think the extension code is fine now. We just need to figure out what to do in the python API.

I think we can add parameters of delay and ts with a default value of none; check if those, too are not none and use overloaded functions instead.

@tavallaie I have pushed the changes you suggested, please tell me what you think

@Neptune650 did you update unit tests too?

@Neptune650 did you update unit tests?

@Neptune650 did you update unit tests too?

@tavallaie There's no need, they're working fine without changes.

@Neptune650 , @tavallaie thoughts on moving the python changes to a new PR and focus on getting the SQL API changes approved? Also, while the python client changes are very helpful IMO they are out of scope to the bounty that @Neptune650 is working on.

@Neptune650 would you please revert the Python changes, then? Then I can merge.

@v0idpwn I reverted the changes, please merge.

@Neptune650 , @tavallaie thoughts on moving the python changes to a new PR and focus on getting the SQL API changes approved? Also, while the python client changes are very helpful IMO they are out of scope to the bounty that @Neptune650 is working on.

@ChuckHend Sounds good to me, I can create another PR for the Python changes (I'd appreciate if it was with a separate tip but I'll send it either way)

If you are busy, I can do that.

@Neptune650 , @tavallaie thoughts on moving the python changes to a new PR and focus on getting the SQL API changes approved? Also, while the python client changes are very helpful IMO they are out of scope to the bounty that @Neptune650 is working on.

@ChuckHend Sounds good to me, I can create another PR for the Python changes (I'd appreciate if it was with a separate tip but I'll send it either way)

If you are busy, I can do that.

@tavallaie I've created a PR for it #333

Thank you @Neptune650

@ChuckHend No problem - please merge if ready.


Update apple-sso-plugin.md

Microsoft Cloud Germany (aka Blackforest) and the urls microsoftonline.de are no longer valid

@Andy-0-Ryan : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off


Fix windows paths

Adding in the code to fix some path issues and some relative paths.
This doesn't fully address #200 - we really need a more updated test schema.
I imported a majority of the code from that PR, though, and will take a look at some point in the future.
https://github.com/APIDevTools/json-schema-ref-parser/pull/315 windows absolute paths should be included here

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

58 of 70 (82.86%)  changed or added relevant lines in 8 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.3%) to 95.984%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

lib/util/convert-path-to-posix.ts
9
11
81.82%

lib/util/url.ts
28
38
73.68%

Totals

Change from base Build<PHONE_NUMBER>:
0.3%

Covered Lines:
3208

Relevant Lines:
3300

💛  - Coveralls


FIle Upload box doesn't appear.

Version
1.44.0
Steps to reproduce
In a app that I am using, file upload box doesn't appear when clicking the choose file element as below:
page.waitForFileChooser(() -> locator1.click();
Tried with set force true but same issues
page.waitForFileChooser(() -> locator1.click(new Locator.ClickOptions().setForce(true));
When I click the choose file with a simple click with the above waitforfilechooser wrapper method, it works just fine and opens the file upload dialog.
locator1.click(new Locator.ClickOptions().setForce(true))
Any idea what the issue could be.
Expected behavior
FIle upload box should appear
Actual behavior
File upload box not appearing
Additional context
No response
Environment
Mac OS
Playwright 1.44.0
Java 17
Chromium

Please follow our bug template and provide a minimal self-contained project that we could run locally to reproduce the problem.


Setup environments after reset of INT portal on 17.01.2024

As Team
I want to re-setup trace apps on all infected systems after reset of portal
so that reduce the outage because of a portal reset to a limit
Clarification

[ ] In case we switch to API Keys before portal reset there seems not the be any changes regarding the reset of portal

[ ] Setup EDC and SSI Wallet

Dependency

related to https://github.com/eclipse-tractusx/traceability-foss/issues/552

Hints / Details
Hints / Details

[x] Reset of portal application
[x] Reset of registration application
[x] Reset of Keycloak IdP instances
[x] Reset of EDC discovery service
[x] Reset of Managed Identity Wallet (MIW)
(Re-)register your company (in case the company account is still needed) ("how to")
(Re-)register users ("how to")
Register connectors ("how to")
Register apps ("how to")
Execute app subscriptions ("how to")
Activate app subscriptions ("how to")
SSI Credential Requests ("how to")

Infected systems

[x] DEV IRS
[x] INT IRS

Outcome / Acceptance Criteria

Outcome

...

Acceptance Criteria

[x] IRS is up and running after portal reset
[ ] Smoke tests are conducted on each system
[x] Insomnia collection is up and running
[x] Setup EDC and SSI Wallet
[x] Vault is updated with new tokens and urls

Out of Scope

...

@jzbmw
We have to wait for that organization IRS is registered in the portal.
fyi
@jjeroch

With the new Portal, we need to create a Technical User for each System, we interact with. That means that we need a separate User for

Semantic Model Management (user configured via spring.security.oauth2.client.registration.common)
BPDM Pool (user configured via spring.security.oauth2.client.registration.common)
Dataspace Discovery (user configured via spring.security.oauth2.client.registration.portal)
Identity Wallet Management (only configured in EDC, not relevant for IRS)

With the current configuration of IRS it is not possible to set a separate User for BPDM Pool, so a change in implementation is required.
PBI created to add this: https://github.com/eclipse-tractusx/item-relationship-service/issues/378

@ds-alexander-bulgakov can you please verify that DEV and INT are working again after the poral reset?

Update: During testing on INT authentication issues of DiscoveryFinder-user were detected. @ds-jhartmann will take over this topic.

Provided a fix for the authentication issues on INT https://github.com/catenax-ng/tx-item-relationship-service/pull/749


Update the mocked card objects to use brand instead of type.

The Stripe API renamed Card type to Card brand (see discussion here). This PR updates the mocked Card objects accordingly.

Thanks, looks like this was fixed in 8913129 though


fix task2 for windows cmd

This is concerned with #99.
My modification

add path.join, otherwise copy function can not properly copy the cc file to the temporary folder
replace the single quotation marks with the double quotation marks, otherwise will get The filename, directory name, or volume label syntax is incorrect. on windows cmd.

Only those with write access to this repository can merge pull requests. @kid-icarus could you help to merge this? Thanks.

@thyecust any way you can test this in a unix environment? we don't currently have automation set up

The same issue is present on other exercises as well, such as part 3. The root cause is that the copy function doesn't work when "to" is a directory in Windows.