Then it may also be helpful/useful for others... or it may show that those books are broken :grin:

Yes, you page normally. Only once you reach the boundary of the fragment you're taken back to the main flow. (So, if you're reading a multi-page footnote, reach the end and page forward without noticing it's the end, you may get the finish book dialog or get carried to some strange place in the book, depending on where exactly this fragment is placed in the spine.)

Right, that was my point. I wouldn't want to "break" those tweaks.

I'll consider your suggestions and see if it's worth it.


Silly question: Is Lua caching my function calls? If so, how can I force it to forget them?

Without going too much into the details, I have something like:

function CreDocument:getPageFlow(page)
 print("getPageFlow", page)
 ... some other stuff that calls the crengine interface and returns a value
end

This should be called once or several times for each page turn, since the frontend needs to know the flow for each page, so in `readerrolling.lua` there's something like:

 test_page = test_page + step
 test_page_flow = self.ui.document:getPageFlow(test_page)
 print("testing page",test_page,"flow",test_page_flow)

The point here, I'm calling `getPageFlow` every time before printing `testing page`, so I should get the two prints. But I get this:

getPageFlow 3
testing page 3 flow 0
getPageFlow 4
testing page 4 flow 2
getPageFlow 5
testing page 5 flow 0

which is good, now if I page back:

testing page 4 flow 2
testing page 3 flow 0

no `getPageFlow` lines printed.


There's a CRe callcache implemented in the Lua frontend, yeah.

I'd say it's in credocument, but I'm not at my dev box right now ;).

In the meantime, you can disable it in the developer options menu ;).


Yep, it does:
 URL

Either disable this (while developping) in File browser > Tools > More tools > [ ] Enable cre call cache.
Or add (now or later, you'll have to later) your new function(s) into the next stuff like:
 URL
or the other ones depending on how the result can be cached.


Hmm... Thank you both. I'd have to add `getPageCount` too, but that doesn't look clean.
Somehow, when I change the view mode to continuous or paged, the relevant cache entries seem to be cleared/updated, but I can't figure out how/where. If I could do the same when toggling the "hide non-linear" option, that would be preferable, I believe.


That was my guess, but I'm calling a `set*` function and I don't get the cache cleared... Anyway, we can maybe discuss it further once I have an implementation to share.


The issue was actually caused by a boundary being rendered. This is resolved in 1.0.9.

FYI, you might find it more convenient to use the `task.get_demos()` functionality, rather than parsing the demo folders yourself (see here). If you pass in the live=False flag, then it gives you a list of demos loaded from file. You can also set `image_paths=True` if you want the paths rather than the images themselves.


I have the exact same issue. This is probably a duplicate of #10923


Plus one to this request. I would like to overlay a builds interior on the map.


Same issue here. Adding a `.js` in the import inside a TypeScript file does allow to compile it with the TypeScript compiler and will output files with working ESM imports.

However, when I add `.js` extensions on the imports, I can't get testing working. Tried with Mocha and Jest, but no luck so far: they complain the files with `.js` extension don't exist, which is correct, those files don't exist since they actually have a `.ts` extension.

I would love to see the TypeScript compiler add `.js` extenstions on imports when the output is esm/es2015.


The specific R libraries this should be implemented for are httr and curl.


I face the same issue when trying to clone the wiki of a GitHub Repository.
The repository in question however, was never deleted, renamed or similar.

The logs also don't mention anything about a failed cloning or the repository in question.
2020-11-07.desktop.production.log


Hi @stepjam,

I observed something weird for the place cups task. For id 33, it gives:
33_214
There is a small green segment on top of the cup, which should not be the case.

Moreover, when I'm playing with other tasks, a similar issue happened. The problematic task is block_pyramid. Using a similar script (see the bottom), it produces the following results:

The id 53 corresponds to:
53_97
which should be a green region indicating the target.

Moreover, I though each id will correspond to a single object, but id 54 and 55 give:
54_817
55_20

This seems to be a systematic error rather than a bug for a single task. I'm thinking there may exist some bug in the .ttm file generation? Could you take a look at it?

The script I used to parse block_pyramid is:

python tools/dataset_generator.py --save_path ./debug --tasks block_pyramid --image_size '256,256' --episodes_per_task 1 --variations 1

import os
import cv2
import shutil
import numpy as np

from tqdm import tqdm
from glob import glob

def main():
 src_dir = './debug/block_pyramid/'
 tar_dir = './debug/parsed_block_pyramid/'

 variations = sorted(glob(f'{src_dir}/variation*/'))
 for v_i, variation in enumerate(tqdm(variations)):
 episodes = sorted(glob(f'{variation}/episodes/episode*/'))
 for e_i, episode in enumerate(episodes):
 image_path = f'{episode}/front_rgb/'
 images = glob(f'{image_path}/*.png')
 os.makedirs(f'{tar_dir}/image/v{v_i:03d}_e{e_i:03d}/', exist_ok=True)
 for image in images:
 im_id = int(image.split('/')[-1].split('.')[0])
 tar_path = f'{tar_dir}/image/v{v_i:03d}_e{e_i:03d}/{im_id:04d}.png'
 shutil.copy2(image, tar_path)
 mask = cv2.imread(image.replace('rgb', 'mask'), 0)
 obj_ids = list(np.unique(mask))
 for o_id, obj_id in enumerate(obj_ids):
 im = cv2.imread(image)
 masked_image = (mask == obj_id)[..., None] * im
 os.makedirs(f'{tar_dir}/{v_i}_{e_i}/', exist_ok=True)
 cv2.imwrite(f'{tar_dir}/{v_i}_{e_i}/{obj_id}_{im_id}.png', masked_image)

if __name__ == '__main__':
 main()


Hi,
There may be a bug. Could you first swap to loading demos through the Environment interface? In your script that you linked, you are nor decoding the masks correctly.


Hey, I also encounter the same blockage. Whether I make the project public or private, it doesn't change anything. On the other hand, via Visual Studio Code no problem for cloning.


Hi,

Sorry, I didn't realize the mask is converted to 3 channel RGB image in the tools/dataset_generator.py so my parsing mask code is wrong. After changing it to single channel mask image, it works as expected.

Thanks a lot for your time!


Ok no one has stepped forward for the past month on this. But what kind of data do we want. Looking at @alexlarsson Data, I am not sure how much of this makes sense. Are you looking for more info then the following. There is a slippery line where we don't want to leak too much information into the container for hacker purposes.

[Container]
Names=TestContainer
Id=5f7540486e88b23c42ceb658c7576d1b73e07de3b0c67e016bd0c34d7e00095a
[Image]
name=registry.centos.org/centos:latest
digest=c46009597289604ac5b188492347119c00f274a5591bd8d2f08e50b3101fab1a
[Engine]
name=podman-2.2.0-dev


The repository in question however, was never deleted, renamed or similar.

@Andre601 there are some known issues working with wikis. See URL If you are running into specific authentication issues please open a new issue and we can assist you further.

@bryx it would be helpful if you could open a new issue and fill out the issue template. Thanks!


@rhatdan I think that, for most cases, you want/need to know which image (name, tag and digest) you are in. So, the info you propose should be more than enough.

I mean this for general purposes and cases like **toolbox** users. Some other use cases, as **Flatpak**, probably would need more info, but they already have their ways and it might be too much info for more general cases.


Yes, the container name and ID, and the image name and ID are the most important, I think.

As for the *engine*, would it be the version of Podman that started the container? Or the one that called `podman create`? I wouldn't mind leaving it out, unless someone specifically asks for it.


I took a look at this yesterday, and realised something. In order for untranspiled top-level await user code to work, webpack needs to provide it with an async context. The only way to do that is by wrapping it with an `async` function. We can't replace this `async` function with `.then` because that would remove the async context and make untranspiled top-level await fail. I think that in order to make top-level await compatible with ie11, webpack output will need to be transpiled in a post-processing step.


Is there an update on this? It seems there is a fair amount of traffic linked to this issue and should be pushed up the stack.


I've brought this issue up in the meetup couple of weeks ago but didn't get any response yet.
I do not see this into the current roadmap either. Is this something that is being worked on, or not yet?

Thanks a lot in advance for any info.


You can completely remove github desketop from you PC and install again, remember don't forget to delete Residual file!!!

1

Then it can be solved.


But I believe it's better to find and solve the problem than try to find ways to hide the problem, cause cloning the repository in other ways is easy, I already have done that. i just reported the problem for it to be resolved.


Sorry if this has already been mentioned, but this thread is quite long so I mostly just skimmed it.

I believe there isn't a single "right answer" here:

For `$ErrorActionPreference`, I personally use

powershell
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"

as a header in every module I write, because I want to fail hard when an unhandled error occurs, and my code is written with this in mind. So just blindly copying the variable from caller scope is imo not a good approach, because scripts that do not declare the variable themselves will work differently in different sessions.

For output level preference variables (`$VerbosePreference`, `$InformationPreference`,...), I think the current situation where the output is controlled in each scope separately (so the effective output is the minimum of all set preference variables in all scopes the output passes through) is quite nice and I'd like to keep it both as a module writer and a user.


@MatejKafka: There are two separate aspects, which are _independent_ of one another:

* Designing your module so that it reports the _appropriate_ type of error, based on the official guidelines, summarized here (by me). The same applies to using the other output streams, such as the one for verbose output.

* Respecting the _caller's_ preference variables so as to _modify_ the module's _default_ behavior _on demand_. For that, there's no justification for distinguishing between (a) functions (and scripts) _outside_ a module scope, (b) functions _inside_ a module, and (c) cmdlets.
 * (a) and (c) properly respect the caller's preferences, whereas (b) doesn't. This distinction doesn't make sense, and no user should ever have to think about the _implementation details_ of a given command, i.e. whether they _happen to be_ implemented as (a), (b), or (c).


@mklement0 I agree that the behavior being inconsistent is an issue, but it seems we partially disagree in which direction they should be unified.

Ad 1) - I'm more of a programmer than sysadmin - the concept of a non-terminating error seems like something terrifying to me - an error occurred, meaning that something bad happened and I did not correctly anticipate it and handle it, and the program is in an undefined state. Continuing ahead instead of panicking is imo irresponsible, as I cannot safely reason about the behavior of my own program. Non-terminating error should imo either be a terminating error, or a warning, not a weird mix of both.

I also edited my previous comment, as I found out that my assumption in the last paragraph aren't correct.


It shouldn't do. There's a difference between errors and exceptions. Whether an error is "exceptional" depends on the context. If you've correctly functionally decomposed your code into a series of small pipeline functions each function by itself can't determine if an error is an exception, because it can't own that policy because it doesn't know why it's being called. Errors from that function should bubble through the pipeline to the creator of the pipeline who can, in that context, determine whether the error is exceptional in that context/pipeline.


As a general rule, non-terminating errors tend to be something that comes from an individual object input in the pipeline. If one bad piece of data is received, you don't necessarily want to cancel processing the next 10,000 bits of input. On the other hand, if the error comes from bad / unusable input as the result of a fixed (non-pipeline) parameter input, you can deduce that processing all 10,000 bits of input will yield with the same result (say, for example, the cmldet requires authentication, and the authentication provider you're using indicates that the credentials specified are invalid) -- then you can throw a terminating error to avoid wasting time trying the known-bad credentials 10,000 times.


I would prefer we do not use this Issue to discuss/debate PowerShell's error handling models. There are existing Issues you can pile onto, or start a new one.


Noting a suggestion raised during the mySociety retreat which was something along the lines of each user could be allocated a certain number of tags which they could allocate to requests.

The idea was as I understand it if tags were to be used to flag up requests of particular value / interest, they could be rationed, so any one user would have to allocate them judiciously.

I think this might be getting away from tagging and more towards an "upvoting" system.

Not crediting the idea to anyone as I might not have noted in the way they were envisaging it working.


@spapadop Sorry we missed this one from the community meeting a while ago but I'm checking into it now.


Yeah, you're having the same issue another person I'm talking to is having. I didn't have any special reason for using `supported_output_configs`, that's just what I saw in the cpal docs. I can get a fix merged in soon.


@debarshiray What do you think if we only give this information out in --privileged mode? Or have a config flag and containers.conf to say whether we reveal it.

Some engineers are raising concerns about the information leak, being a vector to attach the system.


Toolbox already uses `--privileged`, so that's fine. Any other flag that we can specify as a command-line argument is also fine.


@apedroferreira unfortunately not since the issue is upstream I wasn't able to make progress on this. I'm hoping that maybe upgrading dependencies to 6.0+ will help. I'll test it in the 6.0 upgrade branch.

From what I understand there would need to be a version of storybook client that isn't polyfilled or at least with a different browser target. So I think a workaround is the best chance we have for now, however I will raise the issue on the storybook repo to see if we can look into it.


I went ahead and released v0.1.2, so this should be fixed now. Let me know if you have any more issues.


Extending the thoughts of @xplosionmind , a simple mutex-solution would be fully satisfying imho. Just have a lock on the form while it is being edited and a timeout if one forgets to free it afterwards.
Conflict handling is mainly needed for realtime or offline collaborative editing. Offline is not possible anyway (it's browser only, right?) and realtime is really cool but only necessary in corner cases. :)


@dannyhw Today, after doing an upgrade of the Expo SDK (40), the same error appeared.

After some investigations, more or less dumb tries of making my app working, I discovered something quite interesting.

If I add `import 'core-js/features/promise/finally'` to `@storybook/react-native/dist/index.js` it still shows an error.
But if I remove the import and add it again after my app is fully loaded, and then save the file, the Fast Refresh feature of react-native handles the import and then everything works until the next JS bundle reload.

I honestly don't know what to do with this info but maybe someone will.

Btw, the above workaround did work for a while, but only for a while. I'm now quite stuck with this error and don't have any clue on how to get my app working. Any fix or workaround would be HUGELY appreciated.


Ok I managed to get my app working !

Adding an import of `core-js/features/promise` AFTER importing Storybook is the fix. Above workarounds and patches don't work because `Promise.prototype.finally` keeps being overwritten even after the execution of `@storybook/react-native/dist/index.js`, maybe because of some Storybook plugins.

In my case, I had to import `core-js/features/promise` a bit deep in my app hierarchy, but this effectively resolves the issue.

Anyway, some consideration about this issue from the Storybook team would be highly appreciated, since any RN developer working with promise based libs (e.g. @apollo/client 3.x) will be facing the same issue...


@ajacquierbret hey thanks for posting your workaround hopefully that will save some people a lot of frustration.

I've tried different things in the past to resolve this and the proper fix always seems to require changes upstream. It's hard to coordinate these changes since it's only rn with this problem. I think in the web versions it's fixed via webpack wizardry.

I was kind of hoping that 6.0 might fix this but I'm not sure yet. I'll try it out in the upgrade branch soon.


I also have the same problem. Signing out from my account and then logging in didn't help.
I use GitHub Desktop for macOS Version 2.6.1.


The problem I'm running into is that I need the `.js` extension added to `export` statements, not just `import`. I have this `index.ts` file for a library of math functions:

export * from './math.js';
export {
 Angle, convertFromRadians, convertToRadians, FMT_DD, FMT_DDD, FMT_HH, FMT_MINS, FMT_SECS, FMT_SIGNED,
 HALF_PI, Mode, PI, TWO_PI, Unit
} from './angle.js';
export { MinMaxFinder } from './min-max-finder.js';
export { SphericalPosition } from './spherical-position.js';
export { SphericalPosition3D } from './spherical-position-3d.js';
export { ZeroFinder } from './zero-finder.js';

Adding `.js` only works for the first line. I don't know if that's because it's a wildcard export or not. But the generated JavaScript code is missing the `.js` everywhere else:

export * from './math.js';
export { Angle, convertFromRadians, convertToRadians, FMT_DD, FMT_DDD, FMT_HH, FMT_MINS, FMT_SECS, FMT_SIGNED, HALF_PI, Mode, PI, TWO_PI, Unit } from './angle';
export { MinMaxFinder } from './min-max-finder';
export { SphericalPosition } from './spherical-position';
export { SphericalPosition3D } from './spherical-position-3d';
export { ZeroFinder } from './zero-finder';
//# sourceMappingURL=index.js.map


Does anyone have info on this? Especially the second question for me personally


@josdejong you can get around this by using an `index.ts` file. In the index.ts file do the following `export { MyClass } from 'src/my-class.js'`, and in your test just import the file directly instead of via the index file `import { MyClass } from `src/my-class.ts`.


Thanks for sharing your workaround @bobbyg603 . I'm not sure how that would work for the imports inside `src/my-class.ts`, (nested). You can't change that dynamically depending on your context (testing or actually using).

It feels to me like there is a serious mismatch between plain ES modules (requiring actual existing paths with proper file extensions) and TypeScript code (relying on "smart" nodejs module resolution, not requiring file extensions, and (implicitly) changing the (implicit) file extensions from .ts to .js when compiling). I can't understand this issue is marked "Working as intended" in URL this is a problem that needs to be addressed.

Most logical to me would be to write imports with `*.ts` extension in your code (matching the actual file extension). And when compiling, have TypeScript replace `*.ts` extensions with `*.js`, matching the actual file extension of the compiled file (which is changed to `*.js` by TypeScript). TypeScript changes the file extensions from `*.ts` to `*.js`, so logically it should also fix corresponding imports.


I would recommend using trtexec over onnx2trt as the CLI interface for converting ONNX models into TensorRT engines since it is more actively maintained.

onnx2trt hasn't been updated in a while, and we are planning to deprecate it in favor of trtexec soon.


from @ georgewfraser (thanks!), lightly edited and shared with permission:

You can get most of Fivetran's commands if you set up postgres as a source (henceforth, "upstreamdb") and set up a new postgres database as a destination (henceforth, "downstreamdb"). Instrument downstreamdb with statement level logging and do the following operations:

Create a few tables in upstreamdb, add some data, and connect it to fivetran. Fivetran should do an initial load of all the data (into fivetran's internal representation).

* Sync a table to downstreamdb.
 * On the first sync Fivetran should copy straight into the table (this is DWH dependent, so lets see what happens).
* Run some inserts in upstreamdb, then sync again.
 * You should see Fivetran create a separate staging table and then move the data from there.
* Run some updates in upstreamdb and then sync again.
 * Be sure to update multiple columns, and try a few variations.
 * You'll see us do some funky update queries that do a "patch" operation. They're long but they follow a simple template.
* Sync some DELETES.
 * You'll see some slightly different update queries.
* Add a column.
 * We'll add the column in the destination.
* Change the type of a column.
 * We'll migrate the data in-place in the destination.
* Click resync in the Fivetran UI.
 * We'll do a "mass update" where we flag any rows that didn't get resynced as deleted.
* All of these queries will be slightly different in "history mode" vs "live mode" (ed: i don't know what this means, perhaps it is obvious from Fivetran UI).
 * History mode isn't widely available yet though, and it's probably best to just start with live mode.


Use Git GUI to clone it, then "Add local repository" from GitHub Desktop to circumvent this issue.


Well, if it's the case i'm closing the issue cause i've already got what i need, but the problem remains on the app


+1

The auto-generated R SDK by OpenAPI Generator seems pretty heavy so I would prefer code snippets using curl instead


Facing the same problem.

In most scenarios, we use webpack. But for simple scenarios and samples, e.g. for our TS-training for developers, we want to use plain TS files and JS modules without the complexity of another transpiler like Babel/webpack.
It looks odd in training classes when you try to explain the beauty of TS and then have to stutter something like "TS never changes outputted strings". Or you have to tell them that it will get better with webpack.
=> "The simple case is ugly but it looks good in the more complicated case when we use more tools."

This means:
* On the client/browser, TS needs a transpiler to transpile to some non-ECMASCRIPT-modules.
* If you go go for "import ./myModule.js", IDEs might mark it as error.
* Other ALM-scripts which parse source-code (testscripts, mock-scripts, build-scripts, deploy-scripts, ...) might get confused.

Why not add an option to tsconfig and leave it to the developer to use it or not?
We know that is is not "pure doctrine" but for many cases it will work. One could also emit a warning "will only work with static files" or something like that.

I'm aware that "import ./myModule" could resolve to something which is not a static file on the web-server. E.g. a web-service dynamically resolving and returning js-code.

In any case, please such an option would leave it to the developer's resonsibility how to transpile it.


Definitely bumping for support especially since now SwiftPM has a gui and has been updated to handle frameworks better. Its far easier and less cumbersome then pods at this point.


Ok, I've set up a GitHub -> Generic PostgreSQL connector to try this out. Nothing particularly interesting happening yet

2021-01-12 11:35:51.076 EST [3663493] postgres@fivetran LOG: execute : SET extra_float_digits = 3
2021-01-12 11:35:51.094 EST [3663493] postgres@fivetran LOG: execute : SET application_name = 'fivetran'
2021-01-12 11:35:51.112 EST [3663493] postgres@fivetran LOG: execute : SELECT 1
2021-01-12 11:35:51.471 EST [3663494] postgres@fivetran LOG: execute : SET extra_float_digits = 3
2021-01-12 11:35:51.488 EST [3663494] postgres@fivetran LOG: execute : SET application_name = 'fivetran'
2021-01-12 11:35:51.506 EST [3663494] postgres@fivetran LOG: execute : SET ssl_renegotiation_limit = 0
2021-01-12 11:35:51.657 EST [3663495] postgres@fivetran LOG: execute : SET extra_float_digits = 3
2021-01-12 11:35:51.676 EST [3663495] postgres@fivetran LOG: execute : SET application_name = 'fivetran'
2021-01-12 11:35:51.700 EST [3663495] postgres@fivetran LOG: execute : SELECT 1
2021-01-12 11:35:51.874 EST [3663496] postgres@fivetran LOG: execute : SET extra_float_digits = 3
2021-01-12 11:35:51.892 EST [3663496] postgres@fivetran LOG: execute : SET application_name = 'fivetran'
2021-01-12 11:35:51.910 EST [3663496] postgres@fivetran LOG: execute : SELECT 1
2021-01-12 11:35:52.041 EST [3663497] postgres@fivetran LOG: execute : SET extra_float_digits = 3
2021-01-12 11:35:52.280 EST [3663497] postgres@fivetran LOG: execute : SET application_name = 'fivetran'
2021-01-12 11:35:52.299 EST [3663497] postgres@fivetran LOG: execute : SET ssl_renegotiation_limit = 0
2021-01-12 11:35:52.671 EST [3663498] postgres@fivetran LOG: execute : SET extra_float_digits = 3
2021-01-12 11:35:52.911 EST [3663498] postgres@fivetran LOG: execute : SET application_name = 'fivetran'
2021-01-12 11:35:53.166 EST [3663498] postgres@fivetran LOG: execute : /*Fivetran*/CREATE SCHEMA fivetran_testing_schema_e2fdda3da7874877a1e98315e8acf782
2021-01-12 11:35:53.188 EST [3663498] postgres@fivetran LOG: execute : /*Fivetran*/CREATE TABLE fivetran_testing_schema_e2fdda3da7874877a1e98315e8acf782.fivetran_testing_table (id int)
2021-01-12 11:35:53.207 EST [3663498] postgres@fivetran LOG: execute : /*Fivetran*/CREATE TEMPORARY TABLE fivetran_testing_table_temporary (id int)
2021-01-12 11:35:53.226 EST [3663498] postgres@fivetran LOG: execute : /*Fivetran*/DROP SCHEMA IF EXISTS fivetran_testing_schema_e2fdda3da7874877a1e98315e8acf782 CASCADE
2021-01-12 11:36:16.149 EST [3663736] postgres@fivetran LOG: execute : SET extra_float_digits = 3
2021-01-12 11:36:16.394 EST [3663736] postgres@fivetran LOG: execute : SET application_name = 'fivetran'
2021-01-12 11:36:16.414 EST [3663736] postgres@fivetran LOG: execute : SELECT 1
2021-01-12 11:36:16.993 EST [3663737] postgres@fivetran LOG: execute : SET extra_float_digits = 3
2021-01-12 11:36:17.011 EST [3663737] postgres@fivetran LOG: execute : SET application_name = 'fivetran'
2021-01-12 11:36:17.030 EST [3663737] postgres@fivetran LOG: execute : SET ssl_renegotiation_limit = 0
2021-01-12 11:36:17.179 EST [3663753] postgres@fivetran LOG: execute : SET extra_float_digits = 3
2021-01-12 11:36:17.196 EST [3663753] postgres@fivetran LOG: execute : SET application_name = 'fivetran'
2021-01-12 11:36:17.221 EST [3663753] postgres@fivetran LOG: execute : /*Fivetran*/SELECT version()

But fivetran is still loading data from GitHub, it seems. I guess the initial sync is buffered by Fivetran and then dumped into the destination in one shot.

One learning so far has been that our "modern" TLS requirements are too modern for Fivetran.


Here's the full dump: URL

A quick glance suggests we're missing:

 * `COPY FROM ... (FORMAT CSV)`
 * `INSERT ... SELECT`
 * `DELETE ... USING`
 * `CREATE TEMPORARY TABLE`

That's all to build upsert semantics on top of PostgreSQL though. If Fivetran is willing to meet us in the middle, there are probably some simpler solutions to be had that supporting the above four types of queries.


Is this (question / problem) still a thing?
Required the declare statement in a project with many (~6.000) existing files.
Had to play around with some parameters.

But in the end this setup did the job for me ... the declare statement on the first line.

$config = PhpCsFixer\Config::create()
 ->setRiskyAllowed(true)
 ->setUsingCache(false)
 ->setRules([
 '@Symfony' => true,
 '@PSR2' => true,
 '@PhpCsFixer' => true,

 'declare_strict_types' => true,
 'linebreak_after_opening_tag' => false,
 'blank_line_after_opening_tag' => false,
 ...


Those three last lines are those we use for enforcement.

They do solve the situation somewhat, but currently we have a lot of files with divergent declarations:

php
<?php declare(strict_types=1);

php
<?php
declare(strict_types=1);

or even

php
<?php
declare(encoding='SJIS');
declare(strict_types=1);


Thanks for the detailed report. You're totally right about where that new behavior is coming from.

Unfortunately, the behavior you're seeing is intended. To quote the docs:

If you're seeing the links in your browser on Windows 10, that means your browser supports touch events (more specifically, `window.TouchEvent`). That might mean your desktop/laptop has support for touch interface (many windows computers, like surface books, do), or that the browser would support a touch interface if it were installed on such a device.

The change that you saw in the newer AnchorJS version comes from a similar Modernizr update, which was intended to make touch event detection more accurate. You can see details on that here: URL

Ultimately, I'm comfortable leaving this feature as-is, focused on detecting touch-events, which only approximates touchscreen detection. The alternative is to remove the feature altogether (which is what Modernizr eventually did).

If you prefer the former behavior, I'd say feel free to continue using v4.2.2.


We would gladly accept a PR for this, as I understand we still need SPM support from Bolts-obj.


I'm having this problem as well. Suddenly today on Windows I stopped being able to authenticate via command line using a PAT (though it still works on macOS and it worked that last time I was on Windows with no changes).


@dmauro this issue tracker is for GitHub Desktop. For Git authentication issues I'd recommend reaching out to GitHub Support.


You can work with absolute paths in windows using simport for dynamic imports.
It also makes you feel like you using promisified `require` with `ESM` support.

js
// other.mjs
export const hello = 'world';

js
// index.mjs
import {createSimport} = require('simport');
const simport = createSimport(import.meta.url);

const {hello} = await simport('c:\\other.mjs');
console.log(hello)
// outputs
'world';


Okay, I may need to change my mind if React supports equalityFn. ref: URL
If it lands, we don't need useMutableSource, and there's no restriction.


@dnowak-wrldrmt How we dealt with this in, for example, Spring Web MVC metrics is always having an `exception` tag; the value is `none` if there was no exception.

I'm reopening this for some more consideration as this keeps coming up and we've made recent changes to not throw an exception anymore by default in these cases. The current state is still that the scrape will not contain metrics with different labels, though. I'm reopening to see if we can make that happen somehow.

After some investigation into this, I will echo what @checketts said in URL that the Prometheus Java client does not seem to support this by design. That being said, it is indeed true that the Prometheus server can and will scrape metrics with different labels, with no problem as far as I can tell.

@fieldju thank you for the tests. That was useful to look at. The modifications, however, are causing meters to end up as different metrics with the same name, which violates the Prometheus scrape format, even though the Prometheus server seems to have no problem scraping this.

Specifically, your modifications result in a scrape like:

# HELP foo_total
# TYPE foo_total counter
foo_total{hostname="localhost",optionalExtraMetadata="my-cool-value",} 1.0
# HELP foo_total
# TYPE foo_total counter
foo_total{hostname="localhost",} 1.0

The above violates the following snippets from the Prometheus scrape format:

So my understanding is that the scrape should be like:

# HELP foo_total
# TYPE foo_total counter
foo_total{hostname="localhost",optionalExtraMetadata="my-cool-value",} 1.0
foo_total{hostname="localhost",} 1.0

Trying to register things with the Prometheus client so this happens results in the aforementioned exception. We need to find a way to properly register them, which may not be currently exist. In that case, we would need to see if the Prometheus Java client is willing to make changes to support this, as suggested by @checketts. For example, here is a pure Prometheus Java client unit test that fails trying to do what this issue asks to support:

java
@Test
void promClientSameMetricNameDifferentLabels() throws IOException {
 CollectorRegistry registry = new CollectorRegistry();
 Counter counter = Counter.build().name("my_counter").labelNames("hi").help("unhelpful string")
 .register(registry);
 Counter counter1 = Counter.build().name("my_counter").labelNames("hello").help("unhelpful string")
 .register(registry); // fails with "Collector already registered that provides name: my_counter"

 counter.labels("world").inc(2);
 counter1.labels("world").inc(3);

 StringWriter writer = new StringWriter();
 TextFormat.write004(writer, registry.metricFamilySamples());
 System.out.println(writer.toString());
}


I was thinking about this again recently, actually. I have seen more situations since I opened the issue where `equalityFn` would be useful, I don't remember specific examples right now but I think they are similar to the above, typically whenever you combine an inline non-trivial selector function with typescript type narrowing.


It's still doubtful, if react really supports equalityFn. There's probably going to be a big debate.

For now, we should focus on creating a wrapper.
Rewriting URL

js
import { useContextSelector } from 'use-context-selector';

export const useSelectedContext = (ctx, selector, eqlFn) => {
 const prev = useMemo(() => ({ value: null }), [ctx]);
 const patchedSelector = useCallback((state) => {
 const selected = selector(state);
 if (eqlFn(prev.value, selected)) {
 return prev.value;
 }
 prev.value = selected;
 return selected;
 }, [selector, eqlFn, prev]);
 return useContextSelector(ctx, patchedSelector);
};


I finally ran into this same problem in my own application code. Spring was configuring caches using the cacheManager so half of my caches were being registered with a `cacheManager` tag, however I had several other caches that were being registered via a different mechanism. I worked around the Prometheus limitation by adding a filter that added the extra empty tag like so:

registry.config().meterFilter(new MeterFilter() {
 @NotNull
 @Override
 public Meter.Id map(@NotNull Meter.Id id) {
 if (id.getName().startsWith("cache") && id.getTag("cacheManager") == null) {
 return id.withTags(Tags.of("cacheManager", "", "name", ""));
 }
 return id;
 }
 });


I wrote something similar to this, the issue is there are several thousand names to check which would make the linter relatively heavy


Maybe reusing logic from the `object_usage_linter` and checking for collisions of all of the found symbols within the base & recommended packages would be a lightweight way to implement this.

That way we wouldn't need a list of all bad object names, but instead dynamically check the (presumably fewer) used symbols against a bunch of loaded namespaces.


I have 7 apps I've instrumented and I finally ran into this error on only one of them... specifically wiht

`jam_gc_pause_seconds`


So I came up with a workaround.

I was registering an `application` tag on all my meters (I thought) but apparently the GC got instantiated prior to me actually doing this... so the fix I found was to use a `MeterRegistryCustomizer` bean:

java
 @Value("${spring.application.name}")
 String appName;

 @Bean
 MeterRegistryCustomizer metricsCommonTags() {
 return registry -> registry.config().commonTags("application", appName);
 }

kotlin
 @Value("\${spring.application.name}")
 val appName: String? = null

 @Bean
 fun metricsCommonTags(): MeterRegistryCustomizer {
 return MeterRegistryCustomizer { registry: MeterRegistry ->
 registry.config().commonTags("application", appName)
 }
 }

This got my errors to go away


See URL for a campaign encouraging users to tag requests via a hashtag in the request subject. The tag is then used to make it easier to avoid duplicate requests to the same body.

Presumably if there had been a public tagging feature they'd have used that.


A WhatDoTheyKnow.com user has suggested a database field for ICO decision reference numbers, enabling linking of requests to decision notices.

This could be achieved via tagging requests, with a tag format of eg.

`ICO_REF:XXXXXXX`

key:value tags are used extensively in the WhatDoTheyKnow body database, so using them when tagging requests too feels reasonable.


The problem is, that here it only ensures the existing line break (or not). It does not ensure, that there is no line break. So when you already have a line break here, it won't get removed. Probably this requires a new rule which ensures declare on same line as <?php opening tag.


How did you connect to SPO? i.e. which switch on the "_Connect-PnPOnline_"?

I have noticed a similar issue this morning, i.e. "**Access denied**." when using the "_-UseWebLogin_" or "_-Interactive_" arguments. However, when I connected via "**-Credentials**" on the "_Connect-PnPOnline_", it worked.

Perhaps the issue is with the Connect-PnPOnline cmdlet.


The issue is most likely connected to the registration of the PnP Management Shell application that is in place in your Azure AD. Run `Register-PnPManagementShellApplication` again, it will change the granted permissions: we added the userprofile readwrite right there like 2 weeks ago (it used to be only read access).


I am using the following approach to connect to SharePoint Online:

`
Connect-PnPOnline -Url ' URL -Interactive

`

@erwinvanhunen We registered the application yesterday and the permissions of this application seems ok:

image


I just tested and indeed it doesn't work with a bearer token (which is what we use by default). It seems that that is (not more?) supported. We'll investigate that. I noticed that if you use -UseWebLogin (which is cookie based auth) it does work.

I'll leave this issue open while we investigate.


How to decompose a gate in SU(2) into A, B, C : URL

From Lemma 4.1., every element of SU(2) can be expressed as
image

Then, from the proof of Lemma 4.3.:
image


For a general unitary, not in SU(2), (i.e X gate) Theorem 4[1] seems to be applicable that gives a CNOT count that scales quadratic. According to the upper bound they give, it's beneficial to use their scheme only when n > 10. (however the bound they give seems not to be tight and i can think it can be improved).

Even ancilla decompositions of `mcx` can be proved (according to section 1 of the appendix A[1]) when:
- `mode=recursion`. Current implementation uses 1 ancilla and has exponential CNOT count. With one ancilla qubit, it can be done with linear cost (16n - 40) (n: total no. of qubits)
- `mode=v-chain-dirty`. Current implementation uses (12k - 22) CNOTs (k: no. of controls). It can be reduced to (8k - 6) that is better for k > 4.

Can i work on this?

[1] URL


I had the same problem as described above. Seems to be similar to #10923 #7634 and other issues. Thank you @CaptainJackey : your advice solved my problem. I wish I would have found a more "elegant" solution, but de-install, re-install is probably the easiest one for a novice like me.


It's not a bug, it's simply that the algorithm is not as smart as it could be ;)


I did it, but it logs me off after loging in, any solution on that?


Changing issue to 'Feature Request', since this case is complicated and is nether correctly handled by *BSD native hashing utilities.


Consider legal and other risks of publicising existing tags where they might to draw attention, or be deemed to draw attention, to request threads on which we've hidden material.


Can you please tell me how to add multiple optimisation profiles using trtexec. I can't seem to find any example anywhere. I know it is possible to do using Python and C++ API but I've no idea about trtexec.

Thanks


@Vlaaaaaaad Can you try the following permutations for the buildx step please:

* `driver-opts: image=moby/buildkit:v0.8.1`
* `driver-opts: image=moby/buildkit:buildx-stable-1` (default)


@crazy-max sure!

Here's `v0.8.1`: URL
Here's `buildx-stable-1`: URL

Unfortunately, the same error is reported. Let me know if the changes are not in the right place and I can re-test 🙂


@Vlaaaaaaad Ok thanks for your feedback. There is something odd and I think it's a scope issue on ECR. We have e2e tests with several registries to detect if there is something wrong early. And everything looks fine atm with our private ECR. Can you check if the the requirement to push to ECR with AmazonEC2ContainerRegistryPowerUser managed policy is ok? Thanks.


@Vlaaaaaaad Wonder if this is not linked to a specific region. Can you disclose it? WDYT @jtoberon?


@crazy-max hm... does your test ECR repo have "_Immutable tags_" enabled? I could not find a definition for the repo itself. The docker/build-push-action action works great on non-immutable repos.

The repo is in `eu-west-1`.
I doubt there's a policy issue as the the IAM user used has **both** `AmazonEC2ContainerRegistryPowerUser` **and** the following policy attached:

{
 "Version": "2012-10-17",
 "Statement": [
 {
 "Sid": "VisualEditor0",
 "Effect": "Allow",
 "Action": [
 "ecr:GetDownloadUrlForLayer",
 "ecr:BatchGetImage",
 "ecr:CompleteLayerUpload",
 "ecr:UploadLayerPart",
 "ecr:InitiateLayerUpload",
 "ecr:BatchCheckLayerAvailability",
 "ecr:PutImage"
 ],
 "Resource": "arn:aws:ecr:eu-west-1:000000000000:repository/bug-report"
 },
 {
 "Sid": "VisualEditor1",
 "Effect": "Allow",
 "Action": "ecr:GetAuthorizationToken",
 "Resource": "*"
 }
 ]
}

I can test another region if you think it would help!


@kevinch-nv Thank you but I meant Optimisation Profiles where I can set multiple min, opt and max sizes for different optimisation profiles.

Eg. like this: URL
but only using trtexec. Using trtexec, I can set maximum only 1 profile (min, opt & max) but with Python API you can add multiple such profiles


When taking selfie in native camera at on Android devices, they are correcting the mirror effect, this is a useful feature to be baked into the `camera` package instead of modifing the image using `Transform` widget
Thanks for the issue!


I'm surprised you see it working in containerd. This has been a known error of containerd pusher that it repushes the tag multiple times. Maybe something has changed or containerd case is not quite the same.


Looking at the code I think containerd does a trick on pushing by tag and digest together. In that case tags are ignored for objects where digest does not match. I think we should be able to do the same thing.


This issue is a blocker for us:
- We are trying to integrate `libcst` into `wemake-python-styleguide` which supports all versions from 3.6
- We even have a PR ready: URL
- But, since 3.9+ is not supported, we have to reconsider this idea
- The same is true for several other projects of mine which potentially could use `libcst` for code auto-formatting 😞

Are there any updates? Is there anything I can help with?


@TahaTesser do you have any timeline as to when this can be fixed in the plugin code? We are about to go live.


I'm waiting this feature for months. I hope that doesn't take long. My job is on the table.
Sending good vibes to the dev team.
Thxx


correct Docker-compose Volume Path is:
`volumes:
 - ./my-external.conf:/etc/lighttpd/external.conf
`


I have to say you guys make a lot of disappointingly user-hostile decisions. You don't let users resize the window (a very standard feature), you hide the option to set the freaking wifi password. That is so beginner unfriendly!

If by "discussed" you mean "almost everyone agreed it was bone-headed", then sure. Look at the comments from your users!

I'd also like to reply to one of the two (that I counted) replies in favour:

Well for a start you literally just forgot the shortcut!, but secondly how are you supposed to remember the shortcut if you never even knew it existed?

This goes against basically every UX principle ever. I could understand it if the options were super dangerous, but we're talking about setting up wifi here! What world are you living in where you think people with a Raspberry Pi are intimidated by wifi?

Anyway I'll leave you to your crazy designs.


@maxnet / @ghollingworth Is it worth mentioning the magic advanced-mode key-combo in URL ?


I am getting this Permission denied error on cypress github action while installing dependencies with the `npm ci` command

This is where the error occurs
`/usr/bin/git ls-remote -h -t ssh://git@github.com/ethereumjs/ethereumjs-abi.git`

This error makes the project untestable on github action. Any idea to how solve?

Here is the full log:

/usr/local/bin/npm ci
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/ethereumjs/ethereumjs-abi.git
npm ERR!
npm ERR! Warning: Permanently added the RSA host key for IP address '140.82.113.3' to the list of known hosts.
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-03-26T17_17_00_879Z-debug.log
Error: The process '/usr/local/bin/npm' failed with exit code 1


If you actually want users to know about this very useful feature then just put a button for it in the app. Very few people will read the Readme but everyone uses the app.

If you don't want users to know about this feature then you should think hard about why, because it's clearly insane to write a feature that you don't want anyone to actually discover.


Yes, everybody working at Raspberry Pi is clearly insane :stuck_out_tongue_winking_eye: Welcome to the madhouse :upside_down_face:


My customer needs a fix for this! Here are a couple of possible clues, though I still get the same error behavior discussed in this issue.

Accessing SharePoint using an application context, also known as app-only says "User Profile CSOM write operations do not work with Azure AD application - read operations work. Both read and write operations work through SharePoint App-Only principal". Then Granting access using SharePoint App-Only gives instructions for setting that up. I was feeling pretty good when I found this, but then when I tested, still "Access denied. You do not have permission to perform this action or access this resource. Microsoft.SharePoint.Client.ServerUnauthorizedAccessException, ServerErrorCode : -2147024891, ServerErrorTypeName : System.UnauthorizedAccessException".

**Another possible clue** is that Granting access using SharePoint App-Only shows **-AppId** and **-AppSecret** parameters for Connect-PnPOnline, but the current version (1.3.0?) doesn't provide those parameters, only -ClientId and -ClientSecret.

_Is there a PnP core version I can test with that provides -AppId and -AppSecret?_


@SebasT87 what version of SharePointPnP are you using as a workaround?


@veronicageek, my apologies for seeming demanding, the exclamation point is a bit overused these days! I absolutely appreciate everyone's supporting each other, and I'll post something if I find an answer. I'm trying some things in this article now: URL


It's not even been 2 weeks and I just had to look up the key combo already. To do that I had to first find the blog post. I'll accept I have a poor memory but that aside, this was by no means resolved in the blog comments. I fully appreciate these extra options might be overwhelming/confusing to our newest users and we absolutely don't want that, but I think there is a middle ground here. Could we discuss what that might look like?


The shortcut sort of was the middle ground.
Between team #we-are-targetting-beginners rejecting the concept of a button, and team #experts coming up with a command line option (which is non-trivial to use on say Mac OS X).


Well, on Mac the application executable is not in the path.
And yes, you do can actually `cd` into .app containers, but I doubt many Mac users know that.
Would require entering something like: `/Applications/Raspberry\ Pi\ Imager.app/Contents/MacOS/rpi-imager --option`

Keyboard combo was also changed "shift" + "ctrl" + "X", to be able to have the same combination on MacOS.
Even though ctrl+alt+x may be easier to remember for some, MacOS lacked "alt".


OK, thanks for that explanation regarding Mac.

So to clarify, is a button with a very clear warning really off the table? Such a button could be small and placed in the bottom corner to reduce the chance of being accidentally pressed. Something like this:

Screenshot from 2021-03-31 14-14-04

If someone still feels this could lead to anyone accidentally changing the advanced options, what if one of the advanced options was to always show this button? So then you only have to remember/lookup the magic shortcut once. If that is still somehow disagreeable, you could have the button hidden unless the `--show-advanced-options` command line option is used (for the benefit of non-Mac OS users only).

I'm really struggling to see how this adjustment makes the tool noticeably more confusing for new users. And it's much better for those other users who do want to easily enable SSH, change the hostname, configure WiFi etc.


I think `add .js extenstions on imports when the output is esm/es2015` would be the only correct behaviour, because `The file extension is always necessary ` for relative specifier in esm.


Do we have a solution for video recording? Similar to that suggested by @peasfarmer for picture?


Can anyone share what **Connect-PnPOnline** parameter set and values to use to authenticate from an Azure Function App so the script can _write_ User Profile properties without requiring an interactive login?

I used **Register-PnPManagementShellAccess** successfully and it appears to be configured correctly. But I'm unsure how to tell Connect-PnPOnline to use the **PnP Management Shell** app that it installs, except with -Interactive which only works locally, not from an Azure Function App.

Also tried these approaches to no avail. All can read SP profile properties but none can write:
Connect-PnPOnline docs Example 6 (why doesn't this work if the app has SharePoint | User.ReadWrite.All | Application | Read and write user profiles?)

Granting access using SharePoint App-Only (may be deprecated, but moot because it doesn't work though it says it should for this specific scenario)

Many thanks


Finally found a way to authenticate to SharePoint online to _write_ profile properties without an interactive/user logon, that works from Azure function app. Unfortunately it uses ACS which is retired now but _explicitly still supported for SharePoint use_. So it's not my preferred approach, but as it actually works, it's better than all other approaches so far.

The key is to follow this article Granting access using SharePoint App-Only, but to add the scope /sharepoint/**social**/tenant. Update the Permission Request XML as follows, and it will permit writing user profile properties.

Still looking for a more "modern" approach that's not just supported as a waiver from a retired approach. Many thanks to all!


Hello, Is there an ETA on this Bug when it will be resolved ?


Like @veronicageek said upthread, all of this work is done by volunteers in their spare time. There usually isn't an ETA and some bugs don't get fixed.


So, would you accept a pull request with such a change? If not, what could we adjust to make it more apealing to those in charge here?


For the moment we've already made our decision about how we're going to support this functionality. As said many times before we do not want to change the user interface at the moment since this is the easiest way for people to image SD cards.

When an easier way appears we may then make this a more complex interface for more advanced users, but until then we will not be changing it.

You are free to build and distribute your own version (as long as you remove the Raspberry Pi logos and wordmark from the front page.)


Disappointing but of course that's your decision to make. Thanks for taking the time to reply.


An idea to allow for a workaround might be to implement import and export of forms (#582). Users could then share their exported, say CSV, files. The different exported CSV files could be manually merged in a spreadsheet app and imported to the final form.

This would at least work for our use case. What do you think?


Some of you have mentioned that you have implemented your own workarounds, it would be great to post them in this thread. Because mine is just terrible; when my OS complains that it has 0 bytes left, I delete `~/.cache` and the next build will be very slow.


On linux, I was using the find command to delete the oldest files. I use something like:

 find /PATH_TO_DIRECTORY -type f -mtime +60 -delete

The `+60` mean to delete files not changed in the last 60 days. So depending how quickly it fill, adjust this value.

Take care with that command. It is dangerous! It can easily delete foo much files too.


I had a workaround similar to @nouiz but on a crontab

shell
@daily find /usr/local/google/home/gcmn/.cache/bazel* -mtime +12 -type f -delete

**but it ended up causing really hard to debug issues** (see URL

Note that there are two Bazel caches here.

The one stored in `~/.cache/bazel` by default is not the disk cache referenced in this bug. It's the output directory for builds (see URL This will contain:

- `install/`, unpacked data files from the Bazel binary (0.5G on my machine)
- `cache/`, which is not mentioned anywhere in the documentation and I have no idea what it does but based on the file paths like `cache/repos/v1/content_addressable/sha256/` is I guess some kind of content addressable indexing of repos :shrug: (300M on my machine)
- One directory per workspace root from which you've invoked Bazel (as in the path to the workspace on your machine). Each of these is an "output base" On my machine these are typically a 0.5-1.5G each, but it's going to depend on what you're building.

Probably you don't want to delete the first two directories (well, as I said, I have no idea what the second one is for, but best not to touch it). They don't seem to grow in size over time either. Based on my experience in URL the cache entries for the individual workspace roots are not at the file-level, however. That is, you can't just delete a single file in this "cache" and expect a correct build. They're at some directory level that is more granular than the whole directory, but I'm honestly not sure how much more. To make things more interesting, the timestamps of files are stubbed out in some places, so mtime is going to behave poorly on them. So I think the thing to do here is to look at the mtime of `$OUTPUT_BASE/lock`. This should contain the last time this entire directory was actually used and would help you clean up old directories. I'm pretty sure you could delete things in a more granular fashion, but it would require more investigation to see how to do so safely. Like some of these are fetches of entire external repositories that Bazel will refetch if they're not present (but will get very upset if only part of them is present).

Now moving to the Bazel disk cache, which is actually what's referenced in this bug. You determine the location of this directory based on `--disk_cache`. Personally, I set `build --disk_cache=~/.cache/bazel-disk-cache` in `~/.bazelrc` so it always goes there. I think my aforementioned cron was behaving fine with this cache, for which individual files are entire cache entries (at least I didn't notice anything like the other issue). For now, I've disabled my cron and will reinvestigate it the next time Bazel brings my machine to a screeching halt by using all my disk space.

The general theme here is that Bazel has caches, but they're missing a pretty key feature of caches: eviction. Without them, users are left implementing weird and hacky workarounds. I wish someone from the Bazel team could at least endorse some workaround (like a safe script to run on a cron).


`~/.cache/bazel` was definitely growing (apparently without bound?) for me.

I changed jobs so I'm not using bazel anymore, but this is the script I was running from cron: URL

It's mostly just `find` but takes case of some subtle issues. I never did track down how I ended up with non-writable directories in my cache, maybe something involving docker... so most people may not need that. Feel free to use it as needed, but bazel should really take care of this itself.


still waiting for the solution.. because i have the same issue..


Hopefully this wrapper solution or something similar can be considered as the standard export of the package. I was really hoping to replace Redux with Context API for application state management. While `use-context-selector` seemed promising in this endeavor, not being able to specify an equality function like you can in Redux is a deal-breaker.

The equality function option would be especially useful when replacing Redux with Context since you usually need to grab both values and methods (mutations) from your context object and so referential equality is a clear problem. With Redux you're doubly covered in this regard, because instead of selecting mutations you dispatch them through a separate mechanism.

Having the wrapper function mentioned in the above comment as a work-around is great, but I'm unsure how stable the solution is.


While I understand where you are coming from, I'm still not confident if the equalityFn is going to be a mainstream in the React core. I'm not sure either how we can make it CM friendly. My hope is to do some experiment against a new experimental build of React and learn how it behaves (but that doesn't ensure anything for the future React versions.)

We had some discussions above and some of them are convincing the need of equalityFn. But, if it's about methods or Redux dispatch, I'd suggest to use two hooks.

js
const foo = useContextSelector(v => v.state.foo);
const dispatch = useContextSelector(v => v.dispatch);

It should be just fine at this point. Not sure with concurrent mode thing in the future, but I guess your concern is for the future React too? So, including the workaround in the lib doesn't seem to help, does it?


@nouiz thank you for the valiant effort; but at least on my machine, I can see from this command that some if not all my bazel files were made on january 1st 1970.

find ~/.cache/bazel/ -type f -mtime +12000 | xargs ls -la

If anyone wants to use find mtime to get old files, run something like that first to check that you are not just going to delete everything.


Thanks for the warning. I do not recall having such problem with the dates of times. It is good to know!


I think you want to use access time `-atime` instead of modified time `-mtime`, there could be older files that don't change frequently but are still used during each build.


Good point. But atime doesn't always works. On NFS server, most of the time the update of atime is disabled.
I do not recall all the detail of why I used mtime. I found one that works well enough for me and used it ;)

TF frequently force the rebuild of the everything. So for me it wouldn't have helped.


Yeah this is what I mentioned above

apparently they do this to avoid build dependence on the timestamp of the file (and therefore loss in hermeticness/caching)


Looking through the built-in formatting more, I wonder if this could instead be used for built-in command output rather than manually formatting the output. The crux of Docker's `table` template function is "text/tabwriter" which uses elastic tabstops, so even paginated results should align properly. I'm interested in taking a crack at this if there's interest in accepting it. At the minimum, I think making it available for `gh api --template` would be a good start, and whether to adopt it for built-in commands could be a separate discussion. You could combine that with your existing `color` functions, though it seems you'll need to add a couple more color options to match what you use currently for built-in command colored output.


@heaths I'd be interested in having a table template function!

If our templating support gets full-featured enough, we could theoretically switch built-in output to the template approach. That would also serve as a starting template for someone who would like to tweak the output in their own scripts. But for now, I'd propose expanding `--template` functionality first, then exploring if built-in commands can switch to it separately.


To give you an update: this is not an issue with PnP PowerShell but has to do with how SharePoint Online handles authorization. We provided Microsoft with this feedback and are waiting for them to reply on it. We have no ETA when that will happen.


I am +1 on these ideas but defer to @mislav on the details as he is the one who's been thinking most about programmatic output like this.


@heaths You are welcome to send a PR adding a `table` helper. I'm interested in how it will work 👍


I'll try to take a look this weekend. I need to play around with things a little (probably just a scratch program) to see if `{{with pipeline}}` will work since your GraphQL results typically have the juicy bits nested lower. Using Docker's `table` as a pattern, it only wants leaf nodes and seems to expect strings. If `{{with}}` doesn't work, may need to tweak this `table` function a little more to handle nesting, but I don't foresee a problem.


After playing around with a few options last night, I think this might be better served by a PR to the text/template package itself. Docker's "function" is really just a hack: if the template starts with "table" (or a couple others like "raw"), that prefix is stripped from the template and it does some simple string transforms on the remaining pipeline. It works well when your output is already an array, but if you're array is arbitrarily nested (like a GraphQL query might often end up), it wouldn't work. Even if we scanned the string for any occurrence of "table" (or similar), there's no obvious end. The `text/template/parse.Tree` that is compiled is where the change really needs to happen. I can also make it work with 2 templates, but it seems like an even bigger hack and not very user-friendly to have two arguments for a table, like `--template '{{with .Nodes}}{{template "table"}}{{end}}` then, if you use a table, `--template-table '{{range .}}{{.Id}}{{"\t"}}{{.Name}}{{end}}'`.

For now, let me see if there's any interest in a change to the text/template package. I think it could be an all-around useful addition.


Thanks for exploring all this! I have little faith that the proposal to `text/template` will be accepted, since I think you will be told to just implement this programmatically (either via custom helper function or nested templates), but even if it doesn't get into Go, I think we can just invent some approach ourselves. For example:

gotemplate
{{range .}}{{ tableRow .number .title .author }}{{end}}
{{tableRender}}


I've been considering some similar approaches under the assumption it won't be accepted because it actually emits formatted text, which seems out of scope.

One idea was similar to what you suggested, but the problem is that you can't pass fields to functions if, for example, you wanted to color text. Maybe some was to do that would be more acceptable, like inline pipelines via syntax like (partial) `{{tableRow (.I'd | color "green")}}`.

If not even that, I've been thinking that we could pre-parse the template and, like Docker CLI, manipulate it to make another named template internally. I'll continue to play around with this in my scratch program.


Well...I'm shocked. Apparently parenthesis already work. While perusing through the text/template/parse code and making a few preliminary changes to support my proposal, I failed to see how parsed parenthesis were used.

This commit shows my idea above already works:

image

I'll proceed with this course of action, but would also like to add a couple more helper functions that I think will also help in the future if we wanted to replace the built-in formatting with this new set of functions, e.g. `truncate`, though I think I might reverse the `uint` and `string` params so you can do either `{{truncate 30 .Title | color "green"}}` or `{{.Title | truncate 30 | color "green"}}`.


After further consideration I propose support for multiple tables, which could be beneficial down the road. Effectively, this:

`{{table}}{{range .Books}}{{row (.Title | truncate 30 | green) .ISBN13}}{{end}}{{endTable}}`

We could use `{{tableRow}}` as well, but with `{{table}}` I figured it would be fairly obvious and slightly prefer brevity over specificity in a rather limited scope like this.

`{{table}}` would set the current table for subsequent `{{row}}` calls, while `{{endTable}}` would flush the current table an nilify it.


@ioslh I'm trying to get eslint to be able to ensure ".js" extensions are never forgotten
any thumbs up or help in trying to make my PR be accepted would be appreciated:
 URL


@heaths Looks pretty good! I think you're definitely on to something here.

Does `text/tabwriter` work when the lines passed in contain ANSI escape sequences? I would have guessed that it doesn't recognize these escape sequences as non-printable and that they can mess up horizontal alignment.


C-style escape sequences within the text won't be interpreted, but literal escapes will. While the web forms appear to prevent this (or at least make it harder), I was able to add an issue with literal escapes in both the title and text. Seems I'll have to create a replacer that perhaps JS-encodes all but `\ux1b` used for vterm sequences.


Actually, looks like this shouldn't be a problem:

bash
$ gh api graphql -f query='query {
 repository(name: "templ", owner: "heaths") {
 issue(number: 1) {
 number
 title
 bodyText
 }
 }
}'

json
{
 "data": {
 "repository": {
 "issue": {
 "number": 1,
 "title": "Title:\u0008 with escape",
 "bodyText": "This\tbody has\nescape sequences"
 }
 }
 }
}


Posting in case I can help save someone a few hours of their time, it looks like this polyfill behaviour of Storybook breaks `promise.resolve` in Native Module contexts too.

Example in a native Android module

kotlin
@ReactMethod
fun multiply(a: Int, b: Int, promise: Promise) {
 promise.resolve(a * b)
}

Importing any part of Storybook in a project breaks the above example (the promise is never resolved on the RN/JS side), e.g.

javascript
import {getStorybookUI} from '@storybook/react-native';
getStorybookUI({});

// The following will now never resolve (but did work prior to the inclusion of Storybook)
AwesomeModule.multiply(3,7).then(...); // or
(async () => { const res = await AwesomeModule.multiply(3,7); ... })();

MVP repo with screenshots, basic example bootstrapped using `react-native init` & `create-react-native-library`

Have tried the potential fixes mentioned in this thread, but currently I've been unsuccessful in figuring a way around the issue.


@4lun thanks for providing information and examples.

I will try out your example and see what comes up. In my projects I don't have issues with promises so I'm sure there is a way around this.


Working on some tests and docs, but a preview of using a table template for `gh issues list`:

bash
bin/gh issue list --json number,title,labels,updatedAt --template '{{table}}{{range .}}{{row (.number | printf "#%v" | color "green") (.title | ellipsis 50) (.labels | pluck "name" | join ", " | printf "(%s)" | color "gray") (timeago .updatedAt | color "gray")}}{{end}}{{endTable}}'

image


@4lun I've experimented a bit and the promise not returning only happens if you run the `getStorybookUI({})` function call.
I'm still investigating so I can't offer a proper solution and instead just some insight.

In some cases you can get around this by not calling this function in the top of your app.tsx and instead have a function that will set up the UI when you need it.
like `const getSBUI = () => getStorybookUI({asyncStorage: null});`
then you can do something like

 if (showSB) {
 const SBUI = getSBUI();
 return ;
 }

It's kind of a workaround for the case where you want to have storybook optionally render without it breaking other things in the app.

I realise it's not exactly the solution to your problem however it does make it possible to include storybook along side other react native code without breaking things when storybook isn't rendered.

Also it does confirm it's not the @react-native/storybook import. I'm still going to investigate further and see if I can find which line in the getStorybookUI function is causing this.

My theory on this is still that the polyfill issue comes from the storybook client api (found in the web storybook repo) which uses polyfills etc. I'm fairly confident in this because I've tried removing all polyfills from react-native storybook and it made no difference.


@4lun So I actually ended up finding what I think is the cause of the problem.

If you open up
node_modules/@storybook/addons/dist/index.js

and comment out line 11 `//require("core-js/modules/es.promise");` like this then it starts working.


Thanks @dannyhw, I've ended up doing something similar to your suggestion, wrapping up all references to Storybook and conditionally loading it via an env flag.

The native module I'm working on shouldn't ever be utilised a storybook context so this works quite well for the time being.


hi there,

could the survey (forms) be provided with an edit(orange)/public(green) button (i.e. a button that changes color and function by click). when the button is set to edit, the edit option for groups or nextcloud-user or a public-edit-link appears. and when the button is clicked to public, the edit-group/nextcloud-user/public-edit-link is blocked and can only be edited by the creator of the survey (forms)?

or all people added as editors to the survey (forms) can click the edit/public button to 'lock' or 'unlock' the survey?

thx for your work, i like this project <3


Same problem. I've edited the logging strategy as-is to make it work :

 filename: /data/homeserver.log


Logging to `/homeserver.log` by default doesn't seem ideal regardless. I'm not 100% sure where we should put the log file by default (I don't know what the standard practice for docker containers are), but I think we'd be happy to have a PR to change the defaults. We probably do want to make sure that any changes here are backwards compatible? I.e. we don't change the location for existing deployments?


@erikjohnston Why don't you put it under `/data` (like all other persisted files)


@erikjohnston I think standard practice would be to only log to `console` since containers are ephemeral. Or if file logging is desired, log files would be written to an attached volume that was explicitly configured.

Correct me if I'm wrong, but backward compatibility shouldn't be affected since running in "on-the-fly `generate` mode" is no longer supported. So any existing deployments should have a working `handlers.file.filename` configuration that doesn't change when upgrading Synapse.

I ran Synapse for the first time a couple of days ago and from reading the docs, I was under the impression that running Synapse as container would be done by running in "generate mode" only. So I tripped over the following:

 URL

So it's more about the first-time experience when initially generating the logger config. Typically when running Synapse as a container, the `synapse` user has write access to data and Synapse is also aware of that folder during `generate`:

 URL

So I think we have two options:

1. `log_file = self.abspath(environ.get("SYNAPSE_DATA_DIR", "/data") + "/homeserver.log")`
2. Prevent the creation of an empty logging file, even if `file` logging is disabled and disable `file` logging by default

I like 1) more.


I would also expect logging to be directed to stdout by default, as people generally rely on Docker's logging system rather than inspecting files in mounts.


A PR was created on the main storybook repository with a fix for future version of storybook. This means that this issue will be resolved in 6.0 of react native storybook. The PR enables provides a modern version of the distributed files, in your project you would add the following config `resolverMainFields:['sbmodern', 'main']` and the storybook dependencies used would be without polyfils.


Right now I'm working on a fork of our dependency Bolts-Objc with SPM support. Once that works, I'll see if I can do the same to the SDK.

I can't give you an estimate on completion, sorry.


I'm going to peer out from behind my dunce's cap here and admit this one has me stumped. I'm new to docker and even newer to Matrix Synapse but I wanted to set up a small homeserver. At this stage of my knowledge, if the instructions don't explicitly work then I'm in a fix.

I usually drop into the containers (?) via an interactive shelll and tinker but I can't do that from here.

Sorry to be so ignorant, but how do I get into a docker container thing to make these changes? Or is there some other way I can fire Synapse up without going through all that rigmarole?


In the android library source code, I had modified a bit on the solution suggested by @peasfarmer in order to fix the mirroring on front camera

// Listen for picture being taken
 pictureImageReader.setOnImageAvailableListener(
 reader -> {
 try (Image image = reader.acquireLatestImage()) {
 ByteBuffer buffer = image.getPlanes()[0].getBuffer();

//Add this line.
 if (isFrontFacing) {
 byte[] buf2 = new byte[buffer.remaining()];
 buffer.get(buf2);
 Bitmap bitmap = BitmapFactory.decodeByteArray(buf2, 0, buf2.length);
 Matrix m = new Matrix();
 m.preScale(1, -1);
 m.postRotate(270);
 Bitmap dst = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), m, true);
 dst.setDensity(DisplayMetrics.DENSITY_DEFAULT);
 ByteArrayOutputStream stream = new ByteArrayOutputStream();
 dst.compress(Bitmap.CompressFormat.JPEG, 100, stream);
 buffer = ByteBuffer.wrap(stream.toByteArray());
 }

 writeToFile(buffer, file);
 pictureCaptureRequest.finish(file.getAbsolutePath());
 } catch (IOException e) {
 pictureCaptureRequest.error("IOError", "Failed saving image", null);
 }
 },
 null);


In the android library source code, I had modified a bit on the solution suggested by @peasfarmer in order to fix the mirroring.

// Listen for picture being taken
 pictureImageReader.setOnImageAvailableListener(
 reader -> {
 try (Image image = reader.acquireLatestImage()) {
 ByteBuffer buffer = image.getPlanes()[0].getBuffer();

//Add this line.
 if (isFrontFacing) {
 byte[] buf2 = new byte[buffer.remaining()];
 buffer.get(buf2);
 Bitmap bitmap = BitmapFactory.decodeByteArray(buf2, 0, buf2.length);
 Matrix m = new Matrix();
 m.preScale(1, -1);
 m.postRotate(270);
 Bitmap dst = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), m, true);
 dst.setDensity(DisplayMetrics.DENSITY_DEFAULT);
 ByteArrayOutputStream stream = new ByteArrayOutputStream();
 dst.compress(Bitmap.CompressFormat.JPEG, 100, stream);
 buffer = ByteBuffer.wrap(stream.toByteArray());
 }

 writeToFile(buffer, file);
 pictureCaptureRequest.finish(file.getAbsolutePath());
 } catch (IOException e) {
 pictureCaptureRequest.error("IOError", "Failed saving image", null);
 }
 },
 null);


This currently breaks the installation of anyone trying to install Synapse the first time using Docker, could you please change the default to `/data/homeserver.log` until you have decided on a better approach?

This issue really requires a quick fix as the Synapse Docker guide currently does not work due to this problem.


Yep, I just went through the installation today and ran into this problem. I just disabled file logging completely since Docker catches the console output.


Haven't tested again but this also crashed my container because despite file logging disabled, an empty log file was created.


@schnerring i also didn't have luck disabling logs, but my work around was just to change the log file to /dev/null, and reduce the number of backups to 0. Works so far!


I'll add support for it once the underlying Maven Publish and Signing plugins support configuration caching on the Gradle side URL


Hi all I have the same problem.
How can I disable logging.
I am a newbie in docker.


The log settings should be in `/data/SERVERNAME.log.config`. If you copy my log config from my previous comment, it should completely disable logging to a file.


Ok its working thank you.
Is it possible to use the nginx proxy manager container for another lxc containers outside of docker in my local lan


That I don't know, I also don't think it's appropriate to discuss this here.


I've got a PR open against Bolts that adds SPM support.

Started looking at this library today.


I'm very confused. I thought this *was* the default, per URL


ok I see. The problem is that the `file` handler is being created even though it's not enabled.

This seems to have been introduced by #9162, which landed in Synapse 1.33.0.


@schnerring wrote:

This appears to be incorrect - or if it's correct, it's a different problem to what everybody else is talking about. When running with `docker run matrixdotorg/synapse:latest generated`, the log config is generated by `docker/start.py`, not Synapse itself.


No updates yet apart from some of us hacking around on our spare time to get LibCST onto a peg parser. I'll update here as soon as work starts on this in earnest. I'm hoping for good news in a month or so.


I tested it with `-WebLogin` and it indeed worked, thank you for that workaround. My environment is Windows, PnP.PowerShell 1.5.0.


This thread was closed? The bug is still active. With -interactive or using an Azure AD registered application with full control of sites and read/write of user profiles the error still exists.


Bot closed this issue due to inactivity, have opened it. The best option now would be to contact MS support and explain the case to them.


Right. Which they will point back to this thread as its a community driven module and not maintained by Microsoft. I'll probably fall back to the old Sharepoint module and hope PnP gets updated as a work around.


You can do a minimal CSOM code and use the same access token for the support case. The underlying code is all CSOM C#. Unfortunately we have no clue if and when it will be fixed at all. Other cmdlets work perfectly fine with this auth flow but somehow this particular one doesn’t.


@wimp777 and as mentioned above the workaround for Azure AD registered application is to use Granting access using SharePoint App-Only, which works if you also add the scope ** URL to those instructions. I know it's not the same as Azure AD registered but it's close and it works.


As @erwinvanhunen mentioned earlier in this thread, this isn't an issue with PowerShell PnP but dependant on MSFT's actions.


@peasfarmer your answer is good solves the issue but the image is rotated 90 degrees in some devices


I can reproduce when entering to other page then go back. I believe it's same root cause.


@maxgolov Thanks for posting this, I am seeing the same. Do you know which version of VSCommunity and Build Tools *doesn't* have this issue? On my local computer, I have VSCommunity 16.9.0 with

$ vcpkg list
grpc:x86-windows 1.33.1#2
protobuf:x64-windows 3.14.0#1
protobuf:x86-windows 3.14.0#1

and everything compiles fine, but I have a Docker image where I am using 16.9.0 from chocolatey

# Install Visual Studio, BuildTools, and compiler (CL.exe)
RUN choco install visualstudio2019buildtools --version=16.9.0 -y
# You need this one with you want CL.exe to exist
RUN choco install visualstudio2019-workload-universalbuildtools -y --package-parameters "--includeOptional" --confirm
RUN choco install visualstudio2019community --version=16.9.0 -y

with gRPC and Protobuf versions

grpc:x64-windows 1.37.0#2 An RPC library and framework
grpc[codegen]:x64-windows Build code generator machinery
protobuf:x64-windows 3.15.8#1 Protocol Buffers - Google's data interchange format

and I still see this error in my Docker build image, even with 16.9.0


FWIW I changed my CXX flags to user c++17 instead of c++latest and I was able to get around this issue w/ Protobuf and MSBuild (in case this helps anyone in the future) - only c++latest gives this problem. I also did not need to downgrade MSbuild/VSCommunity as long as I changed those CXX flags (in my case, in CMake triggering MSBuild).


@netpoetica - bug report repro steps indicate that: `make sure the language set to C++20, -std:c++latest`. You can avoid the issue by setting compiler flag to earlier language standard. For some projects it is impractical or impossible, esp. if projects actually need the new C++20 language features.

Since you are using `vcpkg` - you may workaround the issue by using `vcpkg` overlay to apply the patch. Take the contents from here: URL , then point `vcpkg` to custom location of the patched package as follows: `vcpkg install --overlay-ports=X:\path\to\patched\protobuf protobuf` .. I have submitted the proposed patch to `vcpkg`, but unsure how long it'd take to merge.


For real though, if they announce that Objective-C imports will soon just work with SPM at WWDC this week... I'm gonna scream so loud.


It's a bug of XeTeX engine:
 URL
 URL
We don't need to fix it here.


Maybe not an option for everyone but there is a rebuild of the Parse API for iOS in Swift: URL


@shakuzen I have an idea how to address this issue and curious what you think about it.

So it is not possible to register several metrics with the same name in prometheus' `io.prometheus.client.CollectorRegistry` indeed as you mentioned before.
it checks if the name is already registered

java
 public void register(Collector m) {
 List names = collectorNames(m);
 synchronized (namesCollectorsLock) {
 for (String name : names) {
 if (namesToCollectors.containsKey(name)) {
 throw new IllegalArgumentException("Collector already registered that provides name: " + name);
 }
 }
 for (String name : names) {
 namesToCollectors.put(name, m);
 }
 collectorsToNames.put(m, names);
 }
 }

So it is not possible to register multiple collectors with the same metric name but why not to change the collector then?
The main goal of a collector is to return a list of samples

java
 @Override
 public List collect() {
 /// ...
 }

each sample has label keys and values, so it is possible to modify the collector to support dynamic label keys and values.
Currently it takes the keys in the constructor

My idea is not to store label keys in the collector and instead add them dynamically with label values like it does now.

So I've built simple PoC to verify if it makes sense, I didn't want to fork the micrometer repo and created mine.
I copied `MeterCollector` and `PrometheusMeterRegistry`, made some small changes in them and wrote simple tests to verify if it works.

The repo URL
My new collector that stores label keys and values dynamically URL

Prometheus output looks like this

# HELP counter_total
# TYPE counter_total counter
counter_total{type="success",version="1",} 1.0
counter_total{code="500",type="error",version="1",} 1.0

let me know what you think about it, if there are any issues I've missed, and if this idea makes sense to you.


Since as yet there is no `@storybook/react-native@6`, I've found a more elegant workaround.

The below example lazy-loads Storybook. Convenient both to avoid polyfill downgrades as well as tree-shaking the code out of production builds.

typescript
import React, { ReactNode, useEffect, useState } from 'react'

export function StorybookScreen() {
 const [storybookUI, setStorybookUI] = useState (null)

 useEffect(() => {
 if (!__DEV__) return
 // eslint-disable-next-line @typescript-eslint/no-var-requires
 const { StorybookUI } = require('../../storybook')
 setStorybookUI( )
 }, [setStorybookUI])

 return <>{storybookUI}
}


Hello, I tried to run it using :
- Yup 0.32.8
- Typescript 4.2.3
And it worked, no `| undefined` added to the expected type.

Minimal runnable example here : URL

It seems to have broken between the 0.32.8 and the 0.32.9, but I have no idea of the modification that could have caused this type bug.


This has since been resolved with the property **cache-items**.

 URL

Closing this as resolved.

If you have any questions, please reach out to us in our Discord community.


Unfortunately the SharePoint Online support engineers are not always 100% up to date about the limitations of their own products... :-( In this case the issue lies with the fact that a requested permission through an Azure AD application grant is not being recognized by SharePoint online specifically when it comes to the UPS (User Profile Service Application). With -UseWebLogin we use a different type of authentication (cookiebased/legacy) where as with all the other authentication methods we use the currently by Microsoft promoted way of authentication : Azure AD OAuth. We switched over to Azure AD OAuth as the default as more and more API requests we need to make are located in the Microsoft Graph. And the MS Graph only supports Azure AD OAuth.

In order for the OAuth authentication flow to work one needs to grant permissions to an Azure AD App registration, either a multi-tenant one alike the PnP Management Shell, or your own registered one. Our tests show that while the correct permissions are in place, SPO is not allowing the user to perform the actions. We brought this up with the product manager in charge of those APIs back then but are still awaiting feedback.


Please share your case number so I can look into this. Either here or send it to me privately.


25392520

Avel Pinales
Senior Consultant
P 216.359.7866 | E ***@***.******@***.***>

***@***.***D761D1.DF053AC0]
Sent: Tuesday, June 15, 2021 10:29 AM
To: pnp/powershell ***@***.***>
Cc: Pinales, Avel ; Comment ***@***.***>
Subject: Re: [pnp/powershell] [BUG] Set-PnPUserProfileProperty : Access denied. You do not have permission to perform (#277)

@veronicageek< URL I opened a case with Microsoft and escalated this with their SharePoint Online engineers for this issue. I was told that this is not an issue on their end and that the issue is with the module itself.

Please share your case number so I can look into this. Either here or send it to me privately.

-
You are receiving this because you commented.
Reply to this email directly, view it on GitHub< URL or unsubscribe< URL

________________________________
Important Notice: This email message and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the named addressee, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Core BTS. Core BTS specifically disclaims liability for any damage caused by any virus transmitted by this email.


With cache-items, the item still shows up when unselected which is unwanted in a server side rendered options scenario. One way I found out was to use computed property: URL


Thanks for sharing @apinales. Looking into it with the support team.


@apinales Discussed this with the support team. We would very much like to dive into this issue but since your case has been closed two months ago already we would like to ask you to open a new case and have it reference your old case. If you can share the new case number with me, we'll ensure the correct details will be transferred to the engineer who will handle the case.


Thanks for creating the ticket @apinales. I'm already aware of the ticket number, no need to share.


Pulling back to the `--disk_cache` aspect itself...

I find the boring use of a disk cache without any remote caching pretty awesome. It is essentially `ccache` but substantially better and more powerful. I would really love to see some way to bound the size / GC the old entries.

I'll note that GitHub's new, fancy action system has a built-in and very nice way to persist caches from run-to-run for things like CI. Using this in conjunction with the disk cache of Bazel results in a very clean way to have very fast CI builds with very minimal risk of corruption by keeping the cached state extremely small and focused. However, it needs *some* way to GC things.

Currently, for CI I use a terrible hack of manually setting all the `atime`s back by several years for the entire disk cache before running the build, and then deleting any parts of the disk cache whose `atime` isn't updated during the build. This has the rough effect of working even with Linux-style `relatime`. It of course won't work on file systems without `atime` or places like Windows I suspect. Something from Bazel itself would be fantastic.


I'll acknowledge that the observable consequence of our decision here _might_ not even be massive. Maybe it's just "six of one". But, if we can't get on the same page conceptually, that seems like ill portent to me. Cmon, we can do this. :-)

My claim is:

1. Code exists, where SuperFoo.bar(Object) promises to accept null but SubFoo.bar(Object) throws on it.
2. This code is problematic because it violates substitutability.
3. Nevertheless, the most correct and useful application of JSpecify annotations to this code is that SuperFoo's parameter is @Nullable and SubFoo's is not.
4. That is accurate, and also provides information that tools can use to report a problem: "'SubFoo.bar(Object)' parameter #1 should be of type '@Nullable Object', because calls to overridden method 'SuperFoo.bar(Object)' will be permitted to pass 'null'."

I believe the point I am making is simple, and I don't see it being _refuted_ either; however it seems as though each response above keeps branching the conversation hither and thither. (Truth be told, I just wanted to get to say "hither and thither".) Can you help me understand what's going on here? :-) Thanks


I'm going to be thinking about this more today, but as a quick response:

The part of that that sits poorly with me is the phrasing "promises to accept null": Yes, we have a method whose parameter type includes null\[*\], but I'm nervous about describing that as a "promise": The method might do _anything_ when given null, including "throw NullPointerException," just as it might do _anything_ when given `1` or `"foo"` or `Color.RED`. Now, the method should _have some defined behavior_ for those inputs. (Or, alternatively, it could explicitly call the behavior unspecified.) But I see that part of the contract as something to explain in Javadoc.

From this point of view, a definitively _non_-null parameter is a way of saying that the behavior of the method on null inputs is undefined. (Analogy: If a method accepts an `Iterable `, its Javadoc doesn't need to talk about what happens if you manage to cram an `Iterable ` into it.) But if the parameter type can include null, then that isn't a "promise" of anything more than (ideally) to _explain_ what the behavior for that input is.

\[*\]: Again, I think that there may be actual controversy over whether the parameter type _does_ include null. I am with you that it does. But I have forgotten the state of the wider conversation on this, so I say that there may be controversy because that's _not_ how the Checker Framework annotates its JDK.


Correct that "promises to accept" is wrong. I reached for that word only to express that when we're annotating an overridable method, we aren't just making a choice for the method's own body, we're making contract that constrains overriders.


Still trying to understand what position I'm arguing against (i.e., where a 'no' to my proposal means we end up). My confused guess at it is "there's no meaningful difference between 'wrong usage of JSpecify' and 'correct usage that highlights a problem', or we just don't need to care, or trying to care would get us into more trouble than it's worth". Is that even it?


[NOTE: my pushing on this is not proportional to its importance to the project. No urgency per se. It is just that *I* don't feel like my mental model is on solid foundations while it's unresolved.]

The following is NOT an actual argument. I'm just disclosing something that I "hope" will end up being the case in most tools. I don't have a guess how relevant it is here.

Suppose we're retrofitting legacy code, and the below is now in null-marked scope:

interface SuperFoo { void bar(@Nullable Object o); }

class SubFoo implements SuperFoo {
 @Override void bar(/*1*/Object o) { ... }
}

We assume most/all tools want to report a problem at 1. Suppose the user thinks "It's saying this is wrong, and I have to add `@Nullable` to fix it", then when they still get a problem reported in the body, they reason "I'm trying not to change things, just annotate, so I'll suppress this for now."

Result: now *no* problem reported at 2 here:

anyClient(SubFoo subfoo) {
 subfoo.bar(/*2*/somethingNullable);
}

And that had represented a real bug, whereas the problem at 1 was "you are doing something super bogus that *risks* real bugs".

I've hoped that the spec will lead tool vendors to recognize these as two quite different cases (if we must say "levels of badness", okay :-)). Because then it's even *possible* that they will surface them in correspondingly different ways (maybe 1 as warning, 2 as error, or whatever).


occurs again

mysql logs with

2021-06-22T09:45:55.540725+08:00 20334629 [Note] Got an error reading communication packets
2021-06-22T09:46:05.542053+08:00 20334636 [Note] Got an error reading communication packets
2021-06-22T09:46:15.543313+08:00 20334745 [Note] Got an error reading communication packets
2021-06-22T09:46:25.036277+08:00 20334717 [Note] Got timeout reading communication packets
2021-06-22T09:46:25.037289+08:00 20334719 [Note] Got timeout reading communication packets
2021-06-22T09:46:25.047396+08:00 20334741 [Note] Got timeout reading communication packets
2021-06-22T09:46:25.047399+08:00 20334714 [Note] Got timeout reading communication packets
2021-06-22T09:46:25.544400+08:00 20334756 [Note] Got an error reading communication packets
2021-06-22T09:46:31.872522+08:00 20334738 [Note] Bad handshake
2021-06-22T09:46:31.895078+08:00 20334762 [Note] Got an error reading communication packets
2021-06-22T09:46:31.895110+08:00 20334761 [Note] Got an error reading communication packets
2021-06-22T09:46:31.954108+08:00 20334736 [Note] Bad handshake
2021-06-22T09:46:31.954620+08:00 20334727 [Note] Bad handshake
2021-06-22T09:46:31.954912+08:00 20334740 [Note] Bad handshake
2021-06-22T09:46:31.955325+08:00 20334734 [Note] Bad handshake
2021-06-22T09:46:31.955985+08:00 20334737 [Note] Bad handshake
2021-06-22T09:46:31.956544+08:00 20334721 [Note] Bad handshake
2021-06-22T09:46:31.957220+08:00 20334722 [Note] Bad handshake
2021-06-22T09:46:31.957663+08:00 20334739 [Note] Bad handshake
2021-06-22T09:46:31.958200+08:00 20334726 [Note] Got an error reading communication packets
2021-06-22T09:46:31.958597+08:00 20334720 [Note] Bad handshake
2021-06-22T09:46:31.959103+08:00 20334730 [Note] Got an error reading communication packets
2021-06-22T09:46:31.959435+08:00 20334744 [Note] Bad handshake
2021-06-22T09:46:31.959817+08:00 20334723 [Note] Bad handshake
2021-06-22T09:46:31.960346+08:00 20334724 [Note] Bad handshake
2021-06-22T09:46:31.960754+08:00 20334731 [Note] Bad handshake
2021-06-22T09:46:31.961178+08:00 20334743 [Note] Bad handshake
2021-06-22T09:46:31.961742+08:00 20334729 [Note] Bad handshake
2021-06-22T09:46:31.962358+08:00 20334732 [Note] Bad handshake
2021-06-22T09:46:31.962691+08:00 20334725 [Note] Bad handshake
2021-06-22T09:46:31.963022+08:00 20334728 [Note] Bad handshake
2021-06-22T09:46:31.963393+08:00 20334742 [Note] Bad handshake
2021-06-22T09:46:31.963862+08:00 20334735 [Note] Bad handshake
2021-06-22T09:46:31.964187+08:00 20334718 [Note] Got an error reading communication packets
2021-06-22T09:46:31.965984+08:00 20334733 [Note] Bad handshake
2021-06-22T09:46:35.545970+08:00 20334765 [Note] Got an error reading communication packets
2021-06-22T09:46:45.547540+08:00 20334781 [Note] Got an error reading communication packets
2021-06-22T09:46:55.548971+08:00 20334789 [Note] Got an error reading communication packets
2021-06-22T09:47:05.550948+08:00 20334796 [Note] Got an error reading communication packets
2021-06-22T09:47:15.551971+08:00 20334803 [Note] Got an error reading communication packets
2021-06-22T09:47:25.553656+08:00 20334814 [Note] Got an error reading communication packets
2021-06-22T09:47:35.555200+08:00 20334820 [Note] Got an error reading communication packets
2021-06-22T09:47:45.556536+08:00 20334827 [Note] Got an error reading communication packets


I am running into this issue right now. Some updates:

- It was working fine with SharePointPnPPowerShellOnline fine, issue started appearing when we migrated to PnP.PowerShell 1.5.0.
- Raised a case with Microsoft support and they are looking into it.
- Got some updates from them to upgrade to 1.6.0 to see if that resolves the issue. However, it does not. Facing same issue with PnP.PowerShell version 1.6.0
- Tried -UseWebLogin and it does work. -Interactive and -Credentials do not work. However, I can't really use -UseWebLogin since we are running this script from an Azure automation account runbook.
- Re-ran Register-PnPManagementShellAccess and provided global admin consent again, that didn't change outcome.
- I don't get "Access Denied" error text. For me, the error message is : "This operation requires you to be managing your own data or have administrator privileges." I tried this with SharePoint administrator and even a global administrator role role, however outcome is same.


@mohandivraniya can you share your case number so we can bundle it with the one we already have ongoing at the moment for this?

In my repro I'm getting the exact same error message as you. What stumbles me here is that you say it works with SharePointPnPPowerShellOnline. What version of it were you using? How did you connect using that?