Silverblue: Specified path 'elements' must not lead outside of the project directory

See original issue on GitLab
In GitLab by [Gitlab user @valentindavid] on Sep 22, 2018, 21:26
Summary
On Silverblue, /home is a simlink to /var/home. And this causes issue in detecting that files are inside project.
Steps to reproduce
On non Silverblue system, you can easily reproduce this way:
ln -s $HOME/.cache /tmp/cache
export XDG_CACHE_HOME=/tmp/cache
bst build ...

Building Freedesktop SDK, you get error:
/tmp/cache/buildstream/build/bootstrap-junction-2atdruz7/project.conf [line 15 column 14]: Specified path 'elements' must not lead outside of the project directory

What is the current bug behavior?
An error when the requested file is actually inside the project.
This issue was found by [Gitlab user @seppo].yliolli.
What is the expected correct behavior?
No error.
Relevant logs and/or screenshots
Possible fixes
Other relevant information
This affects 1.2.1.
Work-around in Silverblue is to define XDG_CACHE_HOME=/var/$HOME/.cache.

BuildStream version affected: /milestone %BuildStream_v1.x

In GitLab by [Gitlab user @valentindavid] on Sep 22, 2018, 21:28
changed the description

In GitLab by [Gitlab user @toscalix] on Sep 24, 2018, 09:29
assigned to [Gitlab user @adds68]

In GitLab by [Gitlab user @toscalix] on Sep 24, 2018, 09:30
assigned to [Gitlab user @tlater]

In GitLab by [Gitlab user @toscalix] on Sep 24, 2018, 09:30
unassigned [Gitlab user @adds68]

In GitLab by [Gitlab user @adds68] on Sep 24, 2018, 09:30
assigned to [Gitlab user @adds68] and [Gitlab user @tacgomes] and unassigned [Gitlab user @tlater]

In GitLab by [Gitlab user @adds68] on Sep 24, 2018, 09:31
assigned to [Gitlab user @valentindavid]

In GitLab by [Gitlab user @adds68] on Sep 24, 2018, 09:31
unassigned [Gitlab user @adds68]

In GitLab by [Gitlab user @jennis] on Sep 25, 2018, 16:02
Just to add some weight to this, I'm also experiencing the same issue and my current work around is to set a XDG_CACHE_HOME environment variable, obviously not ideal!

In GitLab by [Gitlab user @nanonyme] on Sep 25, 2018, 17:57
Note that the better workaround is to change the setup so all newly created accounts have /etc/passwd home point to /var/home/username instead of /home/username. Persistent symlink indirection for home is silly in general case
Buildstream should support the symlink setup as well though

In GitLab by [Gitlab user @valentindavid] on Sep 27, 2018, 10:04
changed the description

In GitLab by [Gitlab user @valentindavid] on Sep 27, 2018, 14:49
mentioned in commit fbc71ac5874f1de84217993b8b33755ff3f9dd0c

In GitLab by [Gitlab user @valentindavid] on Sep 27, 2018, 14:50
mentioned in merge request !832

In GitLab by [Gitlab user @tacgomes] on Sep 27, 2018, 14:52
unassigned [Gitlab user @tacgomes]

In GitLab by [Gitlab user @valentindavid] on Sep 27, 2018, 17:32
mentioned in commit e91eb38b7424aef63d1e2bfe6d2efbe057592a6b

In GitLab by [Gitlab user @tacgomes] on Sep 27, 2018, 17:57
closed via merge request !832

In GitLab by [Gitlab user @tacgomes] on Sep 27, 2018, 17:57
mentioned in commit 7babd55c248a5817a279c39f030690d60d631759

In GitLab by [Gitlab user @tacgomes] on Sep 27, 2018, 18:00
reopened

In GitLab by [Gitlab user @valentindavid] on Sep 28, 2018, 10:24
mentioned in commit 075ffefa8035422841eca13e56384859a03abfad

In GitLab by [Gitlab user @valentindavid] on Sep 28, 2018, 10:25
mentioned in merge request !834

In GitLab by [Gitlab user @tacgomes] on Sep 28, 2018, 11:04
closed


Sparkc 308

Build against Scala 2.10 finished with failure

Build against Scala 2.11 finished with failure

Build against Scala 2.10 finished with success

Build against Scala 2.11 finished with success

Build against Scala 2.10 finished with success

Build against Scala 2.11 finished with success

Build against Scala 2.11 finished with success

Few minor comments. Other than that, LGTM +1

Build against Scala 2.10 finished with success

Build against Scala 2.11 finished with success

btw. I just realised - this is probably unneeded to reverse user classes list and then doing foldRight - you can just do foldLeft


Plugins failing benchmarks

zling seems to be failing everything.
CRUSH failed enwik8, grammar.lsp, fields.c, xargs.1 ("Not enough memory is available", which is BS)
snappy-framed failed dickens, webster, sao, samba, reymont, …
bsc failed asyoulik.txt fields.c, lcet10.txt, ptt5, ooffice
lzmat failed mozilla, samba, reymont, ooffice
lz4hc failed xml, nci
brotli failed xml

zling seems to be failing everything.

https://github.com/richox/libzling/issues/6

bsc failed asyoulik.txt fields.c, lcet10.txt, ptt5, ooffice

https://github.com/IlyaGrebnov/libbsc/pull/3

Only zling is failing now, it has been disabled by default.  lzmat was removed, all the others are fixed.


137 feat integrate ensip 16 v2 to manage domain page

@FrancoAguzzi

@eduramme very nice! I like it!
But the exclamation is yet a question for me: can you write a comment above it saying that if resolverAdd is null, the function will return an error which will be handled somehow?
Actually I just noticed that this function would not throw an explainative error for whoever called it because it is not inside a try catch block, can you add it? pls :) 🙏🏼 Then the comment mentioned can say that whenever resolverAdd is null, an error will be thrown by "readContract" call
I think the function will look shiny then + will share the error with the parent call
WDYT?

It's actually inside a try...catch block. The readContract function throws an error, which is caught by the getENSDomainDataThroughResolver function and then passed to getENSDomainData, within a try...catch block. If no resolver is found, the default ENS resolver will be used to resolve the domain's data.


Bootstrap failure - Parameters are not expected

When I did some tests on SKU pack with Dell C6320, I find I can't install CentOS. Detailed monitoring found parameters are not delivered as correctly.
Here is the parameters I used for bootstrap
{
"domain": "emc.com",
"hostname": "centos7",
"osName": "CentOS",
"repo": "http://<IP_ADDRESS>:8080/centos/7.0/os/x86_64",
"version": "7",
"rootPassword": "onrack"
}
However C6320 console shows:
It is sometimes trying to install CentOS 6 with http://<IP_ADDRESS>:8080/dummy/images/pxeboot/vmlinuz repo;
And for other cases, it is trying to install CentOS 7 with http://<IP_ADDRESS>/centos/7.0/os/x86_64/images/pxeboot/vmlinuz. Here the repo is the wrong one that I tried for the first time.
Here is the log in on-http (options are consoled) when <IP_ADDRESS> repo is used:
_===================
{}
_--------------------
{"server":"<IP_ADDRESS>","port":8080,"ipaddress":"<IP_ADDRESS>","netmask":"<IP_ADDRESS>","gateway":"<IP_ADDRESS>","macaddress":"f8:bc:12:0b:0b:40","sku":{},"env":{}}
_--------------------
"#!ipxe\nset user-class MonoRail\n\necho\necho MonoRail Boilerplate iPXE...\nset syslog <IP_ADDRESS>\n\n# Interface that requested an IP originally.\nset interface f8:bc:12:0b:0b:40\n\n# Reboot Interval\nset rebootInterval:int8 5\n\n# Interface Search Index.\nset ifIndex:int8 0\nset ifIndexMax:int8 10\n\n# Interface Boot Retries\nset ifBootAttempt:int8 0\nset ifBootAttemptMax:int8 5\n\n# Close all the interfaces to begin with.\nifclose\n\n# Iterate the interfaces to find a match by MAC Address.\n:ifFind\niseq ${ifIndex} ${ifIndexMax} && goto ifFindFailure || goto ifFindContinue\n:ifFindContinue\niseq ${interface} ${net${ifIndex}/mac} && goto ifBoot || inc ifIndex && goto ifFind\n\n# Boot the found interface.\n:ifBoot\niseq ${ifBootAttempt} ${ifBootAttemptMax} && goto ifBootFailure || goto ifBootContinue\n:ifBootContinue\nifopen net${ifIndex}\nifconf net${ifIndex} && goto ifConfigured || inc ifBootAttempt && goto ifBoot\n\n# Find Interface Failure\n:ifFindFailure\necho Unable to locate interface ${interface}, restarting in ${rebootInterval} seconds.\nsleep ${rebootInterval}\nreboot\n\n# Boot Interface Failure\n:ifBootFailure\necho Unable to boot interface ${interface}, restarting in ${rebootInterval} seconds.\nsleep ${rebootInterval}\nreboot\n\n# Configure the booted interface\n:ifConfigured\nroute\necho MonoRail Boilerplate iPXE Completed.\necho\nset i:int8 1\nset macs ${net0/mac:hex}\n:loop\nset current ${net${i}/mac:hex}\nisset ${current} || goto done\nset macs ${macs}&macs=${net${i}/mac:hex}\ninc i\niseq ${i} 100 || goto loop\n:done\nchain http://<IP_ADDRESS>:8080/api/common/profiles?macs=${macs}\n"
[debug] [2016-03-07T07:48:20.084Z] [on-http] [Http.Server] [cbd097] http: GET 200 35.322 - /api/common/profiles
-> /lib/services/http-service.js:298
ipAddress: <IP_ADDRESS>

This issue seems to be related to old configure.json file. Close this issue.


How Should We Use this In Real Time

Hello,
I need to hijack the DNS with this tool in real time!
Can you please tell how to insert an external url as a target?

Not a bug.


Do you plan to release the dataset used in paper for reproducibility

Dataset we constructed can be found in https://github.com/fairyshine/Seal-Tools/tree/master/Seal-Tools_Dataset .
Just let me know if you have more questions! Wish you all the best!

Cool cool thanks, great work

Hey a qq @fairyshine ,
I saw the train.jsonl is formatted in this way:
[API call, Query]
Shouldn't each row in training data also contains a set of relevant tools / candidate tools in prompt? For model to select?
[API lists, Actual API Call, Query]?
Thanks,
Jason

Hey a qq @fairyshine ,
I saw the train.jsonl is formatted in this way:
[API call, Query]
Shouldn't each row in training data also contains a set of relevant tools / candidate tools in prompt? For model to select?
[API lists, Actual API Call, Query]?
Thanks, Jason

Hey, in our experiment setting, we use the retriever to find the needed tools from the whole tool pool. So there isn't any candidate tool list.

Thanks for fast response, yes I understand during inference we use retriever to fetch the relevant tools. But the training data should contain a list of tools fetched from the retriever and the ground truth tool if the fetched tools don't include the ground truth? The released data seemed to only contain ground truth

Thanks for fast response, yes I understand during inference we use retriever to fetch the relevant tools. But the training data should contain a list of tools fetched from the retriever and the ground truth tool if the fetched tools don't include the ground truth? The released data seemed to only contain ground truth

Considering the context length, we only list gold tools for multi-tool instance in the prompt for training in the format here https://github.com/fairyshine/Seal-Tools/tree/master/LLM_Evaluation/data .
If you want to implement the result , for retriever, we have provided the train dataset for DPR.
Also if you really need the dataset for model training, i can try to upload it (The file's a little big.).

@JasonZhu1313
It's new in https://github.com/fairyshine/Seal-Tools/blob/master/Seal-Tools_Dataset/dataset_for_finetune.zip .
Thank you for your concern again!

Awesome thanks


Kanban fields are not shown as selected when creating new project

They are however selected. But you can't see it until you save and reopen.

Can I have screenshots.

Sure. Here. I just clicked 3 tag fields while creating a project.

Currently creating a new project seems broken.

Any error messages?

Whoops, looks like something went wrong.
2/2 ErrorException in Project.php line 121: Undefined variable: selectTags (View: U:\LABSITE-Github\www\tinyissue\resources\views\projects\new.blade.php)

This error fixed in develop branch

Thanks!


[SPARK-11908][SQL] Add NullType support to RowEncoder

JIRA: https://issues.apache.org/jira/browse/SPARK-11908
We should add NullType support to RowEncoder.

Test build #46489 has started for PR 9891 at commit 6035a40.

Test build #46490 has started for PR 9891 at commit f1e58a3.

Test build #46489 has finished for PR 9891 at commit 6035a40.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/46489/
Test PASSed.

Merged build finished. Test PASSed.

Test build #46490 has finished for PR 9891 at commit f1e58a3.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/46490/
Test PASSed.

Thanks, merging to master and 1.5


Add fast list access implementation

Resolves #333 but should not be implemented unconditionally, only with optimization levels (#168 ) enabled.

coverage: 89.483% (+0.05%) from 89.435%
when pulling 96fc5c6d3771bcc3f4254873d1307becb320d55b on feat/fast_index_skip
into d657a227f02670e6b6eed9cac77c0f8a25d51423 on dev.


In the tree-view, please add vertical lines for each level to clarify the indentations.

@somin0016 In the tree-view, please make the following improvements:

Make the vertical lines appear right below the carrots.
Make the gap between each carrot and its left vertical line the same as the distance between the vertical lines.
Make the spacing on the sides of each carrot (from the carrot to its left vertical line, and from the carrot to the string on the right side of the carrot) the same.


Do not assign non-existing ids for annotations.

Currently when you pasting annotated text (let's say HTML one) only first paragraph got annotated.
That's happening typically because you are assigning non existing ids to annotations (at least when you are pasting content inside empty document).

Codecov Report

Merging #1082 into develop will decrease coverage by <.01%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           develop    #1082      +/-   ##
===========================================
- Coverage    63.43%   63.42%   -0.01%
===========================================
  Files          337      337
  Lines        12211    12211
===========================================
- Hits          7746     7745       -1
- Misses        4465     4466       +1

Impacted Files
Coverage Δ

model/paste.js
85.82% <100%> (-0.75%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3e97cd...d0c9381. Read the comment docs.

Would be good to have a test case revealing the problem.

When lot of red is a good sign :)
I will look closely and try to make it green, #1083 is here and other things also I believe...

Haha. It seems you really broke it ;)

Let me know if I can help :)

Oh, I see... you added a revealing test.
Very good!
Let's fix it. Let me know if I can help you.

I will do it today ;)
On Wed, 19 Jul 2017, 05:20 Oliver Buchtala<EMAIL_ADDRESS>wrote:

Oh, I see... you added a revealing test.
Very good!
Let's fix it. Let me know if I can help you.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/substance/substance/pull/1082#issuecomment-316253401,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALG-iMnAPZGqq4z2FidziLtO4x0cRMnks5sPWgEgaJpZM4OalnF
.

I have the feeling that it is very hard to support these combined formatting annotations.
Maybe we accept for now, that there will be more fragments than necessary, and relax the test-case a bit.
On the long run we should try to improve the result by fusing adjacent annotations of the same type.

@oliver---- there are new problems. And the main one is that we have same annotation type overlapping. Is that ok generally that we have two strongs on some range?

It is ok I think. In general we can not avoid this, so we need make sure to be able to deal with it.

@michael is having two bolds at the same place a problem for the UI?
As I said, this can actually come in from XML/HTML, and is valid content there.

God! Merge it pls while it green!
We definitely need to tidy html in future. That's the only independent from editor way...

Hehe :)
I'll take another look first, and then ...

👍

@Integral Good work. Thx!


feat(semseg): allow model customization

Replacing #1338 for rebasing
Before submitting

[X] Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
[X] Did you read the contributor guideline, Pull Request section?
[X] Did you make sure to update the docs?
[ ] Did you write any new necessary tests?
[X] If you made a notable change (that affects users), did you update the CHANGELOG?

What does this PR do?
Allow more customization to the semantic segmentation example:

test set has been replace with a validation set to measure model performance
both training and validation losses are logged
unet allows for more customization: number of layers and number of features
masks have been updated to be compatible with the most recent version of the dataset which contains more labels (additional labels are just ignored)
script allows for other arguments: distributed backend, 16 bit, number of layers and features for unet as well as type of upsampling, gradient accumulation, number of epochs, logging on W&B

PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃

@borisdayma what is the diff to #1338 while it has the same name?

From this comment I understood I had to rebase and make a new PR.

From this comment I understood I had to rebase and make a new PR.

ok, it seems as a misunderstanding, rebase was sufficient, no need for creating new PR lol

changelog need to be rebased on new release #1419

Sorry but I'm not sure of the process of rebasing a PR. Would github allow me to rewrite previous history? I'm typically used to merge commits.

yes, it does, and just when mentioned PR is merged I can do it for you so you do not need to do anything... :]

Hello @borisdayma! Thanks for updating this PR.

In the file pl_examples/domain_templates/semantic_segmentation.py:

Line 51:21: E231 missing whitespace after ':'

Thanks a lot for the changes!


執行 php bin/swoft migrate:down 之後，無法再次 migrate:up

Q
A

Bug report?
yes

Feature request?
no

Swoft version
2.0.3

Swoole version
4.3.5 (by php --ri swoole)

PHP version
7.2.10 (by php -v)

Runtime environment
Docker

Details

Describe what you are trying to achieve and what goes wrong.

執行 php bin/swoft migrate:down
修改 migration 程式碼
再次執行 php bin/swoft migrate:up
只會出現一行訊息：

[SUCCESS] execute ok

必須將 migration 資料表裡面已經 rollback 的資料刪除後，才能再次執行 migrate:up

Migration scripts Up and Down can only be executed once

Migration scripts Up and Down can only be executed once

Oh my god.....
That's mean I need to create new migration file to correct some mistake in code....??
Could possible like "Laravel migration"?? Can exceute more than once??

I'm sorry My thoughts may be a bit different. We optimize this time.

@andiechang OO, you are right!
We will optimize to fix this problem

accept

composer update


feat: select predefined period on date range picker

Issue Number
#912
Description
It's  possible to select predefined period ranges
The definition of these periods is done dynamically, the developer chooses according to the needs of the project.
Screenshots
Gravação de tela de 2024-01-23 16-34-09.webm
Compliance

[x] I have verified that this change complies with our code and contribution policies.
[x] I have verified that this change does not cause regressions and does not affect other parts of the code.

Good job! This feature will help us a lot.


Add Distributed Transaction

Add most of the Distributed Transaction Chapter. @MyonKeminta will add Percolator and Optimized Percolator sections.

@zhangjinpeng1987 for the sake of progress maybe we can go ahead and get this merged. Note though that the current version of mdbook won't build this successfully with the incomplete links in SUMMARY.md. Can you rebase this patch and get it to build and get this merged?
Once this is merged I have a follow-on patch that copyedits the whole chapter: https://github.com/brson/deep-dive-tikv/tree/copyedit-txn

@brson Done

@zhangjinpeng1987 The CI build is failing because of the unlinked summary chapters:
0.01s$ mdbook build
2018-12-12 12:36:10 [WARN] (mdbook::book::summary): Expected a start of a link, actually got Some(Text("[Percolator Transaciton Model]"))
2018-12-12 12:36:10 [ERROR] (mdbook::utils): Error: Summary parsing failed
2018-12-12 12:36:10 [ERROR] (mdbook::utils): 	Caused By: There was an error parsing the numbered chapters
2018-12-12 12:36:10 [ERROR] (mdbook::utils): 	Caused By: Error at line 17, column 37: The link items for nested chapters must only contain a hyperlink

It's due to these three lines in SUMMARY.md:
    + [Percolator Transaciton Model]
    + [Optimized Percolator]
    + [TLA+]

If you want to maintain these placeholders it looks like you can add a bogus link like
    + [Percolator Transaciton Model](todo.md)

Can you please either remove the three placeholders or link them to todo.md like above so that the CI completes successfully?

Beautiful. Thanks @zhangjinpeng1987. LGTM.
@Hoverbear will you take another quick peak and see if it LGTY?


Target cloudant-http 2.10.0

This is anticipated to be the next release version which will include IAM interceptors.
This branch will only build cleanly and be mergeable once the next version of cloudant-http (anticipated to be 2.10.0) is released.

@ricellis OK added CHANGES


Only first request to application is passed with distributed tracing to New Relic

When using Mesh with the useNewRelic plugin, only the first request is sent to New Relic with all expected distributed tracing, limiting the granularity of the metrics we are able to monitor, including, for instance, how long was spent on different data sources.
For instance, with the following setup:
.meshrc.yaml:
sources:
  - name: Currencies
    handler:
      jsonSchema:
        baseUrl: https://api.coinbase.com/v2
        operations:
          - type: Query
            field: currencies
            path: /currencies
            method: GET
            responseSchema: "https://api.coinbase.com/v2/currencies"

  - name: Dogs
    handler:
      jsonSchema:
        baseUrl: https://dog.ceo/api/breeds/image
        operations:
          - type: Query
            field: dog
            path: /random
            method: GET
            responseSchema: "https://dog.ceo/api/breeds/image/random"

additionalEnvelopPlugins: "./envelop-plugins"
customFetch: "./custom-fetch.js"

envelop-plugins.ts:
import { useNewRelic } from "@envelop/newrelic"

export const pluginFactory = async() => {
  return [
    useNewRelic({
      includeOperationDocument: true,
      includeExecuteVariables: false,
      includeRawResult: false,
      trackResolvers: true,
      includeResolverArgs: false,
      rootFieldsNaming: true
    })
  ]
}

export default pluginFactory

custom-fetch.js:
const fetch = require('node-fetch')

module.exports = (url, args) => {
  return fetch(url, args)
}

(customFetch set as Mesh uses undici, which isn't supported by New Relic by default, and requires a feature flag to be set)
When making individual requests for both dogs and currencies, both should appear with full distributed tracing, listed as dependencies, on New Relic. But only the first reaches New Relic. For instance, if the dogs query comes first (crucial bits at the bottom of the screenshots, where we can see any API calls made):

If the application is closed and a new instance booted up (pointing to a different New Relic app for this example), and the currencies query comes first:

(if these had been sent to the same New Relic application as the first example, the two dependencies would both appear).
It looks like manually instrumenting newrelic calls on our codebase suffers the same issue too.
I've experimented with using newrelic and useNewRelic without the use of Mesh and that works as expected. I've also used graphql-yoga without Mesh and that also works as expected. It looks like something in Mesh is causing an issue.
While debugging (eg. at this point), I did notice that when using Mesh, the first transaction is populated in newrelic, but every transaction after that is null. However, the transaction is available as expected during the useNewRelic plugin. I looked to see if different agents were being created but couldn't see any sign that was the case. It looks like the state is being lost at some point?
The issue doesn't look to be restricted to the handler used, locally I've found that the same issue happens with newOpenApi and in our production environment nothing is being recorded except for the first transaction of every instance.

It seems some additional feature flags need to be configured in NewRelic.
The following commit adds those to the docs;
https://github.com/Urigo/graphql-mesh/commit/12a80935bdf882466760f02d0efe371684f83d5f


fix (re-render): eliminate continuous re-render

When there are no toasts, TostManager is updated every 100ms. Anyone who uses the library (which necessitates loading the ToastManager in an Element via use_atom_ref) will have their element reload on every update. This is no good. Don't do that. Instead, do the following
refactor the ToastManager to use a Uuid for the BTreeMap - removes the need for that buggy index logic.
also clean up the time calculation by refactoring ToastManagerItem to calculate hide_after using an Option

Thank you!


Release Google.Cloud.Metastore.V1Beta version 2.0.0-beta02

Changes in this release:
New features

Added federation API (commit a361045)
Added EncryptionConfig field (commit a361045)
Added NetworkConfig field (commit a361045)
Added DatabaseType field (commit a361045)
Added TelemetryConfiguration field (commit a361045)

Created release for Google.Cloud.Metastore.V1Beta-2.0.0-beta02


Sizing problem with BatchDataset in Tensorflow 2.3.1

I want to extract the tensor contained within a BatchDataset. It appears I run into a sizing issue -- if I call a batch of 4500 elements no problem (i.e., extractable), but if I create a batch of 5000 elements no dice.

If inp does not exist in the second example above, then when trying to call inp there is a NameError: name 'inp' not defined.
Broadly speaking, anyone know a work around? I am looking to create (and draw from) with a batch size of ~7500.
System information

Stock Tensorflow installed using pip
Ubuntu 20.04
Sony Vaio Laptop
Tensorflow: v2.3.0-54-gfcc4b966f1 2.3.1
Python: 3.8.5

Hi @jimcost , Could you also provide the complete code which will help us to expedite the issue?


Should we continue faking zoom levels for non-Mapbox GL maps?

As mentioned in #129 here.
Both Google and Leaflet maps use zoom levels that are off by 1 from Mapbox GL/Maplibre maps. In our current implementation we bump the zoom levels to prioritize maps aligning in the interface rather than the zoom levels being 100% accurate. For example:

For Google Maps we do this in a few places:
https://github.com/stamen/maperture/blob/ed54ba1d634f66a4f722527d1caa33af7037bffa/src/components/GoogleMap.svelte#L68-L76
https://github.com/stamen/maperture/blob/ed54ba1d634f66a4f722527d1caa33af7037bffa/src/components/GoogleMap.svelte#L35-L45
And we do something similar for Leaflet maps.
The argument for keeping this as it is is that we will generally only be using Google/Leaflet maps as reference maps and it is less important that the zoom levels are accurate. Looking at multiple map panes with the Google/Leaflet maps at different scales could be confusing.

Couldn't we drop leaflet completely in favor of display via maplibre raster sources? example
https://github.com/bdon/maperture/blob/main/public/config/osm-carto.json
passing tileSize=256 should make the viewports match 1:1 for reference.


Angular.js client sample for token manager integration

Maybe this is a lot simpler than I'm making it out to be.  I have an angular app and I'm trying to integrate the javascript token manager sample into it.  My authentication page works, obtains a token, routes to the next angular page and can use the token from the manager to make an authenticated API call.  I'm using an authentication http provider interceptor to inject the bearer token into all requests.  As long as the window.mgr is alive it works.  It seems though that the window.mgr object becomes undefined if the page reloads like when I refresh the browser.
Any suggestions on the appropriate way to integrate the Token Manager into Angular?  I've seen a authentication service used as a popular route for code separation.  It seems like I can new up the mgr object in each Angular controller (mgr = new OidcTokenManager()) and that gives me back access to the token from localStorage.  I would assume though that the config object for the constructor would need to follow though so the TokenManager knows where to refresh tokens from.   I tried moving it to a service, but the console complains that some of the manager event handlers are not functions. ie. addOnTokenObtained is not a function
I'll put my code below for those looking to make use of the bearer token http interceptor in angular.  Keep in mind that it references the window.mgr so if that is not the proper place to get the token manager from then it will need to be changed accordingly.
I put this in my core project's config.js and added it as a factory to my core module.
Http Interceptor for bearer token injection
var core = angular.module('coreMod');

core.factory('authInjector', authInjector);
authInjector.$inject = ['$q', '$window'];
function authInjector($q, $window) {
        return {
            request: function (config) {
                var mgr = $window.mgr;
                if (!!mgr) {
                    config.headers = config.headers || {};
                    if (!!mgr['access_token']) {
                        config.headers['Authorization'] = 'Bearer ' + mgr.access_token;
                    }
                }
                return config;
            },
            responseError: function (response) {
                var mgr = $window.mgr;
                if (!!mgr) {
                    if (response.status === 401 && !!mgr['access_token']) {
                        mgr.removeToken();
                    }
                    if (response.status === 403 && !!mgr['access_token']) {
                        mgr.removeToken();
                    }
                }
                return $q.reject(response);
            }
        };
    }

core.config(configure);

configure.$inject = ['$httpProvider'];
function configure($httpProvider) {
    $httpProvider.interceptors.push('authInjector');
}

I stripped out irrelevant code to simplify. If you are used to the angular architecture of john papa this should look familiar.

I strumbled getting and checking the access_token from OIDC Manager a couple of months ago. I found the solution by moving OIDC Manager out of the scope of Angular app by defining a global mgr object and only getting access_token and profile info from that global variable where needed, in order to not recall and create instances of the OIDC Manager object everytime a call to the API is made. Creating multiple instances of Manager coused only headaches for me when used in a service or interceptor. It gets a new access_token everytime when Manager is accessed and if you're renewing the access_tokens automatically, there are errors appearing on the console and application breaks at some point.
Moving the Manager object out of Angular and accessing it once during the app lifecycle works for now, but I am still questioning this approach as it is very far from an elegant Angular Way solution.
Can you please explain, how and where are you creating the $window.mgr object in your app?

Storing the Token Manager in window.mgr comes from the Identity server client sample OAuthJS.  The login page instantiates the Token Manager and sets it to the window.mgr.  In angular I'm just swapping out window.mgr for $window.mgr as it sounds like $window is the proper wrapper to use for testing or something.
I was hoping someone from the Identity Server dev team could chime in on their thoughts for angular integration.  I'm still working out some issues regarding silent token renewal, moving the Token Manager to an authentication service module and I'm not fond of the token manager getting attached to the "window". It seems to be destroyed on a browser refresh.
For the time being I'm probably just going to have to include code in my controllers to rebuild the Token Manager and set it to the window each time to make sure that the window.mgr exists.

Yea, create a global TokenMgr and inject it into as a constant into NG. That's one idea -- i'm sure there are others.

@brockallen, thanks for the input. That was what I came up doing a few months back. Wasn't sure it was the right thing to do till I saw your message. Now I am relaxed :)

Thanks @brockallen , good to hear a the tokenMgr will work fine if I stick it in the $rootScope.  I have the TokenManager working now as an Angular service.
The only issue I ran into was trying to put the callback endpoint as an angular route/controller.  I don't think it will work in my setup right now.  My Angular app is not running in Html5 mode so the Angular app uses the hash sign in the URL space to separate the server side route from the angular route.  I think that hash is breaking the callback id_token hash coming back from the identity server.  I'm watching fiddler and normally the callback will look something like ".../callback.html#id_token=<some_token>".  When I try using the angular callback route/controller the identity server response url looks like this ".../app#/callbackid_token=<some_token>".  You can see that the Identity server doesn't insert a hash between the redirect Uri and the token response.  Because of that I think the Oidc.js fails to parse the window.location.hash correctly.
Do you know if there is a way to make this work with angular or why the identity server doesn't insert a preceeding hash in this case?  I'm not overly concerned if not.  a non-angular callback page doesn't seem to hurt anything.  I think the only overhead is the non-angular callback will need to pull down the required script files (oidc.js and jquery) and new up the Token Manager before it can process the callback vs. the angular page would have the 3rd party libraries and Token Manager already initialized.

Yes, I do this in IdentityManager -- here's the route[1]/controller[2] that accept the token via the hash fragment:
[1] https://github.com/IdentityManager/IdentityManager/blob/master/source/Core/Assets/Scripts/App/ttIdmApp.js#L16
[2] https://github.com/IdentityManager/IdentityManager/blob/master/source/Core/Assets/Scripts/App/ttIdmApp.js#L96

Oh and for everyone, here's how i inject the token manager:
https://github.com/IdentityManager/IdentityManager/blob/master/source/Core/Assets/Scripts/App/ttIdm.js#L253
and then I wrap it with my own service:
https://github.com/IdentityManager/IdentityManager/blob/master/source/Core/Assets/Scripts/App/ttIdm.js#L57

Thanks @brockallen .  I updated the route with the /:response and the response hash parsing and that fixed it.  The callback is now operating with in angular.


@azure/arm-cdn - "A non-empty request body is required" when using beginEnableCustomHttpsAndWait

Package Name: @azure/arm-cdn
Package Version: 6.0.0
Operating system: Linux Mint
[x] nodejs

version: 16.14.0

[ ] browser

name/version:

[x] typescript

version: 4.5.4

Is the bug related to documentation in

[ ] README.md
[ ] source code documentation
[ ] SDK API docs on https://docs.microsoft.com

Describe the bug
I'm using CdnManagementClient.customDomains.beginEnableCustomHttpsAndWait and keep getting the error mentioned in the title. You can see the complete error in this gist. Unfortunately, the method has no way to supply parameters.
To Reproduce
My code looks something like this:
import { CdnManagementClient } from '@azure/arm-cdn';
import { ClientSecretCredential } from '@azure/identity';

async function setupCDN(
  credentials: ClientSecretCredential,
  subscriptionId: string,
  resourceGroupName: string) {
  const cdnClient = new CdnManagementClient(credentials, subscriptionId);

  const profileName = 'SomeProfile';
  const endpointName = 'SomeEndpoint';
  const customDomainName = 'CustomDomain';

  await cdnClient.customDomains.beginEnableCustomHttpsAndWait(
    resourceGroupName,
    profileName,
    endpointName,
    customDomainName
  );
}

Expected behavior
I expect there not to be an error or that the SDK allows me to supply parameters.
Screenshots
N/A
Additional context
N/A

Label prediction was below confidence level 0.6 for Model:ServiceLabels: 'Network - CDN:0.5541763,Azure.Identity:0.07960774,Storage:0.04470061'

@maorleger Client label means mgmt plane I think.

@MaryGao Could you take a look at this issue? Thanks

@MaryGao Could you take a look at this issue? Thanks

Will follow up this

@beyerleinf Thanks for reporting this! The reason is that the options parameter to beginEnableCustomHttpsAndWait can't be optional as the customDomainHttpsParameters property is required. So both the options and customDomainHttpsParameters need to be made required, or have a default value.  This is similar to this one. But when we upgraded our libraries we overrode the fix by mistake and I created task to track this and plan to fix it in further release.
As a workaround you could use this way
  await cdnClient.customDomains.beginEnableCustomHttpsAndWait(
    resourceGroupName,
    profileName,
    endpointName,
    customDomainName,
    {
        customDomainHttpsParameters: {
            certificateSource: "Cdn",
            certificateSourceParameters: {
                certificateType: "Dedicated"
            },
            protocolType: "ServerNameIndication"
        }
    }
  );

Thanks for getting back, @MaryGao! I will try that out next week.

Hi @MaryGao, sorry for not getting back earlier. It works, but I had to use a different config:
await cdnClient.customDomains.beginEnableCustomHttpsAndWait(
  resourceGroupName,
  profileName,
  endpointName,
  customDomainName,
  {
    customDomainHttpsParameters: {
      certificateSource: 'Cdn',
      minimumTlsVersion: 'TLS12',
      protocolType: 'ServerNameIndication',
      certificateSourceParameters: {
        odataType: '#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters',
        certificateType: 'Dedicated',
      },
    },
  }
);

Thanks for your help!

I think this can be closed. Thanks for fixing!

close it as issue resolved. Thanks


KeyError: 'DOWNLOADED' when generate cosum dataset

Hi, I need to build cosum dataset use your code, but when I run "generate_dataset.py" on the raw dataset of cosum, it pop the error "KeyError: 'DOWNLOADED'". Would you please kinly help me?  Thanks a lot.

Hi @semchan , sorry for the late reply. I will update the repository during this week. I hope it helps you


Update README.md

/review

@CodiumAI-Agent /review
--pr_reviewer.inline_code_comments=true

PR Reviewer Guide 🔍
Here are some key observations to aid the review process:

⏱ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

/describe

Persistent review updated to latest commit https://github.com/cpantu/challengeCoda/commit/5143c2154c11ec87799868690b54c332b4e4d9c9

@CodiumAI-Agent /describe

Title
Update README.md

User description
/review

PR Type
documentation

Description

Corrected a typographical error in the README.md file title.

Changes walkthrough 📝
Relevant filesDocumentation

README.mdFix typographical error in README title

README.md

Corrected a typographical error in the title.

+1/-1

💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

/help

@CodiumAI-Agent /help

PR Agent Walkthrough 🤖
Welcome to the PR Agent, an AI-powered tool for automated pull request analysis, feedback, suggestions and more.
Here is a list of tools you can use to interact with the PR Agent:
ToolDescriptionTrigger Interactively :gem:

DESCRIBE
Generates PR description - title, type, summary, code walkthrough and labels

[ ] Run

REVIEW
Adjustable feedback about the PR, possible issues, security concerns, review effort and more

[ ] Run

IMPROVE
Code suggestions for improving the PR

[ ] Run

UPDATE CHANGELOG
Automatically updates the changelog

[ ] Run

ADD DOCS 💎
Generates documentation to methods/functions/classes that changed in the PR

[ ] Run

TEST 💎
Generates unit tests for a specific component, based on the PR code change

[ ] Run

IMPROVE COMPONENT 💎
Code suggestions for a specific component that changed in the PR

[ ] Run

ANALYZE 💎
Identifies code components that changed in the PR, and enables to interactively generate tests, docs, and code suggestions for each component

[ ] Run

ASK
Answering free-text questions about the PR

[*]

GENERATE CUSTOM LABELS 💎
Generates custom labels for the PR, based on specific guidelines defined by the user

[*]

CI FEEDBACK 💎
Generates feedback and analysis for a failed CI job

[*]

CUSTOM PROMPT 💎
Generates custom suggestions for improving the PR code, derived only from a specific guidelines prompt defined by the user

[*]

SIMILAR ISSUE
Automatically retrieves and presents similar issues

[*]

(1) Note that each tool be triggered automatically when a new PR is opened, or called manually by commenting on a PR.
(2) Tools marked with [*] require additional parameters to be passed. For example, to invoke the /ask tool, you need to comment on a PR: /ask "<question content>". See the relevant documentation for each tool for more details.


system date is not same with windows (WSL 2)

Your Windows build number:  18922

date is updating itself in WSL 2 even I set the timezone and change date manually with date command

because the date is wrong I can't sudo apt update and I have to set the date to my local time everytime I open WSL 2

thanks.

Which distro are you using?  Any errors in dmesg? WSL relies on the tzdata package to do the translation.

Which distro are you using? Any errors in dmesg? WSL relies on the tzdata package to do the translation.

it's ubuntu 18.04
well I just converted from WSL 2 to WSL 1. I will reply after I convert WSL 2 with the outputs.
Thanks.

I can also confirm this, and it’s especially bad when changing time zones, leading up to not being able to use a package manager at all.

[    0.335041] rtc_cmos 00:00: setting system clock to 2019-06-21 22:54:24 UTC<PHONE_NUMBER>)
[    0.335057] Unstable clock detected, switching default tracing clock to "global"
               If you want to keep using the local clock, then add:
                 "trace_clock=local"
               on the kernel command line

This is what i see in dmesg related to system time. I'm using the Ubuntu 18.04 WSL 2.

Me too.

E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 14h 47min 54s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 15h 2min 9s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease is not valid yet (invalid for another 14h 49min 15s). Updates for this repository will not be applied.

This is the error message I got when I run sudo apt update. I think it's related to the wrong system date.
One workaround is switch to WSL1 and then switch back.

I was having the same issue, but my main gripe was that it was preventing me from reliably working with docker containers in what was otherwise a very workable setup.
Here's my solution along with necessary code snippet.

Get time from reliable source on the internet using Curl.
Parse time and set it onto the WSL linux instance
Create a shell script and modify  .rc file to run said script at start

Script:
# ~/set-date.sh

# Get time from google server or some other reliable source
TIME_FROM_SERVER=$(curl -v --insecure --silent https://google.com/ 2>&1 | grep Date | sed -e 's/< Date: //');

# Set stored time
date +"%d%m%Y%H%M%S" -d "$TIME_FROM_SERVER";

echo "Time updated with success!";

After you run this, you should see the current timestamp printed as well as the success message.
Then, in your bashrc, zshrc or equivalent, call the script
sh ~/set-date.sh
CREDIT: I was having trouble with the returned time format. The script above is a barely modified version from here

The problem with the date begins when I put my notebook at sleep, the system clock is ticking but not the WSL one. It can be easily reproduced.
I've been using ntpdate for time sync purposes.
sudo ntpdate pool.ntp.org

I would venture using chrony would be a better option than ntp. Or even ntpsec. Just add something similar such as pool 2.fedora.pool.ntp.org iburstto chrony.conf (or ntp.conf). If you have a local NTP server serving up time for all your machines, point there (and please have 2 servers configured. Yes one will work, but it is very bad practice).

Can confirm. This is a very serious bug, which means any date/time related service would be unreliable in WSL2... including apt.

Can confirm this as well. On converted distro's and newly downloaded ones. This makes it impossible to download newer packages from apt

Quick fix! In PowerShell or Command Prompt:
wsl --shutdown

Next time you start a WSL session, it'll be a cold boot and the time will be correct.

We are working on a fix, in the meantime "sudo hwclock -s" should get things working.

just a quick and concrete example of when it happened for me:

started a WSL2 distro
made the laptop sleep
started again the laptop the next day
checked the date/time -> was still set to the day before

I went the wsl --shutdown route and it worked. Will do the hwclock next time 👍

Glad i found this post.  This was annoying me for awhile, FYI this also affects azure command line due to bad timestamp.
This works for me:

sudo hwclock -s

Below is the error message from az cli in case someone is searching.  The error is misleading, but the root cause is that the CLI is using an outdated sys time from WSL2.
You do not have the required permissions needed to perform this operation.
Depending on your operation, you may need to be assigned one of the following roles:
"Storage Blob Data Contributor (Preview)"
"Storage Blob Data Reader (Preview)"
"Storage Queue Data Contributor (Preview)"
"Storage Queue Data Reader (Preview)"

I had this exactly same problem back on the time that I was using VirtualBox for virtualization, every time my host machine go to sleep. The virtual machine stopped the clock on that time. But when the host come back from sleep, the virtual machine does not look at the time on host machine to update the clock. This simple continue counting the time from where it had stopped.
Exactly the same bug again.

This should be much better in build 18970.

@benhillis I thought pausing/unpausing a VM would be the equivalent to sleep a PC but I guess I was wrong. Would it be possible a similar fix when pausing/unpausing a VM?

What's the relation between pause/resume of a VM with this issue which is fixed now?

@Biswa96 It's the same problem. If you pause a VM for some time then after unpausing it system date is not the same and apt update shows this error .

There is a way. I'll add the code in hvtool.

There is a way to pause/resume WSL2 VM. I'll add the code in hvtool.

There is a semi-documented way to pause/resume WSL2 VM. The code is in hvtool. I have tried WSL VM to pause and resume but the time is in sync.

That's the container. I mean pausing/resuming (2) the virtual machine that contains build 18970 reproduces this issue.

@onomatopellan - Looks like this fix doesn't work with nested, investigating...

This has been fixed on my machine using previous error cases (sleeping) as of build 18980.

This is happening in build 19002 after the pc is suspended for long hours. wsl.exe --shutdown is the fix

Just ran into this in build 19008.1000. sudo hwclock -s fixed it.

I think this is not fixed, since i have to do script  sudo hwclock -s  almost everyday morning. So please fix this. This happen after my surface laptop 1 is suspended for multiple hours.

Same as above . This still happens for me with vscode too

Any output in dmesg?

dmseg.log

@ricardosantos9521 - thanks, those events are not relevant, anything about not being able to translate timezone?  What is the output of readlink /etc/localtime?

No it doesn't appear nothing related to timezone translation.
readlink /etc/localtime returns (that is my timezone):
/usr/share/zoneinfo/Europe/Lisbon

@ricardosantos9521 - Ok, and does sudo hwclock -s get you back in sync?

Yes it does

Yes it does, until the next day morning

This is my experience too. I have to sudo hwclock -s every day. Not cool.

@miklevin - In your case, how much does your clock drift?  To be clear, we're working on a fix for this, I'm just presenting some workarounds in the meantime (wsl.exe --shutdown is very heavy-handed).

I want to add some new things. I think this is related to the way that suspension works (in this case on my surface laptop). After some hours of suspension (appears to be arround 4 hours) the pc goes to a kind of hibernation instead of continuing in suspension. So when i awake the pc in this 4 hours interval the clock appears to be ok. After that interval the clock starts to drift.
So the drift in my case appears to be related to this 4 hours. If i suspended my pc at 1pm it appears that the clock will work until 5pm after that the clock starts to drift.

@ricardosantos9521 - Thanks for the additional info.  If you don't mind, could you describe your config? Are you using WSL2 nested?  What kind of hardware are you using?

I am runing Windows Fast Ring Builds as my main and unique os in a Surface Laptop 1 (i5-7200U) with all the default configs for WSL2.  I am running Ubuntu from the Store.

FWIW it was super clear to me that the amount of time that the Ubuntu clock drifted was exactly the amount of time my laptop had been closed shut and sleeping. On wake WSL is not re-syncing the clock for whatever reason. Running sudo hwclock -s fixes the time to be the correct time and is fine until the next time you sleep your machine.

Same issue on a Dell XPS on the slow build. Definitely related to sleep

I have the same issue DEll XPS 13 7390 Windows Build 19030.1

If somebody is able to reproduce this could you please run powercfg /spr and share the contents?

@benhillis Here's the sleep study from just after my pc woke up.
Run date on ubuntu and was about ~ 1 day behind (consistent with the sleep time)
https://gist.github.com/nicolashopin/b472afb4d0667ee75e43ee134a3aac73

Same here, 19033 - @benhillis have emailed you my report.

+1, another report in your inbox @benhillis

It seems to be fixed now for me:
19035.1 I recently got both a firmware and OS updates

Dismiss the above

Another report in your inbox @benhillis

Ran into this today, used the ntpdate option.
I wouldn't have noticed but the AWS cli was giving weird time discrepancy errors.

same here on Ubuntu 18.04, Windows 10 19041.153

@chrisdpratt and @rqueraud: I found that the sudo is important.  You'll get the "Cannot access the Hardware Clock" message with hwclock -s, but sudo hwclock -s works just fine.

It's no solution, but one trick I've implemented to make my life easier is adding this to my ~/.profile:
PS1="\t $PS1"

which adds the current time to my command prompt. Then it's on me to remember to pay attention, compare the time to my system clock, and run sudo hwclock -s if appropriate - which all too often I still forget, and my commit history pays the price!

@JaredReisinger: I'm running in containers, so I'm root. The sudo command is only to escalate privilege. That's not necessary for the root account.

Quick fix! In PowerShell or Command Prompt:
wsl --shutdown

Next time you start a WSL session, it'll be a cold boot and the time will be correct.

That worked for me, thanks

Facing the same issue. When it will be fixed?

@speller Doesn't sudo hwclock -s work for you?

@speller Doesn't sudo hwclock -s work for you?

I am facing this issue. sudo hwclock -s return this:
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.

How can I update time for my wsl?

@halink0803 Can you paste what you see after entering these:
sudo hwclock -s --debug
ll /dev/rtc*
sudo dmesg | grep rtc

@onomatopellan

Doesn't sudo hwclock -s work for you?

It works. No errors, just updated the current date:

FWIW - I've done a script to make this easier. (I'm on a laptop, where it happens every time the machine sleeps).
Details in this gist.
Hope it can help others.

I confirm seeing the same thing whenever my laptop sleeps.  Does anyone know if there's a way for WSL to get a message that the machine has gone to sleep?  Presumably then one could have that trigger trigger hwclock. Otherwise it seems like the only solution that doesn't require remembering to run a command (which I have consistently failed to do...) is to use cron or similar...

@eteq This script runs whenever the PC comes from sleep/hibernate
https://github.com/stuartleeks/wsl-clock

Thanks @onomatopellan !
I've had that script/task set up for a couple of days and it has been working well.
Would love to get confirmation if it's working for others, too 😃
And I've written a blog post with a bit more of a breakdown of the script: https://stuartleeks.com/posts/fixing-clock-skew-with-wsl-2/

@stuartleeks Thank you for the script! I never had this problem in my PC though, but I can see it when pausing/unpausing my hyper-v VMs. Unfortunately the script won't help on VMs because hwclock doesn't work and doesn't seem to trigger any event when unpausing the VM.
For now inside a VM I use ntpdate to sync the clock with internet.

This suddenly happened to me today. WSL2 Ubuntu 18.04 still thought it was friday (I wish!) but it was monday 🤷♂
sudo hwclock -s worked as a temporary fix, but the fact that this issue has been open for a year makes me wonder
Running Windows 10, v 2004, build 19041.207 on a Dell XPS 9380

The sudo hwclock -s doesn't work for me. Even as a temporary fix.

This also messes with OAuth 2.0 if you are running a demo webapp locally that happens to use that.

This is happening to me too. Just upgraded a WSL1 Ubuntu 18.04 to WSL2, left the laptop for a day, and it still thinks it's yesterday in Linux-land.

@therealkenc I am running the release build, does not seem to be fixed for me. Is this fixed in an upcoming version?

Something became much better in 18970 circa August 2019, which means that fix shipped in 2004 aka 19041. That thing might not be your thing; feel free to revisit in another issue with your repro.

OK, but it's exactly the same as this issue so not sure if opening a new is is best. After machine wakes up from sleep or hibernate, date is off and is not corrected until I use sudo hwclock -s or some other temporary fix (e.g. shut down & restart the VM). Does not happen with WSL 1. Seems from comments above like I'm not the only one still experiencing this.

@garyo You're not the only one still seeing this. I just ran into this same issue today myself. My Ubuntu 20.04 environment in WSL2 is way off after I put my laptop to sleep last night.
I wonder if there is a difference in

Installing a new Ubuntu 20.04 environment after upgrading to WSL2 vs
upgrading an Ubuntu environment after upgrading WSL1->WSL2

I did (2) above with my setup.

@dwaynebradley Same problem here with '2' (Upgrade of Debain WSL1->2).
sudo hwclock -s works, but is pretty tedious/haphazard. This laptop is alseep a handful of time per day.

@garyo You're not the only one still seeing this. I just ran into this same issue today myself. My Ubuntu 20.04 environment in WSL2 is way off after I put my laptop to sleep last night.
I wonder if there is a difference in

Installing a new Ubuntu 20.04 environment after upgrading to WSL2 vs
upgrading an Ubuntu environment after upgrading WSL1->WSL2

I did (2) above with my setup.
Running sudo hwclock -s updates my time but is a pain to remember to do until it is too late.

Happens with 1. as well. Arrived here in this thread when I ran into issues installing the dotnet SDK, after the laptop had been asleep for a couple days. sudo hwclock -s works to update the date and time.

Just going to pop another mention of this here: https://github.com/stuartleeks/wsl-clock
Since setting that up, I've forgotten about the problem (apart from notifications from this issue thread) :-)

Well, even after I run sudo hwclock -s now, the time in Ubuntu 20.04 is still approximately 3 seconds behind what Windows is showing. If I want it close, I actually have to use sudo date -s "YYYY-MM-DD HH24:MI:SS". Hopefully this is corrected soon.

You can run ntp (via systemd) which will sync the clock, as long as it's reasonably close to start. It may take a while to resync after the hiccup though, not sure. It only slews the clock pretty gradually.

running sudo hwclock -s from wsl2 when resuming from sleep mode resynch the clock in the containers. At least I don't have to reboot Windows 10.

This is happening to me as well.  Ubuntu 20.04 in WSL2 (latest Win10 insider updates applied).
The problem has shown up for me in two difficult to track down ways:

I was running an AWS CLI rake task that was failing with access denied errors
Encountered errors running sudo apt-get update with errors saying that access to ubuntu repositories would be allowed in a few days.
Running sudo hwclock --hctosys or sudo ntpdate pool.ntp.org fixed it.

Ran into this today running apt update with WSL2 and Ubuntu 20.04.
Implemented the following work-around:
/etc/sudoers:
ALL ALL=NOPASSWD: /usr/local/bin/force_time.sh

/usr/local/bin/force_time.sh:
#!/bin/sh

if [ "$(whoami)" != "root" ] ; then
        echo "Not root, running with sudo..."
        sudo $0
else
        echo "Fixing clock from hardware clock"
        /usr/sbin/hwclock -s
fi

This will make it easy to implement in a .bash_profile or other startup script.

@therealkenc

Something became much better in 18970 circa August 2019, which means that fix shipped in 2004 aka 19041. That thing might not be your thing; feel free to revisit in a new issue with your repro.

I'm running 19041 and I'm still seeing this issue. I think this should be re-opened unless another ticket is tracking it. Thanks!

@djensen47 This issue was already fixed but there is another similar problem in some scenarios. Thread and explanation in  https://github.com/microsoft/WSL/issues/5324#issuecomment-638348776

It doesn't seem fixed 🤷♂ . The system time is out of sync in all scenarios for me: after a refresh, after waking from sleep. It just doesn't work. In this example WSL2 is ahead of Windows by 9 seconds. It's actually more because it took my a few seconds to create the screenshot/

Try with wsl.exe --shutdown and reopen the terminal. If you see the correct date then it's #5324.

Quick fix! In PowerShell or Command Prompt:
wsl --shutdown

Next time you start a WSL session, it'll be a cold boot and the time will be correct.

This works! thank you very much

not fixed, still happening Microsoft Windows [Version 10.0.19041.388]
returns errors with AWS api being out of sync

Can confirm it is still happening on 19041.388
Everytime I wake after sleep or hibernation the clock is in the past.
Causes Github issues & AWS issues
Running sudo ntpdate pool.ntp.org solves it as a workaround.

Can confirm it's still present on Windows 10 2004 (19041.388). Gnu Gmake gives time skew errors.

Just got this myself on 19041.388 as well. Didn't get any of the ntpwhatever solutions working, but the sudo hwclock -s updated it just fine, so I guess I'll be working around with that until this is fixed.

I guess we're supposed to be looking in #4114 and #5324 for this problem now?

I still get this reliably every single time I wake the PC from hibernate. The sudo hwclock -s command fixes it, but really annoying.
I'm on a freshly baked Ubuntu distro (Ubuntu 20.04 right now) just after receiving the Windows 2004 update.

I have spent hours tracking missing metrics issues, only to eventually find that they're being logged 16 hours 13 minutes behind because the metrics service is running in a Linux container.  This issue has all kinds of knock-on effects.

This is having various effects on all sorts of software that we're attempting to test on WSL. Running sudo hwclock -s fixed it but this is not a tenable approach long term.

While this being fixed, one can use chrony as a workaround. It looks like you can't autostart it without systemd, but you can add sudo chronyd to your .bashrc / .zshrc. chronyd handles multiple run attempts automatically and returns really fast if it's already running (3ms on my machine) so it shouldn't make any visible impact on your terminal startup performance. I effectively forgot about any time sync issues after I set it up. The only drawback of this workaround – you have to modify your sudoers file to allow run sudo chronyd without password, but as for me it's not a big deal.

Is this even being fixed? I see the issue is closed.

There's another issue on this topic at https://github.com/microsoft/WSL/issues/5324, still open since it is not fixed yet.

I am on the latest build (19041.450) and this doesn't seem to be fixed in ubuntu 20.04 with wsl2. I had to use sudo hwclock -s command as suggested above to workaround this.

Same issue, not fixed atm.

Cheers @tommiv

While this being fixed, one can use chrony as a workaround. It looks like you can't autostart it without systemd, but you can add sudo chronyd to your .bashrc / .zshrc. chronyd handles multiple run attempts automatically and returns really fast if it's already running (3ms on my machine) so it shouldn't make any visible impact on your terminal startup performance. I effectively forgot about any time sync issues after I set it up. The only drawback of this workaround – you have to modify your sudoers file to allow run sudo chronyd without password, but as for me it's not a big deal.

For those as new to this as I am, you might need to raise or disable the maximum skew limit. (Sleep durations will frequently exceed the default skew limit. From /etc/chrony/chrony.conf (Debian), comment out the maxupdateskew line:
# Stop bad estimates upsetting machine clock.
# maxupdateskew 100.0

The chrony workaround got me unblocked. In my case it was as simple as this on Ubunu 20.04 in WSL2
sudo apt-get update && sudo apt-get install -y chrony && sudo chronyd

This is quite problematic when working with git, it seems that system time is used for the commit date.
I can commit something to a GitHub repo, and it immedately shows it as being in the past. In my case, immediately as "committed 3 days ago", since I haven't restarted in 3 days. This makes for quite a confusing git log, and would require rewriting history on these commits to resolve 😬

Still present in W10 2004 (Build 19041.508).

Just adding to the chorus, as this hasn't been solved in a year. I've run into some really hard to diagnose errors using Google Cloud because of this.

This happened to me right after installing Docker Desktop with its WSL integration. I've seen others mention Docker as well. Perhaps there's a pattern here?

ARGH.  This is a complete mess.

I also can't use apt-get update as WSL 2 bash thinks it won't be valid until two and a half days in the future. Installing and running chronyd isn't helping. Installing and running ntpdate is throwing errors about connecting. Running the event setup at https://github.com/stuartleeks/wsl-clock also did nothing. I'm going to try rebooting the computer, see if that helps, because closing and restarting the terminal does nothing.

Please all, use the simple and quick fix as mentioned before as long as this issue is not fixed:
sudo hwclock -s

@danwhitston it's enough to shutdown the VM with wsl --shutdown, no need to reboot. Also chronyd MUST help, as well as sudo hwclock -s. To make chrony more forgiving, take a look at this comment https://github.com/microsoft/WSL/issues/4245#issuecomment-687937163

Thanks both. You're right, chronyd must have been hitting the skew limit, given WSL's time was out by days rather than milliseconds.

That's funny, I had an incorrect date in WSL on waking my laptop today.
So it does not seem to be "fixed" at all.

sudo hwclock -s does not correct the time for me.

I have found this issues because this still happens. I was actually writing a topic about the date command and found this behavior by chance, hadn't tried the hwclock -s, but shutting down and restarting it works

This is not fixed.

This is not fixed. Just keep using the sudo hwclock -s

I can't believe this is still broken. Debating about implementing some kind of hack to mitigate it, but in the meantime I just run sudo hwclock -s occasionally (particularly if I'm about to commit/push code). You would think something like this would be prioritized...surely the WSL maintainers themselves run into this issue all the time.

Just ran into this same problem. Why this issue is marked as closed is beyond me.

There's another issue on this topic at #5324, still open since it is not fixed yet.

It does not seem to occur as of Windows 20H2 update. However, because it is not listed in the resolved issues in Windows 10 version 20H2, I am unsure of why it does not recur after the update.

I also have this problem. The time reported by Windows appears accurate, seems to match "time.io" for example.
The time reported within WSL2 is about 25 seconds ahead.
The sudo hwclock -s command makes no difference for me, the time within WSL2 is unchanged. Restarting wsl with wsl --shutdown has made the clocks synchronize though.

Is there a solution if hwclock -s doesn't work:
root@6d5befe8cf47:/data# hwclock --verbose
hwclock from util-linux 2.33.1
System Time:<PHONE_NUMBER>.723684
Trying to open: /dev/rtc0
Trying to open: /dev/rtc
Trying to open: /dev/misc/rtc
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.
root@6d5befe8cf47:/data# cat /sys/devices/system/clocksource/clocksource0/available_clocksource
hyperv_clocksource_tsc_page
root@6d5befe8cf47:/data#

Yes, I also get that error. So using hwclock -s on its own produces no output to say its failed, but --versose produces:
hwclock from util-linux 2.34
System Time:<PHONE_NUMBER>.397590
Trying to open: /dev/rtc0
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.

Of course I realise that you need to run it as sudo hwclock -s and that then does work (for me):
hwclock from util-linux 2.34
System Time:<PHONE_NUMBER>.374906
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2020/12/03 18:03:18
Hw clock time : 2020/12/03 18:03:18 =<PHONE_NUMBER> seconds since 1969
Time since last adjustment is<PHONE_NUMBER> seconds
Calculated Hardware Clock drift is 0.000000 seconds
2020-12-03 18:03:16.947133+00:00

I was already root. I exec into a redis docker container: docker exec -it redis bash and at that point I'm root but I can't execute hwclock.

Open a bash shell directly from Windows, then try "sudo hwclock -s".   That runs but still left me a few seconds behind though.

Same problem. It is December '20. The bug is from June '19.
This thing is serious since Docker is using WSL 2 now, effectively having wrong clocks in all containers.

prod was broken. solution was do delete windows and install unix system

Just after spending a whole day trying to work out why a Docker container was getting 403 when connecting to AWS... then checked the date! Very annoying. Why has this issue been closed?

Bump?

Bump?

Docker containers having the wrong clock (which is the effect of this issue) is a serious problem. The reason I ran into this was that I have a docker container running a service that is issuing authentication tokens for a web service. Trouble is that you authenticate and get a token, but when you use the token the receiver (not running in docker, and hence having a different clock) complains that the token is being used before it's issued because the clocks aren't in sync. This is just one example, but there would be many ways in which not having the clocks synched will cause unexpected issues.

Docker containers having the wrong clock (which is the effect of this issue) is a serious problem. The reason I ran into this was that I have a docker container running a service that is issuing authentication tokens for a web service. Trouble is that you authenticate and get a token, but when you use the token the receiver (not running in docker, and hence having a different clock) complains that the token is being used before it's issued because the clocks aren't in sync. This is just one example, but there would be many ways in which not having the clocks synched will cause unexpected issues.

Experiencing the same issue, this did not work for me
sudo hwclock -s

this works for some time but then the time resets again
sudo ntpdate pool.ntp.org

Experiencing the same issue, this did not work for me
sudo hwclock -s

this works for some time but then the time resets again
sudo ntpdate pool.ntp.org

If you have a Docker container, don't try changing time within the container. Instead, change the server time with:
sudo ntpdate pool.ntp.org
(if you don't have it on system then install with: sudo apt-get update & sudo apt-get install ntpdate)
or
sudo ~/set-date.sh
given set-date.sh is defined below.

Having correct time becomes a must when you are pushing or pulling updates to Azure blob or any other data factory.

~/set-date.sh
Get time from google server or some other reliable source
TIME_FROM_SERVER=$(curl -v --insecure --silent https://google.com/ 2>&1 | grep Date | sed -e 's/< Date: //');
Set stored time
date +"%d%m%Y%H%M%S" -d "$TIME_FROM_SERVER";
echo "Time updated with success!";

If you have a Docker container, don't try changing time within the container. Instead, change the server time with:
sudo ntpdate pool.ntp.org
(if you don't have it on system then install with: sudo apt-get update & sudo apt-get install ntpdate)
or
sudo ~/set-date.sh
given set-date.sh is defined below.

Having correct time becomes a must when you are pushing or pulling updates to Azure blob or any other data factory.

~/set-date.sh
Get time from google server or some other reliable source
TIME_FROM_SERVER=$(curl -v --insecure --silent https://google.com/ 2>&1 | grep Date | sed -e 's/< Date: //');
Set stored time
date +"%d%m%Y%H%M%S" -d "$TIME_FROM_SERVER";
echo "Time updated with success!";

Hey, I hope this can help :)
I decided to set up a crontab to update my time every 10 minutes.
I think that it's a good way to make sure the time doesn't drift too much.
Note that since you need sudo to run ntpdate,  you need to use the sudo crontab:
so, run sudo crontab -e, then add:
10 * * * * ntpdate time.windows.com

Hey, I hope this can help :)
I decided to set up a crontab to update my time every 10 minutes.
I think that it's a good way to make sure the time doesn't drift too much.
Note that since you need sudo to run ntpdate,  you need to use the sudo crontab:
so, run sudo crontab -e, then add:
10 * * * * ntpdate time.windows.com

Folks still commenting on this issue might want to comment on #5324 instead because that one's still open and comments there are probably more likely to get noticed by MSFT than comments on this closed issue.
I can't believe this bug has existed for this long.  Wow.


Local checkImages function instead of triggering events on the container (take 2)

This fixes #18. Instead of triggering an event on the container, this moves the image checking into its own function. That function is called where events were previously triggered.
Resizing the window no longer scrolls to the top of the window in jQuery <1.7.
The plugin should only trigger its own events so other code doesn't receive an erroneous onscroll when the window wasn't actually scrolled. Now the plugin only triggers appear.

Merged to 1.7.1 branch. Will release soon. Thanks!


Some images wrongly error out

For some images, the plugin is unable to add the text in the details tag. This is because sometimes the tesseract program emits a line to stderr: Estimating resolution as 314. This debug line makes the plugin think that the command errored out and consequently the OCR text is not added to the details tag even though the console debug logs show the correct text.
If, for example, we add a command-line flag --dpi 300 to the tesseract command, then the program doesn't emit this stderr line and the plugin works as expected.

Thanks for opening this issue, should be fixed in this release (0.3.8). Let me know how it goes...


MNT: Re-rendered with conda-build 3.20.5, conda-smithy 3.8.5, and con…

…da-forge-pinning 2<IP_ADDRESS>.58.57

Checklist

[ ] Used a personal fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[ ] Ensured the license file is being packaged.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.
I do have some suggestions for making it better though...
For recipe:

noarch: python recipes are recommended to have a lower bound on the python version. This recommendation will become a requirement in the future.


[PORT] Make FolderResourceProvider extensions externally onfigurable.

Port this change from botbuilder-dotnet/master branch:
https://github.com/microsoft/botbuilder-dotnet/pull/3290

add comments to resource explorer classes
Fix functional unit tests which are broken local if no environment variable.

already resolved


Fix issue with Windows path being rejected by Docker for Windows

This fix will address issues #105 and #106 .
The problem is that Docker expect Windows paths in the following format:
/C/path/to/directory
Here's an example error when we use the plain process.cwd() method:
PS C:\GitHub\node-openid-provider> binci test
√ Starting services vault, db
√ Running Task
‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧
docker: Error response from daemon: the working directory 'C:\GitHub\node-openid-provider' is invalid, it needs to be an absolute path.
See 'docker run --help'.
‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧
× Command failed
PS C:\GitHub\node-openid-provider>

The exact same issue applies to the tmpdir that is used to mount docker volumes. This fix still requires the use of BINCI_TMP env variable that's set to an absolute Windows path.

@brandonros and @svetkomir thanks for the PR - merged and released 5.8.0

Thank you, Kent!


Reading from stdin panics

Using the example from the docs:
$ echo 'print("Koi")' | koi -s
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/main.rs:77:51
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I believe this is due to this line:
https://github.com/eliaperantoni/Koi/blob/caa13f7bdb1754627dba0d90c733da8ad73107a1/src/main.rs#L77
Providing the -s option conflicts with providing a path, so naturally matches.value_of("path") == None.
Maybe the root can be set to the current directory if reading from stdin?

Hi @cherryblossom000, you are totally right! (Sorry for the abysmal delay).
I have fixed this and other issues with the import system, a new release is available if you want to try it out!
~/code/koi > echo 'print("Koi")' | koi -s
Koi

Closing this for now but feel free to reopen if more issues arise.


Package for Lambda

It would be great if we could run this in Lambda now that it supports python and scheduling.

+1

I have actually written a version of this in node that I will post once it's cleaned up. I am running it in Lambda on a schedule and it seems to be working fine. Basically you just have to setup the function and create a role with the proper permissions and let it run.

A lambda version of this would be awesome

+1
I wonder if it would be possible to run it statelessly, without scheduling, reacting to threshold alerts on Dynamo metrics and/or circuit breaker availability via Cloudwatch?

You need a schedule to handle reductions since there is not a trigger that will indicate under utilization, but that can run once an hour or even less since you can only reduce 4x per day. I make my scaler only reduce a max of once per 6 hours, but if it is in the second 6 hour block of the day (UTC) and it hasn't reduced it will reduce more often so that it hopefully uses them all up by the end of the day.
I have mine one every 5 minutes and also on an SNS when my read throttles are over 2 for 2 consecutive minutes. I am still fine-tuning the logic, but my last 24 an auto pilot looks like this:

I'm setting it up to run every minute on lambda.... I'm using the runonce option, set the cloudwatch data window to -1 minute and for a minute duration, set the check-interval to zero to avoid the sleep at the end, log-file off.  Even running every minute it uses barely any lambda resource however Im not using this in anger just yet, mainly because my usage is very bursty at the moment and it can't keep up.

+1 for the Lambda version :)

A Lambda package would make this complete and easy to use.
Looks not a like mission impossible - package for Lambda deployment, configuration via S3 bucket...

A Lambda version of Dynamic DynamoDB would be really cool. PRs for this is more than welcome.

https://github.com/bradmurray/DynamoDBLambdaMonitor

Another good lambda version:
https://github.com/rockeee/dynamic-dynamodb-lambda

I've just released my version here: https://github.com/channl/dynamodb-lambda-autoscale

I've added new features to the dynamic-dynamodb-lambda developed by rockeee. New features:

Global Secondary Index support
Enable/Disable read/write autoscaling in config json file
Throttle Events in CloudWatch support
Enable/Disable throttle-read/throttle-write checking in config json file
Added test to lambda

You can download this lambda from here:
https://github.com/touchvie/dynamic-dynamodb-lambda
I hope that this lambda can help you. It works fine.


Apply to host modal feedback round

I'm putting up this issue to document some improvements to the modal to apply to a host:

Before (Version in production)
After

Settings

Improved spacing. Used updated form fields

Edit member modal

Improved vertical spacing. Better text legibility (Help text)

Apply to fiscal host modal

Improved text legibility. Improved spacing. Used updated form components

Figma file in production-ready

@kaylarep

Thanks @Memo-Es  these spacing edits make sense.
The copy in the Edit Member Details Section  needs some work. (let me know if you want it typed up)

[ ] Description is misspelled
[ ] The Roles could use better descriptions, maybe even bulleted, clearly defining the limitations/access of each role
[ ] The modul should also include:

[ ] link to Docs to instructions for adding Admin (if possible— this is quite a support pain point)
[ ] Description that invitation will be emailed to recipient and they must accept the invite in order to appear on the page

Also, not sure if this is the right place for this, but. OCF has been wanting to add a couple questions to the application flow, maybe OSC wants to consider these edits too:

What do you plan to do with the raised funds? Please provide details.
How long will this collective be active?

Unlimited | Time limited: Please specify

How did you hear about us?


CI - The set-env command is deprecated and will be disabled soon

Issue Type

Repository CI

Summary
The set-env command is deprecated and will be disabled soon.
Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
Role or Module Name
During execution of: .github/workflows/ansible_test.yml

Github documentation
Setting an environment variable
echo "{name}={value}" >> $GITHUB_ENV

Multline strings
For multiline strings, you may use a delimiter with the following syntax.
{name}<<{delimiter}
{value}
{delimiter}


WIP: Ported Fluent Theme to ControlThemes.

What does the pull request do?
This PR ports the fluent theme to use ControlTheme with @Takoooooo's help.
Due to the way that control themes work, some of the themes required a bit of refactoring - in particular we decided not to allow nested /template/ selectors in control themes, so controls that used these had to have their sub-controls refactored out into separate sub-ControlThemes. This is a bit of a pain but should hopefully improve the stability of themes in the long-term as control themes are no longer relying on implementation details of other control themes.
The only place the lack of nested /template/ selectors turned out to really be a problem was in SplitButton as that control essentially adds additional states to Button (checked, flyout open). For the moment I've used a hack with setting the Tag property but we really need a proper solution for this - probably something like ClassSetter which would allow setting classes on controls from a style, or maybe something like the CSS :part selector (or both).
Depends on #7679
Depends on #8263
IMPORTANT
Currently targeting #7679 - change the PR target back to master before merging.

Rebased to credit @Takoooooo for the work he did on this.

In particular we decided not to allow nested /template/ selectors in control themes, so controls that used these had to have their sub-controls refactored out into separate sub-ControlThemes

I've found other places where directly accessing the template of a control within a template is very useful. Not trying to start another big discussion but if I had a vote I would not want to remove this functionality. It is totally find for one control default style to depend on another control's default style within the same theme (translating to Avalonia's "new terminology" default style = ControlTheme, Theme = FluentTheme).
Additionally, you are adding code duplication of styles so it would be easy for a button in one control style to be out-of-sync or outdated with the main button's default style. That is an undetectable error -- however, referring to a template part that no longer exists can be detected. So... well, I would not have done this for

Code duplication
Sure there is separation now so some changes don't break dependent control styles; however, now you have undetectable places where code can become out-of-sync design-wise

I've found other places where directly accessing the template of a control within a template is very useful. Not trying to start another big discussion but if I had a vote I would not want to remove this functionality.

Yeah we had a pretty intense discussion about this internally as well, but the general consensus was:

The /template/ selector was generally speaking a mistake. It came from the CSS /deep/ selector which was removed and for good reason - it's essentially the equivalent of changing private fields in a class using reflection
A /template/ selector which can poke into any template was needed previously because of the way our styles worked - there was no scoping of styles
The CSS /deep/ selector was replaced by the :part selector which is much better because it defines an API contract

So the plan is to:

Add a :part selector - the details of this need to be fleshed out, but we already have concept of "parts" and we already have the [TemplatePart] attribute, so conceptually it's a good fit for Avalonia
Add a ClassSetter which can be used to add extra state to other controls from a style
Long term, eventually do a gentle deprecation of the /template/ selector outside control themes

To give some context: we're currently basically unable to change our templates between major releases because the template contents essentially become a public API due to /template/. So we have to balance the fact that 1) /template is a problem and 2) removing /template/ would break a lot of code if we did it now.
Given the above we felt that preventing meddling with implementation details of other controls in a new feature is a good start, but removing the feature as it already exists is probably a step too far right now.
We are actually open to removing the limitation on nested /template/ selectors in control themes if a problem arises that literally cannot be solved by any other means, but as you know it's far easier to add features than remove them! So for the moment I'm hoping that by disallowing nested template selectors we can understand what exactly they're needed for and try to come up with better solutions for these use-cases.
Does that make sense?

A single theme can have inter-dependencies.

The problem with this is, how do you define a theme? Are we talking about the fluent theme as defined in Avalonia.Themes.Fluent? Or does it include Avalonia.Controls.DataGrid/ColorPicker fluent themes? If it also includes those then it probably should include 3rd party fluent themes, right? And so you're back to having the contents of our themes be a public API.

Started a discussion to discuss the usages of /template/ selectors: https://github.com/AvaloniaUI/Avalonia/discussions/8490

You can test this PR using the following package version. 0.10.999-cibuild0022401-beta. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]


Allow bash-like env variables expansion in topology file

Use case: Run CI/CD against a particular SR Linux release on a given type of emulated device
---
name: napalm-ci_cd

topology:
  kinds:
    srl:
      image: ghcr.io/nokia/srlinux:{ SRL_VERSION|"latest" }
      type: { SRL_TYPE | "ixrd2l" }
  nodes:
    srl:
      kind: srl
      mgmt_ipv4: <IP_ADDRESS>
      mgmt_ipv6: 2001:172:20:20::16

You can use env vars for that today:

but, as explained here this only does pure env vars expansion and doesn't allow for bash-like syntax.
I agree that it'd be nice to have a possibility to provide a default, and the linked issue links two projects that can do that:

https://pkg.go.dev/mvdan.cc/sh/v3/shell#Expand
https://github.com/drone/envsubst

If it is run within a CICD pipeline, that pipeline should allow something like this.
ENV_VAR="${ENV_VAR:-defaultvalue}"

Which will apply the default to $ENV_VAR if it is not set. I'd assume that is all that is required?!

@steiler I would still add this https://github.com/a8m/envsubst to allow for non-CI environment.
I can see how this can be useful to have a single topo file that runs both in CI and locally without modifying it.


Fix: Don't need to encode tags when production

The tags with Chinese character would be double encoded when deploy in the way of static export. Then the server wold not  find the correct route.

Hmm I just noticed that there were some people who posted about this issue in https://github.com/timlrx/tailwind-nextjs-starter-blog/pull/771 as well. What's the reason that encodeURI is needed in dev but not prod? And could you just if it works on a normal yarn build and yarn serve as well?
Would like to fix this issue properly.


Bad variable type checking inside documentation for defaultSortMethod

What version of React-Table are you using?
6.7.6
What bug are you experiencing, or what feature are you proposing?
Fix for documentation (defaultSortMethod)
Reproduction
Please check README.md file
What are the steps to reproduce the issue?
Inside documentation for default sorting method, there is missing checking variable type. Current code:
a = a === 'string' ? a.toLowerCase() : a
b = b === 'string' ? b.toLowerCase() : b

will compare variable to provided "string", not to the type. Here's how code should look:
a = typeof a === 'string' ? a.toLowerCase() : a
b = typeof b === 'string' ? b.toLowerCase() : b

Please submit a PR to fix this if you can :)


Fixed bug in replaceItems involving hook.result.total

Fixed this issue https://github.com/feathersjs/feathers-hooks-common/issues/93

daffl said ok in slack

Thx for the fix. I see this was merged to master, when will this be published to npm? Last publish was over a month ago.

v3 should be published this week.
It contains some breaking changes, so its been held back to come out with the Auk release.

Thx for the update!

Any idea when this will be available?

It is in v3.0.0-pre.1

I have tried installing this version but it didn't make any difference, not sure I missing something though. I just did npm i<EMAIL_ADDRESS>

replace-items no longer touches hook.result.total, so it should be what the service returns. Could you please provide a breaking example of the problem.

using feathers-client the follow request return 50 items and a total of 50 even though there are more records.
service.find({query: {$limit: 50, $skip: 0}})

on the feathers service I have
exports.after = {
  all: [],
  find: [hooks.populate({
    schema
  })],
  get: [],
  create: [],
  update: [],
  patch: [],
  remove: []
};

with a schema of
module.exports = {
  include: [{
    service: 'images',
    nameAs: 'image_s3',
    parentField: 'image_s3',
    childField: '_id',
    query: {
      $select: ['key', 'version']
    }
  },{
    service: 'terms',
    nameAs: 'materialType',
    parentField: 'materialType',
    childField: '_id',
    query: {
      $select: ['name', 'weight', 'price'],
      $sort: {
        weight: 1
      }
    }
  }]
}

Could you copy here the contents of your services/replace-items.js ? Thanks.

'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

exports.default = function (hook, items) {
  if (hook.type === 'before') {
    hook.data = items;
  } else if (hook.method === 'find' && hook.result && hook.result.data) {
    hook.result.data = Array.isArray(items) ? items : [items];
  } else {
    hook.result = items;
  }
};

module.exports = exports['default'];

@eddyystop Apologies my fault I was using
const hooks = require('feathers-hooks');

instead of
const hooks = require('feathers-hooks-common');

No problem as long as we found the problem. ;)


mushroom (whole organism)

This term needs to be deprecated in favour of "mushroom fruitbody" but check if its remaining subclasses can simply be unplugged or if they need fruitbody subclasses.

Completed!


Error to change set option value

Hi
I am trying to change the Home Domain parameter for my issuer account and everytime finish with error 400.
I follow this guide but not worked: https://stellar.stackexchange.com/questions/2821/cant-change-low-threshold-to-0-in-set-options
My issuer account is GCRZ3AXG3LKYGWUUZHK64FEUVQ64UNEIKUCWCR5JOL336UUIIE2ZLOYG
Thank you

Sorry for the long response. We are overwhelmed with support requests at the moment.
Looks like you managed to set correct thresholds for your account because currently its status is shown as "locked".
So I'm closing this.

Hi
Thank you for your return. So, once the account locked is not possible change enything, not even the home domain?
Another question, is possible drop or delete these accounts (issuer and distritution) and recreate the token?
Thank you.

No, you can't do anything with it since there is no active singers available.
To recreate the token, you'll need to create a new account, and distribute new tokens to current token holders. The easiest way is to set up a DEX offer that will exchange old tokens for the new tokens at the 1:1 rate. People will be able to trade tokens using any Stellar wallet in this case.

So, I need to do the procedure to create a new token, with the same name and exchange the old for the new, right?
But the older, after remove all thust, can I delete de account? I dont want have 2 tokens with the same name.

No, you cannot. The whole purpose of account locking is to prevent a token issuer from doing these things. Once the account is locked, it's impossible, for example, to dilute tokens supply or change home domain - this protects users from potentially malicious actions of token issuers.

Understood.
I just need add the link of my page on home domain to complete the information about the token. In fact, I want give more information to my users.


Removed deprecated stuff

Removed makeBackgroundTaskQueue usage since it’s deprecated

Thanks for contributing.
This looks like a corruption of generated documentation.
These methods were added just the last stable version of Flutter and are not deprecated even on master
https://github.com/flutter/engine/blob/32ed9897919b6f930252a669eda087a491fb3ff5/shell/platform/android/io/flutter/embedding/engine/dart/DartMessenger.java#L82
https://github.com/flutter/engine/blob/32ed9897919b6f930252a669eda087a491fb3ff5/shell/platform/android/io/flutter/plugin/common/BinaryMessenger.java
So I'm closing this since this is based on a wrong premise.

Also, the official doc is this https://api.flutter.dev/javadoc/io/flutter/plugin/common/BinaryMessenger.html#makeBackgroundTaskQueue()


Request to publish our motivation when we do larger changes in materials, so that others can link to it as motivation

Feedback from ambassador call

Great feedback. We could comment on big lesson changes somewhere inside the lesson repos to make them easy to find and track.


[Insets] Insets don't apply immediately

Description
The status bar padding insets don't apply immediately which results in unpleasant visual artifact
Steps to reproduce
I'm using a compose View inside a fragment.
  override fun onCreateView(         inflater: LayoutInflater,         container: ViewGroup?,         savedInstanceState: Bundle?     ) = ComposeView(requireContext()).apply {         setContent {             AppTheme {                 ProvideWindowInsets {                     Screen()                 }             }         }     } }
The insets are then consumed inside the screen  composable
 @Composable fun Screen() {     Column(         Modifier             .statusBarsPadding()             .fillMaxSize()     ) {         Text(modifier = Modifier.fillMaxWidth().background(Color.Red).padding(vertical = 48.dp), text = "")     } }
Expected behavior
The insets should be applied fast enough that no artifacts are seen
Additional context
Video for context
You can see the red background takes time until it's padding are applied
Version: 0.24.0-alpha

Seems to be related to this issue
https://github.com/google/accompanist/issues/155
Which provides a hack that is not optimal.
Any updated on an official solution?

There is no 'solution', that's just how insets work.


Agent is not deploying offline subgraphs

Indexer/Service/CLI v0.20.5-alpha.1 and Graph node v0.28.2
When deploying offline subgraphs either via INDEXER_AGENT_OFFCHAIN_SUBGRAPHS or graph indexer rules prepare Qm.. the agent seems to look likes it's deploying the subgraphs but never does. Agent logs attached.
If you look at the also attached graph node logs, you will see some behaviour that I am assuming is weird - the offchain subgraphs are being referred to as being sgd:  0 in the graph node logs.
For example, Nov 07 00:20:58.223 INFO Set subgraph start block, block: Some(#11296635 (624092abf48ac2437ed77ce96d6f061431838ea1a8404e181d7df37b9bb53dc0)), sgd: 0, subgraph_id: Qmew9PZUJCoDzXqqU6vGyTENTKHrrN4dy5h94kertfudqy, component: SubgraphRegistrar whereas this subgraph is sgd8 in the database.
index-node-0.txt
indexer-agent.txt

The sgd: 0 logs are odd.
Are you using a toml file to configure your graph-node à la advanced config docs?  Control of deployment assignments has been moved out of indexer-agent and now graph-node is making the assignment decisions based on the config.


False positive unused import while formatting conditional

Expected Behavior
Formatting this code should not remove the import for CONSTANT.
import other.CONSTANT

fun main() {
	if (CONSTANT
    	&& true
    ) {
        return
    }
}

Observed Behavior
Ktlint outputs the following (which no longer compiles due to error: unresolved reference: CONSTANT):
fun main() {
	if (CONSTANT &&
    	true
    ) {
        return
    }
}

Steps to Reproduce
I created a sample to reproduce it here. Format and then compile to reproduce the error.
Notes:
It seems like correcting the && wrapping is key here, because other formatting fixes don't seem to trigger this same behavior.
Also if CONSTANT is referenced elsewhere in the same file, it will not be removed during formatting.
Your Environment
ktlint 0.37.2

Could you try the latest version (0.38.1) and also run with --verbose to get an idea which rule is it?

I upgraded to 0.38.1 and it still happens. Verbose mode says this is the rule: Line must not begin with "&&" (chain-wrapping)

Problem with unused import was resolved in 0.38.1. The violation Line must not begin with "&&" (chain-wrapping) can simply be resolved by the user.


Allow settings value to not affect a light below 0

hi, great addon.
My use case is that I have 6 lights from Zigbee2MQTT, sending individual commands to each lightbulb is network expensive, so I additionally have these 6 in a group so there's only 1x command being sent.
The bulbs don't get very dim, so I want to turn these on one-by-one between brightness levels 1-6, after that, I want to start using the group as normal.

Group is 0 up till brightness level 7, after which it scales to 100.

Individual light 1 turns on at 1% brightness, should stay at 1% until lightner goes past 6%

Individual light 2 turns on at 2% brightness, should stay on at 1% until lightner goes past 6%

... etc
Up to individual light 6

What actually ends up happening between levels 1-6 is that the individual lights are correctly controlled, they are set to 1% brightness in sequence. But the group is also controlled, setting the group brightness down to 0 (turning them all off).
Suggestion is, to add some additional value to the settings (maybe 1:null) which would mean that the light does not get controlled at all during these levels. For my use case, I would set the group to be 6:null, 7:1 so below 7 % the light is not controlled at all (thus not switching off the group).

I second this, for a different use case. I have a lamp which exposes two different lights in Home Assistant (Yeelight Ceiling Light with a main mode and a moon mode). Now I'd like to create one lightener light which combines those two, from 1-30 the moon light should be used, from 31-100 the main one. With the current implementation changing the brightness will turn off the lamp, as a brightness = 0 command is being sent to the second light - which unfortunately turns off both modes.

Great add-on. I would also appreciate it if this gets implemented. I have over 10 Yeelight lamps, and this would help organize them in the interface.