Impossible to revalidation frozen instances that do not allow extra fields

Initial Checks

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

Description
Arguably an edge case: model_validate fails to revalidate frozen instances that do not allow extra fields and have a private field.
The code example raises a ValidationError with "_internal_field: Extra inputs are not permitted".
note: The TYPE_CHECKING/ClassVar bit is only to pass pyright in strict mode. Suggestions to improve type annotations for this use case are highly welcome!
Example Code
from typing import TYPE_CHECKING, ClassVar

from pydantic import (
    BaseModel,
    model_validator,  # type: ignore
)

class MyModel(BaseModel, frozen=True, revalidate_instances="always", extra="forbid"):
    if TYPE_CHECKING:
        _internal_field: ClassVar[int]  # as ClassVar to hide _internal_field from __init__
    else:
        _internal_field: int

    @model_validator(mode="after")
    def set_internal(self):
        object.__setattr__(self, "_internal_field", 1)
        return self

MyModel.model_validate(MyModel())

Python, Pydantic & OS Version
pydantic version: 2.3.0
        pydantic-core version: 2.6.3
          pydantic-core build: profile=release pgo=false
                 install path: C:\Users\fbeut\mambaforge\envs\bio38\Lib\site-packages\pydantic
               python version: 3.8.17 | packaged by conda-forge | (default, Jun 16 2023, 07:01:59) [MSC v.1929 64 bit (AMD64)]
                     platform: Windows-10-10.0.19041-SP0
     optional deps. installed: ['email-validator', 'typing-extensions']

Thanks @FynnBe for this issue 🙏
_internal_field is a private attribute and  based on private attributes docs the error seems correct.

Attributes whose name has a leading underscore are not treated as fields by Pydantic, and are not included in the model schema. Instead, these are converted into a "private attribute" which is not validated or even set during calls to __init__, model_validate, etc.

Did I misunderstand the issue?

Hey @FynnBe,
Following up further - @hramezani was entirely correct to point out that private attributes aren't treated as fields by Pydantic. The issue that you're having is that you're not actually assigning a value to the private field correctly.
Two other approaches you could use would be:
    @model_validator(mode="after")
    def set_internal(self):
        self._internal_field = 1
        return self

or
    @model_validator(mode="after")
    def set_internal(self):
        self.__pydantic_private__['_internal_field'] = 1
        return self

Using either of these in place of your current set_internal function will not result in a validation error.
When you use the __setattr__, you're setting the _internal_field within the __dict__ attribute of the instance. Private fields aren't actually stored here, which was causing your error.

Thanks!
I expected to have to work around my instance being frozen 🤦


fix(buttons): Changing the elevation of a disabled button displays a shadow

Setting the elevation of an MDFloatingActionButton or MDRaisedButton while
the button is disabled no longer causes the shadow effect to be displayed
when it should not be.
Description of the problem
The property 'elevation' can be used to set the elevation of an elevation-supporting KivyMD button class (currently MDRaisedButton and MDFloatingActionButton). However, if the elevation is changed while the button is disabled, elevation effects (namely the background shadow) are disabled. Disabled buttons should not display any elevation behaviour. Changing the disabled status (e.g. toggling between disabled and un-disabled) fixes the problem, as the method on_disabled in CommonElevationBehaviour properly clears all animations etc.
Reproducing the problem
from kivy.lang import Builder
from kivymd.app import MDApp
from kivymd.uix.label import MDLabel
from kivymd.uix.button import MDFlatButton, MDFloatingActionButton, MDRaisedButton

KV = """
MDScreen:

    ScrollView:

        MDBoxLayout:
            id: box
            orientation: "vertical"
            spacing: dp(10)
            adaptive_size: True

            MDLabel:
                text: "Elevation 6"
                adaptive_size: True

            MDFloatingActionButton:
                id: kv_1
                icon: "android"
                elevation: 6
                disabled: True

            MDRaisedButton:
                id: kv_2
                text: "PRESS"
                elevation: 6
                disabled: True

            MDFlatButton:
                text: "TOGGLE DISABLE"
                on_release:
                    kv_1.disabled = not kv_1.disabled
                    kv_2.disabled = not kv_2.disabled

            MDFlatButton:
                text: "INCREASE ELEVATION"
                on_release:
                    kv_1.elevation = kv_1.elevation + 4
                    kv_2.elevation = kv_2.elevation + 4

            MDFlatButton:
                text: "DECREASE ELEVATION"
                on_release:
                    kv_1.elevation = max(2, kv_1.elevation - 4)
                    kv_2.elevation = max(2, kv_2.elevation - 4)
"""

class Test(MDApp):
    def build(self):
        return Builder.load_string(KV)

Test().run()

Screenshots of the problem
Before increasing elevation

After increasing elevation

Description of Changes
Changes are made in ButtonElevationBehavior.

on_disabled is not called at the end of init, as it is now called at the end of on_elevation.
The line self._anim_raised = Animation(_elevation=self._elevation_raised, d=0.15) is removed as it is redundant; the same call is made in on__elevation_raised which will always be triggered immediately before this line anyway.
on_disabled is always called at the end of on_elevation.

Screenshots of the solution to the problem
After clicking 'INCREASE ELEVATION' or 'DECREASE ELEVATION', no visual change is observed in disabled widgets.

@gbm001 https://github.com/kivymd/KivyMD/discussions/1145?converting=1


Adding coordinates for map rendering on listings.

Pull Request Template
Issue
Addresses # (issue)

[ x ] This change addresses the issue in full
[ ] This change addresses only certain aspects of the issue
[ ] This change is a dependency for another issue
[ ] This change has a dependency from another issue

Description
Current minimal.json break map rendering on listing components.
Type of change

[ x ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Prototype/POC (not to merge)
[ ] This change is a refactor/address technical debt
[ ] This change requires a documentation update
[ ] This change requires a SQL Script

How Can This Be Tested/Reviewed?
Please describe the tests that you ran to verify your changes. Provide instructions so we can review. Please also list any relevant details for your test configuration

[ x ] Desktop View
[ x ] Mobile View
[ ] Test A
[ ] Test B


Node folder in config.json is not used. Instead it uses default

In my config everything seems fine but for some reason the volume is created in the default folder.
I thought maybe it was related to the permissions, but when I removed the node config and configured the default in the /mnt/k8s-data folder, everything worked flawlessly.
The <IP_ADDRESS> is the NAME of the node (also its IP, of course). I mention this because I had another issue with Linstor in another cluser because Linstor got confused with the name of the node.
Maybe is the same issue with local-path-provisioner?
Am I doing something wrong?
  config.json: |-
    {
            "nodePathMap":[
            {    node":"DEFAULT_PATH_FOR_NON_LISTED_NODES", "paths":["/opt/localstorage"]   },
            {    "node":"<IP_ADDRESS>", "paths":["/mnt/k8s-data"]  },
            { -- cut for simplicity -- }
            ]
    }

time="2023-02-04T07:06:36Z" level=debug msg="Applied config: {\"nodePathMap\":[{\"node\":\"DEFAULT_PATH_FOR_NON_LISTED_NODES\",\"paths\":[\"/mnt/k8s-data\"]}]}"
time="2023-02-04T07:06:36Z" level=debug msg="Provisioner started"
I0204 07:06:36.263087       1 controller.go:773] Starting provisioner controller rancher.io/local-path_local-path-provisioner-7b65754f87-5l6qh_b57b7800-bede-4c6c-92b7-6c01cd754d61!
I0204 07:06:36.363181       1 controller.go:822] Started provisioner controller rancher.io/local-path_local-path-provisioner-7b65754f87-5l6qh_b57b7800-bede-4c6c-92b7-6c01cd754d61!
I0204 07:08:54.965446       1 controller.go:1202] provision "local-path-storage/local-path-pvc" class "local-path": started
time="2023-02-04T07:08:54Z" level=debug msg="config doesn't contain node <IP_ADDRESS>, use DEFAULT_PATH_FOR_NON_LISTED_NODES instead"
time="2023-02-04T07:08:54Z" level=info msg="Creating volume pvc-531f43ad-17c7-409e-aa84-b7d6619cddd9 at <IP_ADDRESS>:/mnt/k8s-data/pvc-531f43ad-17c7-409e-aa84-b7d6619cddd9_local-path-storage_local-path-pvc"
time="2023-02-04T07:08:54Z" level=info msg="create the helper pod helper-pod-create-pvc-531f43ad-17c7-409e-aa84-b7d6619cddd9 into local-path-storage"
I0204 07:08:54.989841       1 event.go:281] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"local-path-storage", Name:"local-path-pvc", UID:"531f43ad-17c7-409e-aa84-b7d6619cddd9", APIVersion:"v1", ResourceVersion:"3832258", FieldPath:""}): type: 'Normal' reason: 'Provisioning' External provisioner is provisioning volume for claim "local-path-storage/local-path-pvc"
time="2023-02-04T07:09:00Z" level=info msg="Volume pvc-531f43ad-17c7-409e-aa84-b7d6619cddd9 has been created on <IP_ADDRESS>:/mnt/k8s-data/pvc-531f43ad-17c7-409e-aa84-b7d6619cddd9_local-path-storage_local-path-pvc"
I0204 07:09:00.136468       1 controller.go:1284] provision "local-path-storage/local-path-pvc" class "local-path": volume "pvc-531f43ad-17c7-409e-aa84-b7d6619cddd9" provisioned
I0204 07:09:00.136548       1 controller.go:1301] provision "local-path-storage/local-path-pvc" class "local-path": succeeded
I0204 07:09:00.136570       1 volume_store.go:212] Trying to save persistentvolume "pvc-531f43ad-17c7-409e-aa84-b7d6619cddd9"
I0204 07:09:00.148004       1 volume_store.go:219] persistentvolume "pvc-531f43ad-17c7-409e-aa84-b7d6619cddd9" saved

time="2023-02-04T07:06:36Z" level=debug msg="Applied config: {\"nodePathMap\":[{\"node\":\"DEFAULT_PATH_FOR_NON_LISTED_NODES\",\"paths\":[\"/mnt/k8s-data\"]}]}"

The config with the "node": "172.18...." is not updated yet.
Can you describe your steps to update the nodePathMap?
Ref: https://github.com/rancher/local-path-provisioner#reloading


schedulers: fix the issue about the limit of the hot region

Signed-off-by: nolouch<EMAIL_ADDRESS>
What problem does this PR solve?
The auto adjust limit may become 0.
What is changed and how it works?
use 1 as min value.
Check List
Tests

Unit test

Codecov Report

Merging #1552 into master will decrease coverage by 0.19%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master    #1552     +/-   ##
=========================================
- Coverage   67.75%   67.56%   -0.2%
=========================================
  Files         159      159
  Lines       16141    16138      -3
=========================================
- Hits        10937    10903     -34
- Misses       4250     4263     +13
- Partials      954      972     +18

Impacted Files
Coverage Δ

server/schedulers/hot_region.go
76.66% <100%> (+0.47%)
:arrow_up:

pkg/tempurl/tempurl.go
57.14% <0%> (-14.29%)
:arrow_down:

pkg/metricutil/metricutil.go
90.62% <0%> (-9.38%)
:arrow_down:

pkg/etcdutil/etcdutil.go
86.04% <0%> (-9.31%)
:arrow_down:

server/util.go
70.86% <0%> (-4.64%)
:arrow_down:

server/etcd_kv.go
65.95% <0%> (-4.26%)
:arrow_down:

server/namespace_cluster.go
81.81% <0%> (-3.9%)
:arrow_down:

server/leader.go
80.81% <0%> (-3.68%)
:arrow_down:

server/schedule/region_scatterer.go
86.23% <0%> (-2.18%)
:arrow_down:

server/tso.go
74.46% <0%> (-2.13%)
:arrow_down:

... and 8 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 c44ddf4...def6db7. Read the comment docs.


Missing classes/methods

On Linux,  64bits,  v0.13.0, there are some default http methods missing from uws module.  The problem is not from Koa.
For example, I cannot access http.response.removeHeader function:
TypeError: this.res.removeHeader is not a function
    at Object.remove (PROJECT/node_modules/koa/lib/response.js:476:14)
    at Object.set body [as body] (PROJECT/node_modules/koa/lib/response.js:174:10)
    at Object.body (PROJECT/node_modules/delegates/index.js:92:31)
    at Object.v2Get (PROJECT/src/controllers/search.js:468:18)
    at v2Get.next (<anonymous>)
    at Object.dispatch (PROJECT/node_modules/koa-router/lib/router.js:331:14)
    at dispatch.next (<anonymous>)
    at Object.compress (PROJECT/node_modules/koa-compress/index.js:42:12)
    at compress.next (<anonymous>)
    at onFulfilled (PROJECT/node_modules/co/index.js:65:19)

and removeHeader is from http Response class:
https://nodejs.org/api/http.html#http_response_removeheader_name

@alexhultman Why was this issue closed? I'm using 0.18.0 and it's still an issue.


Nit problem with SASS version of "unstack" in flex grid

The vanilla CSS specifies:
.row.medium-unstack .column, .row.medium-unstack .columns {
-webkit-flex: 0 0 100%;
  -ms-flex: 0 0 100%;
      flex: 0 0 100%; }

The compiled SASS only specifies:
.row.medium-unstack .column {
-webkit-flex: 0 0 100%;
-ms-flex: 0 0 100%;
flex: 0 0 100%; }
So class="columns" works with unstack only if you are using the css version, not SASS.

That could be UnCss stripping out .columns if you're not using it in your markup somewhere.

@RioBrewster Are you using the production flag? How are watching for Sass changes? It would help us get to the bottom of this.

I use class="columns" in multiple places - Typically I use "columns" and not "column" everywhere for consistency.
That's the bug - it is NOT working with "columns" but it does work with "column".
No i'm not using the production flag.
I created the project using YETI - Basic Template.  But I had to edit the gulpfile so I'm running it with npm start.
var gulp = require('gulp');
var $    = require('gulp-load-plugins')();

var sassPaths = [
  'bower_components/foundation-sites/scss',
  'bower_components/motion-ui/src',
  'scss'

];

gulp.task('sass', function() {
  return gulp.src('scss/**/**/**/*.scss')
    .pipe($.sass({
      includePaths: sassPaths
    })
      .on('error', $.sass.logError))
    .pipe($.autoprefixer({
      browsers: ['last 2 versions', 'ie >= 9']
    }))
    .pipe(gulp.dest('css'));
});

gulp.task('default', ['sass'], function() {
  gulp.watch(['scss/**/**/**/*.scss'], ['sass']);
});

I use class="columns" in multiple places - Typically I use "columns" and not "column" everywhere for consistency.
That's the bug - it is NOT working with "columns" but it does work with "column".
No i'm not using the production flag.
I created the project using YETI - Basic Template.  But I had to edit the gulpfile so I'm running it with npm start.
var gulp = require('gulp');
var $    = require('gulp-load-plugins')();

var sassPaths = [
  'bower_components/foundation-sites/scss',
  'bower_components/motion-ui/src',
  'scss'

];

gulp.task('sass', function() {
  return gulp.src('scss/**/**/**/*.scss')
    .pipe($.sass({
      includePaths: sassPaths
    })
      .on('error', $.sass.logError))
    .pipe($.autoprefixer({
      browsers: ['last 2 versions', 'ie >= 9']
    }))
    .pipe(gulp.dest('css'));
});

gulp.task('default', ['sass'], function() {
  gulp.watch(['scss/**/**/**/*.scss'], ['sass']);
});

I spun up a basic project from the command line (the same one used by Yeti Launch) and when I compiled the Sass I saw the correct code. I believe 1249929b343b865c2b330e79272e2189558e432f fixed this issue.
There's currently a bug with Yeti Launch not downloading the latest version of Foundation into the project. If you have a development environment set up on your machine, open the project folder in your command line and run bower install foundation-sites#6.1.2 --save. That will get your project up to date.


[EBPF] Test correct packaging of eBPF files

What does this PR do?
This PR is a fixed version of https://github.com/DataDog/datadog-agent/pull/25727, which had to be reverted due to some tests being broken on main. This PR changes e2e tests so that they validate that eBPF object files are correctly packaged. This means two changes:

Add metadata to eBPF object files that helps us define the architecture they were compiled against. While eBPF assembly is architecture agnostic, offsets and structs used in them are not, which means we need some manual way to mark the architecture they were built for.
Add code to the e2e packaging tests that ensure that system-probe is running (which means that at least one module that loaded eBPF object files was enabled) and that eBPF object files are of the correct arch.

Motivation
Ensure that changes of the eBPF build process (motivating PR) have at least a basic sanity check.
Additional Notes
Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

/trigger-ci --variable RUN_ALL_BUILDS=true --variable RUN_KITCHEN_TESTS=true --variable RUN_E2E_TESTS=on --variable RUN_UNIT_TESTS=on --variable RUN_KMT_TESTS=on

/trigger-ci --variable RUN_ALL_BUILDS=true --variable RUN_KITCHEN_TESTS=true --variable RUN_E2E_TESTS=on --variable RUN_UNIT_TESTS=on --variable RUN_KMT_TESTS=on

Looks fine for build and release - assuming the full pipeline's passed 👍

Double checked just in case, it seems that all e2e jobs that run on main ran on this pipeline too

/trigger-ci --variable RUN_ALL_BUILDS=true --variable RUN_KITCHEN_TESTS=true --variable RUN_E2E_TESTS=on --variable RUN_UNIT_TESTS=on --variable RUN_KMT_TESTS=on

/merge


gem 'promise.rb'  leads to "undefined method `arity' for nil:NilClass"

Hi.
Installing as described (in my case with bundler gem 'promise') succeeds but installs the wrong gem - i.e. it installs this older and completely different promises library:  https://github.com/bhuga/promising-future
Since the install appears to succeed the mistake is not apparent until you try to use the library - at which time Promise.new fails with the runtime exception:
undefined method `arity' for nil:NilClass

My Mistake:
gem 'promise.rb' works fine as documented.  gem 'promise' leads to the error.  Probably worth leaving in in case anyone does the same.


Add defaultMimeTypes to Nginx

This adds support for MIME types to Nginx.
Without it the static files don't work because they are all of type "text/plain".
Closes: #876
I basically copied it from here: https://github.com/NixOS/nixpkgs/blob/nixos-23.05/nixos/modules/services/web-servers/nginx/default.nix#L571
Is there maybe a better way to use configs from NixOS?
This way we just duplicate a lot of the code and I don't really know what else might be useful.
I just noticed the MIME types because my project was broken without them.

I recently thought about adding an additional option so that we can extend the nginx config more freely if needed.
The pattern for this I think is extraConfig or is it settings?
I could easily expand this PR this way.


IPv6 Support

TCP Ports have only 2^16 possible values

https://github.com/kravets/NewCoin/blob/develop/src/cpp/ripple/ripple.proto#L190
https://github.com/kravets/NewCoin/blob/develop/src/cpp/ripple/ripple.proto#L68

Both lines specify that TCP port number is to be encoded using uint32 whereas uint16 should be used instead (also there should only be a single place instead of two where this is spec'd)
IPv6 MUST be Supported
Instead of allocating 32 bits to IPv4 address here
https://github.com/kravets/NewCoin/blob/develop/src/cpp/ripple/ripple.proto#L189
one can allocated uint128 to handle either IPv4 or IPv6 addresses where the most significan 96 bits of an address being zero would mean this endpoint is an IPv4 endpoint.
See http://www.tcpipguide.com/free/t_IPv6IPv4AddressEmbedding.htm#Figure_99 for details.
Alternatively allowing either IPv4 or IPv6 address (or both) for an endpoint would allow endpoints more flexibility in deciding to be visible on one, the other or both.
Discussion
It is critical to get these in before the code base is open sourced, changes at such low level of the protocol will be a BIG DEAL later.
For comparison: Bitcoin supports not only IPv6, but also Tor and may even support I2P, "shipping" w/o IPv6 is very very uncool.

This is something to consider in the long term but for now I'm closing it.


--since and --until not working together and not able to geolocation of scraped tweets

(venv) Ko-MacBook-Pro:SmartCity ko$ twint -g -s "traffic" --near 'London' --since "2020-01-01 00:00:00" -o Londontraff2020.csv --csv
usage: python3 twint [options]
twint: error: argument -g/--geo: expected one argument
(venv) Ko-MacBook-Pro:SmartCity ko$

I think you can not use both together! You could use --since to get tweets for that year or --until to get tweets before the date you mention in descending order(by date). It would be interesting to know why would you need to use both of these commands together?

No problem I wanted to collect tweets for a specified period for analysis but I will just use  - - since, my major issue lies in collecting the tweets geolocations to create an interactive map, is there any possible way to do this?

maybe you could use --Location feature in your csv and use reverse geo coding to get (lat, long) coordinates.

I am trying to collect tweets for a given time period, searching by hashtag, but there's such a large volume of data that I want to gather the data week by week, then merge the data later.
I was hoping I could use --since and --until to do this.
Why can't they work together? I can specify both on Twitter's Advanced Search (in a browser), and it seems to work fine.

I use --since and --until for this exact purpose and they work together. What you need  to do is provide the -g geo argument with an input. It requires "lat,long,radius" as the input. An example would be: --geo 35.1,-127.23,25mi. You can use mi or km for the geo argument. I would use geo over near since you have more control over the area you search for.


error TS2564: Property 'name' has no initializer and is not definitely assigned in the constructor.

ERROR in /Users/benzhao/Researchs/TypeScript-Vue-Starter/src/components/HelloDecorator.vue.ts
(16,11): error TS2564: Property 'name' has no initializer and is not definitely assigned in the constructor.

ERROR in /Users/benzhao/Researchs/TypeScript-Vue-Starter/src/components/HelloDecorator.vue.ts
(17,11): error TS2564: Property 'initialEnthusiasm' has no initializer and is not definitelyassigned in the constructor.

typescript version 2.7.2

how do we work around this?

got it, it's because typescript 7.2 included a strict class checking where all properties should be declared in constructor. So to work around that, just add a bang sign (!) like: name!:string;

Try adding "strictPropertyInitialization": false to your compiler options.

 You can turn off quite a lot of features and dumb TypeScript down to a extend and it'll start deffering to any where you don't declare a type, but then it looses the point. TypeScript being strict is what we want, and because of that, it's easy to refactor and write more obvious code :slightly_smiling_face:

@cyberhck
and write more complex code too.
code should keep clean and simple.
i use typescript because it hides differences between versions of node.js/ecma.
not because it wastes time and provide type info.

type info may be good for large projects. but it is not that important for small projects.
and some grammatical errors are just time wasting and should only be warned or auto corrected.

I agree on writing clean and simple code. Sure. But if you say type info isn't necessary for small projects, then maybe just don't use TypeScript and go for plain JS, (or disable most of feature in TypeScript), that will just work fine. TS does give you ability to enforce less strictness. But here's something, if it's a small project you're doing for yourself, and you know exactly what's gonna happen, like "coming soon" page for your new website, or similar, then yes, sure, typescript with minimal strictness or even JS will do.
But what I've seen is projects starting minimal, and client asking for some change which touches quite a bit of code, even though it's a small project, I'd still prefer type safety.
But if it's really a coming soon page kinda, I think normal JS will do just fine (or a event page which won't be used after a week or so)

type safe means not direct data conversion or type casting which leads to time and code wasting on type conversion. code is much complex with the result of the introduction of generic programming.
scripting languages are introduced not to use generic programming due to their dynamic nature.
as far as i can see, typescript may not be on the right track by bring new burdens to the scripting language, javascript, developers.

For larger projects, I wouldn't be comfortable with TypeScript being more flexible and allowing developers to do more stuff, (for example property initializers may not be very useful in this project, but it's quite useful feature on a lot of other places), so if you find TypeScript more restricting, just turn some options off. There's no harm in that. But for larger project, I wouldn't be comfortable with that.

This happens with Object.assign too.

Imho, the most important point of strong typing is that it throws errors to the programmer, not to the user. If you remove all checking from typescript, why use it?
I like this hilarious talk about the lack of type safety in javascript.

typescript provides translation to different js versions. that is why i use it.
not because it provides type checking which is much useless and time wasting.
if you like type checking, you should use c++ OR java at first place which is faster and more efficient.
why you use javascript as your working environment then?

to me it is mostly another babel which can keep code much more consistent.
with which i don't need to think if the features are supported by certain js version, and don't need to change the code when time goes on.
Sometimes i do use types to limit input when necessary, but I won't use strict typing extensively.
it is a bonus not a must. especially I would forbid using generic programming when it is a script language which is created to avoid generic programming.

Again, like I already mentioned, you CAN remove all types and make typescript as simple as JS, but for people who have to deal with projects which explodes very quickly, we need typescript to be as strict as any other strongly typed language.
If you're using mostly like another babel, you're using the tool which can technically do what you want it to, but it's about so much more than that.
So you can configure the way you like, it's your opinion, and a lot of people hold that opinion, trust me, I've seen these comments :) but I'm not one of them.
For you it's a bonus, for me, it's a must when I'm working.
I like the help I get from TypeScript. I don't have any checks like: if something is a number or not, I just declare it, and typescript does the rest for me.

I am not forcing everyone to be on my side, but still there are people who want to force their idea to others.
I do appreciate the features typescripts bring to us, but I do resist the idea using types extensively within a scripting language as well.
types can be helpful and types can be harmful.
It is an art on how to balancing them, so i choose to use types when necessary while keeping code simple, clean, understandable.
There is no truth in that strong types are superior than weak types.
if it is true, then scripting languages would never come into being.
So the idea using strict typing is good for large projects is nonsense.
the largest package repositories are pip, npm, gem which are backed by languages with weak types, none of them are strong typed languages such as java, c++.
so type checking is irrelevant to how large your project is. why should there always be someone trying to convince someone else that strong types are superior?

I'm trying to force my opinion to you, I never did that, your comment was: "typescript should be more flexible instead of being another C++/Java.", and I said you CAN configure typescript to not be strict, it's upto you.
About having largest repositories in weakly typed language, first I'd like to say this:

pip: because python is very popular and it has many libraries
npm: JS is common among-st most developers because backend language can vary, but frontend can't.
Actually mavencentral has more than pip or gem, which is Java (looked up at modulecount)

Second, just because it has a large number of package doesn't say anything, if we count number of users, then wordpress serves most of the website in the world, does that mean wordpress has a greater codebase? No! It just happened to happen.
Third: if typechecking is irrelevant to how large your project is, why would facebook move from PHP to hack (performance AND typechecking), why would facebook introduce flow?
Just because it's popular doesn't mean anything.
Finally: Again, I'm not saying my view is superior to yours, you have your view and I have mine, you're making a statement: "typescript should be more flexible instead of being another C++/Java." which degrades my view, it's not like typescript is stopping you from doing stuff in your way. It's flexible.
What you're saying is it should remove everything and make it a plain js transpiler, if you wanted that, go with a transpiler, not a type checker.
You CAN configure your project to not have strict typings, that's how you like it.
I WANT to be able to configure my project so a jimmy won't fuck up in production, that's how I like it.

your are making a bad example on how to use scripting language properly.
when using scripting language, you need not to make sure your type is correct.
so the code should be:
class Calc {
  static add(a, b) {
    return a + b;
  }
  static sub(a, b) {
    return a - b;
  }
  static mul(a, b) {
    return a * b;
  }
  static div(a, b) {
    return a / b;
  }
}

and a, b needn't to be a number when other types are applicable.
where calc::add('aa', 'bb') is ok. when it produce expected result.
why should i check type every time? what i needed is it solve my problem and improve my code efficiency.

And you are absolutely wrong on I think first class is more clean, beautiful, easy to maintain than the later one.

I think most users are just using it as javascript replacement where javascript syntax is changing.
we just want our code to be steady. not because we like strong types. although type checking sometimes do help.
And I should say, if you think strong types really good? why not just use C++/Java/C#？ web assembly is coming, you've good the opportunity.

https://www.youtube.com/watch?v=M3BM9TB-8yA&t=2s
https://github.com/ry/deno
context: guy who created nodejs thinks nodejs is a bad idea because of typesafety, and he's now working on deno which runs typescript.
If you think I'm wrong on that, mention why you think I'm wrong. I think you're absolutely wrong and I'm correct because of the following premises:

your code doesn't have any error handling whatsoever.
your code doesn't have any documentation whatsoever.

When I see your class, I expect it to work just by doing Cal::(1, myValue), but it doesn't because myValue is not defined and it throws a run time error.
And if you're trying to use javascript on production without validating inputs first, good luck with that.
Scripting language have their own place (while scripting), not while building complex application which we rely on.
Most users aren't using just as replacement, that's what you think, which doesn't make it true.
I'd much rather use C++/Java/Any thing really, but if you didn't know, webassembly is coming, it's not reliable yet, unlike a lot of people I've to ship to customers whose browser isn't new.
calc::add('aa', 'bb') is okay in your case, but let's see something shall we?
consider a dom where I've got 2 input boxes, and I've to display a sum of those on a div when anything changes.
here's a sample link
here's js I used, and notice html input type is number.
const firstInput = document.getElementById("first");
const secondInput = document.getElementById("second");
const resultContainer = document.getElementById("result");
const performAdd = () => {
  const firstValue = firstInput.value;
  const secondValue = secondInput.value;
  resultContainer.innerHTML = firstValue + secondValue;
}

const listenChange = (element) => {
  element.addEventListener("keyup", performAdd);
}
listenChange(firstInput);
listenChange(secondInput);

When I try to add 1 and 2, it says 12, that's definitely not fine in my case. I don't want it happening, if I wanted it happening, I'd much rather convert first. Just because it's good when we do with simple strings doesn't mean it's good everywhere.
Say you did similar, you didn't check parameters, you created a library which others use, do you think they're going to be happy when there's silent errors? At least report an error, and you don't have documentation, come on! In my case, my class self documents.
Now you might say, if I don't parse it, I'm incompetent and shouldn't be doing programming at all, but the point is, it's something you've to remember, but typescript would catch it. This is one of the example, there might be some more.
Scripting languages are good for fast iteration, but again IMO, they're not very useful for larger codebase.

regret on node having nothing to do with weak types or strong types.
I won't waste time on this.

Woah... I ended up in "that" part of Github again 😆

If you are not initializing a property right away (during the construction phase), you should explicitly indicate that it could be undefined: private name: string | undefined; or private name?: string;, then the warning would go away. It makes a lot of sense, actually, because everyone working with the code will see that it could be undefined, including the compiler.

I never thought of it, if I had done that instead of using bang (!), I'd not have that bug yesterday, just yesterday, wow.
I'm gonna create a lint which will not allow me to use bang and set can be undefined instead. So we always check.
Thanks
@slavafomin

you can combine between strictPropertyInitialization: false and @IsDefined() decorator


No need to install ruby [run-systemtest]

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

Requires built image from https://github.com/vespa-engine/docker-image-dev/pull/131


Fix tryout issue

This will enable the UI and show all the environments + deleted environment

The proper fix should be once we click that environment, the message should be coming this env is deleted.


[Bug] V 2,2.0 Mouse Cursor

Not 100% sure if this mod is causing it, but whenever I emote and hold Left Alt to turn the camera, my mouse is no longer centered on my screen, and can move off-screen to my other monitor causing me to tab out when I click and mouse buttons. I haven't found a fix for it, alt tabbing or even windows tabbing back into the game doesn't seem to work. Thank you for your hard work! I'd also like to mention that we'd all love if you added a random emote button :)

Noticed the person before me already made a bug report about this issue. CLOSING


Getting Error : Private Marker Transaction failed due to intrinsic gas exceeding the limit

Description
I wanted to create a privacy group with two participants and do a private transaction between these two .
Steps to re-produce -
a. I have created 3 Besu nodes with privacy enabled.
b. Each node is running a tressera node inside.
c. Using IBFT consensus
d. Created Privacy group with 2 participants
e . Sending Ether within 2 participants member
Getting Error :  Private Marker Transaction failed due to intrinsic gas exceeding the limit
Code Snippet -
Getting Privacy Group ID -
         node1 = Besu.build(new HttpService("http://localhost:8545"));
        List<Base64String> participants = new ArrayList<Base64String>();
        participants.add(Base64String.wrap("KXJmOY+SyjGoPgZmA7itpSu4W6wxWFCWz+4HQGvZ600="));
        participants.add(Base64String.wrap("sOkbkOhXVBzhOzYX7qSy0AqIhvdBO1g5nG9ytFfrARI="));
        Base64String privacyGrpIdBase64 = node1
                .privCreatePrivacyGroup(participants, "network_1", "Network 1 privacy group")
                .send()
                .getPrivacyGroupId();
        privacyGrpId = privacyGrpIdBase64.toString();

Sending Ether -
     TransactionManager transactionManager = new BesuPrivateTransactionManager(besu,
            new BesuPrivacyGasProvider(DefaultGasProvider.GAS_PRICE, DefaultGasProvider.GAS_LIMIT), credentials, CHAIN_ID, privateForm, privacyGroupId);
    Transfer transfer = new Transfer(web3j, transactionManager);
    TransactionReceipt transactionReceipt = transfer.sendFunds(toAddress, value, Convert.Unit.ETHER).send();

Stacktrace
2022-02-25 14:47:51.247 ERROR 47917 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: Error processing transaction request: Private Marker Transaction failed due to intrinsic gas exceeding the limit. Gas limit used from the Private Transaction.] with root cause
java.lang.RuntimeException: Error processing transaction request: Private Marker Transaction failed due to intrinsic gas exceeding the limit. Gas limit used from the Private Transaction.
at org.web3j.tx.PrivateTransactionManager.processResponse(PrivateTransactionManager.java:250) ~[besu-5.0.0.jar:na]
at org.web3j.tx.PrivateTransactionManager.executeTransaction(PrivateTransactionManager.java:109) ~[besu-5.0.0.jar:na]
at org.web3j.tx.ManagedTransaction.send(ManagedTransaction.java:102) ~[core-5.0.0.jar:na]
at org.web3j.tx.Transfer.send(Transfer.java:79) ~[core-5.0.0.jar:na]
at org.web3j.tx.Transfer.send(Transfer.java:55) ~[core-5.0.0.jar:na]
at org.web3j.tx.Transfer.lambda$sendFunds$1(Transfer.java:107) ~[core-5.0.0.jar:na]
at org.web3j.protocol.core.RemoteCall.send(RemoteCall.java:42) ~[core-5.0.0.jar:na]
.....
Versions
Besu Version - 22.1.0
web3j Lib - 5.0.0
Jopen JDK 11

Thanks for providing these details @jann2005.  The team will have a look this week.

Hi @jann2005, I've had a look what is happening here. The error happens, because Besu uses the gas_limit from from the private transaction (as well as the gas_cost) that you are sending for the private marker transaction. If you are using the Transfer class from web3j to send the transaction the gas_limit used in the private transaction is 21000 (cost for a value transfer), which is below the intrinsic cost for the PMT. The minimum cost for the PMT is 21128 (tx base cost of 21000 plus 32 * 4, for 32 byte payload times 4, which is the cost for a zero byte, more for a non zero byte).

The PrivateTransactionManager in web3j could check whether the gas_limit used in the private transaction is greater than the intrinsic gas for the PMT.  The sendTransaction() method could then fail early, or could fix the gas_limit.

@pinges  - I am setting  DefaultGasProvider.GAS_LIMIT . The value is below by default. This should be sufficient as per your logic. Is not it?
public static final BigInteger GAS_LIMIT = BigInteger.valueOf(9_000_000);
But still I am getting this issue. Please comment if I am missing something.

Can you share the code you're using and the error you're getting?

Closing this issue since no activity in the past 30 days. Feel free to reopen if further help is needed 😊

Hi, I have been trying to deploy a smart contract on my private permissioned network created using besu.
I am getting the error " reason: 'Intrinsic gas exceeds gas limit " , below is my code and genesis
import { Web3 } from 'web3';
import { resolve } from 'path';
import { readFileSync } from 'fs';
import { Common, Hardfork } from '@ethereumjs/common'
import { LegacyTransaction } from '@ethereumjs/tx'
const web3 = new Web3("http://<IP_ADDRESS>:8545/");
// use an existing account, or make an account
// const privateKey = "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63";
// const account = Web3.eth.accounts.privateKeyToAccount(privateKey);
// const acc = "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73";
const privateKey = "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63";
const privateKeyBuffer = Buffer.from(privateKey, 'hex');
const acc = web3.eth.accounts.privateKeyToAccount("0x8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63");
// read in the contracts
const contractJsonPath = resolve(process.cwd(), "SimpleStorage.json");
const contractJson = JSON.parse(readFileSync(contractJsonPath));
const contractAbi = contractJson.abi;
const contractBinPath = resolve(process.cwd(), "SimpleStorage.bin");
const contractBin = readFileSync(contractBinPath);
// initialize the default constructor with a value 47 = 0x2F; this value is appended to the bytecode
const contractConstructorInit =
"000000000000000000000000000000000000000000000000000000000000002F";
const contractBinHex = contractBin.toString('hex'); // Convert buffer to hexadecimal string
const data1 = 0x${contractBinHex}${contractConstructorInit}; // Concatenate
// get txnCount for the nonce value
const txnCount = await web3.eth.getTransactionCount(acc.address);
const rawTxOptions = {
nonce: web3.utils.numberToHex(txnCount),
from: acc.address,
to: null,
value: "0x00",
data: data1,
//   data: "0x" + contractBin + contractConstructorInit, // contract binary appended with initialization value
//   gasPrice: 100, //ETH per unit of gas
gasPrice: 500,
gas: 500000000,
chainId: 1337 //max number of gas units the tx is allowed to use
};
// const gasEstimate = await web3.eth.estimateGas({
//     from: acc.address,
//     data: data1
// });
// console.log("gas estimate -->", gasEstimate);
console.log("Creating transaction...");
const common = Common.custom({ chainId: 6990 },{ hardfork: Hardfork.Berlin })
// const tx = new Tx(rawTxOptions);
const tx = LegacyTransaction.fromTxData(rawTxOptions, { common })
console.log("Signing transaction...");
console.log("Length:", privateKey.length);
const signedtx = tx.sign(privateKeyBuffer);
console.log("Sending transaction...");
var serializedTx = signedtx.serialize();
console.log("reached here...")
console.log('Serialized Transaction:', serializedTx);
// const pTx = await web3.eth.sendSignedTransaction(
//   "0x" + serializedTx.toString("hex"),
// );
try {
const pTx = await web3.eth.sendSignedTransaction(
"0x" + Buffer.from(serializedTx).toString('hex')
);
console.log('Transaction Hash:', pTx);
} catch (error) {
console.error('Error sending transaction:', error);
}
Genesis:-
{
"config" : {
"chainId" : 6990,
"berlinBlock" : 0,
"ibft2" : {
"blockperiodseconds" : 2,
"epochlength" : 30000,
"requesttimeoutseconds" : 4
}
},
"nonce" : "0x0",
"timestamp" : "0x58ee40ba",
"gasLimit" : "0x47b760",
"difficulty" : "0x1",
"mixHash" : "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
"coinbase" : "0x0000000000000000000000000000000000000000",
"alloc" : {
"0x086Ed7A43049c0A2a428884E69ec298dC215Fa61" : {
"privateKey" : "98237264cbac8630421c10ef99521102f3c720bcb341591067dd45c1e1b6b5a6",
"comment" : "private key and this comment are ignored.  In a real chain, the private key should NOT be stored",
"balance" : "90000000000000000000000"
},
"fe3b557e8fb62b89f4916b721be55ceb828dbd73" : {
"privateKey" : "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63",
"comment" : "private key and this comment are ignored.  In a real chain, the private key should NOT be stored",
"balance" : "0xad78ebc5ac6200000"
},
"627306090abaB3A6e1400e9345bC60c78a8BEf57" : {
"privateKey" : "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3",
"comment" : "private key and this comment are ignored.  In a real chain, the private key should NOT be stored",
"balance" : "90000000000000000000000"
},
"f17f52151EbEF6C7334FAD080c5704D77216b732" : {
"privateKey" : "ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f",
"comment" : "private key and this comment are ignored.  In a real chain, the private key should NOT be stored",
"balance" : "90000000000000000000000"
}
},
"extraData" : "0xf87ea00000000000000000000000000000000000000000000000000000000000000000f8549499793e1a679672b9ec70b77976f7270cbf15d5e2941e0e19a96d2beff77a0721251c5cdb7ee8297dbb942ea65fb755dc807cf94c2c79e9d030e6aab370ae940f98db1b38140dd682c78b79bade89dc7f0983ff808400000000c0"
}


Limit of analysis to be copied

Heys guys, how are you? So, I was trying to copy a lot of results from excel to TOPSOIL (exactly 330 analysis). However, when I try to paste from the clipboard, there is a limit of 239 analysis that can be copied. Is this a real limit or it might be some kind of bug? I am using Windows 10 Home and Microsoft Office Professional Plus 2010.

We've yet to see this sort of thing before. If it's a problem with Topsoil, it's certainly not intentional. This could also be an issue with Windows, Excel, or your data. Are you able to send me the file you're having trouble with? If I'm able to reproduce the issue, I can start working on a fix or a workaround.

Hey John, I will prepare the file ASAP!

Resultados 91500 - TOPSOIL issue.xlsx

I don´t believe the problem is actually with the data because I was able to plot it using Isoplot. But let´s see what you find out, maybe Isoplot is handling some kind of error in a way that It´s not obvious to me.

I've found the issue and will have a fix out soon. @Felipe-UnB, thanks for reporting this.

John, the bug was actually related to the number of the analyses?

Not the one I found, but I could reproduce the copy-paste failing. After that, everything worked fine. Are you still having issues?

The version with the bug correction for this issue is the v1.0.0-alpha.6, correct? If that's right, I am still experiencing the same problem. I will try exporting the data as CSV and see if I am able to plot all of them.

I'll try again to reproduce and get back to you.


Model Training Logs

Attaching my loss card from tensorboard/ does everything looks okay?  val_epoch seems to have converged, what were the final losses you were getting. Any other thing I need to keep an eye on?

with smoothing = 0.6

More details about individual losses can be seen in sub_loss card. The flow matching loss is noisy and is not the best representation of model performance (similar to diffusion loss). Further, from what I've seen it is okay for the duration predictor to overfit for a while mainly because of the limited val set (my val set was only 100 samples).
Generally, training for longer helps, as these losses are not the best representative of the model's performance, similar to diffusion-type models.

I am getting good quality speech! I havent trained a vocoder yet, but with griffin lim it seems acceptable, I'm sure neural vocoders would yield great output.
Since I am new with this I have some questions, Should I ask them here or is there a better channel for discussion?

I'm sure neural vocoders would yield great output.

If you do not want to train a vocoder you can use the universal HiFiGAN.

Since I am new to this I have some questions, Should I ask them here or is there a better channel for discussion?

You can continue posting them here, or reach out to me by email smehta(at)kth(dot)se . Additionally, I can also answer them on LinkedIn.

I tried using the universal vocoder but that dint went well, I'll figure it out tho.
Thanks I'll close this issue then and reach out on other channels.

@shreyasinghal-17 Hi, can you share your dur_loss graphs/logs? Thanks

@p0p4k  I trained this for more iterations but for some reason tensorboard is not showing the comeplete data points

@shreyasinghal-17 Hi, can you share your diff_loss&prior graphs/logs? Thanks

hi,
Did you find why tensorboard is not showing the complete data points? I ran into the same issue.
Thanks.

@ummjevel what do you mean by complete data points?

Hi, @p0p4k
First, thank you for asking.
I mean i set the max_epochs 2000, but tensorboard logs are not saved until 2000 epochs.
as you see the upper image, the tensorboard log wrote until 53k but the maximum step is 78k.
(ljspeech train data : 12,500, batch size : 32, 12500/32 = 390, 390*2000 = 78,200)
as you see the lower image, i can find the saved ckpt files so training and saving checkpoints per steps/epoch is ok.


feat: Basic OpenTelemetry and Datadog support

Switch to pluggable design so that some monitoring functions can report to something other than New Relic. Still defaults to just New Relic, but new setting allows adding OpenTelemetry or Datadog, or removing New Relic.
Initialization and configuration of OpenTelemetry is left as an exercise to the deployer, but https://github.com/mitodl/open-edx-plugins/tree/main/src/ol_openedx_otel_monitoring/ would be a likely candidate.
Part of https://github.com/openedx/edx-django-utils/issues/389
Merge checklist:

[x] Version bumped
[x] Changelog record added
[x] Documentation updated (not only docstrings)
[x] Commits are squashed
[x] Tests

I believe I've addressed everything—take a look. There's one CI failure but it's due to Codecov throttling, not an actual test failure.


Feature/Error objects

This PR

replaces the string error with a proper object of type ResultError that has property code, message and parameter. A code can be one of the enum ErrorCode.
uses the blockstack.js file from feature/error_messages (https://github.com/blockstack/blockstack.js/commit/17d7f45c2ac1c49f8abbc378fa13b951646a76d49)
fixes #61

The blockstack.js file is patch to make the integration tests work, see https://github.com/blockstack/blockstack.js/issues/514

Thanks for this @friedger - i'm not going to get a chance to review this until next week. Have a great vacation!

@friedger these changes look good to me. Please fix conflicts though.

It needs merging in blockstack.js first
On Tue, 4 Dec 2018, 18:07 Shreyas Thiagaraj<EMAIL_ADDRESS>wrote:

@friedger https://github.com/friedger these changes look good to me.
Please fix conflicts though.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/blockstack/blockstack-android/pull/73#issuecomment-444177903,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABYcWaXJgWv1v8O0fwQZy95uh9DkHYBVks5u1qvTgaJpZM4VsdpG
.

New PR for this issue is #161


config.devServer options ignored

When specifying devServer options in my webpack config, it looks like all these settings are ignored by app.UseWebpackDevMiddleware();
webpack.config.js example:
const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
(...)

module.exports = {
(...)
    devServer: {
        before(app)
        {
            app.use(errorOverlayMiddleware());
            app.use(noopServiceWorkerMiddleware());
        }
    }
(...)
}

When running webpack via the command line, the error overlay middleware shows me runtime erros in file. When running integrated in my asp.net core app with app.UseWebpackDevMiddleware(); this does not work.
Are the devServer settings ignored? If so, is there a way to achieve setting things like devServer middleware a different way?

Are the devServer settings ignored?

Yes, because it's not using Webpack's own dev server at all. It's being served by ASP.NET instead.

If so, is there a way to achieve setting things like devServer middleware a different way?

You can configure webpack.config.js arbitrarily to change how the bundles get built, but I'm afraid it's still totally different to Webpack's own dev server.

So no way to customize these settings and nothing on the roadmap to enable this then?

@MJLHThomassen-Eurocom It doesn't use Webpack's built in dev server, so those settings aren't applicable.

Ok, thanks for clarification.


Meta: Automatically label commits in releases

Untested
Docs: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuration-options
Mentioned in

https://github.com/refined-github/refined-github/issues/4008#issuecomment-942723376

Hi @fregante. I think that it would more preferable to reorder the items as follows:

New
Changes
Bugfixes

I believe 'New' entries deserve to be listed first, followed by 'Changes' and 'Bugfixes' to be in the end.
If you agree, I'd like to make a PR.


IconStatus Refactoring and Generalization

📝 Description

VMIconStatus -> IconStatus
other small fixes

/lgtm
next up move the template svg icons from kubevirt plugin to here

@metalice thanks. I resolved all the suggestions. What do you think about the data-test solution that I implemented?

@yaacov @glekner  can you please review this?


Terraform for DO configuration issues

When I edit the example lattice.tf file (renamed from lattice.tf.example) to include the required variable values, terraform doesn't believe that the vars are set.
Ex:
# terraform plan
There are warnings and/or errors related to your configuration. Please
fix these before continuing.

Errors:

  * Required variable not set: do_token
  * Required variable not set: do_ssh_public_key_fingerprint
  * Required variable not set: do_ssh_private_key_file

If I include the variables in the terraform command, it works correctly:
terraform plan \
-var 'do_token=mytokenval' \
-var 'do_ssh_public_key_fingerprint=fingerprintval' \
-var 'do_ssh_private_key_file=filelocation'

I think this is a side effect of having the lattice.tf in the same folder as the other .tf files - (e.g., outputs.tf, resources.tf, etc.)  .. try moving the config file to its own folder, then to do the terraform get -update and terraform apply and see if that works.
this has been reported a couple times - #39 #43 and we're working on clarifying the instructions

we changed around the terraform directory structure to put the example .tf file in a separate folder from the other .tf files.  this should be more clear now and you won't run into that issue again.
https://github.com/cloudfoundry-incubator/lattice/commit/de342bd07b37a2a9aa91328a3823182a184dc064
#39 #43 #45 should all be addressed with this change


Big Sur / Xcode 12.2

Built with Xcode 12.2
Todo :

Sidebar Size
NavigationLink click bug
NSTitleBar not included in safe area
Code Editor lags

Version 1.5.0 released.


merge_adjacent_segements fails if there is a gap between .text and .text_init segments

See https://github.com/rust-lang/rust/issues/118214 .
I'm trying to figure out, if rustc is allowed to do this (insert a gap at will), and we should handle it, or if it is a rustc bug.
Workaround

Works when applying the following patch:
https://github.com/esp-rs/espflash/compare/main...t-moe:espflash:main

After some discussion in the linked rustc issue, I think we probably have to fix it on our side.
(https://github.com/rust-lang/rust/issues/118214#issuecomment-1827351764)

@Vollbrecht The issue I'm having is that sometimes the .text segment is 16 byte(!!) aligned. When data is 16 byte aligned, it is also 16bit aligned :).  Individual functions (like semihosting::process::abort) request a such large alignment and rustc or llvm will then align the entire text segment on a 16-byte boundary. We need to handle that case accordingly, and merge adjacent flash segments, even if they have some alignment padding between them.

reading comprehension failed :D yeah i only read byte as bit's everywhere, thanks for clearing that up.

Sorry, work did not go as planned at all last week and I'm still quite busy with other tasks. If somebody else is able to investigate this that'd be very much appreciated, otherwise I probably can't get to it until the new year unfortunately.

when fixing it we need to keep this in mind: https://github.com/esp-rs/esp-hal/blob/260c882b088c416c457e0b3337d849338a0a56e2/esp-hal-common/ld/esp32c6/esp32c6.x#L72-L82

This is a minimal repro of the issue:
#![no_std]
#![no_main]

use esp_backtrace as _;
use esp32c3_hal::prelude::entry;

#[entry]
fn main() -> ! {
    unsafe {
        foo();
    }
    loop {}
}

#[inline]
pub(crate) unsafe fn foo() {
    unsafe {
        core::arch::asm!(
            ".balign 16",
            ".option push",
            ".option norvc",
            "nop",
            ".option pop",
        );
    }
}

We could also solve this by just moving
    KEEP(*(.init));
    KEEP(*(.init.rust));
    KEEP(*(.text.abort));

into .text (needs some adjustments where .text_init is mentioned) - or are there any downsides doing this?

or are there any downsides doing this

We did do it for a reason, but I can't find the reason nor remember it :D. Let's try it and see what happens.

https://github.com/esp-rs/esp-hal/pull/1038 should solve the problem (in a different way) - feel free to re-open if there are still issues

Is it possible that we have the same problem, when using esp_idf_hal ? @bjoernQ
See the gap here:
# riscv32-esp-elf-objdump -h  target/riscv32imac-esp-espidf/debug/esp32_devkit

target/riscv32imac-esp-espidf/debug/esp32_devkit:     file format elf32-littleriscv

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  .....
  5 .iram0.text   00009f66  40800000  40800000  00001000  2**8
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  6 .iram0.text_end 00000000  40809f66  40809f66  0007f7e0  2**0
                  CONTENTS

Not sure if this is a problem or not, but I have a binary here, that does not boot up as expected...

I don't think it is the same issue, because even though they have different section alignments, the two sections are contiguous where as before there was a gap which caused the error. I suggest filling a separate issue.

Thank you @MabezDev. You're indeed right, there is no gap here. case closed.
(I've added a diagnostic that warns me of gaps, but it seems the diagnostic is wrong. And i posted the output without checking.... sorry :face_with_head_bandage:  )


Removed default license settings, and implemented selecting last selected license as default licence(#2170)

Fixes #2170  Remove license setting, and just use last selected license?
What changes did you make and why?
Removed Default License settings and used last selected license as default license. DEFAULT_LICENSE is now updated whenever user selects a license during upload.
Tested on Motorola Moto G5 plus with API level 24.

@domdomegg I think travis is failed because i made changes in SettingsFragment. Will i also have to make changes in SettingsActivityTest.java file ?

I believe so - from the logs it appears that the tests afterClickingCcby4ItWillStay and oneLicenseIsChecked failed.

I think we should remove these two tests as Default License is no longer selected from settings

Hmm.. It's not ideal but it does work. Ideally you'd add tests for this feature, but practically I'm not really sure how android on device automated testing works - something I want to learn soon.

Codecov Report

Merging #2218 into master will increase coverage by 0.39%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master   #2218      +/-   ##
=========================================
+ Coverage    5.88%   6.28%   +0.39%
=========================================
  Files         231     233       +2
  Lines       11597   11600       +3
  Branches     1081    1069      -12
=========================================
+ Hits          683     729      +46
+ Misses      10856   10810      -46
- Partials       58      61       +3

Impacted Files
Coverage Δ

...n/java/fr/free/nrw/commons/upload/UploadModel.java
59.8% <ø> (+0.09%)
:arrow_up:

...fr/free/nrw/commons/settings/SettingsFragment.java
49.2% <ø> (+8.02%)
:arrow_up:

.../LongTitlePreferences/LongTitleListPreference.java
0% <0%> (-66.67%)
:arrow_down:

...n/java/fr/free/nrw/commons/utils/NetworkUtils.java
72% <0%> (-5.78%)
:arrow_down:

app/src/main/java/fr/free/nrw/commons/Utils.java
23.17% <0%> (-1.22%)
:arrow_down:

...ain/java/fr/free/nrw/commons/upload/FileUtils.java
10.41% <0%> (-0.28%)
:arrow_down:

...va/fr/free/nrw/commons/upload/UploadPresenter.java
8.99% <0%> (-0.05%)
:arrow_down:

...rw/commons/mwapi/ApacheHttpClientMediaWikiApi.java
3.91% <0%> (-0.03%)
:arrow_down:

...mmons/contributions/ContributionsListFragment.java
0% <0%> (ø)
:arrow_up:

...ain/java/fr/free/nrw/commons/utils/DialogUtil.java
0% <0%> (ø)
:arrow_up:

... and 25 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 b447612...fdca542. Read the comment docs.


Views to expose custom settings via DRF  (feature request)

I am building a project in which I need to have a few custom settings that are editable by certain users which do not have access to the django admin panel, who access the application via an Angular frontend. I installed django-constance in order to have these custom settings editable, but I am missing the functionality to expose those settings on my API rest via django rest framework
It would be great if some views could be provided in order to retrieve and update the customized settings easily in decoupled applications.
Thanks in advance!

Django version: 2.0.7
Python version: 3.6.6

I think this is out of the scope for this library, seems a better fit to make your custom backend using the constance low level api.
Regards.

@camilonova I understand, thanks for the tip!
@yinkh  Thank you very much for the demo! I will try to go ahead with this. I also posted a question here where you might want to share your answer.


Major Improvements

Pull Request (PR) description

Refactoring of SPOSite;
New MSCloudLoginAssistant Version;
Complete Removal of MSOnline;
Partial removal of SPO Management Shell

This Pull Request (PR) fixes the following issues
N/A

This change is

Tests will fail until MSCloudLoginAssistant 1.0.0 is published to the Gallery

Codecov Report

Merging #354 into Dev will increase coverage by 0.38%.
The diff coverage is 89.34%.

@@            Coverage Diff             @@
##              Dev     #354      +/-   ##
==========================================
+ Coverage   89.72%   90.11%   +0.38%
==========================================
  Files          83       83
  Lines        8807     8646     -161
  Branches       10       10
==========================================
- Hits         7902     7791     -111
+ Misses        895      845      -50
  Partials       10       10

Impacted Files
Coverage Δ

...Policy/MSFT_EXOHostedOutboundSpamFilterPolicy.psm1
94.02% <ø> (-0.34%)
:arrow_down:

...MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1
97.91% <100%> (+0.04%)
:arrow_up:

...erProfileProperty/MSFT_SPOUserProfileProperty.psm1
61.9% <100%> (ø)
:arrow_up:

.../DSCResources/MSFT_SPOHubSite/MSFT_SPOHubSite.psm1
93.75% <100%> (ø)
:arrow_up:

...Resources/MSFT_SPOSiteGroup/MSFT_SPOSiteGroup.psm1
81.15% <76.47%> (+1.46%)
:arrow_up:

...365DSC/DSCResources/MSFT_SPOSite/MSFT_SPOSite.psm1
90.28% <89.47%> (+5.24%)
:arrow_up:

...5DSC/DSCResources/MSFT_O365User/MSFT_O365User.psm1
89.14% <91.66%> (+9.4%)
:arrow_up:

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 be2508c...a2df075. Read the comment docs.


Experiencing a few crashes on v1.2.0

Since using the new 1.2.0 version I've experienced the two crash dialog messages in a day, although it hasn't been in the middle of viewing images. Unsure what has triggered the crash dialogs, but the last one was after viewing a GIF then closing the window (couldn't reproduce).
Here is the crash dialog error output:
Problem signature:
  Problem Event Name:   BEX64
  Application Name: Pictus.exe
  Application Version:  <IP_ADDRESS>
  Application Timestamp:    549897ad
  Fault Module Name:    d3d9.dll_unloaded
  Fault Module Version: 6.3.9600.17095
  Fault Module Timestamp:   534b7c88
  Exception Offset:<PHONE_NUMBER>00d845
  Exception Code:   c0000005
  Exception Data:<PHONE_NUMBER>000008
  OS Version:   6.3.96<IP_ADDRESS>.256.48
  Locale ID:    3081
  Additional Information 1: d41d
  Additional Information 2: d41d8cd98f00b204e9800998ecf8427e
  Additional Information 3: 0062
  Additional Information 4: 0062b45507e302fa589ecd5b2f81a5b3

Using the app currently in portable mode, if that makes any difference.

I managed to reproduce it in a virtual machine, so hopefully I've managed to fix it properly this time. I would appreciate some testing though before I re-release, as I'm not sure exactly what is/was causing the crash.
https://poppeman.se/beta/PictInst.exe
https://poppeman.se/beta/pictus64.zip
https://poppeman.se/beta/pictus32.zip

I managed to reproduce it in a virtual machine, so hopefully I've managed to fix it properly this time. I would appreciate some testing though before I re-release, as I'm not sure exactly what is/was causing the crash.
https://poppeman.se/beta/PictInst.exe
https://poppeman.se/beta/pictus64.zip
https://poppeman.se/beta/pictus32.zip

Managed to reproduce it on some physical machines as well and the fix helped on all of them. Hooray I hope!


Refactor to use display entities

Description
Nearly all views that show details of a node, edge, or type would do the exact same transformations at the view level. This change abstracts all of that logic to a single place, ensuring the logic is consistent and making it easier to modify the behavior across the app.
The next step of this refactoring will be to abstract the neighbor count logic to the same DisplayVertex. And after that we will have a good foundation for loading a node/edge from a simple ID, which is foundational to URL sharing.
Validation

Smoke test all areas of the app

Related Issues

Resolves #677
Affects #122

Check List

[x] I confirm that my contribution is made under the terms of the Apache 2.0
license.
[x] I have run pnpm checks to ensure code compiles and meets standards.
[x] I have run pnpm test to check if all tests are passing.
[x] I have covered new added functionality with unit tests if necessary.
[x] I have added an entry in the Changelog.md.

I've pushed a series of changes:

Changed the defaultVertexTypeConfig and defaultEdgeTypeConfig to not have a display label in order to allow the display logic to fill in the display label as needed
Added test for sparql case of displayId and displayLabel
Updated some of the imports to be the aliased import
Made useSelectedDisplay* hooks more efficient
Updated styles of node and edge properties in the details sidebar
Added default properties for edges:

Edge type
Source vertex id & type
Target vertex id & type

Move edge display name logic to the DisplayEdge type rather than useGraphStyles()

Fixed tests and added some more

LGTM 👍


Skip tests when in restricted environments

One should be able to run the unnitests without the whole docker boilerplate using the same command. Thus, the respective tests should be skipped if e.g. no postgres endpoint is set in the environment or something similar.

bottest, ignore

bottest, ignore


properties for $campaign_open for the cta url and if the button was p…

…rimary or secondary. also now always track $campaign_open if they tap on either button or mini, instead of only if there was a ctal url
this is currently untested. i don't know how to use gradle to point the test app at my local changes. will ask in person later this week

okay i tested now. it seems to work!


Measurement sites can be very similar in colour on graphs

In the below example there are two measurement sites for the city, and the colours used are very similar. This is not great for users to quickly interpret without mousing over.

Also, the measurement lines can be difficult to see against the background:

We will have a list of specific colours our lines can be assigned, these will be picked so that they are easy to distinguish, and easy to view on top of the AQI background colours.
We would also like to stop the graphs from rendering until the colour change has been applied (currently the colours change after it's loaded the lines)
Test Checklist:

[x] Test Analysis & discussion with developer
[ ] Write Test Cases / Charters
[ ] Test Cases & Charters Reviewed
[x] Test Cases Executed
[ ] Test Charters Executed
[ ] Regression tests executed
[x] Automation Tests added to project

Test Analysis

Need to manually verify that the chart is rendering with expected colours ( see below)

Set up test with 11 sites, manually verify that the colours above are used properly (using powertools), verify:

only the above colours used
only one duplication of a colour
colours are easy to distinguish, and easy to view on top of the AQI background colours
the graphs don't render until the colour is applied - (after the loading spinner they will render and then don't change)

This test can then be automated as a snapshot test

Need to verify that they
colours:

[
    '#FF0000', // Red
    '#0000FF', // Navy
    '#039000', // Green
    '#80530d', // Brown
    '#777777', // Grey
    '#FF8800', // Orange
    '#8800FF', // Purple
    '#BBBB00', // Yellow
    '#0088FF', // Blue
    '#FF00FF', // Pink,
  ]

Finding - colours in UI are different to the hex colours listed in echarts-service.ts
Colours are not identical to hexes listed. The data point colour is close, the line is quite a bit more pale
Steps to reproduce:

Navigate to city page for Brisbane (has 11 stations)
Use power tools colour picker to look at colours of each line
Compare to colours listed in air-quality-ui/src/services/echarts-service.ts const colours

Red:
Expected:

Actual:
Point

Line 1

Line 2

Navy:
Expected:

Actual :
Point

Line

List of data found (point / line 1 / optional line 2):
red - f4271c / e2807e / e27d77
navy - 3b1ff9 / 7277f3
green - 258f0e / 74c47d
brown - 7c5415 / a7a37d
grey - 777777 / a7b9b8
orange - f68c21 / e4be79
purple - 9002ec / ad79f3
yellow - b8bb1e / c6d779
blue - 3c86fc / 78bbf3
pink - cd5fdb / e57ffa

Re-attempting the method from the finding above, using the zoom functionality in powertoys colour picker and targeting just the data points
Expected:
[
    '#FF0000', // Red
    '#0000FF', // Navy
    '#039000', // Green
    '#80530d', // Brown
    '#777777', // Grey
    '#FF8800', // Orange
    '#8800FF', // Purple
    '#BBBB00', // Yellow
    '#0088FF', // Blue
    '#FF00FF', // Pink,
  ]

Actual:
[
    '#f4271c', // Red
    '#3000fc', // Navy
    '#258f0e', // Green
    '#7c5415', // Brown
    '#777777', // Grey
    '#f68c21', // Orange
    '#8a00fc', // Purple
    '#b8bb1e', // Yellow
    '#3c86fc', // Blue
    '#f820fd', // Pink,
  ]

Frontend regression PASSED

Playwright Regression 29.08.24.pdf

Although colours detected with the colour picker did not match exactly thre colours in the implementation, they are close and this is not a stipulation of the AC


Add tasks

As of now, we have resources in the readme, how about creating a new file like tasks.md and add relevant tasks for each section of resources.
Example:
For GitHub, @chirathr has created an assignment in the previous version. https://github.com/amfoss/vidyaratna/blob/initial/beginners/5_github.md#assignment
We can recreate such things and add assignments for every category.
Would like to hear your views on this. :slightly_smiling_face:

@vchrombie great idea :rocket:
For the android section, we can have the Android Codelabs. They fundamental codelabs will be great a great assignment for learning.
For linux, bash scripting particularly, people could maybe attempt the higher levels of bandit. Besides this, there are some basic CTF challenges that need bash scripts(concepts like looping, extracting tar, bzip2 files and so on) to be solved.

Any more opinions?
@akhilam512 @vaishnav04 @harshithpabbati

Sounds like a great idea @vchrombie
I guess we can move forward and start assigning tasks to each topic?

Awesome then. Please send the tasks whenever you are free with the topic you are familiar with. :slightly_smiling_face:

I suggest the idea of moving the readme contents to resources.md and create another file tasks.md for the assignments.

I suggest the idea of moving the readme contents to resources.md and create another file tasks.md for the assignments.

@vchrombie yeah this should be done since we'll be adding tasks too. Separate files is a good idea. Should I open an issue for this?

This can be added as a big picture
https://frontendmasters.com/guides/learning-roadmap/

Add a Course on Learn How to learn from coursera.com

Add TODO To Read the Book Clean Code to improve coding standards


IMouse does not contain a definition of SetLedAsync

In the code I couldn't figure out how to fix the
usings
so i decided to just use
Colore.Data
But when I try to use SetLedAsync I get an error about how IMouse does not contain a definition of SetLedAsync
private async void Start_Click(object sender, EventArgs e)
        {
            var chroma = await ColoreProvider.CreateNativeAsync();
            await chroma.Mouse.SetLedAsync(Colore.Effects.Mouse.Led.Strip1, (Colore.Data.Color.Red);
        }

Where are you getting SetLedAsync from? You're probably looking for SetStaticAsync(Color, Led)

Closing due to inactivity, feel free to reply back with more informatin though :)


az ml job stream does not work

Describe the bug
I have a job running on Azure ML. I can see the logs on ml.azure.com, but I wish to see live logs on the terminal.
I tried running az ml job stream, but I don't see any outputs.
$ az ml job stream --name <job name> --resource-group <resource-group> --workspace-name <workspace-name>
Class WorkspaceHubOperations: This is an experimental class, and may change at any time. Please see https://aka.ms/azuremlexperimental for more information.
RunId: gray_pig_knyllgjbkl
Web View: https://ml.azure.com/runs/<run name>?wsid=/subscriptions/<sub id>/resourcegroups/<resource group>/workspaces/<workspaces>

Related command
az ml job stream
Errors
The command does not fail. It just outputs nothing.
Issue script & Debug output
The output is huge with a lot of sensitive data, Can provide later if needed.
Expected behavior
I should be able to see the logs in real time. Ideally I should be able to choose which logs to stream
Environment Summary
azure-cli                         2.52.0

core                              2.52.0
telemetry                          1.1.0

Extensions:
ml                                2.20.0

Dependencies:
msal                            1.24.0b1
azure-mgmt-resource             23.1.0b2

Python location '/opt/az/bin/python3'
Extensions directory '/home/ubuntu/.azure/cliextensions'

Python (Linux) 3.10.10 (main, Aug 31 2023, 09:13:53) [GCC 11.4.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context
No response

Thank you for opening this issue, we will look into it.

https://github.com/Azure/azure-cli/issues/27363


⚠ Guya.moe Proxied has degraded performance

In 06f5988, Guya.moe Proxied (https://ice.guya.moe/) experienced degraded performance:

HTTP code: 200
Response time: 12008 ms

Resolved: Guya.moe Proxied performance has improved in f5e6641 after 1 hour, 9 minutes.


Question about "cmac_usplus_1_au280.tcl"

Hi all,
Thanks for your contributing the great OpenNIC project! And I have one question about GT_LANE configuration in cmac_usplus_1_au280.tcl
    CONFIG.CMAC_CORE_SELECT {CMACE4_X0Y7}
    CONFIG.GT_GROUP_SELECT {X0Y44~X0Y47}
    CONFIG.LANE1_GT_LOC {X0Y40}
    CONFIG.LANE2_GT_LOC {X0Y41}
    CONFIG.LANE3_GT_LOC {X0Y42}
    CONFIG.LANE4_GT_LOC {X0Y43}

It seems that the LANEx_GT_LOC and GT_GROUP_SELECT are mismatch. Or there are some reasons behind that?
Really appreciate for your help!
~Vic

Hi @Vic0428,
Thanks, for spotting that. I agree that the mismatch looks like a bug, and I think that these should be consistent.
Effectively, in the implementation X0Y44~X0Y47 from that GROUP_SELECT are being used by cmac_us_plus1 (highlighted in pink below), and X0Y40~X0Y43 are being used by cmac_us_plus0 (highlighted in green below).
(My mouse curser didn't get captured in the screenshot.  It was hovering over MGT X0Y47 which was the towards/on the top of that group, which is what the pop up is describing, although the pop up is slightly lower.)
I wanted to ask, if you would you be willing to submit a pull request with the code change to correct the lane assignments by following the pattern used in the others (in the interest of encouraging contributions from the community)?  Please let me know.
Best regards,
--Chris

Sure! Let's me submit the PR tomorrow :)


Improve Font Awesome module documentation

I've added some clearer instructions on installation, as well as illustrating use-cases and clarifying details and limitations of the module.
I've also added links to the Font Awesome docs so folks have a more detailed reference to jump into once they've set up the module.
Intending to close Issue #288

Hi @jcat4. Thanks for this PR. Fontawesome is now moved to a dedicated repo with lots of new improvements: https://www.npmjs.com/package/@nuxtjs/fontawesome

Cool, thanks! I left a comment on Issue #288 explaining this. 😁 I don't have the ability to close the issue, though. I'm sure someone will catch it in cleanup eventually.


Feature/pipe git commands

added "secret" option and updated version numbers to 3.1

branch not ready yet


I'm got an issue in example in onAfterUpload exec ?

I'm just trying to implement the simple example gived in the project presentation.
The only modification I made was to change Image by File (because i want store pdf files)
All work ! but I've got an error message in server console which look like that :
I20161204-23:39:41.309(1)? Exception in callback of async function: Error: object [{"_bsontype":"ObjectID","id":"WESaDDklWQql0sb0"}] is not a valid ObjectId
I20161204-23:39:41.310(1)?     at Object.Future.wait (/home/joel/.meteor/packages/meteor-tool/.1.4.2_3.l0lhon++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:446:16)
I20161204-23:39:41.312(1)?     at MongoConnection.<anonymous> (packages/meteor.js:213:24)
I20161204-23:39:41.313(1)?     at MongoConnection.meteorInstall.node_modules.meteor.mongo.mongo_driver.js._.each.MongoConnection.(anonymous function) [as update] (packages/mongo/mongo_driver.js:774:49)
I20161204-23:39:41.313(1)?     at [object Object].update (packages/mongo/collection.js:589:29)
I20161204-23:39:41.314(1)?     at collections/upload-cv.js:37:25
I20161204-23:39:41.314(1)?     at runWithEnvironment (packages/meteor.js:1176:24)
I20161204-23:39:41.315(1)?     - - - - -
I20161204-23:39:41.316(1)?     at serializeObjectId (/home/joel/.meteor/packages/npm-mongo/.2.2.11_2.1r0wpm6++os+web.browser+web.cordova/npm/node_modules/bson/lib/bson/parser/serializer.js:255:11)
I20161204-23:39:41.317(1)?     at serializeInto (/home/joel/.meteor/packages/npm-mongo/.2.2.11_2.1r0wpm6++os+web.browser+web.cordova/npm/node_modules/bson/lib/bson/parser/serializer.js:760:17)
I20161204-23:39:41.319(1)?     at serializeObject (/home/joel/.meteor/packages/npm-mongo/.2.2.11_2.1r0wpm6++os+web.browser+web.cordova/npm/node_modules/bson/lib/bson/parser/serializer.js:300:18)
I20161204-23:39:41.321(1)?     at serializeInto (/home/joel/.meteor/packages/npm-mongo/.2.2.11_2.1r0wpm6++os+web.browser+web.cordova/npm/node_modules/bson/lib/bson/parser/serializer.js:608:17)
I20161204-23:39:41.323(1)?     at serializeObject (/home/joel/.meteor/packages/npm-mongo/.2.2.11_2.1r0wpm6++os+web.browser+web.cordova/npm/node_modules/bson/lib/bson/parser/serializer.js:300:18)
I20161204-23:39:41.324(1)?     at serializeInto (/home/joel/.meteor/packages/npm-mongo/.2.2.11_2.1r0wpm6++os+web.browser+web.cordova/npm/node_modules/bson/lib/bson/parser/serializer.js:766:17)
I20161204-23:39:41.325(1)?     at [object Object].serialize (/home/joel/.meteor/packages/npm-mongo/.2.2.11_2.1r0wpm6++os+web.browser+web.cordova/npm/node_modules/bson/lib/bson/bson.js:49:27)
I20161204-23:39:41.325(1)?     at [object Object].Query.toBin (/home/joel/.meteor/packages/npm-mongo/.2.2.11_2.1r0wpm6++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/connection/commands.js:143:25)
I20161204-23:39:41.326(1)?     at [object Object].Pool.write (/home/joel/.meteor/packages/npm-mongo/.2.2.11_2.1r0wpm6++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/connection/pool.js:920:23)
I20161204-23:39:41.327(1)?     at executeWrite (/home/joel/.meteor/packages/npm-mongo/.2.2.11_2.1r0wpm6++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js:78:10)

The bug come from these lines :
writeStream.on('close', Meteor.bindEnvironment(file => {
        const property = `versions.${versionName}.meta.gridFsFileId`;
        // If we store the ObjectID itself, Meteor (EJSON?) seems to convert it to a
        // LocalCollection.ObjectID, which GFS doesn't understand.
        this.collection.update(file._id, { $set: { [property]: file._id.toString() } });
        this.unlink(this.collection.findOne(file._id), versionName); // Unlink files from FS
 }));

I'm running on last meteor update Meteor <IP_ADDRESS> and<EMAIL_ADDRESS>...
Anyone have an idea ?
Thank you in advance

Hi @jalaux ,
This one looks new to me. As far as I see it's coming from mongo_driver.js.
What MongoDB version you're running on? It's build-in into Meteor or separately running instance?

The bug come from these lines :

Which file?

Hi @dr-dimitru ,
I'm using the mongo buid-in into Meteor (mongo@1.1.14).
The lines are extracted from example in Meteor-Files/docs/gridfs-integration.md

@jalaux
Looks like image._id id not a String but an ObjectId here:
this.collection.update(image._id, { $set: { [property]: file._id.toString() } });
//                                                                                ^

Could you try to convert it to String or compose new ObjectId()?

Hello,
I used file._id.toString()  but that did not working  ...
so I commented folowing lines
        this.collection.update(file._id, { $set: { [property]: file._id.toString() } });
        this.unlink(this.collection.findOne(file._id), versionName); // Unlink files from FS

and that's working ...
but i'm not sure that it's a good solution.

Those lines set necessary fields to serve file from GridFS, and removes file from FS
Could you console.log(file._id), please?

and that's working ...
but i'm not sure that it's a good solution.

File served from FS, not GridFS

One more thing -  you're using ES6 "fat arrow" functions, which drops necessary for this event context. This may be the source of issue.

I uncommented the two lines. first, for id console log :
#### file._id ####
5864c649af05b31847bc5805
#### file._id.toString() ####
5864c649af05b31847bc5805

It's the same in console log however the followning just file._id.toString() seems working (file._id doesnt) ...
For 'fat arrow', I already tried to suppress them... but in this case I'm got an error on this.collection which is not defined ... ??

@jalaux ,
Okay, still weird.
What your current status, error and code?

Current status is an error on unlink ... the error message in server console is :
I20170102-11:26:25.161(1)? Exception in callback of async function: TypeError: Cannot read property 'versions' of undefined
I20170102-11:26:25.162(1)?     at FilesCollection.module.runModuleSetters.FilesCollection.unlink (/home/joel/project/c10po/beta/.meteor/local/build/programs/server/packages/ostrio_files.js:2910:26)
I20170102-11:26:25.162(1)?     at collections/upload-cv.js:67:22
I20170102-11:26:25.163(1)?     at runWithEnvironment (packages/meteor.js:1176:24)

This erro come from this line this.unlink(this.collection.findOne(file._id.toString()), versionName);
Below the entire code :
import {  Meteor} from 'meteor/meteor';
import {  FilesCollection} from 'meteor/ostrio:files';
import Grid from 'gridfs-stream';
import {  MongoInternals } from 'meteor/mongo';
import fs from 'fs';

let gfs;
if (Meteor.isServer) {
    gfs = Grid(  MongoInternals.defaultRemoteCollectionDriver().mongo.db,  MongoInternals.NpmModule );
}

export const CV_files = new FilesCollection({
    collectionName: 'CV_files',
    storagePath: 'assets/app/uploads/CV_files',
    allowClientCode: false,
    debug: false, //Meteor.isServer && process.env.NODE_ENV === 'development',
    onBeforeUpload(file) {
        if (file.size <= 10485760 && /pdf/i.test(file.extension)) return true;
              return 'Merci de déposer des fichiers PDF, avec une taille inférieure ou égale à 10MB';
    },
    onAfterUpload(file) {
        // Move file to GridFS
        Object.keys(file.versions).forEach(versionName => {
            const metadata = {
                versionName,
                fileId: file._id,
                storedAt: new Date(),
                dispoId : file.meta.dispoId,
            }; // Optional
            const writeStream = gfs.createWriteStream({
                filename: file.name,
                metadata
            });

            fs.createReadStream(file.versions[versionName].path).pipe(writeStream);

            writeStream.on('close', Meteor.bindEnvironment(file => {
                const property = `versions.${versionName}.meta.gridFsFileId`;
                // If we store the ObjectID itself, Meteor (EJSON?) seems to convert it to a
                // LocalCollection.ObjectID, which GFS doesn't understand.
                this.collection.update(file._id.toString(), {
                    $set: {
                        [property]: file._id.toString()
                    }
                });
                console.log("UNLINK : ");
                this.unlink(this.collection.findOne(file._id.toString()), versionName); // Unlink file by version from FS
            }));
        });
    },
    interceptDownload(http, file, versionName) {
        const _id = (file.versions[versionName].meta || {}).gridFsFileId;
        if (_id) {
            const readStream = gfs.createReadStream({
                _id
            });
            readStream.on('error', err => {
                throw err;
            });
            readStream.pipe(http.response);
        }
        return Boolean(_id); // Serve file from either GridFS or FS if it wasn't uploaded yet
    },
    onAfterRemove(CV_files) {
        // Remove corresponding file from GridFS
        CV_files.forEach(file => {
            Object.keys(file.versions).forEach(versionName => {
                const _id = (file.versions[versionName].meta || {}).gridFsFileId;
                if (_id) gfs.remove({
                    _id
                }, err => {
                    if (err) throw err;
                });
            });
        });
    }
});

@jalaux well I went trough this conversation - lots of stuff is broken.
Could we make sure this solution works for you without 3rd party storage, GridFS in your case, in first place. Then we will integrate GridFS. What do you think?

of course as you want ...
How can I do it?
for information... I've tried to change the unlink operation from
 this.unlink(this.collection.findOne(file._id.toString()), versionName); // Unlink file by version from FS

to
this.unlink(this.collection.find(file._id), versionName); // Unlink file by version from FS

I don't have an error message anymore...
However, when I restart the server, I couldn't access to files

How can I do it?

Just comment out onAfterUpload and interceptDownload
.unlink() is not playing a role now, it just removes files from FS after successful transfer to 3rd party storage

Hello @jalaux ,
Any news on your end?

Hello @dr-dimitru ,
I made the test. I created a test project or I removed expenses that could have caused problems
https://github.com/jalaux/Test-Meteor-Files
Without 3rd party storage, all seems correct...

@jalaux ,
The issue is in the code, you adopted from GFS integration example: the file argument of onAfterUpload, got overridden by file argument in Meteor.bindEnvironment callback. Originally there was two different (image and file) variables used in this.collection.update call.

Correct, this should work if you change this code to:
    onAfterUpload(file) {
        // Move file to GridFS
        Object.keys(file.versions).forEach(versionName => {
            const metadata = {
                versionName,
                fileId: file._id,
                storedAt: new Date(),
                dispoId : file.meta.dispoId,
            }; // Optional
            const writeStream = gfs.createWriteStream({
                filename: file.name,
                metadata
            });

            fs.createReadStream(file.versions[versionName].path).pipe(writeStream);

            writeStream.on('close', Meteor.bindEnvironment(file => {
                const property = `versions.${versionName}.meta.gridFsFileId`;
                // If we store the ObjectID itself, Meteor (EJSON?) seems to convert it to a
                // LocalCollection.ObjectID, which GFS doesn't understand.
                this.collection.update(file._id.toString(), {
                    $set: {
                        [property]: file._id.toString()
                    }
                });
                console.log("UNLINK : ");
                this.unlink(this.collection.findOne(file._id.toString()), versionName); // Unlink file by version from FS
            }));
        });
    },

Just got the same error fixed by this way.

Feel free to reopen it in case if the issue still persists on your end.