Can not invoke 'summary' on the instance of AdversarialRegularization instance

Hi,
nsl.keras.AdversarialRegularization is a subclass of tf.keras.Model
When I invoke summary() on the instance of AdversarialRegularization I get an error saying the model needs to be built
ValueError                                Traceback (most recent call last)
<ipython-input-47-d160d5b3365c> in <module>()
      1
----> 2 adv_model.summary()

/tensorflow-2.0.0/python3.6/tensorflow_core/python/keras/engine/network.py in summary(self, line_length, positions, print_fn)
   1255     """
   1256     if not self.built:
-> 1257       raise ValueError('This model has not yet been built. '
   1258                        'Build the model first by calling `build()` or calling '
   1259                        '`fit()` with some data, or specify '

ValueError: This model has not yet been built. Build the model first by calling `build()` or calling `fit()` with some data, or specify an `input_shape` argument in the first layer(s) for automatic build.

This is happening because even though the 'base_model' is built the wrapper one i.e. instance of AdversarialRegularization is not.

Thanks for your interest.
nsl.keras.AdversarialRegularization creates subclassed Keras models, so calling .summary() won't work until the model is called with some input. The reason is that the computation of a subclassed Keras model is defined in its call function (a piece of Python code), and the model architecture is unknown to Tensorflow engine until the call function is executed. This behavior is different from Keras models created by Sequential or functional API, where all the computation can be defined in the constructor.
Here is an example of doing compile, call, and then summary for a AdversarialRegularization model:
>>> base_model = tf.keras.Sequential([tf.keras.Input(shape=(2,)), tf.keras.layers.Dense(1)])
>>> adv_model = nsl.keras.AdversarialRegularization(base_model, label_keys=['label'])
>>> adv_model.compile('sgd', loss='mse')
>>> adv_model({'input': tf.constant([[1.0, -1.0]]), 'label': tf.constant([[0.0]])})
<tf.Tensor: id=492, shape=(1, 1), dtype=float32, numpy=array([[-0.8385217]], dtype=float32)>
>>> adv_model.summary()
Model: "AdversarialRegularization"
_________________________________________________________________
Layer (type)                 Output Shape              Param #
=================================================================
sequential_1 (Sequential)    (None, 1)                 3
=================================================================
Total params: 3
Trainable params: 3
Non-trainable params: 0
_________________________________________________________________

More details about model subclassing can be found here: https://www.tensorflow.org/guide/keras/overview#model_subclassing


Export ALL results for a query as CSV/TSV

For any given SQL query the ability to export the entire resultset as CSV would be incredibly useful.
It could be expensive, so we would want to restrict it to only specific trusted users.

Idea: only support this for queries that return a paginated column, which must be unique and must be sorted. Then we can execute keyset pagination against it. And maybe detect the special case of it being sorted by primary key and use that?

There's another way I could do this that would work for all queries: I could specify a sort order that sorts by ALL of the returned columns - then use the combined values from every column for keyset pagination.
The thing that makes me nervous about this is that if the first (or more) columns aren't covered by an index every single one of the keyset pagination queries could be really expensive, and for returning millions of records at 500-per-batch this could really hammer the database.

The alternative here would be to trust psycopg2 to do the right thing when calling cursor.fetchmany(500) - let PostgreSQL return a million results in one go, avoiding the keyset pagination trick entirely.
I'm going to try that. I might add an extra permission controlling this in the future, but for the moment I'll make it available for the existing execute_sql permission.

API design: POST a sql= query to to /dashboard/?export=1 plus optional format= parameter specifying csv or tsv or json or nljson.
Uses a Content-Disposition header to force a browser download. The filename is the first 20 characters of the SQL query converted to lowercase and concatenated together with - plus a truncated 5 character SHA256 hash of the rest of the query.

Actually the POST will go to regular /dashboard/ with a hidden form field that triggers the export - because the dashboard UI is all one big <form> and I'd need extra JavaScript to have a form nested inside another form that targets a different action.

https://www.buggycoder.com/fetching-millions-of-rows-in-python-psycopg2/ says:

Turned out that psycopg2 fetches the entire result set to the client by default — unless you use a named cursor (server-side cursor). When you use a named cursor, the result set is maintained on the server-side allowing you to fetch rows as necessary. You can also control the no. of records fetched over the network in each go by setting the cursor.itersize property to a reasonable value (default 2000).

And provides this code example:
    cursor = conn.cursor(name='fetch_large_result')
    cursor.execute('SELECT * FROM <large_table>')

    while True:
        # consume result over a series of iterations
        # with each iteration fetching 2000 records
        records = cursor.fetchmany(size=2000)

        if not records:
            break

        for r in records:
            # do something with record here

    cursor.close() # don't forget to cleanup
    conn.close()

https://docs.djangoproject.com/en/2.1/releases/1.11/#database-backend-api

The name keyword argument is added to the DatabaseWrapper.create_cursor(self, name=None) method to allow usage of server-side cursors on backends that support it.

Ran into this error:

psycopg2.ProgrammingError: can't call .execute() on named cursors more than once

Which means the trick I've used in the past to ensure read-only transactions even against a read-write connection won't work here: https://github.com/simonw/django-sql-dashboard/blob/4e325ed67d11993a028cc68ce0523ae0622305cf/django_sql_dashboard/views.py#L152-L160

cursor.description is None for me - https://stackoverflow.com/questions/57129176/how-to-get-psycopg2s-description-from-postgresql-server-side-cursor explains:

The query in cursor.execute('select...') is executed on the server side but the application has no data yet, hence cursor.description is undefined. To get the description you need to get at least a row from the server-side cursor

This implementation needs a little bit more work.
The big issue is that it's not at all safe to run against read-write connections (the weird edge-case where I run my blog on Heroku but they charge a lot extra for the ability to create a read-only connection) because of https://github.com/simonw/django-sql-dashboard/issues/50#issuecomment-826394200
I'm going to disable the feature by default and allow people who are OK living dangerously to turn it on explicitly.

I wrote about this on my blog: https://simonwillison.net/2021/Apr/26/vaccinate-the-states/


Setup initial project scaffolding based on zio-actors

The zio-actors project has a modern template for a ZIO organization project, including support for Github Actions.
The ZIO Flow project can be patterned after this project, taking the same basic build file, Github workflows, and so forth.
We should reproduce:

.gitignore and other utility files
The SBT build, but changed with details specific to ZIO Flow
The Github Actions workflows, customized to ZIO Flow
The Apache 2 license file
The code of conduct
The directory structure for the source code
The scaffolding for the microsite
Contributor's guide
Etc.

When this ticket is completed, the ZIO Flow project will be fully "ready to go", albeit with no meaningful source code or content.

/cc @ashprakasan

/cc @ashprakasan


python310Packages.phonenumbers: 8.12.43 -> 8.12.45

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python310Packages.phonenumbers is: "Python module for handling international phone numbers"
meta.homepage for python310Packages.phonenumbers is: "https://github.com/daviddrysdale/python-phonenumbers"
meta.changelog for python310Packages.phonenumbers is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 8.12.45 with grep in /nix/store/q48kmxx12y2s61qias5nd9y6w6vgy2c6-python3.10-phonenumbers-8.12.45

found 8.12.45 in filename of file in /nix/store/q48kmxx12y2s61qias5nd9y6w6vgy2c6-python3.10-phonenumbers-8.12.45

Rebuild report (if merged into master) (click to expand)

25 total rebuild path(s)

13 package rebuild(s)

13 x86_64-linux rebuild(s)
12 x86_64-darwin rebuild(s)

First fifty rebuilds by attrpath
dvc
dvc-with-remotes
matrix-synapse
matrix-synapse-plugins.matrix-synapse-mjolnir-antispam
matrix-synapse-plugins.matrix-synapse-shared-secret-auth
mautrix-signal
pgadmin4
python310Packages.flask-security-too
python310Packages.phonenumbers
python310Packages.python-benedict
python39Packages.flask-security-too
python39Packages.phonenumbers
python39Packages.python-benedict

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/q48kmxx12y2s61qias5nd9y6w6vgy2c6-python3.10-phonenumbers-8.12.45 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python310Packages.phonenumbers https://github.com/r-ryantm/nixpkgs/archive/663c7789eda76a06ec2abffdf2342f0d6c30153f.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/q48kmxx12y2s61qias5nd9y6w6vgy2c6-python3.10-phonenumbers-8.12.45
ls -la /nix/store/q48kmxx12y2s61qias5nd9y6w6vgy2c6-python3.10-phonenumbers-8.12.45/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages failed to build:

dvc
dvc-with-remotes

11 packages built:

matrix-synapse
matrix-synapse-plugins.matrix-synapse-mjolnir-antispam
matrix-synapse-plugins.matrix-synapse-shared-secret-auth
mautrix-signal
pgadmin4
python310Packages.flask-security-too
python310Packages.phonenumbers
python310Packages.python-benedict
python39Packages.flask-security-too
python39Packages.phonenumbers
python39Packages.python-benedict

Maintainer pings
cc @fadenb for testing.

Pypi is on 8.12.47


feat(docker): added a Dockerfile to easily distribute the app

I would recommend setting this up to be linux-host friendly (file permissions) as well as providing directory volume binding to make site/monitor configs persistent. Both can be done by using a linuxserver.io base image.


Some routes use hard-coded RequiredPrivLevel 0

This Bug Report affects these Traffic Control components:

Traffic Ops

Current behavior:

18 Traffic Ops routes (6 in each TO API version) have a Route.RequiredPrivLevel of 0:
https://github.com/apache/trafficcontrol/blob/1c6c9b8ca190b7d9a527ed48eb31c814b19432f2/traffic_ops/traffic_ops_golang/routing/routes.go#L225-L229
https://github.com/apache/trafficcontrol/blob/1c6c9b8ca190b7d9a527ed48eb31c814b19432f2/traffic_ops/traffic_ops_golang/routing/routes.go#L258
https://github.com/apache/trafficcontrol/blob/1c6c9b8ca190b7d9a527ed48eb31c814b19432f2/traffic_ops/traffic_ops_golang/routing/routes.go#L619-L623
https://github.com/apache/trafficcontrol/blob/1c6c9b8ca190b7d9a527ed48eb31c814b19432f2/traffic_ops/traffic_ops_golang/routing/routes.go#L652
https://github.com/apache/trafficcontrol/blob/1c6c9b8ca190b7d9a527ed48eb31c814b19432f2/traffic_ops/traffic_ops_golang/routing/routes.go#L996-L1000
https://github.com/apache/trafficcontrol/blob/1c6c9b8ca190b7d9a527ed48eb31c814b19432f2/traffic_ops/traffic_ops_golang/routing/routes.go#L1029
https://github.com/apache/trafficcontrol/blob/1c6c9b8ca190b7d9a527ed48eb31c814b19432f2/traffic_ops/traffic_ops_golang/routing/routes.go#L652
https://github.com/apache/trafficcontrol/blob/1c6c9b8ca190b7d9a527ed48eb31c814b19432f2/traffic_ops/traffic_ops_golang/routing/routes.go#L996-L1000
https://github.com/apache/trafficcontrol/blob/1c6c9b8ca190b7d9a527ed48eb31c814b19432f2/traffic_ops/traffic_ops_golang/routing/routes.go#L1029
There is no constant associated with RequiredPrivLevel 0:
https://github.com/apache/trafficcontrol/blob/1c6c9b8ca190b7d9a527ed48eb31c814b19432f2/traffic_ops/traffic_ops_golang/auth/authorize.go#L82-L97
Expected behavior:

A constant should be added to the github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/auth package for RequiredPrivLevel 0, and those routes should be updated to use it.

Hello @zrhoffman I would like to fix this issue.
but I need some help here those routes should be updated to use it

Hello @zrhoffman I would like to fix this issue. but I need some help here those routes should be updated to use it

Would you please expand on what help you are looking for?

Like first we will add  const RequiredPrivLevel = 0 on auth, right?
then how we are going to update those routes to use it

Like first we will add const RequiredPrivLevel = 0 on auth, right?

The new const should not be named RequiredPrivLevel. RequiredPrivLevel is just the name of a certain field in the routing.Route struct: https://github.com/apache/trafficcontrol/blob/1398c02a80dfd4090881f8f90961c11ff57feeaa/traffic_ops/traffic_ops_golang/routing/routing.go#L51-L62

then how we are going to update those routes to use it

Instances of the routing.Route struct that set RequiredPrivLevel to 0 should have 0 be replaced with the new const.

I'm still little confused here.
sorry if I wasted your time but I think I need more clarity for doing this or I can leave this issue.

@Ayushsunny So the basic idea is not using the magic numeral 0 in those routes. Instead, you create a constant like
const PrivLevel<Whatever you want to name it> = 0 in the authorize.go file and then use this new name in place of the 0's in the routes that Zach mentioned.

@Ayushsunny are you working on this. If not then I would like to work on this issue

@Ayushsunny are you working on this. If not then I would like to work on this issue

Hey, Thank you @sourikghosh Yes you can take it.
I'm busy with my Uni's test.

@zrhoffman  @srijeet0406 any suggestion for a proper name for this const


optional posthog

Hi Eduardo,
Noticing that ploomber-core depends on posthog for telemetry, may be?
The worrying thing is its attempt to log into an external end point, us-api.i.posthog.com
Traceback (most recent call last):
File "/Users/kxvn318/.pyenv/versions/3.9.16/lib/python3.9/logging/init.py", line 1086, in emit
stream.write(msg + self.terminator)
ValueError: I/O operation on closed file.
Call stack:
File "/Users/kxvn318/.pyenv/versions/3.9.16/lib/python3.9/threading.py", line 937, in _bootstrap
self._bootstrap_inner()
File "/Users/kxvn318/.pyenv/versions/3.9.16/lib/python3.9/threading.py", line 980, in _bootstrap_inner
self.run()
File "/Users/kxvn318/Library/Caches/pypoetry/virtualenvs/runnable-QaOCn3sv-py3.9/lib/python3.9/site-packages/posthog/consumer.py", line 65, in run
self.upload()
File "/Users/kxvn318/Library/Caches/pypoetry/virtualenvs/runnable-QaOCn3sv-py3.9/lib/python3.9/site-packages/posthog/consumer.py", line 81, in upload
self.request(batch)
File "/Users/kxvn318/Library/Caches/pypoetry/virtualenvs/runnable-QaOCn3sv-py3.9/lib/python3.9/site-packages/posthog/consumer.py", line 148, in request
send_request()
File "/Users/kxvn318/Library/Caches/pypoetry/virtualenvs/runnable-QaOCn3sv-py3.9/lib/python3.9/site-packages/backoff/_sync.py", line 105, in retry
ret = target(*args, **kwargs)
File "/Users/kxvn318/Library/Caches/pypoetry/virtualenvs/runnable-QaOCn3sv-py3.9/lib/python3.9/site-packages/backoff/_sync.py", line 20, in _call_handlers
hdlr(details)
File "/Users/kxvn318/Library/Caches/pypoetry/virtualenvs/runnable-QaOCn3sv-py3.9/lib/python3.9/site-packages/backoff/_common.py", line 120, in _log_giveup
logger.log(log_level, msg, *log_args)
Message: 'Giving up %s(...) after %d tries (%s)'
Arguments: ('send_request', 4, "requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='us-api.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x11c10c730>, 'Connection to us-api.i.posthog.com timed out. (connect timeout=15)'))")
1). Could we make it optional install?
I set up the _PLOOMBER_TELEMETRY_DEBUG to  but I still see an attempt to do telemetry.
Cheers,
Vijay

hi, you can disable telemetry with:
export PLOOMBER_STATS_ENABLED=false

I think you'll still need to have posthog installed, otherwise importing the package will break, but this will disable external API calls. let me know if you still have issues after disabling it


Fix angular module generation

When I use the pair generator, it creates a module without dependencies, like this:
angular.module('module_name')
But this generates the following error
Error: [$injector:nomod] Module 'module_name' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
To fix this, the module should be like this:
angular.module('module_name', [])

Hi @matheuscas, the pair generator does not create a new module. That is done with the yo m-ionic:module subgenerator. The pair generator merely creates a controller and a template pair in a given module.
So to create a module with a controller and template pair run:
# first create module
yo m-ionic:module myModule
# create pair
yo m-ionic:pair myModule

the angular.module('module_name') line is merely a getter.
I hope I could help. If not, please feel free to reopen :)

So, I think you guys have to change docs, perhaps. In Quick Start you tell that I can do something like this:
yo m-ionic:<component> <name> <moduleName>

So I did it:
yo m-ionic:pair myList myModule

And it generated a template, an controller inside the new module, like it should do. But the module generation still produces an error. Whats the point of uses a generator and still have to fix it's generation? You know what I mean?

Maybe it might be less confusing to make this more obvious in the quick start guide. #335 What do you think?

Like a said, I think you guys should improve documentation, because even the latest link, did not reached what I pointed. To Explain that part what you said to me would be clarifying to the public. Thanks for the answers and keep the great job.


development playground

oh god

woop woop

cookie

c ookie

COOKIE DAMN YOU

experiment [ ]

[ ] experiment

[ ] experiment

Expected release notes (by @Shesekino)
features:
trigger on issue_comment.edit (257092f)
others (will not be included in Semantic-Release notes):
3517567 dsad
76d2aa8 dasd

Expected release notes (by @Shesekino)
features:
trigger on issue_comment.edit (257092f)
others (will not be included in Semantic-Release notes):
8b8a655 fasdfsds
3517567 dsad
76d2aa8 dasd

Expected release notes (by @Shesekino)
features:
trigger on issue_comment.edit (257092f)
others (will not be included in Semantic-Release notes):
4fe0cfe dsad
9316549 wow
8b8a655 fasdfsds
3517567 dsad
76d2aa8 dasd

Expected release notes (by @Shesekino)
features:
trigger on issue_comment.edit (00c6cb6)
fixes:
omg (39e976c)
others (will not be included in Semantic-Release notes):
cleaner build hopefully (d3171b9)

Expected release notes (by @Shesekino)
features:
trigger on issue_comment.edit (00c6cb6)
fixes:
omg (39e976c)
others (will not be included in Semantic-Release notes):
a6098c1 fsdifds
cleaner build hopefully (d3171b9)

Expected release notes (by @Shesekino)
features:
trigger on issue_comment.edit (00c6cb6)
fixes:
omg (39e976c)
others (will not be included in Semantic-Release notes):
bcf4b08 derka
a6098c1 fsdifds
cleaner build hopefully (d3171b9)

Expected release notes (by @Shesekino)
features:
trigger on issue_comment.edit (16a61c5)
others (will not be included in Semantic-Release notes):
cleaner build hopefully (d3171b9)

Expected release notes (by @Shesekino)
features:
trigger on issue_comment.edit (16a61c5)
others (will not be included in Semantic-Release notes):
4224b1b Dasd
cleaner build hopefully (d3171b9)- [ ] I hereby acknowledge these release notes are 🥙 AWESOME 🥙

Expected release notes (by @Shesekino)
features:
trigger on issue_comment.edit (16a61c5)
others (will not be included in Semantic-Release notes):
75f9dd1 dsad
4224b1b Dasd
cleaner build hopefully (d3171b9)

[ ] I hereby acknowledge these release notes are 🥙 AWESOME 🥙

Expected release notes (by @Shesekino)
features:
trigger on issue_comment.edit (16a61c5)
fixes:
fake fix (fcc87eb)
others (will not be included in Semantic-Release notes):
75f9dd1 dsad
4224b1b Dasd
cleaner build hopefully (d3171b9)

[ ] I hereby acknowledge these release notes are 🥙 AWESOME 🥙

Expected release notes (by @Shesekino)
features:
trigger on issue_comment.edit (16a61c5)
fixes:
fake fix (fcc87eb)
others (will not be included in Semantic-Release notes):
d04c89e Dasd
75f9dd1 dsad
4224b1b Dasd
cleaner build hopefully (d3171b9)

[ ] I hereby acknowledge these release notes are 🥙 AWESOME 🥙

Expected release notes (by @Shesekino)
features:
trigger on issue_comment.edit (e96c12d)
others (will not be included in Semantic-Release notes):
cleaner build hopefully (d3171b9)

[ ] I hereby acknowledge these release notes are 🥙 AWESOME 🥙

Expected release notes (by @Shesekino)
features:
trigger on issue_comment.edit (e96c12d)
others (will not be included in Semantic-Release notes):
141268d DSa
cleaner build hopefully (d3171b9)

[ ] I hereby acknowledge these release notes are 🥙 AWESOME 🥙

Expected release notes (by @Shesekino)
features:
trigger on issue_comment.edit (e96c12d)
others (will not be included in Semantic-Release notes):
8b69cf3 dasda
141268d DSa
cleaner build hopefully (d3171b9)

[ ] I hereby acknowledge these release notes are 🥙 AWESOME 🥙

Expected release notes (by @Shesekino)
features:
trigger on issue_comment.edit (e739b26)
others (will not be included in Semantic-Release notes):
cleaner build hopefully (d3171b9)

[ ] I hereby acknowledge these release notes are 🥙 AWESOME 🥙

Expected release notes (by @Shesekino)
features:
trigger on issue_comment.edit (7c40926)
others (will not be included in Semantic-Release notes):
cleaner build hopefully (d3171b9)

[ ] I hereby acknowledge these release notes are 🥙 AWESOME 🥙

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


Upgrade Mono for preview 9

From benchmarking, it looks like the app size is unchanged (to within < 10KB), and the runtime perf has regressed by about 3%.
Assuming this 3% reduction in speed is due to some improved functionality or correctness it seems OK and within the normal range of fluctuations between versions, so I'll proceed with it.

Merging as there's nothing to code review.


XML Filter

Is your feature request related to a problem? Please describe.
We want to be able to parse XML documents in log fields to make them more easily searchable in OpenSearch. This would mean we wouldn't have to rely on logging the field as a keyword and using expensive wildcard search queries to search for values within the document.
Describe the solution you'd like
Implement an XML filter, similar to what is available in Logstash - https://www.elastic.co/guide/en/logstash/current/plugins-filters-xml.html.

@cameronattard ,
This would be a useful feature. I understand that you'd like a new processor for parsing XML, correct? It sounds like you are performing a grok on a log line and then some part of that log has XML. Correct?
Perhaps something like the following:
processor:
- grok:
    match:
      log: [ '... %{GREEDYDATA:my_xml_key}' ]
- parse_xml:
    source: my_xml_key

In our case we probably wouldn't even grok - the XML is usually in an existing field that's already been json-parsed.

Closed by #4191 and as a duplicate of #4165.


HTML report for banch comparaison

Provides a report of changes, when we compare with another branch (with the  --compare-with=<branch> option)

Testers are welcome to try out this feature! It's a pretty big change, and I expect there are many edge cases. If you'd like to help and test it:

With Ubuntu: ast-metrics.zip (extract the zip file, I cannot upload binary here due to Github restrictions)
For other platforms:

git clone https://github.com/Halleck45/ast-metrics.git
cd ast-metrics
git checkout compare_branch
go run . a -i --report-html=report-dir --compare-with=master <your-source-dir>

@julian776 @greg0ire @DeGraciaMathieu would you be willing to spare some time for testing, if you have a moment?
@epikyros this PR is a first step for https://github.com/Halleck45/ast-metrics/discussions/60
Thanks !

Great job, @Halleck45 ! And so fast! I believe this will help make a lot of interesting insights.
I found some issues using it. Sorting in the comparison report is working in a very strange way, and the table is larger than the page header if you're having long file names.
Then there are some issues with the values too. I haven't been able to find out why, reading your PR, but I've done some screen shots from a report I generated.
The Maintainablity Index is set to 0 for most of the changed files, but not all. Even though they have a MI in the risks view.

Compare that to the risks view. See JournalForm.class.php

The other numbers seem wrong too, CC and LOC don't match.
Does it make sense? Tell me if I can provide more information or help in any other way!

Codecov Report
Attention: Patch coverage is 3.94737% with 146 lines in your changes missing coverage. Please review.

Project coverage is 53.22%. Comparing base (a115848) to head (3fb8be3).

Files
Patch %
Lines

src/Analyzer/Comparator.go
1.47%
133 Missing and 1 partial :warning:

src/Analyzer/Aggregator.go
20.00%
6 Missing and 2 partials :warning:

src/Analyzer/GitAnalyzer.go
0.00%
2 Missing :warning:

src/Command/AnalyzeCommand.go
0.00%
1 Missing :warning:

src/Engine/Php/PhpRunner.go
0.00%
1 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #61      +/-   ##
==========================================
- Coverage   55.29%   53.22%   -2.08%
==========================================
  Files          42       42
  Lines        3454     3594     +140
==========================================
+ Hits         1910     1913       +3
- Misses       1314     1450     +136
- Partials      230      231       +1

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Doesn't work with Horizon Zero Dawn: Remastered

Simply copying the DLLs into the game folder results in this error:

Removing the outdated PsPcSdk.dll changes the error message:

Replacing it with the updated DLL from the SDK installer that comes with the game gives this:

Either way, after closing the error message the game launches, goes through the initial setup and comes to this:

I have a feeling that Sony might patch God of War: Ragnarok to use the newer SDK later as well, breaking the bypass there too.

it ain't a bug, it just only supported on god of war ragnarok

I mean, yeah, obviously. The "bug" label was added automatically. It just would be perfect if this bypass also supported other games requiring PSN login. Kinda like xliveless.

It only supports a specific version of pssdk, someone with some reversing skills would need to update it to be more generic.

This is for undoing the post-launch loginwall on God of War: Ragnarok.
It won't work on other games, and even if it did every new Sony release uses PlayStation Network as the primary DRM provider from the ground up. The online component this mods out is unavoidable in PSN-protected games.
You need a PlayStation account to activate Horizon Zero Dawn: Remastered and there's no legal way around it.


MonoInstaller Installing Inconsistency

Something I noticed about MonoInstallers is that when added in the inspector the CompisitionRoot simply calls the method on the prefab without instantiating them. On the other hand, if you were to install them in code using Install<>(), passing in an instance of MonoInstaller. It attempts to load the prefab from resources and instantiates the prefab.
A comment I found at around line 424 of DIContainer mentions why
// When running, it is nice to keep the installer around so that you can change the settings live
// But when validating at edit time, we don't want to add the new game object

Basically I feel both should do one or the other as both methods of installing a MonoInstaller deal with prefabs. Personally I am in preference with the instantiating of the prefabs so editing them in the scene does not persist out of play mode. That and it would be nice to have access to co-routines within a MonoInstaller for installing Facade containers along side additive scenes using ZenUtil methods.

On the flip side, never instantiating and calling on the prefab has advantages too. When calling Install<>() on an installer of type MonoInstaller for a sub container Facade, the resulting instantiated object will persist after the Facade has been disposed. Loading the prefab from resources to call without instantiating removes this issue, especially if it is a FacadeFactory.

The way it's intended to be used is for the user to add installer prefabs to their scene and then reference those game objects in the Installers field of the composition root.   I did not intend for users to drag installer prefabs directly on to the composition root.  This seems to work but could result in some unexpected behaviour, since you could be directly changing properties of the prefab in the code that gets saved persistently.
I can detect this when inside the unity editor, so maybe I should throw an exception in this case to prevent users from doing this, and instead require that they either install from resources or add their prefab to the scene and reference that.  What do you think?
That comment refers to the way it deals with dynamically created installers during the validation step.  I think you bring up a good point though - and that it should probably instantiate them during validation to mimic what it does at runtime, then delete it after validation completes.

I was unaware that I was doing it wrong the whole time, It always worked to pass in prefabs to the SceneCompisitionRoot so I always did it.
I must state that the GlobalCompisitionRoot does not instantiate the MonoInstaller prefabs from the GlobalInstallerConfigs and runs the code off the prefab. From what you said should it instantiate those MonoInstallers as well?
I don't quite understand the validation part, but I do believe if the installers are being run on instantiated prefabs, then those instantiated prefabs should not be destroyed. Think about the facade initializer method for FacadeFactories or ToMethod(Action<T>). These may call things on the MonoInstaller object and may be unwise to destroy them as a result.

Good point about GlobalCompositonRoot also not instantiating its installers.  I think it probably should.
Directly referencing prefab installers does work, so we could support that, but we may want to disallow it anyway to enforce consistency and to avoid the potential issue of accidentally changing a value at runtime that gets automatically saved to the prefab.  Also, as you say, you can change the settings at runtime without needing to have that change apply persistently.
Yeah, once an installer prefab is instantiated at runtime, it should not be destroyed for the reasons you mention.  I was talking about validation though - which occurs at edit-time not runtime.  The way validation works is that it executes all your installers to create a fully bound container, and then makes sure all the dependencies can properly get resolved, without ever actually instantiating anything.  See here for details
So during validation, we could just call prefabs directly or we could instantiate them and then delete them immediately afterwards.

I think I understand the validation part a bit more now. Not enough to know which path to take during validation of MonoInstallers. For some reason I had the impression that validation could occur at run-time as well as edit time. I realize now how silly that sounds.

Only thing I wonder about is how to handle dynamic MonoInstallers being installed onto sub containers. If a new instance of the MonoInstaller gets created every call to Install<SomeMonoInstaller>(), what happends when the Facade initializer method attached to a FacadeFactory calls it.
Should the sub container track the dynamically installed MonoInstallers as they accumulate and remove them once the DIContainer is unused? Or should the method to dynamically install MonoInstallers first check for and reuse previously instantiated MonoInstallers?
If instantiated MonoInstallers are reused, should they be managed as DontDestroyOnLoad()? A root object to hold all dynamic MonoInstallers that persists scenes for reuse?

Great questions...  I can imagine a scenario where you are creating and destroying a bunch of facades at runtime, and which calls Container.Install<> with a MonoInstaller.  Those MonoInstaller prefabs instantiated from the resources folder would remain in the scene after the facades are destroyed.
I think it would get complex to try and figure out a way to have the newly instantiated MonoInstaller be destroyed along with the facade.  Zenject is pretty simple in terms of how involved it is in the lifecycle of objects.  When the CompositionRoot object is destroyed, it just calls Dispose on all objects bound to IDisposable and that's pretty much it.  If there was a game object associated with the Facade then we could just parent the MonoInstaller to that, but there isn't necessarily one.  The facade could entirely consist of normal C# classes.
So I think you're probably right that we should instantiate each MonoInstaller prefab once and then re-use this each time Container.Install is called with it.  This would mean that it would get its members injected each time (in case another installer binds a parameter for it) which feels a bit odd but probably is fine.  This would also have the added benefit that you could tweak the settings in this prefab and have the change apply to all facades at once.
We could define an empty game object called 'Installers' underneath the GlobalCompositionRoot which can serve as the location for all dynamically created MonoInstallers.  We could also instantiate any MonoInstaller prefabs there that are hooked up directly to either the GlobalCompositionRoot or SceneCompositionRoot.  What do you think?

Sounds good except for one thing that caught my attention. If MonoInstallers placed in a SceneCompisitionRoot are suppose to be in the scene already, it wouldn't be necessary to tie those into the the proposed system.
Unless of course you mean to instantiate the MonoInstallers on SceneCompisitionRoot if they are physical prefabs. Remember you are unable to check if a GameObject is a prefab outside of the editor so this would not work well.
This is fine I think for global installers as they are required to be prefabs anyway.

Yes I was assuming I could check whether a game object was a prefab or not outside of the editor.  That's unfortunate.
Yeah, sounds reasonable to just reuse MonoInstallers that are already in the scene

Actually we may want to instantiate the MonoInstallers from their prefab anyway when they are referenced again, even if they are already in the scene, since some properties may have been changed

In my opinion, scenes and their Installers should remain a closed system. What if a SceneCompisitionRoot contains a MonoInstaller that exists within the scene but has no prefab?
I would argue that global installers and dynamic installers be separated as well.
Here is my thought process.

Installer Source
Comments

SceneCompisitionRoot
Require that all MonoInstallers are within the same scene, prefab or not. Force this requirement by checking and throwing an error when adding in the inspector. The reasoning is because I can very well see a MonoInstaller existing in the scene that is not bound to a prefab. Also these MonoInstallers will be created with the scene, and die with the scene automatically so no maintenance required.

GlobalInstallerConfig
All of them are going to be prefabs due being a project asset. Instantiate all of them and put them as children of the GlobalCompisitionRoot (possibly in a GameObject called "Installers" under the GlobalCompisitionRoot) regardless of the existence of dynamic installers of the same type. The reasoning for this is because one can't guarantee that the prefab in the GlobalInstallerConfig is the same in "Resources/Installers/" and may have different values (Why someone would do this idk. But I feel allowing this is better than trying to figure whitch one to use over the other). This should only cause a problem when a MonoInstaller within the GlobalInstallerConfig calls Install<SomeMonoInstaller>()  when SomeMonoInstaller is also in the GlobalInstallerConfig. At that point it will yell at you on startup (May be even in edit-time validation but I don't fully know how that works)

Install<SomeMonoInstaller>()
Before instantiating, check if cached. If so use the cached version instead of instantiating a new one. Cached MonoInstallers I feel should be kept in an object separate to GlobalCompisitionRoot to avoid confusion. Say the object is called "DynamicInstallers". This object would also be set to DontDestroyOnLoad(). Basically what all has been mentioned above already.

What are your thoughts?

That's a great summary.  I agree - I'll include these changes in Zenject 4

One thing I just remembered, Install<SomeInstaller>() accepts extra args to inject. Not only that but I also have forgotten that Installer holds a DIContainer that gets injected to install onto.
If MonoInstallers are to be cached when dynamic, are there any problems caused by injecting their values (including their DIContainer) more than once? If not, how do you think it will effect MonoInstallers that need to use those values for lazy injection such as FacadeFactory and ToMethod() bindings?

It did occur to me that we would be injecting the dynamic installers twice, which I thought seemed dangerous, but I couldn't think of any bugs with that.  You're right though, there actually are some issues with that.  Anytime injected member variables of the installer are used within a ToMethod or ToFacadeFactory method, it would only be using the most recently injected values.

Maybe for dynamic installers, we should just give up on the ability to tweak the settings at run time, and just instantiate it then delete it immediately afterwards

Maybe for dynamic installers, we should just give up on the ability to tweak the settings at run time, and just instantiate it then delete it immediately afterwards.  Though I'm not sure how this would behave when it comes to late callbacks like those in ToMethod or ToFacadeFactory
Alternatively, we could just spawn multiple copies as necessary and put them under DynamicInstallers like in your original suggestion.  This seems undesirable though because I can imagine scenarios where there are hundreds of facades being created and destroyed.  And every time they are destroyed they would leave an installer game object around that will clutter up the scene

At the very least for DIContainers managed by a Facade, the following would solve the issue of installer clutter if the "create new ones every time" route is taken.
public class DynamicMonoInstallerDisposer : IDisposable
{
    private MonoInstaller monoInstaller;

    public DynamicMonoInstallerDisposer(MonoInstaller monoInstaller)
    {
        this.monoInstaller = monoInstaller;
    }

    public void Dispose()
    {
        Destroy(monoInstaller);
    }
}

// The following within the `Install<SomeMonoInstaller>()` method
this.Bind<IDisposable>().ToInstance(new DynamicMonoInstallerDisposer(newMonoInstaller));

Other than that, perhaps tracking the dynamic MonoInstallers in a list and destroy them all inside put inside ~DIContainer() { }. Or even create a DisposeDynamicMonoInstallers() method if you are in fact managing a DIContainer outside the use of a Facade.

I feel like this is a "rabbit hole".

I think this issue has been addressed with the change to make the prefab installers specified separately from the installers in the scene, and also the introduction of GameObjectContext with zenject 4 (please correct me if I'm wrong)


Release Google.Cloud.Tpu.V1 version 1.0.0-beta01

Changes in this release:
Initial release.

Created release for Google.Cloud.Tpu.V1-1.0.0-beta01


[Spring Boot Tomcat Runtime Guide] Appendix B

Looking at number 8 in Appendix B:
This Maven goal is part of the Spring Boot Tomcat Maven plugin and will repackage the existing jar file that is created during the package goal.
Actually, the goal is part of spring-boot-maven-plugin not Spring Boot Tomcat Maven plugin. In addition, we can explain why is the repackage goal there, as stated in the plugin docs:
Repackages existing JAR and WAR archives so that they can be executed from the command line using java -jar.

Thanks @RadekKoubsky. I'll include this information when as part of resolving #296.

Resolved in PR #315


[UWP] Menu not showing up

i've tested your plugin and it's really nice!
but not works on UWP
and also in android it takes like 1 or 2 seconds for showing the menu.

ok just found out the min version should be 1809 :) and works now with right click.


Implement tracing for pyroscope components

PR Description
Implement tracing for the pyroscope.scrape, pyroscope.receive_http and pyroscope.write components.
Spans are created for http server and http client calls in these components.
PR Checklist

[ ] CHANGELOG.md updated
[ ] Documentation added
[ ] Tests updated
[ ] Config converters updated

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

New spans:

I'm seeing segfaults during reload related to tracing, will need to investigate

Hi @madaraszg-tulip,
Thank you for your contribution and for taking the time to enhance observability in Alloy.
My two cents: while the instrumentation could be valuable, I believe we should align with Alloy's observability choices for now. If they decide to adopt otelhttp in the future, we'd be happy to revisit this kind of instrumentation. However, I'll leave the final decision to someone from Alloy.
Thanks again for your contribution!

Closing for now, might revisit in the future


Asserts generated for Options use .get

For example schema in previous bug produces
assert(temporalScore.get >= 0, "temporalScore.get must be greater than or equal to 0")
Suggestion for assertion:
assert(temporalScore.fold(true)(_ >= 0), "temporalScore must be greater than or equal to 0")

I was thinking the same and have some WIP. I was more thinking of something like:
asssert( temporalScore.contains( _ >= 0) )

^ That seems more readable and fault tolerant.

Yeah fold is too verbose here,.containshowever takes a value not a function. I think .forall would be the correct choice.

Oh my bad. I think meant .exists()

I think assertion parameter should be true for None (i.e. None should be accepted value). You want .forall. Demo:
@ val opt: Option[Int] = None
opt: Option[Int] = None

@ opt.forall(_ >= 0)
res1: Boolean = true

@ opt.exists(_ >= 0)
res2: Boolean = false

Changes have been reflected in online editor as well.


#345 - add fortigate based landing zone light

see #345

see example run in #345 with incoming adjustments for 3 changes around <IP_ADDRESS>/0 fg incoming, 5 vpc quota and username/password fortios authentication over token


fix: attribute [simp] ... in -> attribute [local simp] ... in

Mathlib.Logic.Unique contains the line attribute [simp] eq_iff_true_of_subsingleton in ...:
https://github.com/leanprover-community/mathlib4/blob/96a11c7aac574c00370c2b3dab483cb676405c5d/Mathlib/Logic/Unique.lean#L255-L256
Despite what the in part may imply, this adds the lemma to the simp set "globally", including for downstream files; it is likely that attribute [local simp] eq_iff_true_of_subsingleton in ... was meant instead (or maybe scoped simp, but I think "scoped" refers to the current namespace). Indeed, the relevant lemma is not marked with @[simp] for possible slowness: https://github.com/leanprover/std4/blob/846e9e1d6bb534774d1acd2dc430e70987da3c18/Std/Logic.lean#L749. Adding it to the simp set causes the example at https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Regression.20in.20simp to slow down.
This PR changes this and fixes the relevant downstream simps. There was also one ocurrence of attribute [simp] FullSubcategory.comp_def FullSubcategory.id_def in in Mathlib.CategoryTheory.Monoidal.Subcategory but that was much easier to fix.
https://github.com/leanprover-community/mathlib4/blob/bc49eb9ba756a233370b4b68bcdedd60402f71ed/Mathlib/CategoryTheory/Monoidal/Subcategory.lean#L118-L119

There are other instances of attribute ... in in the codebase:
Topology/Category/TopCat/Basic.lean:attribute [instance] ConcreteCategory.funLike in
LinearAlgebra/BilinearForm/TensorProduct.lean:attribute [ext] TensorProduct.ext in
SetTheory/Game/Short.lean:attribute [-instance] subsingleton_short in
RingTheory/Trace.lean:attribute [-instance] Field.toEuclideanDomain
RingTheory/Polynomial/Basic.lean:attribute [-instance] Ring.toNonAssocRing in
RingTheory/Polynomial/Basic.lean:attribute [-instance] Ring.toSemiring in
RingTheory/Polynomial/Basic.lean:attribute [-instance] Polynomial.semiring Polynomial.commSemiring in

I don't know if those are OK. Also, does the in in attribute [local/scoped simp] ... in do anything, or do they operate on the current file/current namespace (respectively) regardless?

!bench

I'd like to see if it makes a performance difference to disable the simp lemma or not. Since you had to add it back in many places, it looks pretty useful as a simp lemma, so it would be good if we could keep it in the simpset.

It seems that this being a simp lemma is one of the reasons that this regression in simp occurs. More generally, having this in the global simp set can slow down simp calls which are then squeezed away, so I'm not sure that the mathlib benchmark alone is a fair judge.

I'm still not completely convinced: the fact that several files are red in the bench show that the lemma is useful even in places where you haven't put it back, as it provides efficient shortcuts. (I'm not really against the change either, just hesitant).

That's fair - I'm viewing this as reverting an accidental change, rather than making a deliberate change.  WARNING: checking out old commits of this PR using v4.2.0-rc2 or v4.2.0-rc3 can cause lake clean to delete your mathlib folder! If you need to do so, make sure to delete lakefile.olean manually before running any lake commands.

!bench

!bench

Note that eq_iff_true_of_subsingleton as a simp lemma causes simpNF failures which are currently marked as nolint. See, for example, https://github.com/leanprover-community/mathlib4/blob/bf4260cbab0a5be943fe4cfe97a9d54948ddc61a/Mathlib/SetTheory/Game/Short.lean#L43-L48.
As an experiment, I pushed a commit which adds eq_iff_true_of_subsingleton  as a normalization lemma for aesop_cat. A single file had longer build times before and after the last commit (Mathlib.CategoryTheory.Abelian.InjectiveResolution), but I think it shows that the performance regressions are specific to aesop_cat. I can't say if changing the tactic is a good idea, or if the way I did it is the best way of doing so, but at least it helps clarify the situation.
I will push a new commit adding attribute [scoped simp] eq_iff_true_of_subsingleton to Mathlib.CategoryTheory.Category.Basic instead of modifying aesop_cat to see how it performs.

!bench

To recap:

The first benchmark run I triggered, removing eq_iff_true_of_subsingleton from the simp set, reports a few regressions and a few speedups. This corresponds to the first two commits.
The second benchmark run in addition adds eq_iff_true_of_subsingleton as an aesop_cat normalization simp lemma. Except for one file, the original regressions disappear. This is pretty strong evidence that previous slowdowns were all related to aesop_cat. Unfortunately, most of the wins also disappear. This corresponds to the first three commits.
The third benchmark run reverts the aesop_cat change, adding eq_iff_true_of_subsingleton as a scoped simp lemma in the CategoryTheory namespace. This means aesop_cat will use it, but we don't pay a cost to add it to aesop's simp lemma list at each callsite. This corresponds to taking all four commits (the fourth one reverts the third one as well as adding a scoped simp lemma).

Therefore, there are three solutions with different tradeoffs. What all benchmarks had in common was a 5.3% decreasing in number of instructions during linting. This is probably related to the nolinted simpNF failures I described earlier.

@mattrobball I'll take the liberty to mention you here since this PR involves both performance and category theory, but feel free to ignore the ping if you want. Thanks!

Discussion offline suggests we're going with the first option, and I'm happy with that!
bors d+

bors r+


OpenAI o1 compatibility issue

400 Unsupported value: 'messages[0].role' does not support 'system' with this model.

im having the same issue. System prompt needs to be removed from the payload. Can't use it for the time being. Hopefully they will update

v1.6.8 now has o1 support! It turns out o1 doesnt natively support system prompt or tool use, so I had to use structured output prompting to achieve the same effect. I hit my rate limit early so couldn't test much, but figured i should put it out there for others to try.

v1.6.8 now has o1 support! It turns out o1 doesnt natively support system prompt or tool use, so I had to use structured output prompting to achieve the same effect. I hit my rate limit early so couldn't test much, but figured i should put it out there for others to try.

Killer! Thank you sir.

Unfortunately still not quite running appropriately:
400 Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead.

Are you using OpenAI or OpenRouter? Because I don't have a high enough tier on OpenAI to test this properly. It seems like other projects are seeing this error too, so I think OpenAI updated their API to have a new max_completion_tokens param (since there's now the concept of 'reasoning tokens')

I was right, will update ASAP https://github.com/openai/openai-node/blob/328f75caef55f2d7a829d3de520b741855e2e104/src/resources/chat/completions.ts#L796

Fixed in v1.6.10 (I think, pls confirm)

Fixed in v1.6.10 (I think, pls confirm)

Confirming! Works. Thank you!


Omnimount bouncing

Hello again!
Finally finished pulling all of my data down. Quick off topic: NetData issue resolved itself some time back I just didn’t get a chance to mention it. Can’t say if it was a system update or something you did.
Back on topic. Omnimount is bouncing for some reason. It will get to startup complete and then issue a shutdown command.
My setup is now simplified. I have all of my content local on a raid’d enclosure. The enclosure is a mount point called “Media” in my user home directory. I ran the rclone setup again and created a new local remote. I chose it as my media directory and exited leaving it to default to /Media.
This isn’t ideal for me but after creating a local remote and choosing it. OmniStream assumes the user home directory as default. I gathered this after multiple attempts of mounting locations. Omni Menu setups defaults the the user home if you select to chose a media folder other than /Media (which I have anyway now in the user home). You are only allowed to select from a single directory in whatever your rclone remote directory happens to be. There is no option to select a subdirectory from any of the directories listed. Example. I had my mountpoint mounted at ~/OmniStream/mnt/mount but creating a local rclone remote forced me to ~/ and if I selected OmniStream to get to the ~/OmniStream/mnt/mount directory my Media mountpoint would be set as ~/OmniStream.
The main reason it isn’t ideal is because when Omni Backup script kicks off it tries to backup my Media mountpoint because it isn’t included in the ~/OmniStream/mnt exclusion. I’m not sure how long it would take to try and backup and compress 52TB of content but I decided to kill the process - not to mention my host system doesn’t have the space to hold that file anyway.
Omnimount is correctly creating the rclone remote, cloud, unsynched, and uploadcache folders but is removing them when it bounces. There is a mention of a “fusermount extra argument after mount point” error in the logs.
Here is log output:

Starting vnstat

Configuration:

MERGEMOUNT=cloud
RCLONESERVICE=Junker
RCLONEMOUNT=Junker
UNSYNCED=unsynced
UPLOADCACHE=uploadcache
MEDIA=Media
TURBOMAX=20
addgroup: The group omniuser' already exists. adduser: The user omniuser' already exists.
Starting services
{
"jobid": 1
}
Startup complpete
Received request to shutdown
fusermount: extra arguments after the mountpoint
rmdir: failed to remove '/mnt/uploadcache': Directory not empty
rclone v1.58.0

os/version: debian 11.3 (64 bit)
os/kernel: 5.10.0-13-amd64 (x86_64)
os/type: linux
os/arch: amd64
go/version: go1.17.8
go/linking: static
go/tags: none

mergerfs version: 2.33.5

Welcome back @shadowsbane0 😄 So, I'm probably completely misunderstanding what you are asking, but if I read you correctly, you are wanting to use the mounts for local storage, not so much Google/Dropbox/etc right?
So one idea could be to use the "unsynced" mount for that purpose. For example I have a test server at home with two hard drives - one small SSD and a large HDD drive with a number of movies/TV shows. I have simply mounted the HDD to ..../mnt/unsynced and that is what the test server uses for its content - not the stuff I have in Google. In fact it doesn't touch Google at all.
Again, I might misunderstand what you're saying, if so, please eloborate 😆

No Ken, you understood correctly. I was trying to figure the easiest way to get a local mount available within the Omni environment the containers would have access to my content.
I thought I would be able to do it easiest by just creating a rclone “local remote” (currently option 24) but ran into the complications mentioned with omnimount.
Sent from my iPhone
On Apr 27, 2022, at 9:00 PM, Tech Perplexed @.***> wrote:

Welcome back @shadowsbane0https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fshadowsbane0&data=05|01||a52893fcf86145f2f34008da28b26c16|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637867044027479573|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=CYjj4aRXY9pkHGAHHvaHFm2sTZAkpAGwsgFoTPrTnZQ%3D&reserved=0 😄 So, I'm probably completely misunderstanding what you are asking, but if I read you correctly, you are wanting to use the mounts for local storage, not so much Google/Dropbox/etc right?
So one idea could be to use the "unsynced" mount for that purpose. For example I have a test server at home with two hard drives - one small SSD and a large HDD drive with a number of movies/TV shows. I have simply mounted the HDD to ..../mnt/unsynced and that is what the test server uses for its content - not the stuff I have in Google. In fact it doesn't touch Google at all.
Again, I might misunderstand what you're saying, if so, please eloborate 😆
—
Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkelinger%2FOmniStream%2Fissues%2F11%23issuecomment-1111624064&data=05|01||a52893fcf86145f2f34008da28b26c16|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637867044027479573|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=wxIsJvqbHdlcWXrfoT8w4qMGehexDej4WvGPDkfEIzY%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGWGOGAUVW66YBEF275B7WDVHHPJBANCNFSM5UP3XMCQ&data=05|01||a52893fcf86145f2f34008da28b26c16|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637867044027479573|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=hbVJqmF2VauBDcFio4ShyfZDTivIQ7hFLzvhNeEdl%2Bg%3D&reserved=0.
You are receiving this because you were mentioned.Message ID: @.***>

@kelinger @TechPerplexed
I don’t think the issue is with the rclone “local remote”. I deleted my  config and started created a new remote pointing to my GDrive. I’m still getting the “Fusermount: extra arguments after mountpoint” error and omnimount is in a boot loop.

@kelinger @TechPerplexed
Boot loop fixed for GDrive config. I reinstalled rclone and ran setup-again script to recreate my rclone.conf. It now works with the GDrive settings. I tried to create a second “local” remote and selected it as my media location - Omnimount bootloops. It also bootloops if it is just the local remote option only - both with the Fusermount error mentioned previously. (Local remote is now storage option 19 in the rclone config). Gooby used to create a “local” remote on its own. I never saw what it was used for since I was only using GDrive at the time.
Can you expound on how you are setting up to use the unsynced directory? It seems to be created and deleted when omnimount is up and down. If I can easily go down that path it will likely save me some time.

@kelinger @TechPerplexed
I went ahead and “solved” the problem by moving my mount points into the OmniStream /mnt directory (so they would be excluded from the backup cron) and manually added it to my .yaml volumes after moving them into the 800 block. Unless you feel like tracking down why the rclone “local remote” causes boot looping of omnimount you can close this one.

That's just it... it HAS to be in the OmniStream/mnt if it is managed by OmniStream.  When you pass the variables into the containers, the paths (used by OmniStream which is managed outside of Docker) are local to the machine, not the Docker containers.  Thus, I have to strip the path from the directory when it is referenced inside Docker.  In other words, you may path /this/is/where/I/store/my/media as the full path to $MEDIA but OmniMount strips off all but /media and adds /mnt to it so that it sees (and accesses) it in it's own root /mnt/media.


provide dotnet new nlog.config

Investigate if this is possible and how.
Also mentioned here: https://github.com/NLog/NLog/issues/3377
Related: https://github.com/NLog/NLog/issues/2823

Related https://github.com/dotnet/templating/wiki/Available-templates-for-dotnet-new

Nice example:
IdentityServer4.Templates
dotnet new templates for IdentityServer4
dotnet new is4ui


Make php app.php update return proper exit code on failed command

We've faced an issue when using Swagger doc on our project.
When file contains documentation in annotation which is not imported we get behavior like this:

But final return code is

so we can't guarantee that code will work even using this in CI, cause problem is suspended and build passes.
Can you add some optional flag for update and configure commands to make these pipelines fail when some exception caught?

Please verify if this can be closed.


Make HTTP/3 even faster

Currently, the uring HTTP/3 implementation only allows one packet to be sent at a time. See 08245fe for more details

investigate if this is an issue (or if they need to be sent in order)
move away per Transmit data into a vec and allow a stack of "current tasks"
stonks

After some more consideration and looking at the relevant code bits in quinn (listed below), the normal code path only sends one Transmit at a time and groups several datagrams into a single Transmit if that's needed. The code path that triggered the warning (removed in f8c590b) was probably the connection being reset in the middle of a send operation. It will not improve performance by implementing "several sends at the same time", since this isn't what happens.
Normal send code: https://github.com/quinn-rs/quinn/blob/b55ec2925174f06dcba9876439085150cc11336d/quinn/src/connection.rs#L946-L1000
Non-normal (before the handshake is complete / connection resets) send code: https://github.com/quinn-rs/quinn/blob/b55ec2925174f06dcba9876439085150cc11336d/quinn/src/endpoint.rs#L504-L526


Replace old variable return syntax

As discovered in #1539, some of the meta files still use the old @return syntax.
This PR serves to fix all the old syntaxes. I do not use any of the third party libraries included by default though so I need some help to figure out what the return types are for those.

@flrgh I wouldn't mind that second pair of eyes


Order of operations problem with Puppet 4

In Puppet 4.x after the pkgng provider was incorporated into the core there is an order of operations problem that causes failed, or very long puppet runs.   This is tested with puppet 4.5.1 and zleslie/pkgng 1.1.1.
In my setup the pkgng class is included in site.pp like this:
class { 'pkgng':
  purge_repos_d => true,
}

I then include a pkgng::repo resource on FreeBSD hosts to define a local repository.
In this case, the order of operations appears to be:

purge repositories (purge_repos_d true)
update/install packages
process pkgng::repo objects

There are two very painful failure modes with this.
First, on a system where the existing repository is being completely replaced with a local repository (possibly a new system with the default FreeBSD repository), the old repository is deleted, then packages are updated, then the new repository is installed.   The core pkgng provider fails badly if no repository is present (see https://groups.google.com/d/topic/puppet-users/ZtfxbkCEyWc/discussion).  There's no easy way to recover from this within puppet.  Since the agent run fails at the point that the pkgng provider errors out, the repo resource never gets created.  The only fix is to use some other process to create the proper repository config files on all the affected systems.
In the second failure mode, if a repository host or path is being updated, the agent run takes a very long time while all of the package version checks individually time out, before the repository is updated at the end of the agent run.
I'm not sure what the fix is for this.  There at least needs to be a way to swap the order of pkgng::repo handling and package updates.  Preferably the purge of unmanaged repo resources would happen at the same time as the update of managed repo resources.

Thank you for the report.  I too have noticed this, but will take a closer look at a potential fix.
I suspect potential fixes include:

Fix the pkgng provider to fail gracefully when no repos are found.  This should include a fixture upstream and a test to resolve this.
Document a resource override that will ensure order of resources.  The pkg package may present a challenge here.
Look at ensuring the pkgng::repo resources are present before package installation.

The first one seems like something that just needs to happen.  The others might be touchy given that pkg is a package.

I've submitted a PR upstream that should resolve the issue of Puppet failing. https://github.com/puppetlabs/puppet/pull/5285

The upstream work has been merged.  Its unclear which version of Puppet this will be released in, but I'll bump the port version for this change.

Maybe adding a relationship with collectors in order to explicitly manage packages after repos would make sense.
Something like:
Pkgng::Repo <| |>
-> Package <| provider = 'pkgng' |>

I've just tested the collector method and was not able to get this to work correctly.  I also tried a few other incantations of expressing the same desire.  It seems like even the following would work in site.pp, but it doesn't in my environment.
Pkgng::Repo <||> -> Package <| provider == 'pkgng' |>

Alternatively, I thought about putting some kind of ordering in the repo.pp.
File["/usr/local/etc/pkg/repos/${name}.conf"] -> Package <| provider = 'pkgng' |>

Neither strategy worked for me.  It seems like it could be a scoping issue, but I'm not certain why the ordering doesn't work out correctly.
Its possible we could do some kind of autorequire in the provider too.

Quick guess, when Pkgng::Repo configs are applied, two things happen:

Packages resources are "unlocked" and
Exec['pkg update'] is notified.

But since there is no ordering for these two actions, nothing prevents the Exec to happen after the Package are applied…
I think that changing the dependency to the following should work as we expect (can't test before Wednesday… looooong week-end here 😄 ):
Exec['pkg update'] -> Package <| provider = 'pkgng' |>

Okay, did more test, and the answer seems to be basically here: https://puppet.com/docs/puppet/5.5/lang_collectors.html

Note: Collectors can search only on attributes that are present in the manifests, and cannot read the state of the target system. For example, the collector Package <| provider == yum |> collects only packages whose provider attribute is explicitly set to yum in the manifests. It does not match packages that would default to the yum provider based on the state of the target system.

Changing the dependency to…
Exec['pkg update'] -> Package <| provider == 'pkgng' or provider == undef |>

…seems to do the right thing.

Ah, the undef was what I was missing.  This seems to correct the issue.  Thanks for looking into it!

Ah, the undef was what I was missing.
Hehe :-) I also missed it and it took me quite some time to find-out the culpit!


Add stub to make analyzer happy (#41563)

Description
This PR adds stub to allow using registerViewFactory on Flutter Web without dart analyzer errors
Related Issues
Fixes: #41563
Tests
I don't see any sense in testing empty method that always returns true
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I signed the CLA.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I updated/added relevant documentation (doc comments with ///).
[x] All existing and new tests are passing.
[x] The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (Please read Handling breaking changes). Replace this with a link to the e-mail where you asked for input on this proposed change.
[x] No, this is not a breaking change.

@Hixie bot said I need tests for empty method, will you make an exemption for that PR, please?

Last commit due to this error: https://cirrus-ci.com/task/5977824808140800?command=test#L96

Does GitHub adds eol automatically or what? What should I do?

cc @hterkelsen

This isn't the right place to add the stub. If you want to fix https://github.com/flutter/flutter/issues/41563 then I suggest exporting platformViewRegistry from package:flutter_web_plugins and changing example code to use the one from there.

@hterkelsen where is that package? In flutter_web repository?
This stub is needed for using Flutter Web on master channel, where you can't import that package

The test should be that you can use registerViewFactory on Web without analyzer errors.

You can find package:flutter_web_plugins here: https://github.com/flutter/flutter/tree/master/packages/flutter_web_plugins


Inconsistency in Package versions when running in Documenter compared to Pluto

First of all, I think this package is quite stable by now, which is nice.
I recently noticed a small difference when rendering the documentation of
https://manoptjl.org/stable/tutorials/GeodesicRegression/
Running the notebook from
https://github.com/JuliaManifolds/Manopt.jl/blob/master/tutorials/GeodesicRegression.jl
has one major difference:
While running the documentation (with PlutoStaticHTML) used the environment of the docs, most prominently the most recent version of Manopt.jl in my case, running Pluto (with its local environment for the notebook) ran the code with an old version.
Maybe I was not so clever to change the code (in an editor and not in Pluto) to use a new feature. This made PlutoStaticHTML still work fine and render the docs, while when I came back to open the notebook, that one failed.
In reality this would mainly (only) affect breaking changes, of course.
So long story short:
Would it be possible to run notebooks with the pkg environment Pluto has set up for them? That would be neat.

First of all, I think this package is quite stable by now, which is nice.

That's great to hear! Credits go to the tests. They cover things quite well now.

Would it be possible to run notebooks with the pkg environment Pluto has set up for them? That would be neat.

Ah yes sure that is possible. If you do that, you'll need different environments and in Julia environments cannot effortlessly be switched without restarting Julia (thanks to the well-known problems with structs and such). Therefore, you need to set use_distributed to true. This is written in the docs:

use_distributed: Whether to build the notebooks in different processes. By default, this is enabled just like in Pluto and the notebooks are build in parallel. The benefit of different processes is that things are more independent of each other. Unfortunately, the drawback is that compilation has to happen for each process. By setting this option to false, all notebooks are built sequentially in the same process which avoids recompilation. This is likely quicker in situations where there are few threads available such as GitHub Runners depending on the notebook contents. Beware that use_distributed=false will not work with Pluto's built-in package manager.

If you do that, then Pluto should automatically pickup built-in pkg environment.
I see that you're currently not running in parallel. Since EditURL is now also available via PlutoStaticHTML, you could try to pass a list of files to build_notebooks to gain a 2x performance improvement (since the GitHub Runners have 2 cores).

Ah I missed the distributed keyword and will try that.
The Edit URLs are currently broken on my rendering, I am not yet sure why, but that might also be my little-old-code that I hacked a while back.

Sorry to comment here again but something went very wrong in the newest version, where the only thing I did change was the activation we discussed here
https://manoptjl.org/stable/tutorials/Optimize!/
Do you have an idea why the code end part after the image is not rendered correctly?

I checked – fixing to 6.0.3 resolves the problem so the page with wrong html was introduced with 6.0.4

The menu is also messed up, right? Or is that something else? This looks bad. I'm sorry for the mess

It's caused by Gumbo adding HTML begin and end stuff because
<!DOCTYPE ><HTML><head></head><body>

is in the middle of the page

The menu is messed up because my iterations are in a debug output in code as
# 1 F(x) = ...
# 2 F(x) = ...

but with code fences not working those are markdown headlines messing up the menu, sure.

I have to work on a paper today and that has priority since it pays the bills. I hope to find time to fix this later this week

Don't worry – The only thing you changed was the fix in the info box thingy. So I currently just release a patch that pins PlutoStaticHTML to 6.0.3 so the docs are fixed. There is no hurry here :)


function to generate individual to group cumulative mapping

Generate a data frame which has multiple rows per individual corresponding to all of the organisational units they are part of - i.e. not just their immediate unit but grandparent, great-grandparent etc etc.  Need this to calculate cumulative aggregations - e.g. total number of individuals in a unit AND all of its descendants.

Should really be part of version 0.3.0

Included in PR #22


"check.py" is looking for a test_data folder in the data path.

It looks like this was something added in the latest version in the io/check.py file.
The original code was
cwd = os.path.abspath(os.getcwd())

    if result is False:

        message = f'The path {path} does not exist. '\
            f'The current working directory is {cwd}'
        raise pySpextoolError(message)

and now it's
cwd = os.path.abspath(os.getcwd())

test_path = os.path.join(cwd,'tests/test_data/raw/spex-SXD/')
with os.scandir(test_path) as it:
       for entry in it:
               print(entry.name)

if result is False:

       message = f'The path {path} does not exist. '\
           f'The current working directory is {cwd}'
       raise pySpextoolError(message)

I think the os.scandir needs to have a "try" statement since that's for testing purposes.

@kelle.  I just looked at the code and I am unsure why there is a hard coded path in check_path.py.  That program is just supposed to check a user passed path.  If you want to make sure that always exists, can we do that elsewhere?

I think that's an artifact of some debugging I was doing and should have been rolled back but wasn't. I can take a look or someone else can return it to it's original state.  Sorry about that!

This was fixed in #199


fix: do not deselect when zooming

Current behaviour is quite erratic when zooming, with the selection rapidly showing and hiding.
Yet to test this change with touch screen, but I don't think it should affect touch screen behaviour..

Okay, so after this change, touch screen and safari both still have the deselect/reselect functionality

Need to test on IOS.


[FEAT]: Components and Pages

Description

[ ] Advanced Tables
[ ] Blog Templates
[ ] Comments Sections
[ ] Create Drawers (CRUD)
[ ] Create Forms (CRUD)
[ ] Create Modals (CRUD)
[ ] Delete Confirm (CRUD)
[ ] Read Drawers (CRUD)
[ ] Read Modals (CRUD)
[ ] Read Sections (CRUD)
[ ] Update Drawers (CRUD)
[ ] Update Forms (CRUD)
[ ] Update Modals (CRUD)
[ ] Dashboard Footers (CRUD)
[ ] Dashboard Navbars
[ ] Dropdown Filters
[ ] Related Articles
[ ] Side Navigations
[ ] Table Footers
[ ] Table Headers
[ ] Update Drawers (CRUD)

Additional Information
No response

I'm extremely excited to see the blog template and the comments section. This library is really good.

@joreilly86 I just finished the Comment and Blog Template. Please have a look at<EMAIL_ADDRESS>and let me know.

I'm also waiting for the Advanced Table and maybe the Dashboard Navbar

@julien-blanchon I just added Advanced Table.

Nice, do you think you will make a release soon. With many new component the current publish version is missing charts so many other stuff.


Allow "bundled charts" to be easily configurable in Rancher helm chart

In 2.3, we've introduced the environment variable CATTLE_SYSTEM_CATALOG=bundled in order to use the packaged system charts. We should update the helm chart so it's an easy configuration option to set.
For now, let's plan to have the helm chart option be something like:
--set useBundledSystemChart=true

@deniseschannon the default value of useBundledSystemChart should be true, correct?

link PR to https://github.com/rancher/rancher/pull/22825.

The bug fix is validated in Rancher:v2.3.0-rc5 in the air-gapped environment

Render the template with the option  --set useBundledSystemChart=true

helm template ./rancher-2.3.0-rc5.tgz --output-dir .  \
 --name rancher \
 --namespace cattle-system \
 --set hostname=my-hostname \
 --set rancherImage=my-registry/rancher/rancher \
 --set systemDefaultRegistry=my-registry \
 --set useBundledSystemChart=true

follow the documentation to install Rancher in airgap HA mode
add a custom cluster
enable the cluster monitoring

Result:

the system-chart is hidden from the UI
the cluster monitoring is deployed successfully and works as expected


This plugin time starts webpack build effective only, watch the process does not work

This issue can't be fixed given the current architecture of the plugin. I wrapped the former .apply() function inside an event listener in my pull request which fixes this issue, but it has the added side effect of failing every test because of the changed architecture. We'd have to also restructure how tests are done too.

just noticed it doesn't work with watch, files start to pile up. this would be a nice addition!

this is very important feature.

This is really a deal breaker for me. For anybody else who finds this issue, clear old files on watch is supported in this plugin: https://github.com/gpbl/webpack-cleanup-plugin

@kingjerod all PRs are welcome

@tylerhou said:

This issue can't be fixed given the current architecture of the plugin.

Based on that, looks like it would be close to a full re-write?

Ignore that.

Also, @johnagan, there have been two pull requests which fix this issue: #32 and #35, respectively, which have been open for 5 months and 4 months respectively. The first one I wrote; it plays well with the current tests but I didn't add tests for the --watch option; the second one is fully tested but (according to the author) has bugs.
If tests are really really necessary for you, then please tell me and I'll take another look at the code. If you want to do any code review, I'm happy to work with you. All pull requests might be welcome, but it doesn't seem like you're a fan of giving feedback or of pulling them.

@tylerhou I think it was your recommendation to wait for the other with tests
https://github.com/johnagan/clean-webpack-plugin/pull/32#issuecomment-281882026
That PR isn't mergable though

https://github.com/johnagan/clean-webpack-plugin/pull/35#issuecomment-273233989

I was just letting you know that the other PR had tests, and you might want to pull that one instead. But if it's inherently buggy, as the author claims, that's an entirely different issue altogether.
My PR also was definitely mergeable when I submitted it five months ago, and it's not too difficult to resolve the merge conflicts. I just did.

I'm happy to pull in a PR right now. If you think this is GTG as is, I'm 👍

It's GTG if you're willing to accept that it has no tests for the watch function. I'm not sure how to write them.

me either. I'll pull it in. worse case we just revert it... again 😏

Yeah, my bad on that first time. My first legit pull request.

0.1.16 pushed to npm


fix(device_info_plus): Ensure use of Activity Context to obtain WindowManager

Description

Ensure that the WindowManager is obtained from the Activity Context instead of Application Context
Use ActivityAware to obtain Activity binding in DeviceInfoPlusPlugin class.
Set a null MethodHandler when the activity is detached (doing the same as in the onDetachedFromEngine method).
Add the Strict Mode configuration to example project Android code to ensure the Activity Context use is correct.
Tested on Pixel 5.

Related Issues

Fixes #2687

Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I titled the PR using Conventional Commits.
[x] I did not modify the CHANGELOG.md nor the plugin version in pubspec.yaml files.
[x] All existing and new tests are passing.
[x] The analyzer (flutter analyze) does not report any problems on my PR.

Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
[x] No, this is not a breaking change.

Hey folks thanks for the quick response on https://github.com/fluttercommunity/plus_plugins/issues/2687 but based on some feedback from Flutter apps built within Google there has been some pushback on this fix. I'll file a new issue but here is some of the raw feedback:
The DeviceInfo plugin should not have a
dependency on the activity. This change introduces two problems:

1. The activity could change, but the plugin stores the first read of data in memory so
 it can't change, possibly resulting in incorrect display data. The activity's display
 data is not guaranteed to match the device's display data.
2. The plugin should be able to be called even if the FlutterEngine isn't attached to an
 activity. Right now, at best the plugin returns empty data and at worst the app crashes
 or freezes if somebody were to try this.

If we need to exempt the StrictMode violations to get the original version submitted, we
can do that and figure out a resolution to the issue later. I would much prefer that to
the current implementation.

Hmm since this hasn't been incorporated into a release yet, maybe it doesn't make sense to file a new issue. So, I'll just keep the conversation here for now.
Here are my thoughts:
A. Does it even make sense to offer display metrics as part ofAndroidDeviceInfo? With the advent of foldables and other multi-display devices it seems Android has moved away from offering "device screen size" APIs (for instance, getDefaultDisplay is deprecated) in favor of an Activity-dependent APIs. If it doesn't make sense for the Android OS itself to offer such a device-wide API then how can device_info_plus offer such an API?
B. device_info_plus, being a plugin, can be aware of the activity lifecycle but should not be dependent on it for successful calls from Dart.

Hi Christian,
I am more in favor of getting rid of Display Metrics, indeed.
What I'll do is to revert this PR (partially) and re-open the original ticket.
Then, we will have to make a breaking change, removing the Display Metrics part.


Proto 3.15 supports optional again!

According to https://stackoverflow.com/a/62566052/1123955, we can get rid of the wrapper in our protos.

Presence tracking was added to proto3 in response to user feedback, both from inside Google and from open-source users. The proto3 wrapper types were previously the only supported presence mechanism for proto3. Users have pointed to both efficiency and usability issues with the wrapper types.

See: https://github.com/protocolbuffers/protobuf/blob/v3.12.0/docs/implementing_proto3_presence.md#background
This change will be a BREAKING CHANGE so it should be discussed later.
Useful Resources

Google protobuf: if I add a field from one side will it break another one?
Protobufs: Updating A Message Type

Blockers

[x] gen-grpc-gateway, gen-openapiv2: add support for proto3 optional

https://github.com/grpc-ecosystem/grpc-gateway/pull/1951
Released v2.3.0 (2021-02-25)

[x] Failed to generate pb file when using proto3 version.

https://github.com/grpc/grpc-node/issues/1717
grpc-tools v1.11.0: Bump protobuf dependency to 3.15.6 #1718
grpc-tools v1.11.1: make the plugin compatible with proto3 optional fields #1725

[x] grpc_tools_node_protoc_ts

https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/88

[ ] protoc-gen-lint

https://github.com/ckaznocha/protoc-gen-lint/issues/20

[x] ts-protoc-gen (web gRPC)

https://github.com/improbable-eng/ts-protoc-gen/issues/263

More details

How To Implement Field Presence for Proto3

Hi, I stumbled upon this issue while tackling the similar problem: yoheimuta/protolint#234.
FWIW, protoc-gen-protolint supports proto3 optional.
Moreover, protoc-gen-protolint is meant to be a drop-in replacement of protoc-gen-lint.
I hope your blocker issue will be resolved soon.


[CT-1358] [Feature] Add column type constraints as dbt native configs

Is this your first time submitting a feature request?

[X] I have read the expectations for open source contributors
[X] I have searched the existing issues, and I could not find an existing issue for this feature
[X] I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature
Problem:

Data types are created after the fact(assumed by the database) and/or a dbt user has to explicitly cast data types in their SQL. Because of this, there isn't much incentive to assure dbt models have expected data types for consumers to depend on(it's tedious work :/). This may not be a problem for 50 dbt models, but becomes a big problem when you have 2000+ dbt models. There should be an easier way to configure data type constraints for any dbt models and provide options to enable/disable data type enforcement(think: what mypy does for the python static typing experience).

Solution:

Bring data types as native to the dbt experience
Example BigQuery Constraints Macro:https://gist.github.com/sungchun12/f7ea081773ae824a83294649530d6e41
Related discussion: https://github.com/dbt-labs/dbt-core/discussions/5244#discussioncomment-3880254

Describe alternatives you've considered
Custom Materialization Macro in BigQuery: https://www.loom.com/share/1f1f190e66254d12984962c613e8082d
This is a general design pattern, but uses meta configs to enable this functionality. This is brittle because it injects custom configs into the manifest that aren't guaranteed to behave in expected ways.
Who will this benefit?
dbt users with large projects that need extra robustness in their developer experience and downstream users get the data they expect: data types and all.
Are you interested in contributing this feature?
yes, and I'll be working with someone in the community @jonathanneo
Anything else?
Research:

Postgres Constraints: https://www.postgresql.org/docs/current/ddl-constraints.html#id-<IP_ADDRESS>.6
Snowflake ONLY enforces not null constraints, the rest are nice to have metadata: https://docs.snowflake.com/en/sql-reference/constraints-overview.html#supported-constraint-types
BigQuery Macro Demo: https://www.loom.com/share/1f1f190e66254d12984962c613e8082d

Considerations:

have the configs embedded in dbt-core and then each adapter can take stable configs to adjust table materialization macros
Enforce column positions based on schema config
dbt-core contains the hub of native configs while adapters own specific implementations as each database has nuances to which enforceable constraints are valid.
think about not null and default values for a table
Work with Jon Neo from Canva
Include a check constraint as pgsql enables it?
What if constraints could be defined once within a subfolder path in dbt_project.yml and then in automatically creates not null constraints in the DDL?
Leverage how seed configs enable data types: https://docs.getdbt.com/reference/resource-configs/column_types

What this could look and feel like in snowflake: https://www.loom.com/share/14020499f5f646b6bc80c909716850fd

What if we add enum data types to prevent dbt users from having to run accepted values tests?
version: 2
models:
  - name: constraints_example
    config:
      constraints_enabled: true
    columns:
      - name: color
        column_type: varchar
        constraint: value in ('red', 'green', 'yellow', 'blue')
      - name: shape
        column_type: enum('square', 'circle', 'triangle')

Good spike! Just in time too, more and more data warehouse providers are adding constraints into their table definitions. For example, databricks have just added table constraints in October 2022: https://docs.databricks.com/tables/constraints.html

A couple notes on design and scoping
dbt-core design:

Ensure the below is allowed and contains defensive code for when constraints_enabled: true that it requires other schema config values are filled in and are not blank
constraints_enabled should have overrides similar to node_color configs: <example-sql-file.sql> overrides schema.yml overrides dbt_project.yml

--example sql file config

{{
  config(
    materialized = "table",
    constraints_enabled = true
  )
}}

select
  1 as id,
  'blue' as color,
  cast('2019-01-01' as date) as date_day

# schema.yml
version: 2

models:
  - name: constraints_example
    config:
      constraints_enabled: true
    columns:
      - name: id
        column_type: integer
        description: I want to describe this one, but I don't want to list all the columns
        constraint: not null
      - name: color
        column_type: string
      - name: date_day
        column_type: date
        default_value: CURRENT_DATE()

# dbt_project.yml
models:
  +constraints_enabled: true # enforce all models have constraints typed
  dbt_artifacts:
    +docs:
      show: false
    +schema: dbt_artifacts_sung
    staging:
      +schema: dbt_artifacts_sung
  tpch:
    staging:
      database: '{{ env_var("DBT_DYNAMIC_DATABASE","analytics") }}'
      +materialized: view
      +docs:
        node_color: "#FB6962"

    marts:
      intermediate:
        +constraints_enabled: false # overrides the root level enforcement
        +docs:
          node_color: "#3AAAE0"
      core:
        +tags: "owner:sung"
        materialized: table
        +docs:
          node_color: "#F6AE3E"

adapter design:

Works with guaranteed configs from dbt-core and dynamically injects those config values into the table materialization
Each adapter will have their own flavor of table materialization jinja code adjustments
Specific adapters(Databricks, Postgres) allow check constraints while BigQuery and Snowflake do not, there will need to be defensive terminal logs to state to the user when their check config is not allowed based on the database
Each adapter needs to provide guardrails for data types allowed. For example, snowflake interprets string as VARCHAR(38), integer as NUMBER(1,0). How much should an adapter enforce strict typing according to database syntax?
Example places in snowflake adapter to make jinja changes: https://github.com/dbt-labs/dbt-snowflake/blob/main/dbt/include/snowflake/macros/adapters.sql#L1, https://github.com/dbt-labs/dbt-snowflake/blob/main/dbt/include/snowflake/macros/materializations/table.sql#L1

I volunteer to help contribute the Snowflake portions and help test on a real world project. This will really help with incremental updates especially!

Planning Meeting 11/1/2022
Align on vision and scope of work: see above
Define success together: see above
Due Date:  12/7/2022(pull request submitted with passing tests)
Align on time/energy commitments:, Friday, 1.25 month of teamwork

@sungchun12 : 5-10 hours/week, product manager-lite, engineer
@jonathanneo : 5 hours/week, dbt-core engineer
@Victoriapm : What are your hours/week?, adapter engineer
All of us write passing tests

Align on project workflow and how we keep each other accountable:

slack DMs as a group
no recurring meetings
update with comments in this github issue for progress to keep it centralized
We'll use tasks within github projects to easily assign discrete units of work: here
Mondays slack DM updates weekly 10am PST.

Feel ready to start working this week:

Each of these will be a task in the github project above

What files need to be touched in dbt-core?
What files need to be touched in adapters: BigQuery, Postgres, Snowflake, Databricks to start?
What should config UX feel like(think: setting and updating configs, terminal logs, defensive behaviors to prevent users causing unintended effects)?
Make a loom demo video for each adapter


bug: no call to validateAwsRegion() in SetConfigFromFlags()

So if you're like me and fat-finger the region you end up with a big problem on amazonec2.go:164 when it looks for that region in the map index.

wait, nevermind.  i'm blind.

by changing line 159 to return err instead of return nil the output is this:
ERRO[0000] Error creating machine: invalid region specified

as expected


Wrong function name in documentation example

Description
Should be "from_json(...)" instead "to_json(...)"
Reproduction steps
Read the doc with understanding
Expected vs. actual results
Proper example
Minimal code example
No response
Error messages
No response
Compiler and operating system
N/A
Library version
N/A
Validation

[ ] The bug also occurs if the latest version from the develop branch is used.
[ ] I can successfully compile and run the unit tests.

Where exactly in the docs?

https://github.com/nlohmann/json/blob/199dea11b17c533721b26249e2dcaee6ca1d51d3/docs/mkdocs/docs/features/arbitrary_types.md?plain=1#L268


(OraklNode) Offchain code updates after the contract audit

Description

Removes address table from configs table
Update related code based on table update
Update submission code based on solidity code updates

// before
function submit(
        address[] memory _feeds,
        int256[] memory _answers,
        uint256[] memory _timestamps,
        bytes[] memory _proofs) external {...}

// after
function submit(
        bytes32[] calldata _feedHashes,
        int256[] calldata _answers,
        uint256[] calldata _timestamps,
        bytes[] calldata _proofs) external {...}

Update proof generation code based on solidity code updates

// before
bytes32 message_ = keccak256(abi.encodePacked(_answers[i], _timestamps[i]));

// after
bytes32 message_ = keccak256(abi.encodePacked(_answers[i], _timestamps[i], _feedHashes[i]));

Update dummy contract with updated submit function parameters
Check successful github action test here

Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Checklist before requesting a review

[x] I have performed a self-review of my code.
[ ] If it is a core feature, I have added thorough tests.

Deployment

[ ] Should publish npm package
[ ] Should publish Docker image

LGTM! I noticed that the order of values used for message generation is different from the order of input parameters, but it is too late to fix it.

I'll double check the code, thought I've set orders correctly based on submit input parameters

func Value2HashForSign(value int64, timestamp int64, name string) []byte {
...
concatBytes := bytes.Join([][]byte{valueBuf, timestampBuf, feedHash}, nil)
return crypto.Keccak256(concatBytes)
}

would have been better if feedHash was coming first from hash generation, yet it is audited already so it'll be proceeded without updates 🥹


Unused states in models.py for DCC approval

With the "OneGo" DCC approval, some of the states in models.py are not used. I ve marked the unused DCC states as "NOT USED?" @nihesh7391 Can we remove these states?

See issue #66 for reconsidering some of the states..

Closing it as the new models.py no longer uses these limbo states.


Extension issue

Issue Type: Bug
Extension Name: git
Extension Version: 1.0.0
OS Version: Windows_NT x64 10.0.22000
VS Code version: 1.68.1

:warning: We have written the needed data into your clipboard. Please paste! :warning:

@Wizely99, could you please describe the issue that you are facing? Thank you!

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


No HTML5 in the INSPINIA Download

Hi,
I have just purchased the premium template - INSPINIA for the HTML5 bootstrap.
After the payment and download from https://wrapbootstrap.com/theme/inspinia-responsive-admin-theme-WB0R5L90S
I cannot find the HTML5 bootstrap in the download.
Kindly send me urgent. I need to start my project.
Thanks
Srini

Download issue. Closed the ticket.


PopupDialog has no theme properties

Godot version:
3.1.1
Issue description:
PopupDialog doesn't have an apparent purpose, as most dialogs inherit from WindowDialog instead.  It appears to be a generic panel, with no way to access its StyleBox.  If the only distinction between PopupDialog and its parent class is aesthetic, perhaps its purpose could be clarified in the docs.  Otherwise, it appears to behave similarly to PopupPanel, but without theme properties exposed.

See also godotengine/godot-docs#2495.

I think #33120 closes this.

Fixed by #33120.


manifest: Update hal_nordic revision to fix nrfx_pwm driver

Update the hal_nordic module revision to fix a copy-paste bug in
the nrfx_pwm driver that prevents PWM pins from being configured.
Fixes #41413.

cc @novalisek

Please replace PR with SHA

Done,


Help

Hello sir, do you mind joining us at https://discord.gg/vHmjTH where we can help you easily?

Done

The two things are not related.


Add CLI function to create new sensor

One more thought: The Sensor class is not yet part of data.scripts.data_gen.py get_affected_classes - maybe you want to add that in this PR.


chore(deps): update lscr.io/linuxserver/prowlarr docker tag to v1 (main)

This PR contains the following updates:

Package
Update
Change

lscr.io/linuxserver/prowlarr
major
0.4.11-develop -> 1.0.0-develop

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

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

This PR has been generated by Renovate Bot.

Renovate Ignore Notification
As this PR has been closed unmerged, Renovate will ignore this upgrade and you will not receive PRs for any future 1.x releases. However, if you upgrade to 1.x manually then Renovate will reenable minor and patch updates automatically.
If this PR was closed by mistake or you changed your mind, you can simply rename this PR and you will soon get a fresh replacement PR opened.


Obfuscate Authorization header by default

The spring-boot-starter already does this, maybe it makes sense to put this into the core already, i.e. secure by default

Fixed by #66


Move producer-service out of default namespace.

https://github.com/knative-sandbox/async-component/pull/20#discussion_r512850013

Closed by #40