Pymongo Compatibilty Issue with Djongo

Description

Note: this issue is already fixed in #32 as an hotfix this is to log that.

Pymongo was updated with #28 by dependabot which bumped its version from 3.12.1 to 4.0, which is incompatible with djongo and was giving the following error:
File "manage.py", line 22, in <module>
    main()
  File "manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "C:\Users\DELL\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "C:\Users\DELL\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Users\DELL\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 367, in run_from_argv
    connections.close_all()
  File "C:\Users\DELL\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\utils.py", line 213, in close_all
    connection.close()
  File "C:\Users\DELL\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "C:\Users\DELL\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py", line 294, in close
    self._close()
  File "C:\Users\DELL\AppData\Local\Programs\Python\Python37\lib\site-packages\djongo\base.py", line 208, in _close
    if self.connection:
  File "C:\Users\DELL\AppData\Local\Programs\Python\Python37\lib\site-packages\pymongo\database.py", line 829, in __bool__
    raise NotImplementedError("Database objects do not implement truth "
NotImplementedError: Database objects do not implement truth value testing or bool(). Please compare with None instead: database is not None

And since that update was already deployed on production on v46 it crashed it 😢.
Screenshots
No response
Additional information
This issue was fixed with the help of this question on stackoverflow and followed this solution.

Fixed in #32.


Added blog for Mayastor release

Signed-off-by: satyapriyamishra222<EMAIL_ADDRESS>

Can we optimize the images, please?

Can we optimize the images, please?

Done


Player: Log in session should be saved permanently

As a player, I do not want to log into my application using a username and password as my device can identify me.

Completed. Login is already stored permanently in SharedPreferences. Closing this


Uniform naming exception

I suggest all exception'name prefixed with "Dst", then append the name of the specific data structure. e.g. renamed "DstKeyNotFoundException" if the key is not found in the store. renamed "DstDictKeyNotFoundException" if the dict key not found in the dicts.

Totally agree.


Fix typo in README.md

Not much to say here.

Lol, I will do one more commit where I fix a couple of things

😄


different height tiles confuse downstream layout

I've used some tiles on a page (same as in the home example on gh-pages), and would now like to add untiled, normal-width content below the tiles.
I expected that just closing the div with
 would do the trick, but it's not.
I apologise in advance if this is an ignorant question, lacking the necessary CSS knowledge.
Here's the page (never mind the content)
---
layout: media
lang: en
category: teaching
permalink: /teaching/
trans: /lehre/
title: Teaching
share: false
tagline: PhD student in Bremen, Germany
tags:
- about
image:
  feature: https://dl.dropboxusercontent.com/u/5341489/images/Max/jacobs-teaching-gesture_SMALL.jpg
  caption:
  captionlink:
  credit: Jacobs University Bremen
  creditlink: http://www.jacobs-university.de
  location:
  locationlink:
---

I enjoy teaching tremendously — and for selfish reasons, too:
I've noticed that I only *really* understood a subject (or someone else's understanding of it) if I have taught a class on it.
I like it:

Interdisciplinary

Crossing disciplinary borders and venturing applications can deepen understanding, strengthen relevance and forge synthesis — but a rigorous foundation in a discipline always comes first.

    E-Democracy

Interactive

Meaningful visualizations, vibrant virtual and real discussion and the occasional movie segment can make teaching more effective, accessible and fun — but in technology and format, as elsewhere, form follows function.
    That said, I think some great new technology (such as Github and other social media isn't used enough in classrooms, and I expect my students to be(come) reasonably savvy with it.

     German Politics and Culture

In Writing (or Code)

An idea does not exist independent of its written expression.
    Intensive reading and writing are hard, ideally deliberate practice for both teacher and student — but for the social sciences, at least, there are only very poor substitutes.

     Emile

In Service

Perhaps in the spirit of public sociology, student work can also engage and serve a wider audience of fellow citizens.
    Such purpose can focus attention and — as academics know — it's also motivating to write for actual readers.

     Samuelson

RateMyProfessors.com MeinProf.de

Check out my evaluations on teacher rating sites:

This is what it looks like:

I'd like the stuff circled in red to begin a new "line" instead, not fill in the short tiles.

again, I took out the right panel as per #54, hope that doesn't screw things up.

The tile modules were developed for the archive layouts, that's why they're broken on this page with the media layout. I haven't fleshed them out to be used everywhere so you'll need to do some work to get them looking right.
It's likely related to thin gray line in your other issue and probably needs to clear the floats set on the tiles.

thanks. I've no switched the page to the archive layout, and gotten rid of the thin gray line in #59, but the layout is still out of whack as in the above (changing the layout between article, archive or media doesn't change anything).
Could you point me to the place, where I'd need to adjust (clear the floats) this?

Is the repo public somewhere? It's hard to troubleshoot CSS issues without seeing it in action.
Tiles really aren't all that portable at the moment and only work in the archive examples I include with the starter. Same goes for the home splash page stuff. I built that for the demo and haven't really documented it since it's not at all ready for use. Unless you're comfortable hacking away at the CSS to make things work.

Sorry, the website is public at http://www.maxheld.de and the repo at https://github.com/maxheld83/maxheld83.github.io.
I've switched all the sites with tiles to archive, but that hasn't solved the problem.
I'm also staying away from the home layout as you advised (for now).
I might be wrong, but it seems to me that the problem not only affects manual tiles stuff (as in the splash page), but also tiles created by {% include post-grid.html %} .
Like in the below:
### Recently

{% for post in site.posts limit:4 %}
  {% include post-grid.html %}
{% endfor %}

Lirum larum

I would expect that the Lirum larum starts a completely new line after the grid, but that isn't so.

I understand that the tiles functionality is undocumented but would appreciate any pointer as to where to start to fix this problem.
Guess I really have to learn CSS.

Couple of things going on here you can fix.
The Recently
 heading needs clear: both; on it to clear the tiles above.
Secondly. The tiles after the heading need to be wrapped in a
` which should help with any other issues.

Third. "Lirum larum" needs a clear on it too. If you're not already using browser Dev Tools I strongly encourage you to. I was able to do all of these edits in browser to figure out the issues. It's a good way to troubleshoot before messing with your actual stylesheets and layouts.

The better solution would be to add a clearfix to .tiles so it auto clears an elements that come before or after it. I can't remember if I included a Sass mixin to do it, but if not check out this blog post on the details.

fantastic, thanks so much.
And yes, you did include a mixin to that effect, it's in (ships with?) /bourbon/addons:
@mixin clearfix {
  &:after {
    content:"";
    display:table;
    clear:both
  }
}

Here's what I ended up doing to solve my problem:

Wrap all post grids in tiles

{% for post in site.posts limit:4 %}
  {% include post-grid.html %}
{% endfor %}

Declare and add a clearfix class to be used along with tiles

appended to _tiles.scss
.clearfix {
  @include clearfix;
}

and then called whenever I use the tiles class:

...

At this point in my CSS learning curve, I'm sort of like a chimp who randomly bangs away at the keyboard and sometimes, by random chance, finds something that works, so this is probably somehow egregiously stupid, but it get's the job done.
Thanks for the pointers!
Will start using browser debug.


Dynamic route with . (dot) does not work

Hello,
The following structure doesn't not work when you input URL in the address bar:
/
+-pages
 +- versions/
   +- [ver].vue

On router.push(/versions/02.00.00), it works.
however if I input http://<IP_ADDRESS>:3000/versions/02.00.00 in address page or I refresh the page, I have a black page.
If I input http://<IP_ADDRESS>:3000/versions/02 in address bar it works.
Have you any clues ?

Try this --> https://www.npmjs.com/package/vite-plugin-rewrite-all

Looks like this is a problem with vue-router, is better to open issue there instead of here, I will close this for now.


feat: replace ENABLE_RBF_NO_LOCKTIME with ENABLE_LOCKTIME_AND_RBF

follow up https://github.com/rust-bitcoin/rust-bitcoin/pull/3455.
Replace all ENABLE_RBF_NO_LOCKTIME(deprecated) with ENABLE_LOCKTIME_AND_RBF

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

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 82.657%

Totals

Change from base Build<PHONE_NUMBER>5:
0.0%

Covered Lines:
19126

Relevant Lines:
23139

💛  - Coveralls

Thanks man.


[BUG] ModuleNotFoundError: No module named 'torch._six'

Bug description
When trying to import torchdistill.core.forward_hook with an up-to-date version of pytorch, you get ModuleNotFoundError: No module named 'torch._six' error.
To Reproduce

Exact command to run your code: import torchdistill.core.forward_hook
Whether or not you made any changes in Python code (if so, how you made the changes?): Did not make changes.
YAML config file - not relevant.
Log file - not relevant.

Expected behavior
The import should succeed without errors.
Environment:

OS: Ubuntu 22.04 LTS
Python ver. 3.12.2
torchdistill ver. v0.3.3
torch ver. v2.2.1

Additional context
Related to this change in pytorch: https://github.com/pytorch/pytorch/pull/94709
Apparently string_classes is no longer needed and str can be used instead.

Hi @nirgoren ,
You're an old version of torchdistill. It is already resolved in torchdistill v1.0.0

Hi @nirgoren ,
You're an old version of torchdistill. It is already resolved in torchdistill v1.0.0

I see. Note that pip automatically downloaded v0.3.3 for me due to having torch v2.2.1 installed and v1.0.0 of torchdistill requiring a version of torch that is <=2.1.0. It would be nice to have compatibility with the latest version of torch, if that doesn't cause any issues.

You could still use torchdistill v1.0.0 with the latest torch if you force-install torchdistill though I've not tested it.
From torchdistill v1.0.0, I started specifying min/max versions of key requirements to avoid the same mistakes as the old torchdistill had e.g., torchdistill v0.3.3.
Next release of torchdistill with the latest torch support is around the corner, probably next week. Stay tune!


AttributeError: module 'jaxlib.pocketfft' has no attribute 'pocketfft'

Traceback (most recent call last):
File "D:/VS/python/nerfies-main/train.py", line 23, in
from flax import jax_utils
File "D:\RJ\A\python3.8\lib\site-packages\flax_init_.py", line 36, in
from . import core
File "D:\RJ\A\python3.8\lib\site-packages\flax\core_init_.py", line 15, in
from .axes_scan import broadcast
File "D:\RJ\A\python3.8\lib\site-packages\flax\core\axes_scan.py", line 17, in
import jax
File "D:\RJ\A\python3.8\lib\site-packages\jax_init_.py", line 109, in
from .experimental.maps import soft_pmap
File "D:\RJ\A\python3.8\lib\site-packages\jax\experimental\maps.py", line 25, in
from .. import numpy as jnp
File "D:\RJ\A\python3.8\lib\site-packages\jax\numpy_init_.py", line 16, in
from . import fft
File "D:\RJ\A\python3.8\lib\site-packages\jax\numpy\fft.py", line 17, in
from jax.src.numpy.fft import (
File "D:\RJ\A\python3.8\lib\site-packages\jax_src\numpy\fft.py", line 19, in
from jax import lax
File "D:\RJ\A\python3.8\lib\site-packages\jax\lax_init.py", line 332, in
from jax._src.lax.fft import (
File "D:\RJ\A\python3.8\lib\site-packages\jax_src\lax\fft.py", line 145, in
xla.backend_specific_translations['cpu'][fft_p] = pocketfft.pocketfft
AttributeError: module 'jaxlib.pocketfft' has no attribute 'pocketfft'

Hi, I met the same error with you. Did you fix it?

me too


ResolveComReferencesDesignTime target not found after editing project

VS: d15prerel 26005.5

Create a new .NET Core console app
Edit the project in the editor (while the project remains open)
Change TargetFramework property to TargetFrameworks (add an 's') and add ;net45 to the value.
Add Condition=" '$(TargetFramework)' == 'netcoreapp1.0' "  to the two package references.
Save

Expected
The project picks up the change immediately.
Actual
If you Reload the project (#880) you'll likely see errors in the error list about missing targets. I first saw one about ResolveComReferencesDesignTime being missing.
But right now I see this one:

Severity
Code
Description
Project
File
Line
Suppression State

Error
MSB4057
The target "ResolvePackageDependenciesForBuild" does not exist in the project.
ConsoleApp6
C:\Program Files (x86)\Microsoft Visual Studio\2017\d15prerel\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets
1871

If you condition out the Microsoft.NET.Sdk package, you're conditioning out the mechanism that (in that very-slightly-old build) provides that target.
In the latest builds, the targets will be provided by imports from the Sdk attribute on the project rather than a NuGet PackageReference, so you won't be able to create this situation.
For now, just don't condition out the Sdk.

This should be fixed in latest builds because the SDK will always be there. Please reopen if you see this still.

This looks to be actual dupe of https://github.com/dotnet/roslyn-project-system/issues/1479#issuecomment-278771305


Fix/closegocache

Codecov Report
All modified lines are covered by tests :white_check_mark:

Comparison is base (35e5f1f) 77.73% compared to head (5f98d19) 77.65%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3007      +/-   ##
==========================================
- Coverage   77.73%   77.65%   -0.09%
==========================================
  Files         642      647       +5
  Lines       54400    54587     +187
==========================================
+ Hits        42289    42390     +101
- Misses       9978    10049      +71
- Partials     2133     2148      +15

Flag
Coverage Δ

go-1.18-386
77.67% <ø> (-0.01%)
:arrow_down:

go-1.18-amd64
?

go-1.19-386
77.63% <ø> (?)

go-1.21-386
?

go-1.21-amd64
77.64% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 10 files with indirect coverage changes

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


Documents are not populated when running graphql-shield, thus leading to undefined permission errors.

Question about GraphQL Shield
I am using mongoose with graphql via graphql-compose-mongoose with a schema that has nested relational documents. To populate the document for a query I have provided relation methods via addRelation, which works in the absence of graphql-shield permissions, but encounters an _id undefined error when using permissions - presumably because the graphql-shield middleware runs before the documents can be populated?
I have provided a minimal working example below. My question is how can I get this to work?
import { Schema, Document, model, Types } from 'mongoose';
import { composeMongoose } from 'graphql-compose-mongoose';
import { SchemaComposer } from 'graphql-compose';
import { applyMiddleware } from 'graphql-middleware';
import { shield, allow } from 'graphql-shield';

// Mongoose models
export interface Ingredient extends Document {
    name: string;
}

const ingredientSchema = new Schema<Ingredient>({
    name: { type: String, required: true, unique: true },
});

export interface RecipeIngredient extends Document {
    ingredient: Types.ObjectId;
    quantity: number;
}
const recipeIngredientSchema = new Schema<RecipeIngredient>({
    ingredient: { type: Schema.Types.ObjectId, refPath: 'Ingredient', required: true },
    quantity: { type: Number, required: true },
});

export interface Recipe extends Document {
    title: string;
    ingredients: RecipeIngredient[];
}

const recipeSchema = new Schema<Recipe>({
    title: { type: String, required: true },
    ingredients: {
        type: [{ type: recipeIngredientSchema }],
        required: true,
    },
});

export const Ingredient = model<Ingredient>('Ingredient', ingredientSchema);
export const IngredientTC = composeMongoose(Ingredient);
export const RecipeIngredient = model<RecipeIngredient>('RecipeIngredient', recipeIngredientSchema);
export const RecipeIngredientTC = composeMongoose(RecipeIngredient);
export const Recipe = model<Recipe>('Recipe', recipeSchema);
export const RecipeTC = composeMongoose(Recipe);

RecipeIngredientTC.addRelation('ingredient', {
    resolver: () => IngredientTC.mongooseResolvers.findById(),
    prepareArgs: {
        _id: (source) => source.ingredient._id,
    },
    projection: { ingredient: true },
});

// GraphQL resolvers
export const IngredientQuery = {
    ingredientById: IngredientTC.mongooseResolvers.findById(),
    ingredientByIds: IngredientTC.mongooseResolvers.findByIds(),
    ingredientOne: IngredientTC.mongooseResolvers.findOne(),
    ingredientMany: IngredientTC.mongooseResolvers.findMany(),
};
export const RecipeQuery = {
    recipeById: RecipeTC.mongooseResolvers.findById(),
    recipeByIds: RecipeTC.mongooseResolvers.findByIds(),
    recipeOne: RecipeTC.mongooseResolvers.findOne(),
    recipeMany: RecipeTC.mongooseResolvers.findMany(),
};

// GraphQL shield
export const permissions = shield({ Query: { recipeById: allow } }, { allowExternalErrors: true });

const schemaComposer = new SchemaComposer();
schemaComposer.Query.addFields({
    ...IngredientQuery,
    ...RecipeQuery,
});

export const schema = applyMiddleware(schemaComposer.buildSchema(), permissions);

"""GraphQL Query"""
query ExampleQuery($recipeId: MongoID!) {
  recipeById(_id: $recipeId) {
    _id
    ingredients {
      _id
      quantity
      ingredient {
        _id
        name
      }
    }
  }
}

Here is the output for said query:
{
  "data": {
    "recipeById": {
      "_id": "655bf525063f734161299e59",
      "ingredients": [
        {
          "_id": "655bf525063f734161299e5a",
          "quantity": 1,
          "ingredient": null
        }
      ]
    }
  },
  "errors": [
    {
      "message": "Cannot read properties of undefined (reading '_id')",
      "locations": [
        {
          "line": 7,
          "column": 7
        }
      ],
      "path": [
        "recipeById",
        "ingredients",
        0,
        "ingredient"
      ],
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "stacktrace": [
          "TypeError: Cannot read properties of undefined (reading '_id')",
          "    at _id (file:///graphql-shield-example/dist/schema.js:29:44)",
          "    at graphql-shield-example/node_modules/graphql-compose/lib/ObjectTypeComposer.js:1076:36",
          "    at Array.forEach (<anonymous>)",
          "    at resolve (graphql-shield-example/node_modules/graphql-compose/lib/ObjectTypeComposer.js:1075:25)",
          "    at file:///graphql-shield-example/node_modules/graphql-middleware/dist/applicator.mjs:5:112",
          "    at middleware (file:///graphql-shield-example/node_modules/graphql-shield/esm/generator.js:27:30)",
          "    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"
        ]
      }
    },
  ]
}

[x] I have checked other questions and found none that matches mine.

@benfliu I can't remember exactly my reasoning, but looking at the project I was trying to use this in: I ended up not using graphql-shield and instead implemented my own permission guards via GraphQL-Tools resolver composition, which was pretty straight forward and didn't run into this error.

Got it! Thanks Matthew. Coming to a similar conclusion myself. Thought this library would save me time but looks like it might be more of a hassle than it's worth given this weird interaction


Troubleshooting Page

Hi, is there an online test page (like WebRTC Troubleshooter) which includes the webrtc-adapter and can be used to test it's compatibility in real browsers?

WebRTC troubleshooter does use webrtc-adapter but not with the purpose of testing communicability per see.
Also all the tests run automatically in Chrome and Firefox since they are easy to test on Travis. Edge and Safari (they are a bit trickier since they require specific OS's) could be tested using Travis and Browserstack together but we do not have the resources to maintain that kind of infra right now.
There is also https://github.com/webrtc/KITE but be warned it's a huge E2E test framework, it does use AppRTC which also uses webrtc-adapter.


Provide a test case for #6826

What kind of change does this PR introduce? (check at least one)

[ ] Bugfix
[ ] Feature
[ ] Code style update
[ ] Refactor
[ ] Build-related changes
[x] Other, please describe:

Provide a test case for the bug #6826
Does this PR introduce a breaking change? (check one)

[ ] Yes
[x] No

If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:

[x] It's submitted to the dev branch for v2.x (or to a previous version branch), not the master branch
[ ] When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
[ ] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
[x] New/updated tests are included

If adding a new feature, the PR's description includes:

[ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

The same of #6826


avatar, button, and card examples.  changed package name.  Updated sc…

…ript to run styleguide from root package

REVIEW PLS,
This push includes the new style guide with examples for Avatar, Button, Card.
Test to make sure you can pull down the branch, and start the styleguide server with the following commands:
npm install
npm run bootstrap
npm run styleguide

There aren't many issues aside from the dropdown comment mentioned.  The styleguide looks straight forward and aside from updating all of the readme doc it look good.

I will also note the branch did work when I started from a fresh clone of react-atlas.  The npm run bootstrap job did not work in an old clone of the repo.

The dropdown isn't finishedonoy avatar, card, and button are the only ones that have been successfully migrated.


feat: introduce address override

This is a feature I've been wanting for a while that helps with debugging and can be used to bypass DNS censorship.

Comments addressed.
On the naming, it means "address override". We can override the host or the port, so names with "domain" or "host" are not the right scope. "Resolve" also doesn't apply, since we can override the host with a domain.
I thought about using "map", but there's no key to lookup. Perhaps set. It would look like one of these:

override:host=cloudflare.net
set:host=cloudflare.net

override is more specific, since it carries the semantics that an address already exists.

Comments addressed.
On the naming, it means "address override". We can override the host or the port, so names with "domain" or "host" are not the right scope. "Resolve" also doesn't apply, since we can override the host with a domain.
I thought about using "map", but there's no key to lookup. Perhaps set. It would look like one of these:

override:host=cloudflare.net
set:host=cloudflare.net

override is more specific, since it carries the semantics that an address already exists.

What I'm worried about the naming override is what if we would have more stuffs to override in the future (for example, cipher override), shall we put more parameters to override (i.e. override:cipher=xxx&host=yyy), or shall we name it to be a more specific override (i.e. cipher-override, address-override)?

This is a Dialer specification. The only thing a Dialer sees is an address, so there won't be a need to specify other overrides, unless we introduce some sort of modifier, but that's a whole can of worms.


Drop the "aggregation_info" table

The aggregation_info table was used for automatically generating the delete and envleope functions for citydb v4. Since we have a relatively generic database schema in v5 and introduced the table feature_hierarchy,  we can also write a generic delete and envelope function and do not need the aggregation_info table anymore.

I think we don't need to create feature_hierarchy table, because we already defined feature-to-feature relations at the beginning of discussions about new database schema. At first stage, it was in feature_relation table, then we decided to move the data from feature_relation table into property table. So, i guess creating feature_hierarchy table will be only helpful for storing "isPartOf" (or Contains) type relation. By the way, if we decide to add namespace and name columns to feature_hierarchy table, then it will turn into again to feature_relation table, which is already capable of representing any type of hierarchical or bi-directional relation. What i am trying to explain is they looks very similar with feature_relation table.
On the other hand, if we need envelope/aggregation functions for geometries/solids, i think we can re-evaluate the aggregation capability of postgis spatial functions (such as st_envelope or other Boundary Box functions), because i know some of them works very efficiently with spatial indexes (at least for 2D geometries, i am not sure about indexing performance of 3D geometries).
One more thing, if we really need to store automatically generated envelopes, boundary boxes or just feature aggregations, we should discuss about creating "materialized views", because they are not real data and can still efficiently response to queries. Of course we should investigate "Refresh Method" of materialized views before queries or after inserts.

The aggregation_info table in v4 is a pure metadata table storing the type of associations between UML classes and, thus, on an abstract schema level. As @yaozhihang wrote, this information is required in v4 to be able to automatically generate the del_* and env_* functions especially for ADEs. The feature_hierarchy table has a different scope as it stores the concrete hierarchy relations between features.
The question in this issue is whether we still need  aggregation_info. The idea (hope) is that we do not need to generate del_* and env_* functions anymore as we do it in v4, but that we can provide one function for each use case because the schema in v5 is much more generic. This new delete function could still query the feature_hierarchy table, for example, to decide whether a child of a given feature should be deleted as well (a child should not be deleted, for instance, if it is a top-level feature).
This dicussion about envelope/aggregation functions for geometry or materialed views is therefore out-of-scope. The aggregation_info table has been deleted for v5 alpha for the given reasons. So, closing this issue.


fix(governance): ensuring eagerconnect does not block loading of the app

Related issues 🔗
Closes #4896
Description ℹ
Governance was waiting for eagerconnect to complete before proceeding with loading of the app. If a wallet (eg CLI) was locked, the wallet would be prompting the user to connect, but the app was hanging, leading to confusion.
This change ensure the app doesn't hang, and if the user doesn't notice the connection prompt, everything works fine. They can still connect their wallet at a later point.

Closing this PR, will merge in the PR to main then merge that back to develop.


[Event Hubs] Batch Receive or flow control on event processor host

Is your feature request related to a problem? Please describe.
When using EPH it is possible to get into a situation where an earlier message never finished processing but a later message does and successfully checkpoints. If the service dies at this point, upon restarting the EPH messages will start from this later offset even though the earlier message was never successful.
I wrote some sample code I'm happy to share to demonstrate this where I send 11 messages, allow all but 1 in the middle and the latest one to checkpoint. Then upon restarting I see message 11 but my message 6 for example never got to process (i.e. due to a longer processing time).
Describe the solution you'd like
I'm sure there are a bunch of different possible solutions here for example a batch mechanism would allow me to receive those 10 messages as a batch and checkpoint sequentially or checkpoint the latest only if all 10 succeed.
Otherwise possibly some flow control to not send events for all 10 messages until earlier ones checkpoint successfully (of course configuration might need to be applied here or different methods of consumption).
If there are already ways to handle this situation I haven't thought about that would be even better.

Thank you for opening this issue! We are routing it to the appropriate team for follow up.
CC: @ramya-rao-a, @AlexGhiondea

Thanks for reporting @elvinm and apologies for the delay in response
Event if the current model that uses callbacks is updated to return batches of events instead of single events, we would still have the same problem because the callback for the second batch will not wait for the first batch to complete.
What we need here is newer apis that would let you wait until the current event or batch of events are processed before proceeding to the next
The api to work in batches is available in the underlying library @azure/event-hubs which you can try. But you will have to maintain checkpoints at your end if you use this library instead of EPH.
We will keep this issue open for tracking to add the same feature to EPH

Just wanted to check in on this. Are there any plans for adding this pattern to the JS EPH implementation? Without it there's no way for us to control concurrency/rate limit or guarantee at least once delivery.

We are currently working on previews for the next version of the EventHubs library where we will be providing the same EPH support with back pressure such that a callback for the next batch of events will not be called unless the previous call to the callback finished.
By next month, we will have a preview out with the above feature. I'll post an update here then

Hello all,
We have come a long way working on the next version of the Event Hubs library.
We are still in preview, but would like your thoughts and feedback on the new model.
Please checkout v5.0.0-preview.6 of the Event Hubs library. Below are some useful links to get started

Package (npm)
Readme
API Reference Documentation
Samples

One more point, the capabilities of the older Event Processor Host is now folded into the main Event Hubs library. See the sample for receiving events with load balanced for details

Update:
We have released another version of the Event Hubs library, please checkout the version 5.0.0-preview.7.
It has small API changes from the previous version
We will keep this issue open until the above library moves out of the preview state


provide a way to lock edge module images after successful push to Azure Container Registry

We use gitversion to generate build number during build of iot edge modules and this same build number is assigned to the image tag. Sometimes, an incorrect configuration for gitversion.yml causes the same build number to be generated for a different commit. By default, Azure Container Registry allows the same image tag to be re-used by a new image hash, essentially the same image is updated. To prevent this situation from happening, it would be good to provide a Lock image after push checkbox in the Azure Iot Edge task when action is push module images . This will prevent future builds that generate duplicate tags from being able to overwrite existing images. I thought locking a repo would do the trick but as it turns out, it also prevents me from being able to push a new image with new tag onto that repo. There does not seem to be an option specified at the repo level to be able to prevent existing tags from being updated. It is very tedious to lock images after the fact since it can only be done one tag at a time per repo.

Hi @tristanbarcelon
To prevent pushing to an existing image, you can refer following documents:
For Azure Container Registry: https://docs.microsoft.com/en-us/azure/container-registry/container-registry-image-lock
For Docker Hub: https://docs.docker.com/ee/dtr/user/manage-images/prevent-tags-from-being-overwritten/
The goal of Azure IoT Edge push module images task is to help you push all images for your IoT Edge solution. Since different container registry has different ways to manage the policies to images, it would be better to prevent pushing to an existing image through each container registry's setting independently.

Hi @blackchoey ,
I used the same commands from the link you provided to lock specific images in Azure Container registry. Unfortunately, I had to issue these commands after the build pipeline has already completed and not during. It uses the Azure Iot Edge azdo task below.

This task already has all the information about:

container registry name
azure subscription
all the container images that were just built and how to push them based on the Container registry type.

Given everything that it already knows, wouldn't it be possible to enable the ability to lock images when type = Azure Container Registry?
The alternative for me would be to write a script that would run after the Azure Iot Edge publish step and:

parse the deployment.template.json and to find all the repo names and tags
issue az acr repository update --name <registryname> --image <myrepo>/<myimage>:<tag> --write-enabled false command for each and every image that was just uploaded

@tristanbarcelon The Azure CLI task will do the login and set subscription steps for you. You just need to select the Azure Subscription connection that stores your image. No need to store the subscription info as variables in your pipeline.
In the meanwhile, it's better to have the lock images task as a separate step so you can compose each kind of tasks according to your actual requirement. Providing image locking feature with enough flexibility in the push task will make the task too complicated. We expect the task do one thing and do it well.

Hi @blackchoey, is there an easy method for finding all the container images that have just been built and pushed by the Azure Iot Edge tasks without writing code that knows how to parse deployment.template.json? Most of our container images have an image property defined as a variable: ${MODULES.<module_name>.amd64}. I would prefer to call the acr api for locking images while looping through the images that have just been pushed.

You don't need to parse the deployment.template.json. The image tag is defined in the repository property in module.json of each module, the task will expand the environment variables in repository property and append the platform as postfix.


Fails on 'attributes' key?

This seems to fail on the following at the bottom of resources/lang/en/validation.php when running translator:load:
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap attribute place-holders
| with something more reader friendly such as E-Mail Address instead
| of "email". This simply helps us make messages a little cleaner.
|
*/

'attributes' => [],

The value 'Array' is inserted into the database for this key and the following error is thrown:
[ErrorException]
preg_replace(): Parameter mismatch, pattern is a string while replacement is an array

Of course, this value can just be removed, but if this is included by default it seems as though it should be able to be handled?

Hi jfi,
I've tested it out and the latest version (<IP_ADDRESS> and onwards) doesn't load empty arrays into the DB. Could you make sure you're on the latest version?


Extend spo list set, closes #3678

Extend spo list set. Closes #3678
I've added the options title and url for initiating the command. I've changed the existing option title to newTitle and changed this in the body which will be sent to the SP API.
I've also updated the validators to check whether any of the three values (id, title or url) is filled in and whether multiple are filled in. If this is the case, an error will be thrown. I've also updated the specs in the documentation.
I've also changed all the tests to run async

Thank you @MathijsVerbeeck
We'll review it ASAP!

 Could you please clean up your working branch before we review it? If it's too hard, you can also close this PR and open a new one. Thanks!

You'd need to hard reset your local v6 to upstream (git reset upstream/v6 --hard) and then rebase your working branch with git checkout extend-spo-list-set followed by git rebase v6. Let me know if this helps.

@waldekmastykarz Seems like the issue has been resolved! Thanks for the assistance.

@Adam-it I've noticed that this PR too looks kinda messed up (Not sure why). I've tried doing the same as I've done earlier (fetch upstream, checkout v6, reset --hard, change to branch and rebase, but I've got numerous errors making it really hard to resolve them.
If you want me to make another branch based on the latest version of the V6 branch containing my changes, feel free to give me a shout.

@Adam-it I've noticed that this PR too looks kinda messed up (Not sure why). I've tried doing the same as I've done earlier (fetch upstream, checkout v6, reset --hard, change to branch and rebase, but I've got numerous errors making it really hard to resolve them.
If you want me to make another branch based on the latest version of the V6 branch containing my changes, feel free to give me a shout.

@MathijsVerbeeck sorry to hear you are having trouble because of our merging process 😔🙏.
If I remember correctly if we do something like
# fetch changes
git fetch

# reset local copy of v6 to the upstream version
git checkout v6
git reset origin/v6 --hard

# rebase the single latest commit of my feature branch on top of the new v6
git checkout my-v6-feature-branch
git rebase --onto v6 extend-spo-list-set~1 extend-spo-list-set

# and force push to update the remote
git push --force

it should do the trick 🤔 but if you are having a lot of merge conflicts along the way it might be easier to create a new branch from latest v6 and just cherry pick your commits from this one to include your changes 🙂 and open a new PR.
Please feel free to try/do whatever is more convenient for you 👍
thank you for your awesome work 💪 you rock 🤩 as always 🙂.

also please add v6 in all PRs that target v6 🙂

@Adam-it I've tried these steps, as I've already had this issue in the past and that indeed solved the issue. In this case however it doesn't appear to do the trick and I have to resolve numerous files. I'll recreate the PR and tag you in the new one!

@Adam-it Please view the PR #3874


Synthesis failed for java-asset

Hello! Autosynth couldn't regenerate java-asset. :broken_heart:
Here's the output from running synth.py:
ransforms.py", line 208, in move
    f"No files in sources {sources} were copied. Does the source "
synthtool.transforms.MissingSourceError: No files in sources [PosixPath('/tmpfs/tmp/tmpb1adl121/google-cloud-asset-v1-java/gapic-google-cloud-asset-v1-java/src')] were copied. Does the source contain files?
2020-07-16 14:48:31,876 autosynth [ERROR] > Synthesis failed
2020-07-16 14:48:31,876 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at d36ee98 chore(deps): update dependency com.google.cloud:libraries-bom to v8.1.0 (#262)
2020-07-16 14:48:31,883 autosynth [DEBUG] > Running: git checkout autosynth-googleapis
Switched to branch 'autosynth-googleapis'
2020-07-16 14:48:31,890 autosynth [ERROR] > Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.
2020-07-16 14:48:32,032 autosynth [DEBUG] > Running: git checkout d36ee982ee61d6496c96f1401cd2cb84cb3f22cb
Note: checking out 'd36ee982ee61d6496c96f1401cd2cb84cb3f22cb'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at d36ee98 chore(deps): update dependency com.google.cloud:libraries-bom to v8.1.0 (#262)
2020-07-16 14:48:32,038 autosynth [DEBUG] > Running: git checkout 21f1470ecd01424dc91c70f1a7c798e4e87d1eec
Previous HEAD position was d53e4b7 fix: set idle timeout for bazel to 240 seconds (#653)
HEAD is now at 21f1470 chore: add config files for cloud-rad for node.js (#667)
2020-07-16 14:48:32,046 autosynth [DEBUG] > Running: git checkout b56aa06cc99050861c9a9b14d9569bd18eb09604
HEAD is now at b56aa06c feat: Adds AuditLog proto for reading IAM admin logs.
2020-07-16 14:48:32,060 autosynth [DEBUG] > Running: git branch -f autosynth-73
2020-07-16 14:48:32,064 autosynth [DEBUG] > Running: git checkout autosynth-73
Switched to branch 'autosynth-73'
2020-07-16 14:48:32,069 autosynth [INFO] > Running synthtool
2020-07-16 14:48:32,070 autosynth [INFO] > ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']
2020-07-16 14:48:32,070 autosynth [DEBUG] > log_file_path: /tmpfs/src/logs/java-asset/73/sponge_log.log
2020-07-16 14:48:32,072 autosynth [DEBUG] > Running: /tmpfs/src/github/synthtool/env/bin/python3 -m synthtool --metadata synth.metadata synth.py --
2020-07-16 14:48:32,277 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/java-asset/synth.py.
On branch autosynth-73
nothing to commit, working tree clean
2020-07-16 14:48:32,429 synthtool [DEBUG] > Ensuring dependencies.
2020-07-16 14:48:32,440 synthtool [DEBUG] > Cloning googleapis.
2020-07-16 14:48:32,441 synthtool [DEBUG] > Using precloned repo /home/kbuilder/.cache/synthtool/googleapis
2020-07-16 14:48:32,445 synthtool [DEBUG] > Generating code for: //google/cloud/asset/v1:google-cloud-asset-v1-java.
2020-07-16 14:48:34,277 synthtool [SUCCESS] > Generated code into /tmpfs/tmp/tmpm9trheyr.
2020-07-16 14:48:34,278 synthtool [WARNING] > No replacements made in [PosixPath('/tmpfs/tmp/tmpm9trheyr/google-cloud-asset-v1-java/proto-google-cloud-asset-v1-java/src/**/*.java')] for pattern // Generated by the protocol buffer compiler.  DO NOT EDIT!, maybe replacement is no longer needed?
2020-07-16 14:48:34,282 synthtool [WARNING] > No replacements made in [PosixPath('/tmpfs/tmp/tmpm9trheyr/google-cloud-asset-v1-java/proto-google-cloud-asset-v1-java/src/**/*Name.java'), PosixPath('/tmpfs/tmp/tmpm9trheyr/google-cloud-asset-v1-java/proto-google-cloud-asset-v1-java/src/**/*Names.java')] for pattern /\*
 \* Copyright \d{4} Google LLC
 \*
 \* Licensed under the Apache License, Version 2.0 \(the "License"\); you may not use this file except
 \* in compliance with the License. You may obtain a copy of the License at
 \*
 \* http://www.apache.org/licenses/LICENSE-2.0
 \*
 \* Unless required by applicable law or agreed to in writing, software distributed under the License
 \* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 \* or implied. See the License for the specific language governing permissions and limitations under
 \* the License.
 \*/
, maybe replacement is no longer needed?
2020-07-16 14:48:34,282 synthtool [WARNING] > No replacements made in [PosixPath('/tmpfs/tmp/tmpm9trheyr/google-cloud-asset-v1-java/grpc-google-cloud-asset-v1-java/src/**/*.java')] for pattern ^package (.*);, maybe replacement is no longer needed?
2020-07-16 14:48:34,283 synthtool [DEBUG] > Wrote metadata to synth.metadata.
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/kbuilder/.cache/synthtool/java-asset/synth.py", line 28, in <module>
    bazel_target=f'//google/cloud/{service}/{version}:google-cloud-{service}-{version}-java',
  File "/tmpfs/src/github/synthtool/synthtool/languages/java.py", line 318, in bazel_library
    destination_name=destination_name,
  File "/tmpfs/src/github/synthtool/synthtool/languages/java.py", line 193, in _common_generation
    required=True,
  File "/tmpfs/src/github/synthtool/synthtool/transforms.py", line 208, in move
    f"No files in sources {sources} were copied. Does the source "
synthtool.transforms.MissingSourceError: No files in sources [PosixPath('/tmpfs/tmp/tmpm9trheyr/google-cloud-asset-v1-java/gapic-google-cloud-asset-v1-java/src')] were copied. Does the source contain files?
2020-07-16 14:48:34,338 autosynth [ERROR] > Synthesis failed
2020-07-16 14:48:34,338 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at d36ee98 chore(deps): update dependency com.google.cloud:libraries-bom to v8.1.0 (#262)
2020-07-16 14:48:34,345 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-07-16 14:48:34,351 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Traceback (most recent call last):
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 367, in synthesize_loop
    synthesize_inner_loop(fork, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 411, in synthesize_inner_loop
    synthesizer, len(toolbox.versions) - 1
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 266, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 657, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 506, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 637, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 375, in synthesize_loop
    synthesize_loop_single_pr(toolbox, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 401, in synthesize_loop_single_pr
    synthesize_inner_loop(toolbox, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 411, in synthesize_inner_loop
    synthesizer, len(toolbox.versions) - 1
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 266, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth is still having trouble generating java-asset. :sob:
Here's the output from running synth.py:
208, in move
    f"No files in sources {sources} were copied. Does the source "
synthtool.transforms.MissingSourceError: No files in sources [PosixPath('/tmpfs/tmp/tmp6rkhoqhw/google-cloud-asset-v1-java/gapic-google-cloud-asset-v1-java/src')] were copied. Does the source contain files?
2020-07-17 01:44:13,630 autosynth [ERROR] > Synthesis failed
2020-07-17 01:44:13,630 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at d36ee98 chore(deps): update dependency com.google.cloud:libraries-bom to v8.1.0 (#262)
2020-07-17 01:44:13,637 autosynth [DEBUG] > Running: git checkout autosynth-googleapis
Switched to branch 'autosynth-googleapis'
2020-07-17 01:44:13,643 autosynth [ERROR] > Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.
2020-07-17 01:44:13,809 autosynth [DEBUG] > Running: git checkout d36ee982ee61d6496c96f1401cd2cb84cb3f22cb
Note: checking out 'd36ee982ee61d6496c96f1401cd2cb84cb3f22cb'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at d36ee98 chore(deps): update dependency com.google.cloud:libraries-bom to v8.1.0 (#262)
2020-07-17 01:44:13,816 autosynth [DEBUG] > Running: git checkout 21f1470ecd01424dc91c70f1a7c798e4e87d1eec
Previous HEAD position was d53e4b7 fix: set idle timeout for bazel to 240 seconds (#653)
HEAD is now at 21f1470 chore: add config files for cloud-rad for node.js (#667)
2020-07-17 01:44:13,823 autosynth [DEBUG] > Running: git checkout bb46f87724ddd2fd1ce9f9dcb71f147427775592
HEAD is now at bb46f877 Adds bazel build file for public version of AuditData proto for bigquery.
2020-07-17 01:44:13,835 autosynth [DEBUG] > Running: git branch -f autosynth-74
2020-07-17 01:44:13,839 autosynth [DEBUG] > Running: git checkout autosynth-74
Switched to branch 'autosynth-74'
2020-07-17 01:44:13,844 autosynth [INFO] > Running synthtool
2020-07-17 01:44:13,844 autosynth [INFO] > ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']
2020-07-17 01:44:13,844 autosynth [DEBUG] > log_file_path: /tmpfs/src/logs/java-asset/74/sponge_log.log
2020-07-17 01:44:13,846 autosynth [DEBUG] > Running: /tmpfs/src/github/synthtool/env/bin/python3 -m synthtool --metadata synth.metadata synth.py --
2020-07-17 01:44:14,042 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/java-asset/synth.py.
On branch autosynth-74
nothing to commit, working tree clean
2020-07-17 01:44:14,171 synthtool [DEBUG] > Ensuring dependencies.
2020-07-17 01:44:14,181 synthtool [DEBUG] > Cloning googleapis.
2020-07-17 01:44:14,182 synthtool [DEBUG] > Using precloned repo /home/kbuilder/.cache/synthtool/googleapis
2020-07-17 01:44:14,186 synthtool [DEBUG] > Generating code for: //google/cloud/asset/v1:google-cloud-asset-v1-java.
2020-07-17 01:44:15,938 synthtool [SUCCESS] > Generated code into /tmpfs/tmp/tmp4y4tru79.
2020-07-17 01:44:15,939 synthtool [WARNING] > No replacements made in [PosixPath('/tmpfs/tmp/tmp4y4tru79/google-cloud-asset-v1-java/proto-google-cloud-asset-v1-java/src/**/*.java')] for pattern // Generated by the protocol buffer compiler.  DO NOT EDIT!, maybe replacement is no longer needed?
2020-07-17 01:44:15,943 synthtool [WARNING] > No replacements made in [PosixPath('/tmpfs/tmp/tmp4y4tru79/google-cloud-asset-v1-java/proto-google-cloud-asset-v1-java/src/**/*Name.java'), PosixPath('/tmpfs/tmp/tmp4y4tru79/google-cloud-asset-v1-java/proto-google-cloud-asset-v1-java/src/**/*Names.java')] for pattern /\*
 \* Copyright \d{4} Google LLC
 \*
 \* Licensed under the Apache License, Version 2.0 \(the "License"\); you may not use this file except
 \* in compliance with the License. You may obtain a copy of the License at
 \*
 \* http://www.apache.org/licenses/LICENSE-2.0
 \*
 \* Unless required by applicable law or agreed to in writing, software distributed under the License
 \* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 \* or implied. See the License for the specific language governing permissions and limitations under
 \* the License.
 \*/
, maybe replacement is no longer needed?
2020-07-17 01:44:15,943 synthtool [WARNING] > No replacements made in [PosixPath('/tmpfs/tmp/tmp4y4tru79/google-cloud-asset-v1-java/grpc-google-cloud-asset-v1-java/src/**/*.java')] for pattern ^package (.*);, maybe replacement is no longer needed?
2020-07-17 01:44:15,944 synthtool [DEBUG] > Wrote metadata to synth.metadata.
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/kbuilder/.cache/synthtool/java-asset/synth.py", line 28, in <module>
    bazel_target=f'//google/cloud/{service}/{version}:google-cloud-{service}-{version}-java',
  File "/tmpfs/src/github/synthtool/synthtool/languages/java.py", line 318, in bazel_library
    destination_name=destination_name,
  File "/tmpfs/src/github/synthtool/synthtool/languages/java.py", line 193, in _common_generation
    required=True,
  File "/tmpfs/src/github/synthtool/synthtool/transforms.py", line 208, in move
    f"No files in sources {sources} were copied. Does the source "
synthtool.transforms.MissingSourceError: No files in sources [PosixPath('/tmpfs/tmp/tmp4y4tru79/google-cloud-asset-v1-java/gapic-google-cloud-asset-v1-java/src')] were copied. Does the source contain files?
2020-07-17 01:44:15,982 autosynth [ERROR] > Synthesis failed
2020-07-17 01:44:15,982 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at d36ee98 chore(deps): update dependency com.google.cloud:libraries-bom to v8.1.0 (#262)
2020-07-17 01:44:15,989 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-07-17 01:44:15,996 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Traceback (most recent call last):
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 367, in synthesize_loop
    synthesize_inner_loop(fork, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 411, in synthesize_inner_loop
    synthesizer, len(toolbox.versions) - 1
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 266, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 657, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 506, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 637, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 375, in synthesize_loop
    synthesize_loop_single_pr(toolbox, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 401, in synthesize_loop_single_pr
    synthesize_inner_loop(toolbox, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 411, in synthesize_inner_loop
    synthesizer, len(toolbox.versions) - 1
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 266, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth passed, closing! :green_heart:


Add myself as steward for the CoC

The Contributor Covenant requires a named person for conflict resolution.
Adding myself for now, for redundancy we should have additional volunteers.

Ping


question about v1.9.4 implementation

This is NOT an issue, at least I hope it isn't, this is a question to understand what is going on.
Running dnscrypt-proxy on a raspberry pi 3 model B, using the latest build of raspbian jessie lite.
The primary program is pi-hole, witch is basically dnsmasq. I've upgraded dnsmasq from v2.72 to v2.76, as there seem to be issues with earlier versions. I used these instructions to upgrade dnsmasq, after the upgrade was completed, i removed the additional repositories, so the system is only running 1 stretch package. The system is fully upgraded.
I installed dnscrypt-proxy, using these instructions, but modified the number of resolvers, the ip addresses and the ports. To avoid listing all these files, you can download a rar file, containing the resulting files. As indicated in the wiki instructions. the service and socket files go into /lib/systemd/system, the conf file, containing the server settings goes into /etc/dnsmasq.d
I managed to get things running (some hiccups - inactive(dead)) but ended up with a working system.
So I assumed I would be using the 4 resolvers, specified in the four socket files, but when doing a dns leak test, I noticed I was using different servers all the time, not even specified in the socket files.
After some digging, I found this change document, explaining the random behaviour.
Finally, the question: How do I configure the system to use the four resolvers, specified in the socket files, and eliminate the random behaviour. I assumed it already was, because off the log entries, but the dns leak test proved me wrong :
Feb  1 06:18:21 dnsmasq[9141]: forwarded archive.raspberrypi.org to <IP_ADDRESS>
Feb  1 06:18:21 dnsmasq[9141]: forwarded archive.raspberrypi.org to <IP_ADDRESS>
Feb  1 06:18:21 dnsmasq[9141]: forwarded archive.raspberrypi.org to <IP_ADDRESS>
Feb  1 06:18:21 dnsmasq[9141]: forwarded archive.raspberrypi.org to <IP_ADDRESS>
Thank you for your time and response

ExecStart=/usr/local/sbin/dnscrypt-proxy /usr/local/etc/dnscrypt-proxy.conf
        --resolver-name=%i \
        --user=dnscrypt

This is loading a configuration file from /usr/local/etc/dnscrypt-proxy.conf.
Remove that if you just want to specify options from the command-line.

I tried removing all of it, rebooted, the instances are no longer loaded:
pi@raspberrypi:~ $ ps ax | grep dnscrypt
827 pts/0    S+     0:00 grep --color=auto dnscrypt
DNS is broken, pages no longer load
I tried removing just "/usr/local/etc/dnscrypt-proxy.conf", keep the rest, rebooted, the instances load:
pi@raspberrypi:~ $ ps ax | grep dnscrypt
589 ?        SLs    0:00 /usr/local/sbin/dnscrypt-proxy /usr/local/etc/dnscrypt-proxy.conf
590 ?        SLs    0:00 /usr/local/sbin/dnscrypt-proxy /usr/local/etc/dnscrypt-proxy.conf
593 ?        SLs    0:00 /usr/local/sbin/dnscrypt-proxy /usr/local/etc/dnscrypt-proxy.conf
594 ?        SLs    0:00 /usr/local/sbin/dnscrypt-proxy /usr/local/etc/dnscrypt-proxy.conf
866 pts/0    S+     0:00 grep --color=auto dnscrypt
The pages load now, however, the result however is the same, the random setting seems to be activated, probably a default.
The question remains: How do I configure the system to use the four resolvers, specified in the socket files, and eliminate the random behavior, automatically, no after care or command line intervention?

I think I found it, please confirm. It should read (backslash at he end)
ExecStart=/usr/local/sbin/dnscrypt-proxy \
	--resolver-name=%i \
	--user=dnscrypt

Yes, that should do it.
Sorry, I don't know anything about pi-hole and I don't even have the hardware to install it.


Function not implemented in Windows?

fn main() -> std::io::Result<()> {
	for entry in std::fs::read_dir("/")? {
		println!("{}", entry?.path().display());
	}
	Ok(())
}

This is a source code first mentioned in wasmtime issues NO.2618.
Steps to Reproduce
rustup target add wasm32-wasi
cargo build --target wasm32-wasi
iwasm --dir=. demo.wasm

And I got the following error.
Error: Os { code: 52, kind: Unsupported, message: "Function not implemented" }

My test platform is Windows, but when I test on Ubuntu, I get no errors.

[demo.zip](https://githu@wenyongh .com/bytecodealliance/wasm-micro-runtime/files/9141131/demo.zip)
@wenyongh

@abc767234318 The issue is because that in Windows, we use uvwasi library to support the libc-wasi feature, and the uvwasi doesn't support wasi_fd_readir in Windows and Android:
https://github.com/nodejs/uvwasi/blob/main/src/uvwasi.c#L1417-L1418
https://github.com/nodejs/uvwasi/blob/main/src/uvwasi.c#L16-L18
Other runtime should also run failed in Windows if it uses uvwasi library. It is a little complex to fix wasi_fd_read by ourselves, we had better wait some time to see whether uvwasi will fix it. Thanks.

Thanks a lot !


Rating buttons now display when dark theme is on Closes #51

The rating buttons weren't displaying in playlist view when the dark theme was turned on. This appears to fix it. It looks like the css property being set was overwriting the background image used to display the buttons.
This seemed like a really easy fix once I found what to change, so I'm skeptical as to whether or not this is the best way to fix it.

If it works, it works...
I've had issues exactly like this in the theme before where background overrode the background image and changing it to background-color worked.  I'm going to pull this down just to check it works then merge it :D


ENH: Show source space (or source space points?) in plot_trans

Maybe for surface source spaces we should show the two hemispheres, and for volume grid or discrete, show the locations using points3d (or whatever the Mayavi call is). Or we could show the points in all cases. Perhaps I'll experiment. Could be relevant for what @kingjr is trying to work through.

you have some mayavi code to show the source space sampling at:
http://martinos.org/mne/dev/auto_tutorials/plot_forward.html#compute-source-space

I think we might not need this now that we have improved plot_bem, but we can reopen later if necessary


Enable setting PeripheralScanningOptions for ScanForPeripherals on iOS

Enhancement Request - Enable setting PeripheralScanningOptions in IOS.
Certain BLE use cases where BLE Peripherals are operating in a Broadcast only mode require the ability to pass peripheral scanning options to the CBCentralManager.ScanForPeripherals() method.
Plugin.BLE.iOS/Adapter.cs@Line128
	protected override async Task StartScanningForDevicesNativeAsync(Guid[] serviceUuids, CancellationToken scanCancellationToken)
	{
		// Wait for the PoweredOn state
		await WaitForState(CBCentralManagerState.PoweredOn, scanCancellationToken).ConfigureAwait(false);

		Trace.Message("Adapter: Starting a scan for devices.");

		CBUUID[] serviceCbuuids = null;
		if (serviceUuids != null && serviceUuids.Any())
		{
			serviceCbuuids = serviceUuids.Select(u => CBUUID.FromString(u.ToString())).ToArray();
			Trace.Message("Adapter: Scanning for " + serviceCbuuids.First());
		}

		DiscoveredDevices.Clear();

		// Need ability to pass PeripheralScanningOption values to this method.
		_centralManager.ScanForPeripherals(serviceCbuuids, new PeripheralScanningOptions { AllowDuplicatesKey = true });
    }

Apple Documentation describes this use case...

Turning off the default behavior can be useful for certain use cases, such as initiating a connection to a peripheral based on the peripheral’s proximity (using the peripheral received signal strength indicator (RSSI) value).

https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/BestPracticesForInteractingWithARemotePeripheralDevice/BestPracticesForInteractingWithARemotePeripheralDevice.html#//apple_ref/doc/uid/TP40013257-CH6-SW4

Helpful Links

https://developer.xamarin.com/api/type/CoreBluetooth.PeripheralScanningOptions/
https://developer.xamarin.com/api/member/CoreBluetooth.CBCentralManager.ScanForPeripherals/p/CoreBluetooth.CBUUID[]/CoreBluetooth.PeripheralScanningOptions/
http://stackoverflow.com/a/22837799
http://stackoverflow.com/a/12486927

Configuration
Xamarin.Forms
Vanilla Plugin.BLE (no MvvmCross)
Version: <1.1.0-beta1
Platform: iOS
Device: All iOS

Check out 1.1.0-beta4


Wrap with flatpak not working

Ludusavi version
v0.24.1
Operating system
Linux
Installation method
Flatpak
Description
The launch command flatpak run com.github.mtkennerly.ludusavi wrap --infer steam --gui -- %command% is not working.
When games are launched with this flag the game will not launch
Logs
No response

Hi! Could you share your Ludusavi log file? For Flatpak, it would be: ~/.var/app/com.github.mtkennerly.ludusavi/config/ludusavi/*.log
Also, could you try with a standalone copy of Ludusavi just to rule out any Flatpak-specific issues?

Hi,
the logs are empty (only old logs)

can i download ludusavi rpm from somewhere, or do i need to compile it myself?

You can download a standalone executable from the releases page. Here's the latest Linux release:
https://github.com/mtkennerly/ludusavi/releases/download/v0.24.1/ludusavi-v0.24.1-linux.zip
To point it at your Flatpak Ludusavi config, you can add the --config argument:
/path/to/ludusavi --config ~/.var/app/com.github.mtkennerly.ludusavi/config/ludusavi wrap --infer steam --gui -- %command%

Just to confirm, is ludusavi_rCURRENT.log also an old one? If so, that implies Steam isn't even able to launch Ludusavi, which does probably sound like some Flatpak permissions thing (even more so if Steam itself is in a Flatpak as well).

Seeing the same behavior on NixOS. Running steam via terminal and running a game with ludusavi in the launch options also seemingly doesn't output anything.

@njdom24 Could you try the test I mentioned in https://github.com/mtkennerly/ludusavi/issues/358#issuecomment-2179727414 ?

Still no good, I'm afraid. For what it's worth, both my system package, and the standalone binary you linked can run from Steam's launch options (e.g. ludusavi && command), but once wrap --gui is involved, it fails instantly without logging. Removing --gui does produce a log with the expected "not a terminal" error.
The nixpkg for Ludusavi does contain zenity and kdialog as dependencies, and I was able to confirm the dialog works outside of Steam.

Thanks for checking. I'm not sure why it's not working, but I'll try to set up a system with Flatpak and see if I can figure something out.

Hey @mtkennerly,
Any update on this?

@NL-TCH Hey, I finally set up a system to test this on. I did fix a couple of related issues (--infer steam using the wrong case to find the env var, and --force potentially hanging while waiting for input), but I haven't managed to figure out why --gui doesn't work yet. From the logs, Ludusavi tries to show the dialog, but it thinks that the user immediately selected no. It happens even with a standalone copy of Ludusavi, so it's not exclusively a Flatpak issue. I'll do some more testing and maybe explore alternative dialg options if needed.
If you're interested in the other fixes, you can try this build: ludusavi-v0.25.0-post.15+b2926a4-linux.zip

hi @mtkennerly thanks for updating the app, very much appreciated!
with last weeks update, the wrap for flatpak still does not work, but at least i have a log message when launching CompanyOfHeroes2:
[2024-11-04T20:07:59.354Z] WARN [ludusavi::prelude] failed to walk: Some("/home/tch/.local/share/feral-interactive/CompanyOfHeroes2/Application") | Error { depth: 1, inner: Io { path: Some("/home/tch/.local/share/feral-interactive/CompanyOfHeroes2/Application"), err: Os { code: 2, kind: NotFound, message: "No such file or directory" } } }

Thanks for the extra info :+1: That seems promising.
That   formatting is related to https://github.com/native-dialog-rs/native-dialog-rs/issues/41 . I thought we could avoid that issue by sticking to version 0.6.3 of native-dialog-rs, but apparently not. I think it may be best to switch to another dialog library. This is still on my list to continue testing :)

I've switched the dialogs from native-dialog to rfd. That should fix the potential   display issues. However, the Flatpak version can't seem to find the game executable. For example, this is the full command for launching Celeste:
/home/ubuntu/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=504230 -- /home/ubuntu/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- /home/ubuntu/.local/share/Steam/steamapps/common/Celeste/./Celeste

...and here is a minimal example of failing to launch:
$ flatpak run com.github.mtkennerly.ludusavi wrap --force --name Celeste -- /home/ubuntu/.local/share/Steam/ubuntu12_32/reaper
Game failed to launch.
Error: No such file or directory (os error 2)

I've tried a few combinations of --filesystem=host and --user, but I haven't found a way to make it work 😞 For now, I think I'll  just make a note in the documentation that wrap works best with a standalone copy of Ludusavi.
@NL-TCH If you'd like to test it before the next release, here's a build you can use:

Standalone: ludusavi-v0.26.0-post.11+c8f04ac-linux.tar.gz
Flatpak:flatpak remote-add --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo
flatpak install flathub-beta com.github.mtkennerly.ludusavi
flatpak run com.github.mtkennerly.ludusavi//beta

When I tested the Flatpak build, I ran into https://github.com/flatpak/flatpak/issues/3521 , but it seems to just be a benign log message without any impact on the functionality. Not sure if there's a way to silence the log message. I tried setting --env=GTK_MODULES="" and --unset-env=GTK_MODULES, but that didn't affect it.

Thanks, the new library for the native (non-flatpak) version seems to be working:

the flatpakversion however (beta) does not launch games without any log

Thanks for testing!
I'll leave this open in case someone who's more knowledgeable about Flatpak can figure out why it doesn't work 😅 I'm not sure what else to try.


feat: adds Kuma GUI update PR job (TESTING GITHUB ACTIONS WORKFLOW)

DO NOT MERGE THIS PR
I’m testing a GitHub Actions workflow and have pushed a branch to kuma-gui’s original repository and not a fork. This is done on purpose so I can test the workflow (at least I hope that’s how it works.

Adds a new GitHub Actions workflow which automatically creates a pull request in Kuma for updating Kuma GUI.
Limits the main workflow’s triggers for pushes to the project’s default branch.
Signed-off-by: Philipp Rudloff<EMAIL_ADDRESS>

Closing in favour of #370.


Lack testing in FastCGI error

Need more test case in triggering FastCGI Stderr steam output. Make sure no read/write block.

Since node-fastcgi has better support to error stream writing, its best to do the error stream handling as part of the node-fastcgi example.

0d16770 partially solved this issue. But I think some inspection to error stream output is still needed.


Change color icons based on state?('on' or 'off')

Can you add support for Change color icon when entity state change ?

and
2. Possibility to change from tap/click(hold) to tap/click entity to see detailed information

I will take this into consideration, however I believe you currently can achieve this with https://github.com/Mariusthvdb/custom-ui

+1 Just found this card and would love this feature. For light entities, it's great to have them yellow when on or even color matching the color of the light.

+1 Just found this card and would love this feature. For light entities, it's great to have them yellow when on or even color matching the color of the light.

Doesn't custom ui template glob do this job on any card?

Doesn't custom ui template glob do this job on any card?

This adds an external dependency. It can work, but the ideal would be to have those main features baked in. I think custom colors are in fact something that can be left for external customization, but the stardand yellow for lights when on is something that the custom component should do by default.

I will take it into consideration; however, my initial intent is to keep this card minimalist, and if I add this feature, it will only be effective within the card itself.
The https://github.com/Mariusthvdb/custom-ui would make your entities work across all HA with minor effort like:
customize_glob:
  "light.kitchen_*":
    templates:
       icon_color: if (state === 'on') return 'yellow'; return 'white';

My advice is to try custom-ui as it may be a ready-to-use solution for you. It may take some time for me to prioritize feature requests but I appreciate you sharing your thoughts here, thx :)

Hallo ich habe custom-iu probiert aber es funktioniert bei mir nicht.
Danke und Gruß Danny
customize_glob:   "light.*":     templates:        icon_color: if (state === 'on') return 'yellow'; return 'white';

@ibins1980 The only way today is custom-ui. Please double check if it is installed and properly running.
Please try one of the basic examples from the component to see if it is working:
https://github.com/Mariusthvdb/custom-ui

+1


Custom EasyData page URL

It's not an issue but question.
How can I use base page URL other than "/easydata/{url?}" for my EasyData page?
Right now I have this as a first line on my page:
@page "/easydata/{url?}"

It works fine but when I change it to something like @page "/data/{url?}" I have blank page and this in browser's console:

Hello,
You can specify basePath in dispatcher options. For example:
@page "/<my-base-path>/{**entity}"

.    .    .    .

@section Scripts {
    <script src="https://cdn.korzh.com/ed/1.1.1/easydata.min.js" type="text/javascript"></script>
    <script>
        window.addEventListener('load', function () {
            new easydata.crud.EasyDataViewDispatcher({
                   basePath: <my-base-path>
            }).run()
        });
    </script>
}

The default value is easydata.

Thanks for such a quick reply!
Tried what you suggested and it works.
I guess that's worth mentioning in readme ;)

@ilchenkob @antifree add it to the documentation and readme


NoMethodError: undefined method `map' for nil:NilClass

Greetings and thank you for writing this lib!
Trying it out on a project and it's not working:
$ bundle exec schema2type -o frontend/src/schema.d.ts
bundler: failed to load command: schema2type (/Users/casey/.asdf/installs/ruby/2.7.0/bin/schema2type)
NoMethodError: undefined method `map' for nil:NilClass
  /Users/casey/.asdf/installs/ruby/2.7.0/lib/ruby/gems/2.7.0/gems/schema2type-0.3.0/lib/schema2type/covert_service.rb:34:in `define'
  /Users/casey/.asdf/installs/ruby/2.7.0/lib/ruby/gems/2.7.0/gems/schema2type-0.3.0/lib/schema2type/covert_service.rb:21:in `get_binding'
  /Users/casey/.asdf/installs/ruby/2.7.0/lib/ruby/gems/2.7.0/gems/schema2type-0.3.0/lib/schema2type/cli.rb:6:in `eval'
  /Users/casey/.asdf/installs/ruby/2.7.0/lib/ruby/gems/2.7.0/gems/schema2type-0.3.0/lib/schema2type/cli.rb:6:in `execute'
  /Users/casey/.asdf/installs/ruby/2.7.0/lib/ruby/gems/2.7.0/gems/schema2type-0.3.0/exe/schema2type:8:in `<top (required)>'
  /Users/casey/.asdf/installs/ruby/2.7.0/bin/schema2type:23:in `load'
  /Users/casey/.asdf/installs/ruby/2.7.0/bin/schema2type:23:in `<top (required)>'

When I comment this out it works...
  # add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"

@snaptopixel
Thanks for your issue. This is solved  at https://github.com/kawamataryo/schema2type/pull/6


How do I use this integration?

I installed it using HACS, can see it in the custom_components/emscrss directory, but I can't see a sensor created in HA after restart.
Any special steps required?

Add a new sensor to your configuration:
sensor:
  - platform: emscrss
    name: Earthquakes
    radius: 300
    magnitude: 3.0

@julianrinaldi Thank you, it works.
Would you also have an example how to process the returned array in a Jinja2 template? I can't seem to find any examples of it...
thank you!

OK, I figured it using the template editor:
Earthquakes:
{% for quake in state_attr('sensor.earthquakes','earthquakes') %}
{{ quake.time }} - {{ quake.title }} - {{ quake.magnitude }} - {{ quake.distance }} - {{ quake.link }}
{% endfor %}


thread-count not followed for parallel="test" if some tests have parallel="method"

TestNG version: 6.10
Given the following suite, note that it has thread-count in suite tag and it is running in parallel a set of tests where one of these tests is supposed to run some methods in parallel.

Expected behavior
Total thread count is expected to match user defined number, so that number of threads allocated to parallel methods increases if other serial tests finish earlier.
Actual behavior
Due to parallel method parameter in the test element named "parallel-methods"  I found that actual thread count is  not equal to user-defined thread-count.
problem is if I limit number of threads for parallel methods by using another thread count parameter for it,  then i will not be able to get max utilization of resources if other threads terminated earlier.
Is the issue reproductible on runner?

[x] Shell
[ ] Maven
[ ] Gradle
[ ] Ant
[ ] Eclipse
[x] IntelliJ
[ ] NetBeans

@Amr1977 - Can you please retry this using the latest released version of TestNG viz., 7.0.0-beta1. If the problem still persists, please help share a sample standalone that can be used to reproduce this issue.

Closing this issue since there's no response from the user.


Can't run tests in Typescript

Prerequisites
node ../../node_modules/mocha/bin/mocha -r ts-node/register --loader=ts-node/esm

[x ] Checked that your issue hasn't already been filed by cross-referencing issues with the faq label
[x ] Checked next-gen ES issues and syntax problems by using the same environment and/or transpiler configuration without Mocha to ensure it isn't just a feature that actually isn't supported in the environment in question or a bug in your code.
[x ] 'Smoke tested' the code to be tested by running it outside the real test suite to get a better sense of whether the problem is in the code under test, your usage of Mocha, or Mocha itself
[x ] Ensured that there is no discrepancy between the locally and globally installed versions of Mocha. You can find them with: node_modules/.bin/mocha --version(Local) and mocha --version(Global). We recommend that you not install Mocha globally.

Description
At first, I was getting this error Debug Failure. False expression: Non-string value passed to ts.resolveTypeReferenceDirective, likely by a wrapping package working with an outdated 'resolveTypeReferenceDirectives' signature. This is probably not a problem in TS itself.
Upgraded ts-node to latest version and then got this error ``TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts".
Added the --loader=ts-node/esm flag and now I'm getting this error ReferenceError: exports is not defined in ES module scope
Played around with module and target in tsconfig.json and none has helped. Changing target from commonjs to es2015 gives me error saying that it Error: Cannot find module yadayada import from soandso.
I'm out of ideas.

Steps to Reproduce

Install Typescript 4.5.4, ts-node 10.8.2, mocha 10.0.0, run tests written in typescript with the npm command above.

Expected behavior: Should run tests
Actual behavior: Tests not running due to error mentioned above.

Reproduces how often: 100%
Versions

typescript 4.5.4
ts-node 10.8.2
mocha 10.0.0
Windows 10 64-bit

The output of mocha --version and node_modules/.bin/mocha --version:
The output of node --version:
Your operating system

name and version:
architecture (32 or 64-bit):

Your shell (e.g., bash, zsh, PowerShell, cmd):
Your browser and version (if running browser tests):
Any third-party Mocha-related modules (and their versions):
Any code transpiler (e.g., TypeScript, CoffeeScript, Babel) being used (and its version):

Additional Information

I can run my tests if I use this flag with node --es-module-specifier-resolution=node

I get the similar issue, on my monorepo when test import from another package inside the monorepo

Node's --loader option is still experimental, afaik. It feels like the situation around TS / ts-node / ESM is changing every few weeks/months. So I recommend you to follow the according issues on the ts-node repo.
Please have a closer look on our sample repo https://github.com/mochajs/mocha-examples/issues/47#issue-922794133 and the listed links. Most probably you will find some answers to make TS / ESM run with ts-node.
Some comments from my side:

bin/mocha has changed to bin/mocha.js in<EMAIL_ADDRESS>afaik using both options -r ts-node/register --loader=ts-node/esm doesn't make sense

Node's --loader option is still experimental, afaik. It feels like the situation around TS / ts-node / ESM is changing every few weeks/months. So I recommend you to follow the according issues on the ts-node repo.
Please have a closer look on our sample repo mochajs/mocha-examples#47 (comment) and the listed links. Most probably you will find some answers to make TS / ESM run with ts-node.
Some comments from my side:

bin/mocha has changed to bin/mocha.js in<EMAIL_ADDRESS>afaik using both options -r ts-node/register --loader=ts-node/esm doesn't make sense

The tests in the sample repo doesn't import TS files into the test, which I think is the main issue here. Anyways, using -r ts-node/register --loader=ts-node/esm and --es-module-specifier-resolution=node allows me to run my tests again.


Reimage of Ephemeral OS disk VMs to support updating the base OS disk

Preconditions

[X] No need to upgrade Python SDK or the Python SDK is ready.

Related command
az vmss reimage --ids  --forceUpdateOSDiskForEphemeral
Resource Provider
Microsoft.Compute/VMSS
Description of Feature or Work Requested
Currently, reimage of ephemeral VMSS resets the VM to the original state. It does not bring the ephemeral OS disk to the latest version. We are introducing a new flag, forceUpdateOSDiskForEphemeral, which will bring the ephemeral OS disk to the latest version in VMSS.
Minimum API Version Required
2024-03-01
Swagger PR link / SDK link
https://github.com/Azure/azure-rest-api-specs/pull/28074
Request Example
No response
Target Date
2024-06-30
PM Contact
viveksingla
Engineer Contact
sumitsahu, aygaur
Additional context
No response

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

Target Date
2024-06-30

@viveksingla08 Due to the super busy schedule of this sprint, we didn't have the effort to develop this feature in this sprint. If this feature only adds a new parameter --zones without any breaking changes, could we schedule it for the next sprint (released at 07-02)?

Its fine with us. I have updated the target release date. our release has got delayed due to some bugs being found.


z.error#flatten method does not respect schema transformation?

I've created a schema and used a transform to modify its structure. When I use the z.error#flatten function on a failed safeParse, the structure of the errors I receive seems to be based on the input only without the schema transformation being applied.
Codesandox
import { z } from "zod";

const schemaWithTransform = z
  .object({
    email: z.string().email("Invalid email address"),
    name: z.string(),
  })
  .transform((data) => ({
    details: {
      email: data.email,
      name: data.name,
    },
  }));

type SchemaErrorsType = z.inferFlattenedErrors<typeof schemaWithTransform>;

const payload = schemaWithTransform.safeParse({
  email: "invalid@email",
  name: "name here",
});

if (!payload.success) {
  const flattendErrors = payload.error.flatten();

  type ShouldBeSame = IfEquals<
    typeof flattendErrors,
    SchemaErrorsType,
    "same",
    "different"
  >; // different
}

type IfEquals<T, U, Y = unknown, N = never> = (<G>() => G extends T
  ? 1
  : 2) extends <G>() => G extends U ? 1 : 2
  ? Y
  : N;

In this scenario, I expected that SchemaErrorsType and the type of flattendErrors should be the same and reflect the transformed schema. However, that's not what I observe - flatten seems to be returning errors based on the input payload.

Probably a duplication of:
https://github.com/colinhacks/zod/issues/2183
https://github.com/colinhacks/zod/issues/2366


Add badges for CI

Add badges for GitHub Actions in README.md and README_JP.md.

@yoshipon Thank you for your approval!!


How to render data received from a REST service in Next.js?

I want to receive data via a REST service call in my Next.js-based app using fetch() and then render the result server-side into JSX like this:
class VideoPage extends Component {
  componentWillMount() {
    console.log('componentWillMount');

    fetch(path, {
      method: 'get',
    })
      .then(response =>
        response.json().then(data => {
          this.setState({
            video: data,
          });
          console.log('received');
        })
      );
  }

  render() {
    console.log('render');
    console.log(this.state);
    if (this.state && this.state.video) {
      return (
        <div>
          {this.state.video.title}
        </div>
      );
    }
  }
}

export default VideoPage;

Unfortunately, the output is this:
componentWillMount
render
null
received

Which does make sense because the call to fetch is asynchronously and render() finishes before the call to the REST service has finished.
In a client-side app this would be no problem because a change of state would call render() which then updates the view, but in a universal app, especially with JavaScript turned off on the client, this is not possible.
How can I solve this?
Is there a way to call the server synchronously or delay render()?

It is recommended to use getInitialProps() to fetch data. You can read more about that at https://github.com/zeit/next.js#fetching-data-and-component-lifecycle.

Thanks @mikenikles .
@valnub you can follow this guide too: https://learnnextjs.com/basics/fetching-data-for-pages

Thanks a lot guys!